/* ============================================
   面影の綴り ― 正木栄一 人生アーカイブ
   ============================================ */
:root {
  --bg: #f7f4ed;
  --bg-deep: #efe9dd;
  --ink: #2b2926;
  --ink-soft: #57534c;
  --accent: #4a5d4a;
  --accent-soft: #8a9a8a;
  --gold: #a5885c;
  --line: #d8d2c4;
  --white: #fdfcf9;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 2;
  letter-spacing: 0.06em;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- ページ遷移フェード ---------- */
#page-veil {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity .55s ease;
}
body.is-leaving #page-veil { opacity: 1; pointer-events: all; }
body.is-entering #page-veil { opacity: 1; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.site-header.is-scrolled {
  background: rgba(247, 244, 237, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 28px;
}
.brand { display: flex; flex-direction: column; line-height: 1.4; }
.brand .brand-title { font-size: 1.05rem; letter-spacing: .18em; font-weight: 600; }
.brand .brand-sub { font-size: .62rem; letter-spacing: .3em; color: var(--ink-soft); font-family: var(--sans); }
.hero-on .site-header:not(.is-scrolled) .brand-title,
.hero-on .site-header:not(.is-scrolled) .brand-sub { color: #f4f1e8; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.global-nav ul { display: flex; gap: 26px; list-style: none; }
.global-nav a {
  font-size: .82rem; letter-spacing: .14em;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 2px 0; position: relative;
}
.global-nav a .en { font-size: .55rem; letter-spacing: .22em; color: var(--gold); font-family: var(--sans); }
.global-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .35s ease;
}
.global-nav a:hover::after, .global-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.hero-on .site-header:not(.is-scrolled) .global-nav a { color: #f4f1e8; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

.nav-toggle { display: none; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  overflow: hidden; display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: heroZoom 14s ease-out forwards;
  filter: sepia(.14) saturate(.92);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,18,14,.72) 0%, rgba(20,18,14,.18) 45%, rgba(20,18,14,.28) 100%);
}
.hero-inner {
  position: relative; z-index: 2; color: #f6f3ea;
  padding: 0 6vw 12vh;
  max-width: 900px;
}
.hero-era { font-family: var(--sans); font-size: .68rem; letter-spacing: .42em; opacity: 0; animation: rise 1.2s ease .5s forwards; }
.hero-title {
  font-size: clamp(2rem, 5.4vw, 3.6rem); font-weight: 600; letter-spacing: .2em;
  line-height: 1.6; margin: 14px 0 10px;
  opacity: 0; animation: rise 1.2s ease .9s forwards;
}
.hero-lead { font-size: clamp(.9rem, 1.6vw, 1.05rem); letter-spacing: .16em; opacity: 0; animation: rise 1.2s ease 1.4s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #f6f3ea; font-family: var(--sans);
  font-size: .58rem; letter-spacing: .34em; text-align: center;
}
.hero-scroll::after {
  content: ""; display: block; width: 1px; height: 44px; margin: 8px auto 0;
  background: linear-gradient(to bottom, #f6f3ea, transparent);
  animation: scrollHint 2s ease infinite;
}
@keyframes scrollHint { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 内部ページヒーロー ---------- */
.page-hero {
  position: relative; height: 46vh; min-height: 320px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.page-hero .hero-bg { animation: heroZoom 10s ease-out forwards; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,18,14,.66), rgba(20,18,14,.22));
}
.page-hero-inner { position: relative; z-index: 2; color: #f6f3ea; padding: 0 6vw 46px; }
.page-hero-inner .en { font-family: var(--sans); font-size: .62rem; letter-spacing: .4em; color: #d9c9a8; }
.page-hero-inner h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); letter-spacing: .24em; font-weight: 600; margin-top: 8px; }

/* ---------- セクション共通 ---------- */
main { overflow: hidden; }
.section { padding: 110px 6vw; }
.section.alt { background: var(--bg-deep); }
.section-inner { max-width: 980px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 64px; }
.section-head .en { font-family: var(--sans); font-size: .62rem; letter-spacing: .44em; color: var(--gold); display: block; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: .28em; font-weight: 600; margin-top: 12px; }
.section-head h2::after {
  content: ""; display: block; width: 46px; height: 1px; background: var(--gold); margin: 22px auto 0;
}
.lead-text { text-align: center; font-size: .98rem; line-height: 2.5; }
.lead-text + .lead-text { margin-top: 1.5em; }

/* ---------- スクロールリビール ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s ease, transform 1s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .15s; }
.reveal-delay-2 { transition-delay: .3s; }
.reveal-delay-3 { transition-delay: .45s; }

/* ---------- インデックス：導入 ---------- */
.intro-name {
  text-align: center; margin-bottom: 40px;
}
.intro-name .kanji { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: .34em; font-weight: 600; }
.intro-name .years { font-family: var(--sans); font-size: .78rem; letter-spacing: .28em; color: var(--ink-soft); margin-top: 10px; }

/* ---------- カードグリッド ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.content-card {
  position: relative; overflow: hidden; background: var(--white);
  border: 1px solid var(--line);
  transition: box-shadow .4s ease, transform .4s ease;
}
.content-card:hover { box-shadow: 0 14px 36px rgba(43,41,38,.14); transform: translateY(-4px); }
.content-card .card-img { height: 230px; overflow: hidden; }
.content-card .card-img > div {
  height: 100%; background-size: cover; background-position: center;
  filter: sepia(.12) saturate(.94);
  transition: transform .8s ease;
}
.content-card:hover .card-img > div { transform: scale(1.06); }
.content-card .card-body { padding: 26px 28px 30px; }
.content-card .en { font-family: var(--sans); font-size: .56rem; letter-spacing: .34em; color: var(--gold); }
.content-card h3 { font-size: 1.1rem; letter-spacing: .2em; margin: 8px 0 10px; font-weight: 600; }
.content-card p { font-size: .85rem; color: var(--ink-soft); line-height: 1.9; }
.content-card .card-more {
  display: inline-block; margin-top: 16px; font-family: var(--sans);
  font-size: .64rem; letter-spacing: .3em; color: var(--accent);
  border-bottom: 1px solid var(--accent-soft); padding-bottom: 3px;
}

/* ---------- 言葉の帯 ---------- */
.quote-band {
  position: relative; padding: 130px 6vw; overflow: hidden;
  background-size: cover; background-position: center;
  background-attachment: fixed;
}
.quote-band::after { content: ""; position: absolute; inset: 0; background: rgba(24,26,22,.62); }
.quote-band .quote-inner { position: relative; z-index: 2; text-align: center; color: #f3efe4; }
.quote-band .quote-text { font-size: clamp(1.15rem, 2.6vw, 1.7rem); letter-spacing: .18em; line-height: 2.2; }
.quote-band .quote-src { margin-top: 26px; font-size: .72rem; letter-spacing: .3em; color: #cbbd9c; font-family: var(--sans); }

/* ---------- 年表 ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 0; }
.timeline::before {
  content: ""; position: absolute; left: 130px; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.tl-item { position: relative; display: flex; gap: 46px; padding: 34px 0; }
.tl-year {
  width: 130px; flex-shrink: 0; text-align: right; padding-right: 34px;
  font-family: var(--sans);
}
.tl-year .west { font-size: 1.06rem; letter-spacing: .1em; color: var(--accent); font-weight: 600; display: block; }
.tl-year .wareki { font-size: .68rem; color: var(--ink-soft); letter-spacing: .14em; }
.tl-item::before {
  content: ""; position: absolute; left: 126.5px; top: 46px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 5px var(--bg);
}
.section.alt .tl-item::before { box-shadow: 0 0 0 5px var(--bg-deep); }
.tl-body h3 { font-size: 1.04rem; letter-spacing: .16em; font-weight: 600; margin-bottom: 8px; }
.tl-body p { font-size: .88rem; color: var(--ink-soft); }
.tl-body .tl-photo { margin-top: 18px; max-width: 430px; border: 1px solid var(--line); }
.tl-body .tl-photo img { filter: sepia(.16) saturate(.9); }
.tl-body .tl-photo figcaption { font-family: var(--sans); font-size: .62rem; letter-spacing: .16em; color: var(--ink-soft); padding: 8px 10px; background: var(--white); }

/* ---------- エッセイ ---------- */
.essay-note {
  max-width: 760px; margin: 0 auto 70px; padding: 26px 30px;
  background: var(--white); border: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-soft); line-height: 2.1;
}
.essay-note strong { color: var(--accent); font-weight: 600; }
.chapter { max-width: 760px; margin: 0 auto 110px; }
.chapter:last-of-type { margin-bottom: 0; }
.chapter-label { text-align: center; font-family: var(--sans); font-size: .6rem; letter-spacing: .44em; color: var(--gold); }
.chapter h2 { text-align: center; font-size: clamp(1.25rem, 2.6vw, 1.65rem); letter-spacing: .22em; font-weight: 600; margin: 12px 0 46px; }
.chapter p { margin-bottom: 1.8em; font-size: .95rem; line-height: 2.4; text-align: justify; }
.chapter .diary-quote {
  margin: 2.4em 0; padding: 30px 34px;
  background: var(--white); border-left: 2px solid var(--gold);
  font-size: .92rem; line-height: 2.4; color: #4c463c;
  box-shadow: 0 3px 18px rgba(43,41,38,.05);
}
.chapter .diary-quote .src { display: block; margin-top: 14px; font-family: var(--sans); font-size: .64rem; letter-spacing: .22em; color: var(--gold); }
.chapter-photo { margin: 46px 0; border: 1px solid var(--line); }
.chapter-photo img { filter: sepia(.14) saturate(.92); }
.chapter-photo figcaption { font-family: var(--sans); font-size: .64rem; letter-spacing: .16em; color: var(--ink-soft); padding: 9px 12px; background: var(--white); }

/* ---------- 短歌 ---------- */
.tanka-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; max-width: 980px; margin: 0 auto; }
.tanka-card {
  background: var(--white); border: 1px solid var(--line);
  padding: 44px 0; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .4s ease;
}
.tanka-card:hover { box-shadow: 0 10px 30px rgba(43,41,38,.1); }
.tanka-card .tanka {
  writing-mode: vertical-rl; font-size: 1.02rem; line-height: 2.6;
  letter-spacing: .3em; height: 100%; max-height: 300px;
}
.tanka-card .season {
  writing-mode: vertical-rl; font-family: var(--sans); font-size: .58rem;
  letter-spacing: .4em; color: var(--gold); margin-left: 18px;
}
.works-photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 980px; margin: 70px auto 0; }
.works-photo-row figure { border: 1px solid var(--line); background: var(--white); }
.works-photo-row img { filter: sepia(.12) saturate(.94); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.works-photo-row figcaption { font-family: var(--sans); font-size: .64rem; letter-spacing: .16em; color: var(--ink-soft); padding: 9px 12px; }

/* ---------- 家族の声 ---------- */
.voice-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
.voice-card {
  background: var(--white); border: 1px solid var(--line);
  padding: 40px 44px;
  position: relative;
}
.voice-card::before {
  content: "“"; position: absolute; top: 6px; left: 20px;
  font-size: 3.4rem; color: var(--gold); opacity: .4; font-family: Georgia, serif;
}
.voice-card .voice-text { font-size: .93rem; line-height: 2.3; }
.voice-card .voice-name { margin-top: 22px; text-align: right; font-size: .8rem; color: var(--ink-soft); letter-spacing: .14em; }
.voice-card .voice-name strong { color: var(--ink); font-size: .9rem; letter-spacing: .18em; }
.photo-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin: 80px auto 0; }
.photo-mosaic figure { border: 1px solid var(--line); background: var(--white); }
.photo-mosaic img { filter: sepia(.16) saturate(.9); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-mosaic figcaption { font-family: var(--sans); font-size: .6rem; letter-spacing: .14em; color: var(--ink-soft); padding: 8px 10px; }

/* ---------- ABOUT ---------- */
.about-block { max-width: 760px; margin: 0 auto 90px; }
.about-block:last-of-type { margin-bottom: 0; }
.about-block h2 { font-size: 1.2rem; letter-spacing: .24em; font-weight: 600; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.about-block h2 .en { font-family: var(--sans); font-size: .56rem; letter-spacing: .34em; color: var(--gold); display: block; margin-bottom: 6px; }
.about-block p { font-size: .92rem; line-height: 2.3; margin-bottom: 1.4em; color: #3d3a34; }
.about-block ul { list-style: none; }
.about-block li {
  font-size: .9rem; line-height: 2.1; padding: 14px 0 14px 26px;
  border-bottom: 1px dashed var(--line); position: relative;
}
.about-block li::before {
  content: ""; position: absolute; left: 4px; top: 26px;
  width: 7px; height: 7px; background: var(--gold);
  transform: rotate(45deg);
}
.about-photo { margin: 40px 0; border: 1px solid var(--line); }
.about-photo img { filter: sepia(.14) saturate(.92); }
.about-photo figcaption { font-family: var(--sans); font-size: .62rem; letter-spacing: .16em; color: var(--ink-soft); padding: 9px 12px; background: var(--white); }

/* ---------- アルバム ---------- */
.album-intro { max-width: 700px; margin: 0 auto 70px; text-align: center; font-size: .95rem; line-height: 2.4; }
.album-group { max-width: 1020px; margin: 0 auto 90px; }
.album-group:last-of-type { margin-bottom: 0; }
.album-group h2 {
  text-align: center; font-size: 1.15rem; letter-spacing: .3em; font-weight: 600; margin-bottom: 10px;
}
.album-group .g-en { text-align: center; font-family: var(--sans); font-size: .58rem; letter-spacing: .4em; color: var(--gold); display: block; margin-bottom: 40px; }
.album-grid { columns: 3; column-gap: 24px; }
.album-item {
  break-inside: avoid; margin-bottom: 24px;
  background: var(--white); border: 1px solid var(--line);
  transition: box-shadow .4s ease;
}
.album-item:hover { box-shadow: 0 12px 32px rgba(43,41,38,.13); }
.album-item img { filter: sepia(.14) saturate(.92); width: 100%; }
.album-item figcaption {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .12em;
  color: var(--ink-soft); padding: 10px 13px; line-height: 1.8;
}

/* ---------- 写真ストリップ（トップの誘い） ---------- */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 980px; margin: 0 auto 40px; }
.photo-strip .ps { overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; }
.photo-strip .ps img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.14) saturate(.92); transition: transform .7s ease; }
.photo-strip .ps:hover img { transform: scale(1.07); }

