/* =========================================================
   Story reel — "Does this feel like your story?" (vertical video in a glowing frame)
   ========================================================= */
.story {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(40% 60% at 72% 50%, rgba(120, 35, 220, .32), transparent 70%),
    radial-gradient(35% 45% at 10% 30%, rgba(90, 20, 170, .22), transparent 70%),
    #07030d;
}
.story__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 56px) clamp(16px, 3vw, 40px) clamp(16px, 2vw, 28px);   /* neighbours already carry their own spacing */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

/* ---------- copy ---------- */
.story__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: #f7c47c;
}
.story__eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.story__title {
  margin: 0;
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: #f7f3fb;
}
.story__title em { font-style: italic; color: #f7c47c; }
.story__text {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: #d9d2e4;
}
.story__list {
  list-style: none;
  margin: 24px 0 0; padding: 0;
  display: grid; gap: 12px;
}
.story__list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: #e8e2f0;
}
.story__list li::before {
  content: ""; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: #f7c47c; box-shadow: 0 0 10px rgba(247, 196, 124, .8);
}
.story__cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.story__note { font-size: 13px; color: rgba(217, 210, 228, .65); }

/* ---------- video frame ---------- */
.story__media { position: relative; width: clamp(260px, 25vw, 330px); }
.story__media::before {                    /* aura behind the frame */
  content: "";
  position: absolute; inset: -14% -22%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(150, 60, 255, .45), transparent 75%);
  animation: stAura 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes stAura { 50% { opacity: .65; transform: scale(1.05); } }
.story__frame {
  position: relative;
  --rx: 2deg; --ry: -6deg; --gx: 30%; --gy: 20%;
  aspect-ratio: 3 / 4;                      /* compact: the 9:16 reel is cropped, faces + captions stay in view */
  max-height: 72vh;
  border-radius: 24px;
  cursor: pointer;
  overflow: hidden;
  background: #120720;
  padding: 0;
  border: 0;
  box-shadow:
    0 0 0 1px rgba(247, 196, 124, .45),
    0 0 0 7px rgba(25, 10, 45, .9),
    0 0 0 8px rgba(190, 130, 255, .25),
    0 30px 80px -10px rgba(90, 20, 180, .7);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease, ease), box-shadow .4s ease;
}
.story__frame.is-tilting { transition: transform .12s linear, box-shadow .4s ease; }
.story__frame:hover {
  box-shadow:
    0 0 0 1px rgba(247, 196, 124, .8),
    0 0 0 7px rgba(25, 10, 45, .9),
    0 0 0 8px rgba(190, 130, 255, .45),
    0 36px 90px -10px rgba(120, 40, 230, .85);
}
.story__glare {                            /* light that follows the cursor across the glass */
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: radial-gradient(60% 45% at var(--gx) var(--gy), rgba(255, 255, 255, .16), transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}
.story__frame:hover .story__glare { opacity: 1; }
.story__video, .story__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  display: block;
}
.story__poster { transition: opacity .6s ease; }
.story.is-playing .story__poster { opacity: 0; }

/* centre play button (shown until playing, and when paused) */
.story__play {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 74px; height: 74px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(247, 196, 124, .7);
  background: rgba(20, 8, 36, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: opacity .35s ease, scale .35s ease;
}
.story__play::after {                      /* pulsing ring */
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(247, 196, 124, .5);
  animation: stRing 2s ease-out infinite;
}
@keyframes stRing { from { opacity: 1; scale: .9; } to { opacity: 0; scale: 1.35; } }
.story__play svg { width: 26px; height: 26px; margin-left: 4px; }
.story.is-playing .story__play { opacity: 0; scale: .8; pointer-events: none; }

/* sound toggle, top-right (kept clear of the burned-in captions) */
.story__sound {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(15, 6, 28, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff;
  font: 600 12px/1 var(--sans, "Inter", system-ui, sans-serif);
  cursor: pointer;
  opacity: 0;
  transition: opacity .4s ease, background .3s;
}
.story.is-playing .story__sound { opacity: 1; }
.story__sound:hover { background: rgba(138, 23, 255, .7); }
.story__sound svg { width: 16px; height: 16px; }
.story__sound .ic-on { display: none; }
.story.is-unmuted .story__sound .ic-on { display: block; }
.story.is-unmuted .story__sound .ic-off { display: none; }
.story.is-muted-hint .story__sound { animation: stNudge 1.6s ease-in-out 3; }
@keyframes stNudge { 50% { box-shadow: 0 0 0 6px rgba(247, 196, 124, .35); } }

.story__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 3px; background: rgba(255, 255, 255, .15); }
.story__bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--prog, 0)); background: linear-gradient(90deg, #8a17ff, #f7c47c); }

/* expand to theatre */
.story__expand, .story__close {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(15, 6, 28, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background .3s, scale .3s;
}
.story__expand:hover, .story__close:hover { background: rgba(138, 23, 255, .75); scale: 1.08; }
.story__expand svg, .story__close svg { width: 16px; height: 16px; }
.story__close { display: none; left: auto; right: 14px; top: auto; bottom: 18px; }

.story__backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(4, 2, 8, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .45s ease;
}
.story.is-theater { z-index: 9000; }          /* lift the whole section above the fixed header */
.story.is-theater .story__backdrop { opacity: 1; pointer-events: auto; }
.story.is-theater .story__frame {
  position: fixed; z-index: 9001;
  left: 50%; top: 50%;
  width: auto; height: min(90vh, 900px);
  max-height: none;
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, -50%);
  animation: stZoom .5s var(--ease, ease);
  cursor: default;
}
@keyframes stZoom { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } }
.story.is-theater .story__video, .story.is-theater .story__poster { object-fit: contain; background: #000; }
.story.is-theater .story__expand { display: none; }
.story.is-theater .story__close { display: grid; }
.story.is-theater .story__glare { display: none; }
.story.is-theater .story__media::before { display: none; }
html.story-lock { overflow: hidden; }

.story__frame:focus-visible, .story__play:focus-visible, .story__sound:focus-visible, .story__expand:focus-visible, .story__close:focus-visible { outline: 2px solid #f7c47c; outline-offset: 4px; }

/* ---------- reveal ---------- */
.story__copy > *, .story__media { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease, ease), transform .9s var(--ease, ease); }
.story.is-in .story__copy > *, .story.is-in .story__media { opacity: 1; transform: none; }
.story.is-in .story__copy > :nth-child(2) { transition-delay: .1s; }
.story.is-in .story__copy > :nth-child(3) { transition-delay: .2s; }
.story.is-in .story__copy > :nth-child(4) { transition-delay: .3s; }
.story.is-in .story__copy > :nth-child(5) { transition-delay: .4s; }
.story.is-in .story__media { transition-delay: .15s; }

/* ---------- mobile: video first, copy below ---------- */
@media (max-width: 820px) {
  .story__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .story__media { order: -1; width: min(74vw, 300px); }
  .story__frame { --rx: 0deg; --ry: 0deg; }
  .story__eyebrow { justify-content: center; }
  .story__text { margin-left: auto; margin-right: auto; }
  .story__list { justify-content: center; text-align: left; }
  .story__cta { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .story__media::before, .story__play::after { animation: none; }
  .story__frame { --rx: 0deg; --ry: 0deg; }
}
