/* ============================================================
   Delta — Real Stories
   Standalone experience. Independent of the Delta LP design system.
   ============================================================ */

:root{
  --beige:        #F3E9DB;
  --beige-deep:   #EADDCA;
  --cream:        #FBF4E7;
  --cream-2:      #F6EDDC;

  --purple:       #3C1D4A;
  --purple-deep:  #291230;
  --purple-soft:  #6B4C79;
  --purple-mute:  rgba(60,29,74,.55);

  --orange:       #D4622A;
  --orange-soft:  #E48A55;

  --line:         rgba(60,29,74,.14);

  --serif:  "Playfair Display", Georgia, serif;
  --quote:  "Newsreader", Georgia, serif;
  --sans:   "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease:   cubic-bezier(0.22, 1, 0.36, 1);

  --card-w:   clamp(300px, 34vw, 650px);
  --card-w-t: clamp(260px, 27vw, 505px);

  --pad-x: clamp(24px, 3.2vw, 56px);
}

*,*::before,*::after{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  background:
    radial-gradient(120% 90% at 50% 8%, #F8F0E4 0%, var(--beige) 52%, var(--beige-deep) 100%);
  color:var(--purple);
  font-family:var(--sans);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

svg{ fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

/* ---------- Paper texture + vignette ---------- */

.grain{
  position:fixed; inset:0; z-index:9000; pointer-events:none;
  opacity:.55; mix-blend-mode:multiply;
  background-image:
    radial-gradient(rgba(60,29,74,.055) .6px, transparent .7px),
    radial-gradient(rgba(120,70,30,.045) .6px, transparent .7px);
  background-size:3px 3px, 5px 5px;
  background-position:0 0, 2px 1px;
}
.vignette{
  position:fixed; inset:0; z-index:8990; pointer-events:none;
  background:radial-gradient(80% 65% at 50% 45%, transparent 55%, rgba(90,58,30,.10) 100%);
}

/* ---------- Header ---------- */

.site-header{
  position:fixed; top:0; left:0; right:0; z-index:900;
  display:flex; align-items:center; justify-content:space-between;
  gap:24px;
  padding:clamp(18px,2.2vw,32px) var(--pad-x);
}

.brand{ display:flex; align-items:center; gap:clamp(12px,1.3vw,22px); }

.brand__logo{ height:clamp(30px,2.6vw,46px); width:auto; display:block; }

.brand__wordmark{
  font-family:var(--serif); font-style:italic; font-weight:700;
  font-size:clamp(30px,2.7vw,46px); line-height:1; color:var(--purple);
  letter-spacing:-.02em;
}

.brand__rule{ width:1px; height:clamp(24px,2vw,34px); background:var(--line); }

.brand__tag{
  margin:0; font-size:clamp(13px,1.05vw,18px); font-weight:500;
  color:var(--purple); letter-spacing:-.005em;
}

.site-nav{ display:flex; align-items:center; gap:clamp(16px,1.9vw,36px); }

.site-nav a{
  color:var(--purple); text-decoration:none;
  font-size:clamp(13px,.95vw,16px); font-weight:600; letter-spacing:-.005em;
  transition:color .25s var(--ease), opacity .25s var(--ease);
}
.site-nav a:not(.btn-share):hover{ color:var(--orange); }

.brand__home{ display:inline-flex; align-items:center; border-radius:6px; }
.brand__home:focus-visible{ outline:3px solid var(--orange); outline-offset:4px; }
.site-nav a.is-current{ color:var(--purple); }
.site-nav a.is-current::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px;
  height:2.5px; border-radius:2px; background:var(--orange);
}
.site-nav a{ position:relative; padding-bottom:6px; }

.btn-share{
  border:1.5px solid var(--orange); color:var(--orange) !important;
  border-radius:999px; padding:.62em 1.35em;
  transition:background .3s var(--ease), color .3s var(--ease);
}
.btn-share:hover{ background:var(--orange); color:var(--cream) !important; }

/* ---------- Intro ---------- */

.stage-wrap{ position:relative; height:100%; }

.intro{
  position:absolute; z-index:385; pointer-events:none;
  left:var(--pad-x); top:clamp(110px,13vh,168px);
  max-width:clamp(280px,30vw,520px);
}
.intro::before{
  content:""; position:absolute; z-index:-1;
  inset:-14% -34% -22% -18%;
  background:radial-gradient(58% 52% at 34% 46%,
    rgba(246,238,224,.92) 0%, rgba(246,238,224,.70) 48%, rgba(246,238,224,0) 78%);
}

.intro__title{
  margin:0; font-family:var(--serif); font-weight:700;
  font-size:clamp(44px,5.2vw,92px); line-height:.94;
  letter-spacing:-.028em; color:var(--purple);
  white-space:nowrap;
}

.intro__rule{
  display:block; width:74px; height:3px; border-radius:2px;
  background:var(--orange); margin:clamp(16px,1.6vw,26px) 0 clamp(14px,1.4vw,22px);
}

.intro__copy{
  margin:0; font-size:clamp(15px,1.15vw,20px); line-height:1.5;
  color:var(--purple); font-weight:400; max-width:27ch;
}

/* ---------- Stage ---------- */

.stage{
  position:absolute; inset:0;
  perspective:2200px; perspective-origin:50% 48%;
  cursor:grab; touch-action:pan-y;
  outline:none;

  /* The deck extends well past the viewport by design. Without containing it
     here, a mobile browser widens the layout viewport to fit that content and
     zooms the whole page out — measured at 947px wide on a 375px device. Body
     overflow clips it visually but does not stop the viewport expanding. */
  overflow:hidden;
}
.stage.is-dragging{ cursor:grabbing; }
.stage:focus-visible{ outline:2px solid var(--orange); outline-offset:-8px; border-radius:12px; }

.stage__track{
  position:absolute; inset:0;
  transform-style:preserve-3d;
}

/* ---------- Card ---------- */

.card{
  position:absolute; left:50%; top:48%;
  width:var(--card-w);
  background:var(--cream);
  border-radius:22px;
  overflow:hidden;
  transform-origin:50% 50%;
  will-change:transform, filter, opacity;
  backface-visibility:hidden;
  box-shadow:0 16px 34px -18px rgba(52,26,12,.42);
  transition:box-shadow .5s var(--ease), background .5s var(--ease);
}

.card--text{ width:var(--card-w-t); }

.card.is-active{
  box-shadow:
    0 54px 96px -34px rgba(52,26,12,.50),
    0 14px 34px -16px rgba(52,26,12,.26);
}
.card.is-hover{
  box-shadow:0 40px 74px -30px rgba(52,26,12,.45);
}

/* --- Media --- */

.card__media{
  position:relative; aspect-ratio:16/10; overflow:hidden;
  background:linear-gradient(150deg,#C9B79E,#9C8468);
}

.card__video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block; background:transparent;
}

.card__badge{
  position:absolute; top:5%; left:4%; z-index:3;
  display:inline-flex; align-items:center; gap:.5em;
  background:var(--purple); color:var(--cream);
  border-radius:999px; padding:.55em 1.05em;
  font-size:clamp(9px,.72vw,12px); font-weight:700;
  letter-spacing:.09em; text-transform:uppercase;
}
.card__badge svg{ width:1.25em; height:1.25em; stroke-width:1.8; }

.card__play{
  position:absolute; top:50%; left:50%; z-index:4;
  transform:translate(-50%,-50%);
  width:clamp(52px,5.6vw,106px); aspect-ratio:1; border-radius:50%;
  border:0; cursor:pointer;
  background:rgba(251,244,231,.93);
  color:var(--purple);
  display:grid; place-items:center;
  box-shadow:0 10px 26px -8px rgba(30,12,40,.45);
  transition:transform .35s var(--ease), background .3s var(--ease), opacity .3s var(--ease);
}
.card__play:hover{ transform:translate(-50%,-50%) scale(1.07); background:var(--cream); }
.card__play svg{ width:38%; height:38%; fill:currentColor; stroke:none; margin-left:8%; }
.card__play:focus-visible{ outline:3px solid var(--orange); outline-offset:3px; }
.card.is-playing .card__play{ opacity:0; pointer-events:none; }

/* --- Video controls --- */

.card__controls{
  position:absolute; left:0; right:0; bottom:0; z-index:5;
  display:flex; align-items:center; gap:clamp(8px,.85vw,16px);
  padding:clamp(9px,.95vw,17px) clamp(12px,1.15vw,20px);
  background:linear-gradient(to top, rgba(28,12,36,.82), rgba(28,12,36,.30) 70%, transparent);
  color:#F6EEE1;
  opacity:0; transition:opacity .4s var(--ease);
}
.card.is-active .card__controls{ opacity:1; }

.ctl{
  background:none; border:0; padding:0; cursor:pointer; color:inherit;
  display:grid; place-items:center; flex:none;
  width:clamp(16px,1.5vw,26px); aspect-ratio:1;
  transition:color .25s var(--ease);
}
.ctl:hover{ color:var(--orange-soft); }
.ctl svg{ width:100%; height:100%; }
.ctl--play svg{ fill:currentColor; stroke:none; }
.ctl:focus-visible{ outline:2px solid var(--orange); outline-offset:3px; border-radius:4px; }

.ctl__time{
  font-size:clamp(10px,.83vw,14px); font-weight:500;
  font-variant-numeric:tabular-nums; white-space:nowrap; flex:none;
  letter-spacing:.01em;
}

.scrub{
  position:relative; flex:1 1 auto; height:14px; cursor:pointer;
  display:flex; align-items:center; min-width:40px;
}
.scrub::before{
  content:""; position:absolute; left:0; right:0; height:3px;
  border-radius:2px; background:rgba(246,238,225,.34);
}
.scrub__fill{
  position:absolute; left:0; height:3px; border-radius:2px;
  background:var(--orange); width:0%;
}
.scrub__knob{
  position:absolute; top:50%; left:0;
  width:11px; height:11px; border-radius:50%;
  background:var(--cream); transform:translate(-50%,-50%);
  box-shadow:0 2px 5px rgba(0,0,0,.35);
}
.scrub:focus-visible{ outline:2px solid var(--orange); outline-offset:2px; border-radius:6px; }

/* --- Body --- */

.card__body{
  position:relative;
  padding:clamp(18px,1.9vw,34px) clamp(20px,2.1vw,38px) clamp(18px,1.8vw,32px);
}
.card--text .card__body{ padding-top:clamp(24px,2.6vw,44px); }

.card__quote{
  margin:0; position:relative;
  padding-left:clamp(24px,2.4vw,44px);
  font-family:var(--quote);
  font-size:clamp(17px,1.72vw,31px);
  line-height:1.32; letter-spacing:-.012em;
  color:var(--purple);
}
.card--text .card__quote{
  font-style:italic;
  font-size:clamp(18px,1.85vw,33px);
  line-height:1.36;
}

.card__quote::before{
  content:"\201C";
  position:absolute; left:0; top:-.08em;
  font-family:var(--quote); font-weight:500;
  font-size:2.1em; line-height:1; color:var(--orange);
}

.card__foot{
  margin-top:clamp(16px,1.7vw,28px);
  padding-top:clamp(14px,1.5vw,24px);
  border-top:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap;
}

.card__person{ display:flex; align-items:center; gap:clamp(9px,.95vw,16px); min-width:0; }

.card__avatar{
  width:clamp(34px,3.3vw,60px); aspect-ratio:1; border-radius:50%;
  object-fit:cover; flex:none; display:block;
  background:linear-gradient(140deg,#C4AF95,#95795C);
}

.card__name{
  margin:0; font-size:clamp(13px,1.15vw,21px); font-weight:700;
  letter-spacing:-.012em; color:var(--purple);
}
.card__place{
  margin:.16em 0 0; font-size:clamp(11px,.92vw,16px);
  font-weight:400; color:var(--purple-mute);
}

.pill{
  display:inline-flex; align-items:center; gap:.62em; flex:none;
  border:1px solid var(--line); border-radius:999px;
  padding:.62em 1.15em;
  background:var(--cream-2);
  font-size:clamp(9px,.7vw,12px); font-weight:700;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--purple); line-height:1.15;
}
.pill svg{ width:1.5em; height:1.5em; flex:none; }
.pill--stack{ text-align:left; }

/* ---------- Bottom controls ---------- */

.controls{
  position:fixed; left:0; right:0; bottom:0; z-index:900;
  padding:0 var(--pad-x) clamp(18px,2vw,32px);
  display:flex; flex-direction:column; align-items:center;
  gap:clamp(10px,1.1vw,18px);
  pointer-events:none;
}

.rail{
  pointer-events:auto;
  display:flex; align-items:center; gap:clamp(14px,1.6vw,30px);
  width:min(64vw, 940px);
}

.rail__arrow{
  flex:none; width:clamp(28px,2.3vw,40px); aspect-ratio:1;
  background:none; border:0; padding:0; cursor:pointer;
  color:var(--purple); display:grid; place-items:center;
  transition:color .25s var(--ease), transform .3s var(--ease), opacity .3s var(--ease);
}
.rail__arrow svg{ width:100%; height:100%; stroke-width:2; }
.rail__arrow:hover{ color:var(--orange); }
.rail__arrow:disabled{ opacity:.3; cursor:default; }
.rail__arrow:focus-visible{ outline:2px solid var(--orange); outline-offset:4px; border-radius:50%; }

.rail__track{ position:relative; flex:1 1 auto; height:26px; display:flex; align-items:center; }

.rail__line{
  position:absolute; left:0; right:0; height:2px;
  background:rgba(60,29,74,.30); border-radius:2px;
}
.rail__fill{
  position:absolute; left:0; height:2px; width:0%;
  background:var(--orange); border-radius:2px;
}

.dot{
  position:absolute; top:50%; transform:translate(-50%,-50%);
  width:22px; height:22px; padding:0; border:0; background:none;
  cursor:pointer; display:grid; place-items:center;
}
.dot::after{
  content:""; width:9px; height:9px; border-radius:50%;
  background:var(--purple-soft);
  transition:transform .45s var(--ease), background .35s var(--ease);
}
.dot:hover::after{ background:var(--purple); transform:scale(1.2); }
.dot[aria-selected="true"]::after{ background:var(--orange); transform:scale(1.65); }
.dot:focus-visible{ outline:2px solid var(--orange); outline-offset:0; border-radius:50%; }

.hint{
  margin:0; display:flex; align-items:center; gap:.7em;
  font-size:clamp(12px,.95vw,17px); color:var(--purple);
  pointer-events:none;
}
/* A mouse with its scroll wheel, not a hand: the interaction being taught
   is the wheel, which maps to horizontal movement here. */
/* A mouse seen from above: the button split and the accent-filled wheel are
   what make it read as one at this size — without them it was just a
   rounded rectangle with a tick in it. */
.hint__mouse,
.hint__hand{ width:clamp(34px,2.8vw,46px); height:auto; opacity:.85; stroke-width:1.5; }
.hint__split{ stroke-width:1.2; }
.hint__wheel{ fill:var(--orange); stroke:var(--orange); stroke-width:1; }

/* Which hint is shown is a question about the INPUT, not the screen. A phone
   held in landscape reports ~850px wide and would fail a width test on the
   one device that needs the hand; a small laptop window would pass it and be
   told to swipe at a trackpad. (hover:none) and (pointer:coarse) is the
   actual question: is this a finger? */
.hint__hand,
.hint__swipe{ display:none; }

@media (hover:none) and (pointer:coarse){
  .hint__mouse,
  .hint__scroll{ display:none; }
  .hint__hand{ display:inline-block; }
  .hint__swipe{ display:inline; }
}

.sig{
  position:fixed; left:var(--pad-x); bottom:clamp(18px,2vw,32px); margin:0;
  display:flex; align-items:center; gap:.6em;
  font-family:var(--quote); font-style:italic;
  font-size:clamp(12px,.95vw,17px); color:var(--purple-mute);
  pointer-events:none;
}
.sig__mark{ width:1.3em; height:1.3em; color:var(--orange); }

/* ---------- Missing-asset fallbacks ---------- */

.is-missing{ opacity:0; }
.card__media.is-missing-media::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(150deg, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(150deg,#C9B79E,#8E7659);
}

/* ---------- Responsive ---------- */

@media (max-width:1100px){
  :root{ --card-w:clamp(300px,46vw,520px); --card-w-t:clamp(260px,38vw,420px); }
  .intro{ max-width:min(46vw,340px); }
  .rail{ width:min(80vw,700px); }
}

@media (max-width:760px){
  :root{ --card-w:min(78vw,420px); --card-w-t:min(70vw,380px); --pad-x:18px; }

  .site-header{ padding:14px var(--pad-x); }
  .brand__tag, .brand__rule{ display:none; }
  .btn-share{ white-space:nowrap; padding:.55em 1.05em; font-size:12px; }

  .intro{
    position:relative; left:auto; top:auto; max-width:none;
    /* --header-h is measured and published by mobile-nav.js; the fallback
       covers the frame before it runs. */
    padding:calc(var(--header-h, 70px) + 8px) var(--pad-x) 0;
    z-index:600;
  }
  .intro::before{ display:none; }

  /* The intro was taking 300px of a 660px phone viewport — the video began
     below the halfway mark and the episode title was under the fold. Every
     value here is pulled in so the deck starts higher; nothing is removed. */
  .intro__eyebrow{ font-size:10.5px; letter-spacing:.16em; }
  .intro__title{ font-size:clamp(30px,8.4vw,42px); line-height:1.02; }
  .intro__rule{ margin:7px 0 6px; }
  .intro__copy{ max-width:36ch; font-size:13.5px; line-height:1.45; }

  /* The deck sits below the intro instead of over it. The intro's height
     varies with the copy — and, on the report build, with the filters — so a
     percentage top was always going to collide eventually. The page scrolls
     here rather than forcing everything into one screen; touch-action on the
     stage is already pan-y, so vertical scrolling passes through while
     horizontal drag stays with the deck. */
  html, body{ height:auto; }
  body{ overflow-x:hidden; overflow-y:auto; }

  .stage-wrap{
    display:flex; flex-direction:column;
    /* The page scrolls here, so it is only as tall as its content — forcing a
       full viewport height left a band of empty ground under the deck. */
    height:auto;
  }

  /* The rail follows the deck instead of floating over it. Pinned to the
     bottom of a page that now scrolls, it sat on top of the card and there is
     no spare height on a phone to push the card clear of it. */
  .controls{
    position:static; padding:clamp(14px,4vw,22px) var(--pad-x) clamp(20px,6vw,32px);
  }
  .intro{ flex:0 0 auto; }
  .stage{
    position:relative; inset:auto;
    flex:1 1 auto;
    /* has to exceed the card's own height, or the card centres outside the
       box and rides up over the filters above it */
    min-height:clamp(420px,52vh,560px);
    padding:4px 0;
    /* Was clamp(14px,4vw,26px). On a phone every pixel here pushes the card
       further under the fold, and the intro above already separates them. */
    margin-top:6px;
  }

  .card{ top:50%; }
  .card__quote{ font-size:19px; }
  .card--text .card__quote{ font-size:20px; }

  .sig{ display:none; }
  .rail{ width:100%; }
  .hint{ font-size:12px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.01ms !important; }
  .card{ transition:box-shadow .2s linear; }
  .card__play,.btn-share,.dot::after{ transition-duration:.15s; }
}