@media (max-width: 860px) {
  .album-grid { columns: 2; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .album-grid { columns: 1; }
}

/* ---------- ページ末尾ナビ ---------- */
.next-nav { display: flex; justify-content: center; padding: 0 6vw 110px; }
.next-nav a {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 60px; border: 1px solid var(--line); background: var(--white);
  letter-spacing: .22em; font-size: .95rem;
  transition: background .4s ease, color .4s ease;
}
.next-nav a .en { font-family: var(--sans); font-size: .56rem; letter-spacing: .34em; color: var(--gold); }
.next-nav a:hover { background: var(--accent); color: #f4f1e8; }
.next-nav a:hover .en { color: #d9c9a8; }

/* ---------- フッター ---------- */
.site-footer {
  background: #26241f; color: #b9b2a3;
  padding: 70px 6vw 34px; text-align: center;
}
.site-footer .f-title { color: #eae5d8; font-size: 1.05rem; letter-spacing: .3em; }
.site-footer .f-sub { font-family: var(--sans); font-size: .58rem; letter-spacing: .34em; margin-top: 8px; color: #8f887a; }
.site-footer .f-note {
  max-width: 620px; margin: 34px auto 0; font-size: .74rem; line-height: 2.1;
  padding-top: 30px; border-top: 1px solid #3d3a32;
}
.site-footer .f-legal { font-family: var(--sans); font-size: .62rem; margin-top: 30px; line-height: 1.9; color: #77705f; }
.site-footer .f-legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .section { padding: 80px 6vw; }
  .card-grid { grid-template-columns: 1fr; }
  .tanka-grid { grid-template-columns: repeat(2, 1fr); }
  .works-photo-row { grid-template-columns: 1fr; }
  .photo-mosaic { grid-template-columns: 1fr 1fr; }
  .quote-band { background-attachment: scroll; }

  .nav-toggle {
    display: block; z-index: 300; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative;
  }
  .nav-toggle span {
    position: absolute; left: 8px; width: 24px; height: 1.5px;
    background: var(--ink); transition: all .35s ease;
  }
  .hero-on .site-header:not(.is-scrolled) .nav-toggle span { background: #f4f1e8; }
  .nav-toggle span:nth-child(1) { top: 14px; }
  .nav-toggle span:nth-child(2) { top: 21px; }
  .nav-toggle span:nth-child(3) { top: 28px; }
  body.nav-open .nav-toggle span { background: var(--ink); }
  body.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

  .global-nav {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(247,244,237,.97);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .4s ease;
  }
  body.nav-open .global-nav { opacity: 1; pointer-events: all; }
  .global-nav ul { flex-direction: column; gap: 30px; text-align: center; }
  .global-nav a { font-size: 1.05rem; color: var(--ink) !important; text-shadow: none !important; }

  .timeline::before { left: 84px; }
  .tl-year { width: 84px; padding-right: 22px; }
  .tl-item { gap: 28px; }
  .tl-item::before { left: 80.5px; }
}

@media (max-width: 520px) {
  .tanka-grid { grid-template-columns: 1fr; }
  .tanka-card { min-height: 300px; }
  .photo-mosaic { grid-template-columns: 1fr; }
  .voice-card { padding: 32px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
}
