/* ============================================================
   あの日の茅ヶ崎、あしたの茅ヶ崎。— 古写真とエピソード募集
   セクション実装（パターンライブラリの原理を案件へ適用）
   hero-01 / intro-03 / features-02 / gallery-04 /
   features-01 / faq-01 / footer-02
   ------------------------------------------------------------
   読み手の多くが広報紙・掲示板のQRから来る高齢層のため、
   本文は既定より大きく、コントラストを強めに取っている。
   【禁止】左だけの太いボーダー装飾は使わない（base.css 参照）
   ============================================================ */

/* ---- プロトタイプ注記バー（本番では削除）---- */
.protonote {
  background: var(--navy);
  color: #fff;
  padding: 0.7em var(--gutter);
  font-size: var(--fs-small);
  line-height: 1.6;
  text-align: center;
}
.protonote strong { font-weight: 700; }
.protonote-mark { background: var(--amber); color: var(--navy); padding: 0 .35em; font-weight: 700; }
.tbd {
  background: linear-gradient(transparent 62%, var(--amber) 62%);
  padding-bottom: .05em;
}
/* 濃紺の地では下半分だけの帯では文字が沈むので、全面を塗る */
.form .tbd, .site-footer .tbd {
  background: var(--amber);
  color: var(--navy);
  padding: .1em .5em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
/* 「必須」バッジはもともと黄色地なので、重ねて塗らない */
.req.tbd { background: var(--amber); padding: .15em .7em; }

/* ---- 共通 ---- */
.skiplink {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .8em 1.2em; z-index: 100;
}
.skiplink:focus { left: 0; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: .9em 2.2em;
  background: var(--navy); color: #fff;
  font-family: var(--font-sans); font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: .04em;
  transition: background-color var(--dur-quick) var(--ease-out);
}
.btn:hover { background: var(--teal); }
.btn--lg { min-height: 68px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); width: min(100%, 26em); margin-inline: auto; }

.tel { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: .2em; }

/* ============================================================
   hero — hero-01「文字割り」の前後関係に、スクロールの
   ズームインを重ねる。--p（0→1）を JS が更新する
   ============================================================ */
.hero {
  --p: 0;      /* hero 全体の進み（0→1） */
  --pe: 0;     /* 拡大に使う進み。拡大は hero の前半で終わる */
  --pm: 0;     /* 思い出の文の進み（拡大が終わってから 0→1） */
  height: 540svh;   /* 前半で拡大、後半で思い出の文を出す */
  position: relative;
}
.hero__sticky {
  position: sticky; top: 0;
  height: 100svh;
  overflow: clip;
  display: grid;
  place-items: center;
  background: var(--navy);
}
.hero__stage { position: absolute; inset: 0; }
.hero__layer { position: absolute; inset: 0; }
.hero__layer > img { width: 100%; height: 100%; object-fit: cover; }

/* 背景の動画。静止画（img）とまったく同じ位置・寸法に重ねる。
   動画が使えない環境では img がそのまま見える */
.hero__bgvideo,
.hero__bgstill {
  position: absolute;
  z-index: 1;
  object-fit: cover;
  pointer-events: none;
}
/* 動いているあいだは動画、止めたら焼き付けた静止画に入れ替える */
.hero__bgstill { display: none; }
.hero.is-bgstill .hero__bgvideo { display: none; }
.hero.is-bgstill .hero__bgstill { display: block; }
.hero__layer--bg > img { position: absolute; }
/* 写真と手は「背景と同じ座標系に置いた絵」なので、cover でクリップさせない。
   cover は要素の枠で切るため、縦長画面で写真が枠の外へ出ると台紙だけが
   切り取られ、px 配置の canvas との間にズレが出る。位置と寸法は JS が与える */
.hero__layer--photo > img,
.hero__layer--hand > img {
  position: absolute;
  width: auto; height: auto;
  max-width: none;
  object-fit: fill;
}

/* 背景：写真より浅く寄り、同時にぼけていく。前後の速度差が奥行きになる */
.hero__layer--bg {
  z-index: 1;
  transform: scale(calc(1 + var(--pe) * 0.22));
  transform-origin: var(--ph-cx, 49%) var(--ph-cy, 63%);
  filter: blur(calc(var(--pb, 0) * 1px));
  opacity: calc(1 - max(0, var(--pe) - 0.5) * 1.6);
  /* filter を will-change に入れるとレイヤーを持ち続けて重くなるので transform だけ */
  will-change: transform;
  backface-visibility: hidden;
}

/* 背景と写真のあいだの幕。写真へ入っていくあいだ、まわりの景色が静かに沈む */
.hero__veil {
  position: absolute; inset: 0; z-index: 2;
  background: var(--navy);
  opacity: calc(max(0, var(--pe) - 0.2) * 0.85);
  pointer-events: none;
}

/* 古写真：縁ごと拡大していく。中身（canvas）は写真の内側にぴったり重なり、
   スクロールに合わせてコマが進む */
.hero__layer--photo {
  --ph-s: 2.6;
  --ph-fit: 1;
  --ph-bx: 0;
  --ph-by: 0;
  --ph-dx: 0;
  --ph-dy: 0;
  z-index: 3;
  transform-origin: var(--ph-cx, 49%) var(--ph-cy, 63%);
  transform:
    translate(
      calc((var(--ph-bx, 0) + var(--pe) * (var(--ph-dx) - var(--ph-bx, 0))) * 1px),
      calc((var(--ph-by, 0) + var(--pe) * (var(--ph-dy) - var(--ph-by, 0))) * 1px))
    scale(calc(var(--ph-fit) + var(--pe) * (var(--ph-s) - var(--ph-fit))));
  will-change: transform;
  backface-visibility: hidden;
}
.hero__frames {
  position: absolute;
  opacity: 0;
  transition: opacity var(--dur-quick) linear;
}
.hero.is-frames .hero__frames { opacity: 1; }

/* 手：写真と同じ平面にあるので、まったく同じ倍率で一緒に拡大し、
   写真の縁を見せたまま画面の外へ出ていく */
