/* METROPOL — DROP 001 campaign layer
   Loaded after the page sheet on /home, /drop, /drop/black, /drop/white.
   Everything campaign-scoped lives here so the base system stays untouched:
   boarding preloader · arrival chapter · plate overrides · split-flap ·
   droplist board · lookbook chapters · dusk shift · view transitions.
   Color exists ONLY inside campaign photography — the chrome stays B/W. */

/* ───── BOARDING SEQUENCE (preloader, /home only) ───────── */
.boarding {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--m-ease-io);
}
.boarding.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
html[data-boarded] .boarding { display: none; }
html.is-boarding { overflow: hidden; }
.boarding__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--m-s-4);
}
.boarding__label {
  font-family: var(--m-font-mono);
  font-size: var(--m-text-label); letter-spacing: var(--m-track-wide);
  color: var(--m-fg-muted);
}
.boarding__counter {
  font-family: var(--m-font-mono);
  font-size: clamp(40px, 8vw, 80px); line-height: 1;
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  color: var(--m-fg);
}
.boarding__bar {
  width: min(320px, 60vw); height: 1px;
  background: var(--m-border-subtle); overflow: hidden;
}
.boarding__bar span {
  display: block; width: 0%; height: 100%;
  background: var(--m-fg);
  transition: width 0.2s linear;
}

