/* ==========================================================================
   CHAPTER 04 | FINALE
   Normal scroll only. JS (js/ch04-finale.js) blends each section's background
   as it enters (black → off-white → black) and drives light reveals / parallax.
   ========================================================================== */

/* ── SCENE 01 — SHORT EDITORIAL ───────────────────────────── */
.fe {
  /* --fe-overlap : ブランドムービーの最後（黒へ溶ける区間）に重ねる長さ（画面何枚分）。
                    ムービーが暗くなり始めると同時に、このセクションが下から上がってくる */
  --fe-overlap: 0.3;
  position: relative;
  z-index: 2;
  margin-top: calc(var(--vh-large) * -1 * var(--fe-overlap));
  overflow: hidden;                    /* bleeding photos never widen the page */
  background: var(--c-offwhite);       /* JS: #0b0b0b → #f2f1ed while entering */
  color: var(--c-ink);
  padding: 26vw 0 22vw;
}

.fe__title {
  display: flex;
  flex-direction: column;
  margin: 0 var(--gutter) 15vw;
  font-family: var(--font-display);
  font-weight: 900;
  /* "YOUR STANDARD." (≈8.2em) spans the content width */
  font-size: calc((100vw - 2 * var(--gutter)) / 8.3);
  line-height: .92;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.fe__line {
  display: block;
  white-space: nowrap;
  will-change: transform, opacity;
}

/* Two shots: large on the left (bleeds), small on the right set lower — staggered,
   no overlap, each drifting at its own speed */
.fe__photos {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.fe__shot {
  margin: 0;
  overflow: hidden;
  background: #e3e1dc;
  will-change: transform;
}
.fe__shot img {
  display: block;
  width: 100%;
  height: auto;
}
.fe__shot--a { width: 58vw; }
.fe__shot--b { width: 36vw; margin: 38vw var(--gutter) 0 0; }

.fe__foot {
  margin: 16vw var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.fe__sub {
  margin: 0;
  font: 500 12px/17.6px var(--font-text);     /* line box kept at 17.6px (11px × 1.6) → page height unchanged */
  letter-spacing: .24em;
  color: rgba(20, 20, 19, .7);
  will-change: transform, opacity;
}

/* Text links with a hairline (no rounded / decorative buttons) */
.fe__cta,
.finale__shop {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;                     /* ≥ 44px tap height */
  font: 500 12px/1 var(--font-text);
  letter-spacing: .24em;
  color: inherit;
  will-change: transform, opacity;
}
.fe__cta::after,
.finale__shop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform-origin: 0 50%;
  transition: transform .5s var(--ease-out);
}
.fe__arrow { transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .fe__cta:hover .fe__arrow,
  .finale__shop:hover .fe__arrow { transform: translateX(4px); }
  .fe__cta:hover::after,
  .finale__shop:hover::after { transform: scaleX(.6); }
}

/* ── SCENE 02 — FINALE ───────────────────────────────────── */
.finale {
  position: relative;
  z-index: 2;
  background: var(--c-black);          /* JS: #f2f1ed → #0b0b0b while entering */
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  min-height: var(--vh-small);
}
.finale__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22vw var(--gutter) 18vw;
}
.finale__mark {
  width: 64px;                         /* one-point use of the symbol logo; ratio kept by height:auto */
  height: auto;
  margin-bottom: 40px;
  will-change: transform, opacity;
}
.finale__title {
  display: flex;
  flex-direction: column;
  margin: 0 0 36px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc((100vw - 2 * var(--gutter)) / 5.42);   /* same scale as CHAPTER 01 */
  line-height: .86;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.finale__line {
  display: block;
  white-space: nowrap;
  will-change: transform, opacity;
}
.finale__shop { align-self: flex-start; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 var(--gutter);
  padding: 18px 0 calc(var(--safe-bottom) + 22px);
  border-top: 1px solid rgba(255, 255, 255, .14);
  font: 500 11.5px/10.5px var(--font-text);   /* line box kept at 10.5px */
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .6);
}
.site-footer a {
  padding: 17px 0;                     /* ≥ 44px tap height */
  margin: -17px 0;
  color: rgba(255, 255, 255, .78);
}
.site-footer small { font-size: inherit; }

/* ── Tablet / PC (basic only — full PC design comes later) ── */
@media (min-width: 768px) {
  .fe { padding: 14vw 0 12vw; }
  .fe__title { margin-bottom: 8vw; font-size: calc((100vw - 2 * var(--gutter)) / 11); }
  .fe__shot--a { width: 42vw; margin-left: var(--gutter); }
  .fe__shot--b { width: 26vw; margin-top: 22vw; margin-right: 12vw; }
  .fe__foot { margin-top: 8vw; }
  .finale__inner { padding: 12vw var(--gutter) 10vw; }
  .finale__title { font-size: calc((100vw - 2 * var(--gutter)) / 9); }
}

/* ── Phone landscape only（高さ 500px 以下の横向き・幅 1023px 以下）──────────
   ロゴ・ELEVATE YOUR STANDARD.・SHOP AIVEN・フッターを1画面に収める（余白と大見出しを高さ基準に）。
   PC・モバイル縦・タブレットには影響しない。 */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1023px) {
  .finale__inner { padding: 7vh var(--gutter) 6vh; }
  .finale__mark { margin-bottom: 4.5vh; }
  .finale__title { margin-bottom: 5vh; font-size: min(calc((100vw - 2 * var(--gutter)) / 9), calc(var(--vh-small) * .15)); }
}