.hero__layer--hand {
  --ph-fit: 1;
  --ph-bx: 0;
  --ph-by: 0;
  z-index: 4;
  transform-origin: var(--ph-cx, 49%) var(--ph-cy, 63%);
  transform:
    translate(
      calc((var(--ph-bx, 0) + var(--pe) * (var(--ph-dx) - var(--ph-bx, 0))) * 1px),
      calc((var(--ph-by, 0) + var(--pe) * (var(--ph-dy) - var(--ph-by, 0))) * 1px))
    scale(calc(var(--ph-fit) + var(--pe) * (var(--ph-s) - var(--ph-fit))));
  opacity: calc(1 - max(0, var(--pe) - 0.6) * 2.6);
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

/* タイトル（SVG）：寄り始めたら静かに退く */
.hero__title {
  position: absolute;
  z-index: 5;
  top: 0; left: 0;              /* 実際の位置は JS が背景画像に合わせて置く */
  width: 26%;
  opacity: calc(1 - var(--pe) * 3.6);
  transform: translateY(calc(var(--pe) * -2rem));
  pointer-events: none;
}
.hero__title h1 { margin: 0; line-height: 0; }
.hero__title img { width: 100%; height: auto; display: block; }
.hero__sub {
  position: absolute;
  z-index: 5;
  top: 0; left: 0;              /* 実際の位置は JS が写真の下に置く */
  text-align: center;
  opacity: calc(1 - var(--pe) * 3.6);
  pointer-events: none;
  font-size: clamp(.6875rem, 1.05vw, .9375rem);
  letter-spacing: .12em;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(4, 26, 48, .75),
    0 2px 14px rgba(4, 26, 48, .6),
    0 6px 34px rgba(4, 26, 48, .45);
  white-space: nowrap;
}
.hero__80th {
  position: absolute;
  z-index: 5;
  top: clamp(1.25rem, 4vh, 2.75rem);
  right: clamp(1.25rem, 3.5vw, 3.5rem);
  /* 新しい80周年ロゴ（円形のカラーロゴ・白フチ付き）。チラシと同じものを使う */
  width: clamp(72px, 7.5vw, 124px);
  opacity: calc(1 - var(--pe) * 4);
  pointer-events: none;
}
.hero__80th img { width: 100%; height: auto; display: block; }

.hero__scroll {
  position: absolute; z-index: 5;
  bottom: var(--sp-4); left: var(--gutter);
  color: #fff;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: .22em;
  text-indent: .22em;      /* 字間のぶん右へ寄るのを戻す */
  text-transform: uppercase;   /* オープニングの SKIP と組み方を揃える */
  text-shadow: 0 1px 3px rgba(4, 26, 48, .7);
  opacity: calc(1 - var(--pe) * 5);
}
.hero__scroll span { display: block; }
/* 下へ促す線。薄い線を敷き、その上を明るい光が繰り返し下りていく */
.hero__scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 3rem;
  margin: .8em 0 0;
  background-color: rgba(255, 255, 255, .3);
  background-image: linear-gradient(to bottom, transparent, #fff 50%, transparent);
  background-repeat: no-repeat;
  background-size: 100% 60%;
  background-position: 0 -60%;
  animation: hero-scroll-run 2.4s var(--ease-inout) infinite;
}
@keyframes hero-scroll-run {
  0%        { background-position: 0 -60%; }
  60%, 100% { background-position: 0 130%; }
}

/* ============================================================
   facts — 募集の要点。最初の画面で用件が伝わることを優先する
   ============================================================ */
/* 文字は左にまとめ、右に古写真を数枚重ねて置く */
.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  column-gap: clamp(2rem, 5vw, 5rem);
  padding: var(--sec-pad) var(--gutter);
  background: var(--paper-warm);
}
.facts__body { min-width: 0; }
.facts__h {
  letter-spacing: .05em;

  font-size: var(--fs-h2); font-weight: 700;
  margin-bottom: var(--sp-5);
}
/* 左の段に収まるよう、3項目は横並びをやめて縦に積む */
.facts__list {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.facts__item { border-top: 2px solid var(--navy); padding-top: var(--sp-2); }
/* 見出しラベル。英字のラベル（.en）と同じ位置づけだが、和文なので
   字間は詰めて、読みやすさを優先する */
.facts__label {
  color: var(--ink-soft);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .12em;
  text-indent: .12em;      /* 字間のぶん右へ寄るのを戻す */
  margin-bottom: var(--sp-1);
}
.nb { white-space: nowrap; }
.facts__item dd strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  line-height: 1.5;
  font-weight: 700;
}
/* 注記が2行になったとき「ありま／す。」のように
   最後の行が1〜2文字だけ残らないようにする */
.facts__note {
  display: block;
  margin-top: .3em;
  font-size: var(--fs-small);
  color: var(--ink-soft);
  word-break: auto-phrase;
  text-wrap: pretty;
}
/* 募集期間の注記が1行増えたぶん、ここで息を入れる */
.facts__who {
  max-width: 40em;
  margin-top: var(--sp-5);
  color: var(--ink-soft);
  word-break: auto-phrase;
}
/* 広い画面だけ、読みの区切りで改行する。
   狭い画面では自然に折り返させる（無理な改行を作らない） */
.br-wide { display: none; }
@media (min-width: 900px) { .br-wide { display: inline; } }
.facts__cta { margin-top: var(--sp-4); }

.intro { padding: var(--sec-pad-lg) 0 var(--sec-pad); }
.intro > :not(.reel) { padding-left: var(--gutter); padding-right: var(--gutter); }

/* HTML の並び（見出し → 本文 → 動画）が狭い画面で上から読む順 */
.intro__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 5vw, 5.5rem);
  align-items: start;
}
.intro__lines {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: var(--sp-4);
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 2.6vw, 2.375rem);
  line-height: 1.7;
  letter-spacing: .06em;
  font-weight: 700;
}
.intro__lines span { display: block; }

.intro__body {
  grid-column: 1;
  grid-row: 2;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
}

.intro__movie {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: clamp(17.5rem, 29vw, 26rem);
}
.intro__screen {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 5px 18px rgba(46, 33, 26, .11);
}
.intro__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s var(--ease-out);
}
.intro__clip.is-active { opacity: 1; }
.intro__body p + p { margin-top: var(--sp-3); }
.intro__last { font-family: var(--font-serif); font-size: var(--fs-h3); text-wrap: balance; word-break: auto-phrase; }

/* ============================================================
   reel — 古写真を映像にした例。縦（4:5＝Instagram のフィード投稿の縦長上限）を
   横一列に流し続ける。
   狭い画面では1本がほぼ画面幅になり、広い画面では複数本が並ぶ。
   中身は img を video に差し替えてもそのまま成立する
   ============================================================ */
.reel {
  --reel-gap: clamp(.75rem, 1.4vw, 1.25rem);
  --reel-w: clamp(215px, 20vw, 340px);
  margin: var(--sp-5) 0 var(--sp-4);
}
.reel__stage { position: relative; }
/* 流れを覗く窓。両端で静かに消えるので、切れ端が唐突に見えない。
   停止ボタンはこの窓の外に置く（中に入れると一緒に薄くなるため） */
.reel__viewport {
  overflow: clip;            /* 流れる分がページ幅を広げないように */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.reel__track {
  display: flex;
  gap: var(--reel-gap);
  width: max-content;
  animation: reel-scroll 64s linear infinite;
}
.reel__group {
  display: flex;
  gap: var(--reel-gap);
}
@keyframes reel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - var(--reel-gap) / 2)); }
}
/* 流れの停止・再開は右端のボタンで行う。
   ホバーで止めると、読もうとして近づいただけで止まり、
   触れる手段のない環境では操作そのものが存在しないことになる */
.reel.is-paused .reel__track { animation-play-state: paused; }

.reel__toggle, .intro__toggle {
  position: absolute;
  z-index: 2;
  top: clamp(.625rem, 1.4vw, 1.25rem);
  right: clamp(.625rem, 1.6vw, 1.5rem);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(46, 33, 26, .22);
  border-radius: 50%;
  background: rgba(250, 250, 248, .82);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease-out),
              border-color var(--dur-quick) var(--ease-out),
              color var(--dur-quick) var(--ease-out);
}
.reel__toggle .material-symbols-outlined, .intro__toggle .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.reel__toggle:hover, .intro__toggle:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.reel__item { width: var(--reel-w); flex: 0 0 auto; }
.reel__item figure { position: relative; }
/* 写真の器。高さはここで決まるので、中身に関係なく6枚とも必ず同じ大きさになる。
   縁を一本入れて、空の淡い写真が地に溶けて小さく見えるのを防ぐ */