/* ───── ARRIVAL · meadow blooms from grayscale to dusk ───── */
.arrival { position: relative; height: 260vh; background: #000; }
.arrival__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate;
}
.arrival__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
  /* --arr 0..1 written by dusk.js: grayscale station light → dusk color */
  filter: grayscale(calc(1 - var(--arr, 0)))
          brightness(calc(0.68 + var(--arr, 0) * 0.32))
          contrast(1.05);
  transform: scale(calc(1.08 - var(--arr, 0) * 0.08));
  will-change: filter, transform;
}
.arrival__type {
  position: absolute; inset: 0; z-index: 2; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.16em;
  font-family: var(--m-font-campaign); font-weight: 700;
  font-size: clamp(88px, 19vw, 300px); line-height: 1;
  letter-spacing: 0.01em;
  color: #fff; mix-blend-mode: difference;
  /* rides from the lower meadow up to dead center while the color blooms */
  transform: translateY(calc((1 - var(--arr, 0)) * 28vh));
  pointer-events: none;
}
.arrival__meta {
  position: absolute; z-index: 3;
  font-family: var(--m-font-mono);
  font-size: var(--m-text-label); letter-spacing: var(--m-track-mono);
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
/* announcement strip under the nav: departure line + access jump */
.access-bar {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 9px var(--m-gutter-tight);
  background: #000; border: none;
  border-top: 1px solid var(--m-border);
  border-bottom: 1px solid var(--m-border);
  color: var(--m-fg-muted);
  font-family: var(--m-font-mono);
  font-size: var(--m-text-label); letter-spacing: var(--m-track-label);
  cursor: pointer;
  transition: background var(--m-t-fast), color var(--m-t-fast);
}
.access-bar:hover { background: var(--m-fg); color: var(--m-fg-invert); }
.access-bar__action { color: var(--m-fg); display: inline-flex; gap: 8px; align-items: baseline; }
.access-bar:hover .access-bar__action { color: var(--m-fg-invert); }
.access-bar__arrow { animation: m-nudge 1.6s ease-in-out infinite; display: inline-block; }
@keyframes m-nudge { 50% { transform: translateY(3px); } }
@media (max-width: 600px) {
  .access-bar { padding: 9px var(--m-gutter-mobile); font-size: var(--m-text-micro); }
}
@media (prefers-reduced-motion: reduce) { .access-bar__arrow { animation: none; } }

/* thin inverted progress bar along the bottom of the arrival frame */
.arrival__bar {
  position: absolute; left: 0; bottom: 0; z-index: 4;
  height: 3px; width: calc(var(--arr, 0) * 100%);
  background: #fff; mix-blend-mode: difference;
  pointer-events: none;
}
.arrival__meta--tl { top: 40px; left: var(--m-gutter-tight); }
.arrival__meta--tr { top: 40px; right: var(--m-gutter-tight); }
.arrival__meta--bl { bottom: calc(32px + env(safe-area-inset-bottom, 0px)); left: var(--m-gutter-tight); }
.arrival__meta--br { bottom: calc(32px + env(safe-area-inset-bottom, 0px)); right: var(--m-gutter-tight); }
@media (max-width: 600px) {
  .arrival__meta--tl { left: var(--m-gutter-mobile); }
  .arrival__meta--tr { right: var(--m-gutter-mobile); }
  .arrival__meta--bl { left: var(--m-gutter-mobile); }
  .arrival__meta--br { right: var(--m-gutter-mobile); }
}

/* ───── PLATES — bigger shirts, open-link, hover ─────────── */
.drop__plate .m-plate__subject img { max-width: 96%; max-height: 99%; }
@media (max-width: 600px) {
  /* phones: a notch smaller so the tee never sits on the title row */
  .drop__plate .m-plate__subject img { max-width: 90%; max-height: 90%; }
}

/* shirts grow into place when the section scrolls in
   (animated on the anchor so the img keeps its snappy hover-scale) */
[data-reveal="grow"] .m-plate__open {
  transform: scale(0.55);
  opacity: 0;
  transition: transform 1s var(--m-ease-out), opacity 0.5s linear;
}
[data-reveal="grow"] .drop__plate:nth-child(2) .m-plate__open {
  transition-delay: 0.12s;
}
[data-reveal="grow"].is-inview .m-plate__open {
  transform: none; opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal="grow"] .m-plate__open { transform: none; opacity: 1; transition: none; }
}
.drop__plate .m-plate__credits {
  top: auto; bottom: 76px; transform: none;
  background: rgba(5, 5, 5, 0.88);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.m-plate__open {
  flex: 1; align-self: stretch; min-width: 0;
  display: flex; align-items: center; justify-content: center;
}
.m-plate__open img {
  transition: transform var(--m-t-slow) var(--m-ease-out);
}
.m-plate__open:hover img { transform: scale(1.04); }
.m-plate__hint {
  font-size: var(--m-text-micro); letter-spacing: var(--m-track-label);
}
.m-plate__title-link { color: inherit; text-decoration: none; transition: opacity var(--m-t-fast); }
.m-plate__title-link:hover { opacity: 0.7; }

/* ───── CROSS-DOCUMENT VIEW TRANSITIONS (tee → detail) ───── */
@view-transition { navigation: auto; }
.vt-tee-black { view-transition-name: tee-black; }
.vt-tee-white { view-transition-name: tee-white; }
::view-transition-old(tee-black), ::view-transition-new(tee-black),
::view-transition-old(tee-white), ::view-transition-new(tee-white) {
  width: 100%; height: 100%; object-fit: contain; overflow: hidden;
  animation-duration: 0.45s;
}

/* ───── SPLIT-FLAP (board cells; stepping driven by flap-engine.js) ── */
.flap { display: inline-flex; gap: 1px; font-family: var(--m-font-mono); }
.flap__cell {
  display: inline-block; min-width: 0.68em; text-align: center;
  perspective: 260px;
}
.flap__cell--gap { min-width: 0.35em; }
.flap__cell span { display: block; backface-visibility: hidden; }
.flap__cell.is-flipping span { animation: flap-flip 0.18s ease-in; }
@keyframes flap-flip {
  0%   { transform: rotateX(0); }
  49%  { transform: rotateX(88deg); }
  51%  { transform: rotateX(-88deg); }
  100% { transform: rotateX(0); }
}

/* ───── DROPLIST BOARD (/drop) ───────────────────────────── */
.droplist { margin-top: var(--m-s-6); padding: 0 var(--m-gutter) var(--m-s-6); }
@media (max-width: 600px) { .droplist { padding: 0 var(--m-gutter-mobile) var(--m-s-4); } }
.droplist__header {
  display: grid; grid-template-columns: 70px 1fr 110px 70px 130px;
  gap: var(--m-s-4); padding: 10px 0;
  font-size: var(--m-text-label); letter-spacing: var(--m-track-label);
  color: var(--m-fg-muted);
}
.droplist__row {
  display: grid; grid-template-columns: 70px 1fr 110px 70px 130px;
  gap: var(--m-s-4); padding: 14px 0; align-items: baseline;
  border-top: 1px solid var(--m-border);
  font-family: var(--m-font-mono);
  font-size: var(--m-text-small); letter-spacing: var(--m-track-mono);
  color: var(--m-fg-dim); text-decoration: none;
  transition: background var(--m-t-fast), padding-left var(--m-t-fast);
}
.droplist__row:hover { background: rgba(255, 255, 255, 0.04); padding-left: 8px; }
.droplist__row:hover .droplist__arrow { opacity: 1; }
.droplist__item { color: var(--m-fg); }
.droplist__status { color: var(--m-fg); }
.droplist__arrow { opacity: 0; transition: opacity var(--m-t-fast); }
@media (max-width: 700px) {
  .droplist__header, .droplist__row { grid-template-columns: 1fr 90px 110px; }
  .droplist__hide-m { display: none; }
}

/* ───── LOOKBOOK CHAPTERS · seamless card stack (/home) ────
   Pins are DIRECT children of .chapters, each sticky at top:0 with
   exactly one viewport of height: the next frame slides over the
   previous one in one continuous motion — no dwell, no catch. */
.chapters { position: relative; background: #000; }
.chapter__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden; background: #000;
  transition: transform 0.9s var(--m-ease-out), filter 0.9s var(--m-ease-out);
}
.chapter__pin.is-covered { transform: scale(0.96); filter: brightness(0.6); }
.chapter__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
/* pulled-back frame: the whole photograph, no black matte around it */
.chapter__pin--inset .chapter__img {
  inset: 0; margin: auto;
  width: 100%; height: 100%;
  object-fit: contain;
}
@media (max-width: 600px) {
  /* phones: edge-to-edge band, no frame at all — full width, 4:3 crop */
  .chapter__pin--inset {
    position: relative;
    height: auto; min-height: 0;
    padding: 0;
  }
  .chapter__pin--inset .chapter__img {
    position: static; inset: auto; margin: 0;
    width: 100%; height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}
.chapter__pin::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  z-index: 1; pointer-events: none;
}
.chapter__pin--inset::after { display: none; }
.chapter__cta {
  position: absolute; right: var(--m-gutter-tight); z-index: 2;
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 600px) {
  .chapter__cta { right: auto; left: var(--m-gutter-mobile); bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
}

/* ───── OUTRO · the ride home in reverse (/home end) ─────── */
.outro { position: relative; background: #000; }
.outro__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.outro__beat { height: 100vh; }
.outro__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* contain, not cover: the full train stays visible (black bars melt
     into the black stage) — gently scaled up so it still fills the room */
  object-fit: contain;
  transform: scale(1.08);
  /* a canvas (outro.js draws /assets/metro-seq/ "contain"); the grey look
     (grayscale, contrast 1.1, brightness 0.6) is baked into the frames,
     no CSS filter, so each frame goes straight to the screen */
  display: block;
}
/* wide screens: the video fills the height, so the station lifts a little
   while the departure line fades in and the line sits below the platform */
@media (min-aspect-ratio: 4/3) {
  .outro__video { transform: translateY(calc(var(--ologo, 0) * -6vh)) scale(1.08); }
}
@media (max-width: 700px) {
  .outro__video { transform: scale(1.3); }
}
.outro__wash {
  position: absolute; inset: 0; background: #000;
  opacity: var(--owash, 1);
  pointer-events: none;
}
.outro__text {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--m-font-mono);
  font-size: 16px; letter-spacing: 0.24em;
  color: var(--m-fg);
  opacity: var(--otext, 1);
  pointer-events: none;
}
.outro__logo {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--m-s-5);
  opacity: var(--ologo, 0);
  pointer-events: none;
}
.outro__logo img {
  width: min(420px, 64vw);
  filter: brightness(0) invert(1);
}
.outro__next {
  font-family: var(--m-font-mono);
  font-size: var(--m-text-label); letter-spacing: var(--m-track-wide);
  color: var(--m-fg-muted);
}
/* departure line + access form, pinned to the platform edge */
.outro__foot {
  position: absolute; left: 0; right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center;
  gap: var(--m-s-2);
  opacity: var(--ologo, 0);
  pointer-events: none;
}
.outro__access {
  pointer-events: auto;
  width: min(380px, 84vw);
  background: rgba(0, 0, 0, 0.6);
}