/* ── Landscape PC (≥1024px wide, landscape only) ────────────────────────────
   SCENE 01  12列グリッド。大見出しは上段（1〜10列）。階段の写真は左（1〜5列）に画面の高さの約90%で、
             右は階段の写真の上端にそろえて補助文字と EXPLORE COLLECTION（8〜11列）、その下に座った写真を
             小さめに少し下げて（9〜11列）。写真は縦横比のまま。区間は約1.5画面（モバイル・タブレット縦は約2.2）。
   SCENE 02  黒の中央に、シンボルロゴ・ELEVATE YOUR / STANDARD.（2行）・SHOP AIVEN。最小限のフッター。
   見出しなどが固定ヘッダーに届く手前で消える処理と、SCENE 02 との境目を出さない色の追従は
   js/ch04-finale.js（PC のみ）。演出なし表示（.is-static）は対象外。                                */
@media (min-width: 1024px) and (orientation: landscape) {
  .fe:not(.is-static) {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: start;
    padding: 15vh var(--gutter) 12vh;
  }
  .fe:not(.is-static) .fe__title {
    grid-column: 1 / span 10;
    grid-row: 1;
    margin: 0 0 8vh;
    font-size: min(calc((100vw - 2 * var(--gutter)) * .8 / 8.3), 15vh);
  }
  .fe:not(.is-static) .fe__photos { display: contents; }
  .fe:not(.is-static) .fe__shot--a {
    grid-column: 1 / span 5;
    grid-row: 2 / span 2;
    width: min(100%, calc(var(--vh-large) * .9 * 941 / 1672));    /* ≈ 90% of the screen height */
    margin: 0;
  }
  .fe:not(.is-static) .fe__foot {
    grid-column: 8 / span 4;
    grid-row: 2;
    margin: 0 0 9vh;
    gap: 22px;
  }
  .fe:not(.is-static) .fe__shot--b {
    grid-column: 9 / span 3;
    grid-row: 3;
    width: 100%;
    margin: 0;
  }
  .fe:not(.is-static) .fe__sub { font-size: 13px; line-height: 1.6; letter-spacing: .26em; }
  .fe:not(.is-static) .fe__cta { font-size: 13px; letter-spacing: .28em; }

  .finale:not(.is-static) .finale__inner {
    align-items: center;
    text-align: center;
    padding: 14vh var(--gutter) 10vh;
  }
  .finale:not(.is-static) .finale__mark { width: 72px; margin-bottom: 5vh; }
  .finale:not(.is-static) .finale__title {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: .24em;
    margin: 0 0 6vh;
    font-size: min(calc((100vw - 2 * var(--gutter)) / 7.6), 19vh);
  }
  .finale:not(.is-static) .finale__line:nth-child(3) { flex-basis: 100%; }   /* ELEVATE YOUR / STANDARD. */
  .finale:not(.is-static) .finale__shop {
    align-self: center;
    gap: 18px;
    padding: 18px 2px;
    font-size: 14px;
    letter-spacing: .3em;
  }
}

/* ── Reduced motion: no drift, colours already final ─────── */
.fe.is-static .fe__shot,
.fe.is-static [data-rise],
.finale.is-static [data-rise] { transform: none !important; opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  .fe { margin-top: 0; }
}