.reel__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 5px 18px rgba(46, 33, 26, .11);
}
.reel__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(46, 33, 26, .18);
  pointer-events: none;
}
.reel__item :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 写真そのものがゆっくり動いて「映像」に見える。
     実際のAI映像に差し替えたらこの動きは外す */
  animation: reel-drift 16s var(--ease-inout) infinite alternate;
}
@keyframes reel-drift {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.12) translateY(-1.5%); }
}
.reel__item:nth-child(2) :is(img, video) { animation-delay: -3s; }
.reel__item:nth-child(3) :is(img, video) { animation-delay: -6s; }
.reel__item:nth-child(4) :is(img, video) { animation-delay: -9s; }
.reel__item:nth-child(5) :is(img, video) { animation-delay: -12s; }
.reel__item:nth-child(6) :is(img, video) { animation-delay: -15s; }

.reel__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6em;
  margin-top: .6em;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.reel__place { font-family: var(--font-serif); }
.reel__year { letter-spacing: .1em; }
.reel__note {
  margin-top: var(--sp-3);
  padding: 0 var(--gutter);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}

@media (max-width: 768px) {
  .reel { --reel-w: 74vw; margin: var(--sp-5) 0; }
  .reel__track { animation-duration: 48s; }
}

/* 動きを減らす設定：流れを止め、指で送れる棚にする */
@media (prefers-reduced-motion: reduce) {
  .reel__viewport {
    overflow-x: auto; overflow-y: visible;
    overscroll-behavior-x: contain; padding-bottom: var(--sp-2);
  }
  .reel__track { animation: none; }
  .reel__toggle { display: none; }   /* 流れていないので止めるものがない */
  .reel__item :is(img, video) { animation: none; }
  .reel__group:last-child { display: none; }
}

/* ============================================================
   kinds — features-02「罫線の索引」を詰めた形。写真は持たず、
   広い画面では2列に折り返して縦を短くする
   ============================================================ */
.kinds { padding: var(--sec-pad) 0; background: var(--paper-warm); }
.kinds__head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  padding: 0 var(--gutter) var(--sp-3);
}
.kinds__head .en { color: var(--ink-soft); }
.kinds__head h2 {
  letter-spacing: .05em;
 font-size: var(--fs-h2); font-weight: 700; }

.kinds__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  column-gap: clamp(2rem, 5vw, 5rem);
  padding: 0 var(--gutter);
}
.kinds__row {
  padding: .85em 0;
  border-top: 1px solid var(--line);
}
.kinds__title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.75;
}
.kinds__note {
  max-width: 44em;
  margin: var(--sp-3) var(--gutter) 0;
  color: var(--ink-soft);
  font-size: var(--fs-small);
}

/* ============================================================
   example — gallery-04「重なり」を2セット。2つ目は左右を反転させて
   同じ原理でも顔が変わるようにする。z-index は全レイヤーに明示
   ============================================================ */
.example { padding: var(--sec-pad) 0; }
.example__head {
  display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
  padding: 0 var(--gutter) var(--sp-5);
}
.example__head .en { color: var(--ink-soft); }
.example__head h2 {
  letter-spacing: .05em;
 font-size: var(--fs-h2); font-weight: 700; }
.example__lead { width: 100%; color: var(--ink-soft); }

.example__set {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--sp-3);
  padding: 0 var(--gutter);
}
.example__set + .example__set { margin-top: calc(var(--sp-6) + 2rem); }

/* 応募例は要項どおり1例1枚。写真は広く、その上に文章を重ねる */
.example__photo-main { grid-column: 1 / 11; grid-row: 1; z-index: 1; }
/* 要項の応募例写真は 4:3 に近い。3:2 で切ると市が選んだ構図が上下に切れる */
.example__photo-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.example__photo-small {
  grid-column: 9 / 13; grid-row: 1;
  align-self: start; margin-top: -2.5rem;
  z-index: 2;
}
.example__photo-small img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.example__card {
  grid-column: 6 / 12; grid-row: 2;
  margin-top: -5rem;
  z-index: 3;
  background: var(--paper);
  /* 罫線ではなく影で浮かせる。写真の上に重なる紙に見せる */
  box-shadow: 0 14px 36px rgba(46, 33, 26, .16),
              0 3px 10px rgba(46, 33, 26, .10);
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
}
/* 2セット目：左右を入れ替える */
.example__set--flip .example__photo-main { grid-column: 3 / 13; }
.example__set--flip .example__photo-small { grid-column: 1 / 5; }
.example__set--flip .example__card { grid-column: 2 / 8; }

.example__card .en { color: var(--ink-soft); letter-spacing: .2em; }
.example__card h3 { font-size: var(--fs-h3); font-weight: 700; margin: var(--sp-2) 0 var(--sp-3); }
.example__meta {
  max-width: 44em;
  margin: var(--sp-5) var(--gutter) 0;
  color: var(--ink-soft);
}

/* ============================================================
   ways — features-01「段差」。カード化・影・角丸は使わない
   ============================================================ */
.ways { padding: var(--sec-pad) var(--gutter) calc(var(--sec-pad) + 6rem); }
.ways__head { margin-bottom: var(--sp-5); }
.ways__head .en { color: var(--ink-soft); }
.ways__head h2 {
  letter-spacing: .05em;
 font-size: var(--fs-h2); font-weight: 700; margin: var(--sp-1) 0 var(--sp-2); }
.ways__lead { color: var(--ink-soft); word-break: auto-phrase; }
.ways__grid {
  display: grid;
  /* minmax(0, …) にしないと、word-break: auto-phrase が長い見出しを
     1つの句として扱ったときに列が縮まず、画面からはみ出す */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--sp-4);
}
.ways__item {
  min-width: 0;
  --stagger: 0rem;
  transform: translateY(var(--stagger));
}
/* 上の罫線とアイコンを同じ行に置いて、見出しまわりを詰める。
   アイコンが左端、罫線はその右から段の端まで伸びる */
.ways__rule {
  display: flex;
  align-items: center;
  gap: .5em;
  margin: 0 0 var(--sp-2);
}
.ways__rule::after {
  content: "";
  flex: 1 1 auto;
  border-top: 2px solid var(--navy);
}
/* 本文の行数が段ごとに違うと、ボタンの高さがばらついて落ち着かない。
   3段で行を共有し、アイコン・見出し・本文・ボタンの頭をそれぞれ揃える */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 769px) {
    .ways__grid { grid-template-rows: repeat(4, auto); }
    .ways__item {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span 4;
    }
  }
}
.ways__item:nth-child(2) { --stagger: 3rem; }
.ways__item:nth-child(3) { --stagger: 6rem; }
.ways__icon {
  flex: 0 0 auto;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1;
  color: var(--teal);
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 40;
}
.ways__item h3 { font-size: var(--fs-h3); font-weight: 700; margin-bottom: var(--sp-2); }
.ways__item p { color: var(--ink-soft); max-width: 24em; }
.ways__link { margin-top: var(--sp-3); }

/* ============================================================
   form — このサイトの主役。入力は大きく、迷わせない
   ============================================================ */
.form { padding: var(--sec-pad) var(--gutter); background: var(--navy); color: var(--dark-ink); }
.form__head { max-width: 46em; margin: 0 auto var(--sp-5); }
.form__head .en { color: #9db8d0; }
.form__head h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: .04em; margin: var(--sp-1) 0 var(--sp-3); }
.form__lead { font-size: var(--fs-h3); line-height: 1.9; text-wrap: balance; word-break: auto-phrase; }
.form__lead strong { font-weight: 700; }
.form__tbd { color: var(--navy); display: inline-block; margin-top: var(--sp-3); font-size: var(--fs-small); }