/* ───── PARTY ACCESS · newsletter capture ────────────────── */
.access {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: var(--m-s-8); align-items: center;
  padding: var(--m-s-10) var(--m-gutter);
  border-top: 1px solid var(--m-border);
  background: #000;
}
.access__h {
  margin: var(--m-s-2) 0 0;
  font-family: var(--m-font-display);
  font-size: var(--m-text-h4); font-weight: var(--m-w-medium);
  letter-spacing: 0.04em; line-height: 1.4;
  color: var(--m-fg-dim);
}
@media (max-width: 700px) {
  .access {
    grid-template-columns: 1fr;
    gap: var(--m-s-4);
    padding: var(--m-s-8) var(--m-gutter-mobile);
  }
}

/* ───── GRAYSCALE → DUSK COLOR REVEAL (campaign imagery) ─── */
[data-reveal="color"] {
  filter: grayscale(1) contrast(1.05);
  transition: filter 1.1s var(--m-ease-io);
}
[data-reveal="color"].is-inview { filter: grayscale(0) contrast(1); }

/* ───── SPLIT-TEXT REVEAL (reveal.js wraps words) ────────── */
[data-reveal="split"] .split-line { display: block; overflow: hidden; }
[data-reveal="split"] .split-word {
  display: inline-block; transform: translateY(115%);
}
[data-reveal="split"].is-inview .split-word {
  transform: translateY(0);
  transition: transform 0.7s var(--m-ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}

/* ───── DUSK SHIFT (drop chapter tints toward night blue) ── */
[data-dusk-range] { position: relative; }
@supports (background: color-mix(in oklab, #000 50%, #fff 50%)) {
  [data-dusk-range] {
    background: color-mix(in oklab,
      #000 calc(100% - var(--dusk, 0) * 100%),
      #0b1020 calc(var(--dusk, 0) * 100%));
  }
}

/* ───── MARQUEE FOOTER (uses existing m-marquee keyframe) ── */
.m-ticker--marquee { padding-left: 0; padding-right: 0; }
.m-ticker__track {
  display: flex; gap: var(--m-s-6);
  padding: 0; min-width: max-content; flex-shrink: 0;
}
.m-ticker--marquee .m-ticker__track { animation: m-marquee 42s linear infinite; }

/* ───── REDUCED MOTION — the whole layer degrades ────────── */
@media (prefers-reduced-motion: reduce) {
  .boarding { transition: none; }
  .arrival { height: 100vh; }
  .arrival__img { filter: none; transform: none; }
  .arrival__type { transform: none; }
  .m-plate__open img { transition: none; }
  .m-plate__open:hover img { transform: none; }
  .flap__cell.is-flipping span { animation: none; }
  .chapter { height: 100vh; }
  .chapter.is-covered .chapter__pin { transform: none; filter: none; }
  [data-reveal="color"] { filter: none; transition: none; }
  [data-reveal="split"] .split-word { transform: none; transition: none; }
  .m-ticker--marquee .m-ticker__track { animation: none; }
  .outro { height: auto; }
  .outro__beat { display: none; }
  .outro__pin { position: relative; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none !important;
  }
}