.form__body { max-width: 46em; margin-inline: auto; }
.form__set { border: 0; margin-bottom: var(--sp-5); }
.form__set legend {
  font-size: var(--fs-h3);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--dark-line);
  width: 100%;
}
.field { margin-bottom: var(--sp-4); }
.field__label { display: block; font-weight: 700; font-size: var(--fs-body); margin-bottom: .4em; }
.req {
  display: inline-block;
  margin-left: .6em;
  padding: .15em .7em;
  font-size: var(--fs-small);
  font-weight: 700;
  background: var(--amber);
  color: var(--navy);
}
.field__help { font-size: var(--fs-small); color: #bdd2e4; line-height: 1.8; margin-bottom: .6em; }
.field__help.tbd, .req.tbd { color: var(--navy); }
.field__input, .field__textarea, .field__file {
  width: 100%;
  min-height: 56px;
  padding: .8em 1em;
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border: 1px solid #fff;
}
.field__textarea { min-height: 10em; resize: vertical; }
.field__file { padding: 1em; background: #fff; }

.choices { display: flex; flex-direction: column; gap: .25em; }
.choice {
  display: flex; align-items: flex-start; gap: .8em;
  min-height: 52px; padding: .7em .9em;
  background: rgba(255,255,255,.07);
  cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease-out);
}
.choice:hover { background: rgba(255,255,255,.14); }
.choice input { width: 24px; height: 24px; margin-top: .25em; flex-shrink: 0; accent-color: var(--teal); }
.choice--check + .choice--check { margin-top: .25em; }
.field__error + .choice--check { margin-top: .25em; } /* 同意のチェックの間にエラー文があるとき */
.choice a { text-decoration: underline; text-underline-offset: .2em; }

.form__submit { margin-top: var(--sp-5); text-align: center; }
.form__submit .btn { background: var(--amber); color: var(--navy); }
.form__submit .btn:hover { background: #fff; }
.form__alt { margin-top: var(--sp-3); font-size: var(--fs-small); color: #bdd2e4; text-align: center; }
.form__alt .tel { color: #fff; }

/* ============================================================
   faq — faq-01「番号索引」。height の px→px 遷移で開閉する
   ============================================================ */
.faq { --num-w: clamp(2.25rem, 4.5vw, 3.5rem); padding: var(--sec-pad) var(--gutter); background: var(--paper-warm); }
.faq__head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.faq__head .en { color: var(--ink-soft); }
.faq__head h2 {
  letter-spacing: .05em;
 font-size: var(--fs-h2); font-weight: 700; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__summary {
  display: grid;
  grid-template-columns: var(--num-w) 1fr auto;
  align-items: center;
  column-gap: var(--sp-3);
  width: 100%;
  min-height: 64px;
  padding: var(--sp-3) 0;
  appearance: none; background: none; border: 0;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: color var(--dur-quick) var(--ease-out);
}
.faq__summary:hover { color: var(--teal); }
.faq__num {
  font-family: var(--font-en);
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  letter-spacing: .02em;
}
.faq__q { font-size: var(--fs-h3); font-weight: 700; line-height: 1.7; }
.faq__toggle { position: relative; width: 1.5rem; height: 1.5rem; justify-self: end; }
.faq__bar {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 2px; background: currentColor;
  transform: translate(-50%, -50%);
}
.faq__bar--v {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform var(--dur-quick) var(--ease-out);
}
.faq__item.is-open .faq__bar--v { transform: translate(-50%, -50%) rotate(0deg); }
.faq__a {
  height: 0; overflow: clip; opacity: 0;
  transition: height var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}
.faq__item.is-open .faq__a { height: auto; opacity: 1; }
.faq__a-inner { padding: 0 var(--sp-4) var(--sp-4) var(--num-w); max-width: 46em; }
.faq__a-inner p { color: var(--ink-soft); }

/* ============================================================
   footer — footer-02「索引」。縦罫線は使わず、余白で列を分ける
   ============================================================ */
.site-footer { background: var(--navy); color: var(--dark-ink); padding: var(--sec-pad) var(--gutter) var(--sp-4); }
.site-footer__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5); padding-bottom: var(--sp-5);
}
.site-footer__col { border-top: 1px solid var(--dark-line); padding-top: var(--sp-3); }
/* ブランドの区画は、縦組みのタイトルを中心に置き、説明もその中心に揃える */
.site-footer__col--brand { text-align: center; }
.site-footer__brand { line-height: 0; }
.site-footer__brand img {
  width: min(100%, 132px);
  height: auto;
  display: block;
  margin-inline: auto;
}
/* タイトルに添えるサブコピー。字間を広げて、見出しと区別をつける */
.site-footer__brandsub {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  letter-spacing: .14em;
  text-indent: .14em;      /* 字間のぶん右へ寄るのを戻す */
  color: #9db8d0;
}
.site-footer__col-title { display: block; color: #9db8d0; margin-bottom: var(--sp-2); letter-spacing: .18em; }
.site-footer__addr { font-size: var(--fs-small); line-height: 1.9; }
.site-footer__tel .tel { color: #fff; font-size: var(--fs-h3); }
.site-footer__mail { margin-top: var(--sp-2); font-size: var(--fs-small); word-break: break-all; }
.site-footer__mail a { text-decoration: underline; text-underline-offset: .2em; }
.site-footer__links { display: flex; flex-direction: column; gap: .6em; }
.site-footer__links a { transition: opacity var(--dur-quick) var(--ease-out); }
.site-footer__links a:hover { opacity: .65; }
.site-footer__bottom {
  border-top: 1px solid var(--dark-line);
  padding-top: var(--sp-3);
  font-size: var(--fs-small);
  color: #9db8d0;
}
.site-footer__credit {
  margin-bottom: var(--sp-2);
  line-height: 1.9;
}
.site-footer__credit a { text-decoration: underline; text-underline-offset: .2em; word-break: break-all; }

/* ============================================================
   狭い画面 — 並べ替えではなく「上から読む順」で設計する
   ============================================================ */
@media (max-width: 900px) {
  .intro__head { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .intro__lines, .intro__body, .intro__movie { grid-column: 1; grid-row: auto; }
  .intro__body { max-width: none; }
  .intro__movie { margin-top: var(--sp-5); width: min(80vw, 23rem); }
  .facts__list { grid-template-columns: 1fr; gap: var(--sp-3); }
  /* 狭い画面では日付のまとまりごとに折り返す */
  .ways__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: var(--sp-5); }
  .ways__item { display: block; grid-row: auto; }
  .ways__item:nth-child(2), .ways__item:nth-child(3) { --stagger: 0rem; }
  .ways { padding-bottom: var(--sec-pad); }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .site-footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {

  .hero__sub {
    font-size: .75rem;
    letter-spacing: .04em;
    white-space: normal;
    line-height: 1.9;
    text-shadow:
      0 1px 2px rgba(4, 26, 48, .9),
      0 2px 10px rgba(4, 26, 48, .8),
      0 6px 28px rgba(4, 26, 48, .6);
  }


  /* 重なりを解いて縦に積む。写真→補足写真→説明の順に読ませる */
  .example__set { row-gap: var(--sp-3); }
  .example__photo-main, .example__photo-small, .example__card,
  .example__set--flip .example__photo-main,
  .example__set--flip .example__photo-small,
  .example__set--flip .example__card {
    grid-column: 1 / -1; grid-row: auto; margin-top: 0;
  }
  .example__photo-small img { aspect-ratio: 16 / 9; }
  .example__set + .example__set { margin-top: var(--sp-6); }
  .intro { padding: var(--sec-pad) 0; }
  .intro__lines { font-size: clamp(1.375rem, 5.6vw, 1.875rem); margin-bottom: var(--sp-3); }
  .facts__h { font-size: clamp(1.5rem, 6.4vw, 1.875rem); }
  .facts__lead { font-size: clamp(1.25rem, 5.6vw, 1.625rem); }
  .kinds__list { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .faq__a-inner { padding-right: 0; padding-left: 0; }
  .hero { height: 260svh; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   動きを減らす設定：ズーム演出を止め、静止画として成立させる
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__sticky { position: relative; height: 100svh; }
  .hero__layer--bg { transform: none; filter: none; opacity: 1; }
  .hero__layer--photo, .hero__layer--hand { transform: none; }
  .hero__title, .hero__80th { opacity: 1; transform: none; }
  .hero__veil { display: none; }
  .hero__frames { display: none; }
  .hero__scroll { opacity: 1; }
  .hero__scroll::after { animation: none; background-color: rgba(255, 255, 255, .7); background-image: none; }
  .ways__item, .ways__item:nth-child(2), .ways__item:nth-child(3) { --stagger: 0rem; }
}

/* ============================================================
   出現アニメーション — 画面に入った要素を静かに立ち上げる。
   動かすのは opacity と transform だけ（reflow しない）
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* 動きを減らす設定では、最初から見えている状態にする */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   紙の質感 — 地にごく細かい粒を乗せる。
   タイル状のSVGなので、拡大しても粗くならず容量もほぼゼロ
   ============================================================ */
:root {
  --noise: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'><filter%20id='n'%20color-interpolation-filters='sRGB'><feTurbulence%20type='fractalNoise'%20baseFrequency='0.7'%20numOctaves='3'%20stitchTiles='stitch'/><feColorMatrix%20type='matrix'%20values='1%200%200%200%200%201%200%200%200%200%201%200%200%200%200%200%200%200%200%201'/><feComponentTransfer><feFuncR%20type='linear'%20slope='3.5'%20intercept='-1.25'/><feFuncG%20type='linear'%20slope='3.5'%20intercept='-1.25'/><feFuncB%20type='linear'%20slope='3.5'%20intercept='-1.25'/></feComponentTransfer></filter><rect%20width='180'%20height='180'%20filter='url%28%23n%29'/></svg>");
}
.facts, .intro, .kinds, .example, .ways, .form, .faq, .site-footer {
  position: relative;
  isolation: isolate;
}
.facts::after, .intro::after, .kinds::after, .example::after,
.ways::after, .form::after, .faq::after, .site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--noise);
  background-repeat: repeat;
  background-size: 180px 180px;
}
/* 明るい地は粒を沈ませ、濃紺の地は浮かせる（どちらも“さりげなく”） */
.facts::after, .intro::after, .kinds::after,
.example::after, .ways::after, .faq::after {
  opacity: .06;
  mix-blend-mode: multiply;
}
.form::after, .site-footer::after {
  opacity: .18;
  mix-blend-mode: overlay;
}

/* ------------------------------------------------------------
   エンボス（紙に押した文字）
   文字の上辺に細いハイライトを置いて、わずかに浮き上がらせる。
   本文には掛けない（小さい字がにじむため。高齢層が読む前提）。
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6,
.intro__lines, .faq__q, .req {
  text-shadow: 0 -.05em 0 #fff, 0 .03em .02em rgba(0, 0, 0, .18);
}
/* 濃紺の地・濃紺のボタンは白のハイライトが効かないので、
   下辺に落ち影を置いて同じ「浮き上がり」にする */
.btn,
.form h1, .form h2, .form h3, .form h4, .form h5, .form h6,
.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6 {
  text-shadow: 0 .035em .02em rgba(0, 0, 0, .45);
}

/* ------------------------------------------------------------
   hero のタイトル — オープニングが引いた直後はまだ置かず、
   ひと呼吸おいてから、いまの位置に結像させる。
   スクロール連動の opacity は親（.hero__title / .hero__sub）が持っているので、
   内側の要素で出し入れして干渉させない。
   ------------------------------------------------------------ */
.hero__title h1,
.hero__sub span {
  display: block;
  transition: opacity 1.1s var(--ease-out),
              transform 1.1s var(--ease-out),
              filter 1.1s var(--ease-out);
}
.hero__sub span { display: inline-block; transition-delay: .35s; }
.hero.is-lockup-hold .hero__title h1,
.hero.is-lockup-hold .hero__sub span {
  opacity: 0;
  transform: translateY(10px) scale(1.03);
  filter: blur(5px);
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .hero__title h1, .hero__sub span {
    transition-duration: .3s;
    transition-delay: 0s;
  }
  .hero.is-lockup-hold .hero__title h1,
  .hero.is-lockup-hold .hero__sub span { transform: none; filter: none; }
}

/* ============================================================
   opening — 暗転から映写機が灯り、タイトルが一文字ずつ結像する。
   縦書き4列（右の列から下へ）の読み順で出す。
   ============================================================ */
.opening {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #0f0a06;                 /* 墨に寄せた暗い茶 */
  transition: opacity 1.2s var(--ease-out);
}
html.is-opening { overflow: hidden; }

/* フィルムの粒子。1コマずつ飛ぶので steps() で動かす */
.opening__grain {
  position: absolute;
  inset: -8%;
  background-image: var(--noise);
  background-size: 180px 180px;
  opacity: .26;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: op-grain .95s steps(5) infinite;
}
@keyframes op-grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2.5%, 1.5%); }
  40%  { transform: translate(1.5%, -3%); }
  60%  { transform: translate(-1.5%, -1.5%); }
  80%  { transform: translate(2.5%, 1%); }
  100% { transform: translate(0, 0); }
}

/* 中央の灯りと、周囲に落ちる影 */
.opening__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 48% at 50% 46%, rgba(255, 206, 142, .14), transparent 70%),
    radial-gradient(120% 96% at 50% 50%, transparent 38%, rgba(0, 0, 0, .78) 100%);
  opacity: 0;
  animation: op-lamp 1.7s var(--ease-out) forwards;
}
@keyframes op-lamp { to { opacity: 1; } }

.opening__stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 3vh, 2.25rem);
  padding: var(--gutter);
  /* 電球のゆらぎ。滑らかに変えると現代的になるので段で落とす */
  animation: op-flicker 3.6s steps(1, end) infinite;
}
@keyframes op-flicker {
  0%, 16%, 27%, 46%, 71%, 100% { opacity: 1; }
  9%  { opacity: .93; }
  23% { opacity: .96; }
  63% { opacity: .95; }
}

.opening__title {
  width: clamp(205px, 27vw, 360px);
  height: auto;
  fill: #f7f1e6;
  overflow: visible;
}
.opening__title .ch {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 55%;
  animation: op-ch .85s var(--ease-out) forwards;
  animation-delay: calc(.7s + var(--i) * .125s);
}
@keyframes op-ch {
  from { opacity: 0; filter: blur(6px); transform: translateY(-7px) scale(1.14); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}

.opening__sub {
  margin: 0;
  font-size: var(--fs-micro);
  letter-spacing: .3em;
  text-indent: .3em;                    /* 字間ぶんの右寄りを戻す */
  color: rgba(247, 241, 230, .62);
  opacity: 0;
  animation: op-sub 1.2s var(--ease-out) forwards;
  animation-delay: 3s;
}
@keyframes op-sub { to { opacity: 1; } }

.opening__skip {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  padding: .5em 1.1em;
  border: 1px solid rgba(247, 241, 230, .28);
  background: transparent;
  color: rgba(247, 241, 230, .68);
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  letter-spacing: .18em;
  text-indent: .18em;
  text-transform: uppercase;   /* サイト内の英字ラベル（PERIOD 等）と同じ組み方 */
  cursor: pointer;
  opacity: 0;
  animation: op-sub .8s var(--ease-out) forwards;
  animation-delay: 1.6s;
  transition: color var(--dur-quick) var(--ease-out),
              border-color var(--dur-quick) var(--ease-out);
}
.opening__skip:hover { color: #f7f1e6; border-color: rgba(247, 241, 230, .6); }

/* 退場。灯りが落ちながら、わずかに前へ出て本編へ渡す */
.opening.is-out { opacity: 0; pointer-events: none; }
.opening.is-out .opening__stage {
  transform: scale(1.06);
  transition: transform 1.5s var(--ease-out);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .opening__grain, .opening__stage { animation: none; }
  .opening__vignette { opacity: 1; animation: none; }
  .opening__title .ch { opacity: 1; animation: none; }
  .opening__sub, .opening__skip { opacity: 1; animation: none; }
  .opening.is-out .opening__stage { transform: none; transition: none; }
}

/* ============================================================
   cta-float — 古写真の拡大が終わったところから右下に出る応募の導線。
   応募フォームを読んでいる間は引っ込む（重ねて邪魔をしない）
   ============================================================ */
.hero__end {
  position: absolute;
  bottom: 0; left: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.cta-float {
  position: fixed;
  z-index: 60;
  right: clamp(1rem, 2.2vw, 2rem);
  bottom: clamp(1rem, 3vh, 2rem);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 1em 1.6em;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: .04em;
  text-shadow: 0 .035em .02em rgba(0, 0, 0, .45);
  box-shadow: 0 10px 30px rgba(7, 55, 99, .28);
  /* 出ていないあいだは触れないようにする（見えない当たり判定を残さない） */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .55s var(--ease-out),
              transform .55s var(--ease-out),
              visibility 0s linear .55s,
              background-color var(--dur-quick) var(--ease-out);
}
.cta-float.is-in {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .55s var(--ease-out),
              transform .55s var(--ease-out),
              visibility 0s,
              background-color var(--dur-quick) var(--ease-out);
}
.cta-float:hover { background: var(--teal); }
.cta-float .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

@media (max-width: 480px) {
  .cta-float {
    right: .75rem;
    left: .75rem;
    bottom: .75rem;
    justify-content: center;
    padding: 1em 1.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-float { transition: opacity .2s linear, visibility 0s; transform: none; }
  .cta-float.is-in { transform: none; }
}

/* ------------------------------------------------------------
   notes — 要項「7 応募にあたっての注意事項」を要項の文言のまま掲載する。
   (6) が「前号の使用には…」と前の番号を指すため、番号は意味を持つ。
   ここだけは番号を落とせない
   ------------------------------------------------------------ */
.notes__h {
  margin: var(--sp-4) 0 var(--sp-2);
  font-size: var(--fs-body);
}
.notes {
  margin: 0;
  padding-left: 2.6em;
  font-size: var(--fs-small);
  line-height: 1.9;
  color: rgba(244, 242, 238, .88);
}
.notes li { margin-bottom: .6em; }
.notes li::marker { font-variant-numeric: tabular-nums; }

/* ways の補足（応募のしかたの下に置く一文）。
   .ways 側にすでに画面端の逃げがあるので、ここでは足さない */
.ways__note {
  max-width: 46em;
  margin: var(--sp-5) 0 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.85;
  color: var(--navy);
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* ブランドのマークだけは SVG で置く（Material Symbols にロゴは無い）。
   font-size で大きさが決まる Material のアイコンと見た目を揃える */
.ways__icon--brand {
  display: block;
  line-height: 0;
  flex: 0 0 auto;
}
.ways__icon--brand svg {
  width: .84em;
  height: auto;
  display: block;
  fill: currentColor;
}
/* アカウント名はそのままの綴りで見せる（.line-link の大文字化を打ち消す） */
.line-link--id { text-transform: none; letter-spacing: .06em; }

/* ------------------------------------------------------------
   カード内のボタン。主導線（濃紺の塗り）と区別がつくよう線だけにする
   ------------------------------------------------------------ */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  /* 濃紺の塗りボタン用の落ち影は、明るい地では逆効果なので打ち消す */
  text-shadow: 0 -.05em 0 var(--paper);
}
.btn--outline:hover {
  background: var(--navy);
  color: #fff;
  text-shadow: 0 .035em .02em rgba(0, 0, 0, .45);
}
.btn--sm {
  min-height: 52px;
  padding: .7em 1.3em;
  gap: .5em;
  font-size: var(--fs-small);
}
.btn--sm .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.btn__id { letter-spacing: .02em; }
.ways__link { margin-top: var(--sp-3); }

/* ------------------------------------------------------------
   desk — 窓口の案内。数値・時刻は市公式サイトの記載どおり
   （開庁時間・閉庁日: 茅ヶ崎市役所のページ／5階: 広報シティプロモーション課のページ）
   ------------------------------------------------------------ */
.desk {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: 1.8;
}
.desk__row {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: .4em .8em;
  padding: .55em 0;
}
.desk__row + .desk__row { border-top: 1px solid var(--line); }
.desk dt { color: var(--ink-soft); font-weight: 700; }
.desk dd { margin: 0; }
.desk__note { color: var(--ink-soft); font-size: var(--fs-micro); }

/* ============================================================
   reel__zoom / lightbox — 古写真を押すと大きく見られるようにする
   ============================================================ */
.reel__zoom {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: zoom-in;
  /* 印は普段は出さない。近づいたときだけ静かに現れる */
  opacity: 0;
  transition: opacity var(--dur-quick) var(--ease-out),
              background-color var(--dur-quick) var(--ease-out);
}
.reel__zoom .material-symbols-outlined {
  font-size: 2rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 40;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.reel__zoom:hover,
.reel__zoom:focus-visible {
  opacity: 1;
  background: rgba(15, 10, 6, .32);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
html.is-lightbox { overflow: hidden; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 6, .86);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.lightbox__panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  max-width: min(100%, 1100px);
}
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: var(--sp-2); }
/* 開くときに、暗転→写真がすっと寄ってくる。
   ※ .lightbox__panel には transform を掛けない。掛けると、中にある
     position: fixed の閉じるボタンの基準がパネルになってしまう */
.lightbox__fig,
.lightbox__src {
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.lightbox__src { transition-delay: .07s; }
.lightbox.is-in .lightbox__backdrop,
.lightbox.is-in .lightbox__close { opacity: 1; }
.lightbox.is-in .lightbox__fig,
.lightbox.is-in .lightbox__src { opacity: 1; transform: none; }
.lightbox__img {
  max-width: 100%;
  max-height: min(74vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.lightbox__cap {
  display: flex;
  align-items: baseline;
  gap: 1em;
  color: #f7f1e6;
  font-size: var(--fs-body);
}
.lightbox__place { font-weight: 700; }
.lightbox__year { color: rgba(247, 241, 230, .7); letter-spacing: .1em; }
.lightbox__src {
  margin: 0;
  color: rgba(247, 241, 230, .55);
  font-size: var(--fs-micro);
  letter-spacing: .06em;
}
/* 写真の大きさに左右されないよう、画面の右上に固定する */
.lightbox__close {
  position: fixed;
  z-index: 2;
  top: clamp(.75rem, 2.5vh, 1.75rem);
  right: clamp(.75rem, 2.5vw, 1.75rem);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(247, 241, 230, .35);
  border-radius: 50%;
  background: rgba(15, 10, 6, .55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  color: #f7f1e6;
  cursor: pointer;
  opacity: 0;
  transition: opacity .4s var(--ease-out) .08s,
              background-color var(--dur-quick) var(--ease-out),
              border-color var(--dur-quick) var(--ease-out);
}
.lightbox__close:hover {
  background: rgba(247, 241, 230, .2);
  border-color: rgba(247, 241, 230, .7);
}
.lightbox__close .material-symbols-outlined { font-size: 1.5rem; line-height: 1; }

@media (max-width: 768px) {
  .lightbox__img { max-height: 64vh; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__backdrop, .lightbox__fig, .lightbox__src, .lightbox__close {
    transition-duration: .12s;
    transition-delay: 0s;
  }
  .lightbox__fig, .lightbox__src { transform: none; }
}

/* 触る手段しかない環境ではホバーが無いので、印を薄く出したままにする */
@media (hover: none) {
  .reel__zoom { opacity: .85; }
  .reel__zoom .material-symbols-outlined { font-size: 1.5rem; }
}

/* ------------------------------------------------------------
   facts__photos — 古写真を無造作に重ねた絵。
   紙焼きを机に並べたような見え方にする
   ------------------------------------------------------------ */
.facts__photos {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
}
.facts__photo {
  position: absolute;
  margin: 0;
  width: 64%;
  padding: 2.4%;
  background: #fdfcf9;
  box-shadow: 0 10px 28px rgba(46, 33, 26, .18),
              0 2px 6px rgba(46, 33, 26, .12);
}
.facts__photo img { width: 100%; height: auto; display: block; }
.facts__photo--1 { top: 0;    left: 0;   transform: rotate(-4.5deg); z-index: 1; }
.facts__photo--2 { top: 27%;  left: 33%; transform: rotate(3.2deg);  z-index: 3; }
.facts__photo--3 { top: 56%;  left: 5%;  transform: rotate(-1.5deg); z-index: 2; }

@media (max-width: 900px) {
  .facts { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-5); }
  /* margin-inline: auto はグリッドの引き伸ばしを打ち消す。
     中身が全て絶対配置なので、そうすると幅が0になって消える */
  .facts__photos {
    aspect-ratio: 4 / 3;
    width: min(100%, 34rem);
    justify-self: center;
  }
  .facts__photo { width: 58%; }
  .facts__photo--1 { top: 0;   left: 0;   }
  .facts__photo--2 { top: 20%; left: 38%; }
  .facts__photo--3 { top: 46%; left: 10%; }
}

@media (prefers-reduced-motion: reduce) {
  .facts__photo { transform: none; }
}

/* ============================================================
   sitehead — 募集の要点まで読み進んだら上に出る帯。
   タイトルと80周年ロゴはどちらも白のSVGなので、地は濃紺にする
   ============================================================ */
.facts__top {
  position: absolute;
  top: 0; left: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.sitehead, .headhaze {
  --head-h: clamp(60px, 8.5vh, 84px);
  --h-title: clamp(40px, 6vh, 60px);
  --h-80th: clamp(42px, 6vh, 58px);
}
.sitehead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: var(--head-h);
  padding: 0 var(--gutter);
  background: transparent;
  pointer-events: none;   /* 帯自体は素通し。リンクだけ押せるようにする */
  /* 出ていないあいだは上に隠しておく */
  transform: translateY(-101%);
  visibility: hidden;
  transition: transform .5s var(--ease-out), visibility 0s linear .5s;
}
.sitehead.is-in {
  transform: none;
  visibility: visible;
  transition: transform .5s var(--ease-out), visibility 0s;
}

/* 「かすみ」。色は置かず、後ろをぼかして均すだけ。下へ向かって消えるので帯の輪郭は出ない。
   difference は後ろの色を反転するので、写真のように明暗が入り混じった面だと
   文字の形が崩れる。それを防ぐのが役目。
   ※ .sitehead の中に置くと、中の mix-blend-mode が「背景の切れ目」を作ってしまい
     後ろが見えなくなる。そのため帯の外（兄弟）に置いている */
.headhaze {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 89;
  height: var(--head-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  visibility: hidden;
}
.headhaze.is-in { visibility: visible; }

/* ロゴ1つぶんの丸いかすみ。色は置かず、後ろをぼかして均すだけ。
   縁は放射状に消えるので、丸の輪郭は出ない。
   ※ opacity で出し入れすると、その間ぼかしが無効になる（透明度は
     「背景の切れ目」を作るため）。visibility だけで切り替えている */
.headhaze__spot {
  --pad: clamp(16px, 2.2vh, 28px);
  display: block;
  -webkit-backdrop-filter: blur(16px) saturate(.85);
          backdrop-filter: blur(16px) saturate(.85);
  -webkit-mask-image: radial-gradient(closest-side, #000 38%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 38%, transparent 100%);
  margin: calc(var(--pad) * -1);
}
.headhaze__spot--title {
  width: calc(var(--h-title) * 1.1262 + var(--pad) * 2);
  height: calc(var(--h-title) + var(--pad) * 2);
}

.sitehead__title { display: block; line-height: 0; pointer-events: auto; }
.sitehead__logo { margin: 0; line-height: 0; }
/* ロゴは画像そのものではなく「型抜き」で描く。こうすると色を CSS で決められる。
   後ろが濃紺のセクションのときだけ白に切り替える（JS が .on-dark を付ける）*/
.sitehead { color: var(--ink); transition: color .35s var(--ease-out); }
.sitehead.on-dark { color: #f7f1e6; }
.mark {
  display: block;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;  mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: contain;      mask-size: contain;
}
.mark--title {
  height: var(--h-title);
  aspect-ratio: 228.39 / 202.8;
  -webkit-mask-image: url("../img/kv_title.svg");
          mask-image: url("../img/kv_title.svg");
}
/* 80周年ロゴはカラーなので型抜きにせず、そのまま置く（白フチ付きで、地の明暗を選ばない）*/
.sitehead__logo img {
  height: var(--h-80th);
  width: auto;
  display: block;
  pointer-events: auto;
}

/* 帯の下にページ内リンクの行き先が隠れないようにする */
html { scroll-padding-top: clamp(76px, 10vh, 100px); }

@media (prefers-reduced-motion: reduce) {
  .sitehead { transition: transform .15s linear, visibility 0s; }
}

/* ============================================================
   memo — 古写真が画面いっぱいになったあと、そのまま思い出が語られる。
   スクロール量で1行ずつ現れ、読み終えると次のセクションへ進む
   ============================================================ */
.memo__veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(10, 18, 28, .58);
  opacity: var(--pm, 0);
  pointer-events: none;
}
.memo {
  position: absolute;
  inset: 0;
  z-index: 7;
  margin: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(.9rem, 2.2vh, 1.9rem);
  padding: var(--sec-pad) var(--gutter);
  pointer-events: none;
  text-align: center;
}
/* 手書きの画像を行ごとに置く。実際に万年筆で書いた字なので、
   書体では出せない抑揚とインクだまりが残る */
.memo__line {
  margin: 0;
  width: min(100%, 54rem);
  line-height: 0;
  /* 出ていないあいだは、少し下に沈めてぼかしておく */
  opacity: 0;
  transform: translateY(1.1em);
  filter: blur(4px);
  transition: opacity .8s var(--ease-out),
              transform .8s var(--ease-out),
              filter .8s var(--ease-out);
}
.memo__line.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.memo__line img {
  width: 100%;
  height: auto;
  display: block;
  /* 暗い写真の上に置くので、わずかに影をつけて浮かせる */
  filter: drop-shadow(0 2px 8px rgba(6, 14, 24, .75));
}
/* 3行目は文字数が少なく画像も小さいので、行ごとに幅を合わせる */
.memo__line:nth-child(1) img { width: 100%; }
.memo__line:nth-child(2) img { width: 90.3%; }
.memo__line:nth-child(3) img { width: 84.1%; }
.memo__line:nth-child(4) img { width: 95.9%; }
.memo__line { display: flex; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .memo__veil { opacity: 1; }
  .memo__line { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ============================================================
   募集開始前（html.form-closed）の切り替え。
   公開するときは html から class="form-closed" を外すだけでよい
   ============================================================ */
.when-closed { display: none !important; }
.form-closed .when-closed { display: revert !important; }
.form-closed .when-open { display: none !important; }

/* 「11月2日に公開します」の札。押せるボタンに見えないよう、塗りも枠も付けない */
.soon {
  display: inline-block;
  padding: .9em 0;
  font-weight: 700;
  color: var(--navy);
}
.soon::before {
  content: "";
  display: inline-block;
  vertical-align: .1em;
  margin-right: .6em;
  width: .55em; height: .55em;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(254, 217, 102, .35);
}
.soon--sm { font-size: var(--fs-small); padding: .7em 0; }

/* 「ただいま準備中です」 */
.form-closed .form__head { margin-bottom: var(--sp-3); }
.form__closed {
  max-width: 46em;
  margin-inline: auto;
  line-height: 1.95;
}
.form__closed-h {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: var(--sp-3);
  color: var(--amber);
}
.form__closed p { word-break: auto-phrase; text-wrap: pretty; }

/* 窓口に足したメールアドレスは長いので、狭い段では途中で折り返す。電話番号は途中で折らない */
.desk dd { min-width: 0; }
.desk__mail { color: var(--navy); overflow-wrap: anywhere; }
.desk .tel { white-space: nowrap; }

/* 募集の要点：見出しの下の趣旨の文（チラシ裏面の冒頭の文） */
.facts__h:has(+ .facts__about) { margin-bottom: var(--sp-3); }
.facts__about {
  max-width: 40em;
  margin-bottom: var(--sp-4);
  line-height: 1.95;
  text-wrap: pretty;      /* 最後の行に「す。」だけが残らないようにする */
}

/* 著作権表示（茅ヶ崎市公式サイトの表記にそろえる） */
.site-footer__copy { margin-top: var(--sp-2); }
.site-footer__copy small { font-size: var(--fs-micro); letter-spacing: .04em; }

/* ============================================================
   totop — ページの先頭へ戻る矢印。右下に固定する。
   応募の導線（cta-float）が出ているときは、その上に積む
   ============================================================ */
.totop {
  --totop-raise: 0px;
  position: fixed;
  z-index: 60;
  right: clamp(1rem, 2.2vw, 2rem);
  bottom: calc(clamp(1rem, 3vh, 2rem) + var(--totop-raise));
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  /* 紺色のフッターや応募フォームの上でも丸の形が分かるよう、白い細い縁を付ける */
  border: 1.5px solid rgba(255, 255, 255, .7);
  box-shadow: 0 10px 30px rgba(7, 55, 99, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out),
              bottom .35s var(--ease-out), visibility 0s linear .55s,
              background-color var(--dur-quick) var(--ease-out);
}
.totop.is-in {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out),
              bottom .35s var(--ease-out), visibility 0s,
              background-color var(--dur-quick) var(--ease-out);
}
.totop:hover { background: var(--teal); }
.totop .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
@media (max-width: 480px) {
  .totop { right: .75rem; bottom: calc(.75rem + var(--totop-raise)); width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .totop, .totop.is-in { transform: none; transition: opacity .2s linear, visibility 0s; }
}

/* ============================================================
   応募フォーム — 入力の誤り・確認画面・完了画面（紺の地の上）
   ============================================================ */
/* 機械による送信を見分けるための欄。画面の外に置き、人には見せない */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form__alert {
  margin-bottom: var(--sp-4);
  padding: 1em 1.2em;
  background: #fff;
  color: #a4161a;
  font-weight: 700;
  line-height: 1.8;
}
.form__alert:focus { outline: 3px solid var(--amber); outline-offset: 3px; }
.field__error {
  margin-top: .5em;
  padding: .45em .8em;
  background: #fff;
  color: #a4161a;
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.7;
}
.field__input[aria-invalid="true"],
.field__textarea[aria-invalid="true"],
.field__file[aria-invalid="true"] {
  border: 3px solid #ff8a8a;
}
.field--consent { margin-top: var(--sp-4); margin-bottom: 0; }
.choice--consent { background: rgba(255,255,255,.14); font-weight: 700; }
.choice--consent .req { margin-left: .4em; }

/* 確認画面・完了画面 */
.form__confirm, .form__done { max-width: 46em; margin-inline: auto; }
.form__step-h {
  font-size: var(--fs-h3);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--dark-line);
}
.form__step-h:focus { outline: none; }
.form__step-lead { color: #bdd2e4; margin-bottom: var(--sp-4); }
.confirm__photo { margin-bottom: var(--sp-4); }
.confirm__photo img {
  display: block;
  max-width: min(100%, 26rem);
  max-height: 22rem;
  width: auto;
  height: auto;
  background: #fff;
  padding: 6px;
}
.confirm__file { margin-top: .6em; font-size: var(--fs-small); color: #bdd2e4; word-break: break-all; }
.confirm__list {
  display: grid;
  grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  border-top: 1px solid var(--dark-line);
}
.confirm__list dt, .confirm__list dd {
  padding: .9em 0;
  border-bottom: 1px solid var(--dark-line);
  line-height: 1.8;
}
.confirm__list dt { font-weight: 700; padding-right: 1em; }
.confirm__list dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.confirm__list dd.is-empty { color: #9db8d0; }
.confirm__check { margin-top: var(--sp-4); }
.confirm__check .form__alert { margin: var(--sp-3) 0 0; }
.form__progress { margin-top: var(--sp-3); text-align: center; font-weight: 700; }
.confirm__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.confirm__actions .btn--lg { background: var(--amber); color: var(--navy); }
.confirm__actions .btn--lg:hover { background: #fff; }
.confirm__actions .btn:disabled { opacity: .55; cursor: wait; }
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.75);
  min-height: 52px;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); }

.done__receipt {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .3em 1em;
  margin-bottom: var(--sp-4);
  padding: 1.2em 1.4em;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
}
.done__receipt strong {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.form__done p + p { margin-top: .8em; }
.form__done .tel { color: #fff; }

@media (max-width: 600px) {
  .confirm__list { grid-template-columns: minmax(0, 1fr); }
  .confirm__list dt { border-bottom: 0; padding-bottom: 0; }
  .confirm__list dd { padding-top: .2em; }
}
