/* Layout adapted from the public VibeGame project page. See THIRD_PARTY_NOTICES.md. */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --ink: #101016;
  --paper: #f8f6ef;
  --mist: #dfeaf0;
  --ember: #ff7a3d;
  --gold: #ffd27a;
  --cyan: #80d7ff;
  --violet: #b6a3ff;
  --blue: #183a57;
  --muted: #6e7682;
  --line: rgba(255,255,255,0.16);
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Space Grotesk", "Satoshi", "Avenir Next", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", monospace;
}

body {
  font-family: var(--sans);
  background: #05070c;
  color: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,122,61,0.28), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(128,215,255,0.24), transparent 30%),
    radial-gradient(circle at 60% 82%, rgba(182,163,255,0.22), transparent 35%),
    linear-gradient(135deg, #05070c 0%, #0c1320 40%, #120b12 100%);
  filter: blur(18px) saturate(120%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.06); }
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.62;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: linear-gradient(transparent 50%, rgba(0,0,0,0.38) 50%);
  background-size: 100% 6px;
  mix-blend-mode: multiply;
  opacity: 0.32;
}

.page {
  position: relative;
  z-index: 3;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 64px);
  color: rgba(248,246,239,0.78);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(5,7,12,0.78), rgba(5,7,12,0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: none;
  font-size: 16px;
  color: var(--paper);
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
}

.nav-links a {
  opacity: 0.72;
  transition: opacity 180ms ease, color 180ms ease;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--gold);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: #05070c;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transform: scale(1.02);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(5,7,12,0) 0%, rgba(5,7,12,0.22) 62%, rgba(5,7,12,0.55) 100%),
    linear-gradient(180deg, rgba(5,7,12,0.10), rgba(5,7,12,0.45));
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 26vh;
  z-index: 2;
  display: none;
  pointer-events: none;
}

.intro-copy {
  position: absolute;
  z-index: 5;
  top: 18vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 48px));
  text-align: center;
  color: rgba(248,246,239,0.9);
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 46px);
  font-style: italic;
  line-height: 1.22;
  text-shadow: 0 0 30px rgba(255,255,255,0.24);
  animation: introFloat 7s ease forwards;
}

@keyframes introFloat {
  0% { opacity: 0; filter: blur(12px); transform: translateX(-50%) translateY(18px); }
  18%, 72% { opacity: 1; filter: blur(0); transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; filter: blur(10px); transform: translateX(-50%) translateY(-18px); }
}

.hero-content {
  position: relative;
  z-index: 6;
  width: min(1120px, calc(100% - 36px));
  text-align: center;
  padding-top: 12vh;
  opacity: 0;
  filter: blur(18px);
  transform: translateY(0) scale(1);
  transform-origin: 50% 44%;
}

.hero.is-ready .hero-content {
  animation:
    heroEnter 1.2s cubic-bezier(.16,1,.3,1) 8.84s both,
    heroLift 1.05s cubic-bezier(.16,1,.3,1) 12.14s forwards;
}

@keyframes heroEnter {
  from { opacity: 0; filter: blur(18px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes heroLift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-26vh) scale(0.78); }
}

.hero-kicker {
  font-family: var(--mono);
  font-size: clamp(11px, 1.2vw, 13px);
  color: rgba(248,246,239,0.58);
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
  gap: clamp(4px, 0.6vw, 8px);
}

.hero-logo {
  width: clamp(80px, 13.5vw, 170px);
  height: auto;
  flex: 0 0 auto;
}

.hero-title {
  font-family: var(--sans);
  font-size: clamp(64px, 15vw, 188px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0;
  color: transparent;
  background:
    linear-gradient(110deg, #ffffff 0%, #ffd27a 18%, #ff7a3d 36%, #80d7ff 58%, #ffffff 78%, #ffd27a 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 26px rgba(255,210,122,0.16));
  animation: titleFlow 9s linear infinite;
}

@keyframes titleFlow {
  from { background-position: 0% center; }
  to { background-position: 220% center; }
}

.hero-subtitle {
  max-width: 780px;
  margin: 26px auto 0;
  color: rgba(248,246,239,0.78);
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.45;
}

.hero-description {
  display: block;
  margin-top: 12px;
  color: rgba(248,246,239,0.56);
  font-size: clamp(15px, 1.45vw, 21px);
  line-height: 1.45;
}

.hero.is-ready .hero-subtitle {
  animation: heroDetailsExit 0.7s cubic-bezier(.16,1,.3,1) 11.99s forwards;
}

@keyframes heroDetailsExit {
  to { opacity: 0; filter: blur(8px); transform: translateY(-8px); }
}

.hero.is-paused .hero-content,
.hero.is-paused .hero-subtitle,
.hero.is-paused .hero-title {
  animation-play-state: paused;
}

.section {
  position: relative;
  padding: clamp(92px, 10vw, 150px) clamp(18px, 4vw, 64px);
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.paper-section {
  background:
    radial-gradient(circle at 18% 20%, rgba(255,210,122,0.32), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(128,215,255,0.24), transparent 30%),
    linear-gradient(180deg, #f8f6ef, #eef6f3 52%, #f8f6ef);
  color: var(--ink);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: color-mix(in srgb, var(--blue) 72%, var(--muted));
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 880px;
}

.section-title .flow {
  color: transparent;
  background: linear-gradient(110deg, #101016 0%, #ff7a3d 28%, #326b99 55%, #101016 88%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleFlow 10s linear infinite;
}

.lead {
  max-width: 830px;
  margin-top: 28px;
  color: #3b4652;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.55;
}

.abstract-logo {
  display: block;
  width: clamp(64px, 7vw, 92px);
  height: auto;
  margin: 0 auto 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px -12px rgba(22, 34, 58, 0.35);
}

.paper-heading {
  font-family: var(--sans);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: #16223a;
  margin: 0 0 34px;
}

.paper-heading::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), var(--gold));
}

.dark-section .paper-heading {
  color: var(--paper);
}

.abstract-paper-title {
  font-family: var(--sans);
  font-size: clamp(22px, 3.4vw, 42px);
  font-weight: 700;
  text-align: center;
  margin: 0 auto 16px;
  white-space: nowrap;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #16223a;
}

@media (max-width: 640px) {
  .abstract-paper-title { white-space: normal; }
}

.abstract-paper-title .brand-accent {
  background: linear-gradient(95deg, #ff6a3a 0%, #d83a5d 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.abstract-affiliation {
  font-family: var(--sans);
  font-size: 14px;
  color: #5a6373;
  text-align: center;
  margin: 0 0 44px;
}

.abstract-panel {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 48px) clamp(28px, 4.5vw, 56px) clamp(36px, 4vw, 52px);
  background: #fdfcf6;
  border: 1px solid rgba(22, 34, 58, 0.08);
  border-radius: 22px;
  box-shadow:
    0 1px 2px rgba(22, 34, 58, 0.04),
    0 8px 24px rgba(22, 34, 58, 0.06),
    0 32px 64px -24px rgba(22, 34, 58, 0.08);
}

.abstract-panel .abstract-body {
  font-family: var(--serif);
  color: #2a3242;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.78;
  margin: 0;
  max-width: none;
  text-align: justify;
  hyphens: auto;
}

.abstract-panel strong {
  font-weight: 700;
  color: #16223a;
}

/* Resource actions enter after the hero title lifts, matching the final video frame. */
.hero-actions {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: calc(100% + clamp(30px, 4vh, 42px));
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  width: max-content;
  opacity: 0;
  visibility: hidden;
  translate: -50% 12px;
  scale: var(--hero-actions-scale, 1);
  transform-origin: top center;
}

.hero.is-ready .hero-actions {
  animation: heroActionsEnter 0.8s cubic-bezier(.16,1,.3,1) 12.49s both;
}

@keyframes heroActionsEnter {
  from { opacity: 0; visibility: hidden; translate: -50% 12px; }
  to { opacity: 1; visibility: visible; translate: -50% 0; }
}

.paper-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  border-radius: 999px;
  background:
    linear-gradient(110deg, rgba(255, 210, 122, 0.12), rgba(255, 255, 255, 0.05) 48%, rgba(128, 215, 255, 0.12)),
    rgba(8, 13, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f8f6ef;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.paper-btn:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(110deg, rgba(255, 210, 122, 0.2), rgba(255, 255, 255, 0.08) 48%, rgba(128, 215, 255, 0.2)),
    rgba(8, 13, 23, 0.6);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(128, 215, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.paper-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}

/* Q2 scale-to-fit: the abstract fills exactly one screen at any resolution. Its
   content is laid out at a fixed DESIGN size (viewport-independent — the vw-based
   clamps below are pinned to constants) and the whole block is uniformly scaled
   by JS to fit the viewport, like a slide that always fills the screen. This
   stops it from floating tiny in a big empty section on large/hi-res monitors.
   The outer .abstract-scaler is sized by JS to the SCALED footprint so layout
   matches the visual (no phantom scrollbars from the unscaled inner box).
   Desktop only; narrow screens keep the normal responsive flow. */
@media (min-width: 900px) {
  #abstract.abstract-fit {
    height: 100svh;
    min-height: 0;
    padding: clamp(28px, 4.5vmin, 72px);
    overflow: hidden;
  }
  #abstract.abstract-fit .abstract-stage {
    width: 1080px;
    transform-origin: top left;
    will-change: transform;
  }
  /* Pin the responsive sizes to constants so the stage's natural box does not
     depend on the viewport — the transform does the scaling, not vw units. */
  #abstract.abstract-fit .abstract-logo { width: 86px; margin-bottom: 18px; }
  #abstract.abstract-fit .abstract-paper-title { font-size: 36px; white-space: normal; }
  #abstract.abstract-fit .abstract-affiliation { font-size: 15px; margin-bottom: 38px; }
  #abstract.abstract-fit .paper-heading { font-size: 40px; margin-bottom: 30px; }
  #abstract.abstract-fit .abstract-panel { max-width: 940px; padding: 40px 54px 46px; }
  #abstract.abstract-fit .abstract-body { font-size: 16px; line-height: 1.72; }
}

.overview-figure {
  width: min(90%, 1240px);
  margin: 46px auto 0;
}

.overview-figure img {
  width: 100%;
  border: 1px solid rgba(22, 34, 58, 0.1);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(22, 34, 58, 0.04),
    0 18px 44px -20px rgba(22, 34, 58, 0.16);
}

/* Video Demonstration: a dark cinema screen inside the light section, so it
   reads as a player rather than a figure. The poster is the clip's own first
   frame, so it is 16:9 like the clip and neither is cropped or letterboxed. */
.video-figure {
  width: min(90%, 1240px);
  margin: 46px auto 0;
}

.video-figure video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #07071e;
  border: 1px solid rgba(22, 34, 58, 0.1);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(22, 34, 58, 0.04),
    0 18px 44px -20px rgba(22, 34, 58, 0.16);
}

.feature-strip {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(16,16,22,0.12);
  border-bottom: 1px solid rgba(16,16,22,0.12);
}

.feature-strip article {
  padding: 30px clamp(18px, 3vw, 34px);
  border-right: 1px solid rgba(16,16,22,0.12);
}

.feature-strip article:last-child { border-right: 0; }
.feature-strip h3 { font-size: 18px; margin-bottom: 8px; }
.feature-strip p { color: #596573; font-size: 15px; }

.dark-section {
  background: #05070c;
  color: var(--paper);
  overflow: hidden;
}

.dark-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(255,122,61,0.18), transparent 24%),
    radial-gradient(circle at 82% 34%, rgba(128,215,255,0.18), transparent 28%);
  pointer-events: none;
}

.demo-head {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 54px;
}

.demo-head .section-title {
  margin: 0 auto;
}

.demo-head .lead {
  margin-left: auto;
  margin-right: auto;
  color: rgba(248,246,239,0.68);
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.demo-tags span {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(248,246,239,0.72);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(255,255,255,0.06);
}

/* ---------- Demo Cinema ---------- */

.demo-cinema {
  position: relative;
  z-index: 1;
  margin-top: 54px;
}

.cinema-screen {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #06080d;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 26px 70px rgba(0, 0, 0, 0.5),
    0 70px 140px -50px rgba(128, 215, 255, 0.14);
}

.cinema-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 220ms ease;
}

.cinema-screen video.switching {
  opacity: 0;
}

.cinema-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.12);
}

.cinema-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--ember));
}

.cinema-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  background: rgba(6, 8, 13, 0.55);
  color: rgba(248, 246, 239, 0.72);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cinema-loading[hidden] { display: none; }
.cinema-loading .cinema-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(248, 246, 239, 0.18);
  border-top-color: rgba(255, 210, 122, 0.9);
  border-radius: 50%;
  animation: preSpin 0.8s linear infinite;
}

.cinema-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(248, 246, 239, 0.85);
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.cinema-screen:hover .cinema-arrow,
.cinema-arrow:focus-visible {
  opacity: 1;
}

.cinema-arrow:hover {
  background: rgba(255, 210, 122, 0.2);
  border-color: rgba(255, 210, 122, 0.5);
  color: var(--gold);
}

.cinema-arrow.prev { left: 18px; }
.cinema-arrow.next { right: 18px; }

.cinema-info {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 40px;
  align-items: start;
}

.cinema-info .eyebrow {
  color: rgba(255, 210, 122, 0.75);
  margin-bottom: 10px;
}

.cinema-info h3 {
  font-family: var(--sans);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--paper);
  margin: 0 0 12px;
}

.cinema-desc {
  font-family: var(--serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
  color: rgba(248, 246, 239, 0.76);
  max-width: 720px;
  margin: 0;
}

.cinema-info .demo-tags {
  justify-content: flex-end;
  max-width: 320px;
  margin-top: 4px;
}

.cinema-rail {
  margin-top: 34px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(128px, 11vw, 168px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.rail-thumb {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.rail-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.5;
  transition: opacity 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.rail-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-thumb:hover .rail-frame {
  opacity: 0.85;
  transform: translateY(-2px);
}

.rail-thumb.active .rail-frame {
  opacity: 1;
  border-color: rgba(255, 210, 122, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.35), 0 8px 28px rgba(0, 0, 0, 0.45);
}

.rail-name {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(248, 246, 239, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 200ms ease;
}

.rail-thumb.active .rail-name {
  color: var(--gold);
}

@media (max-width: 760px) {
  .cinema-info {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cinema-info .demo-tags {
    justify-content: flex-start;
    max-width: none;
  }
  .cinema-rail {
    grid-auto-columns: 124px;
  }
  .cinema-arrow {
    width: 42px;
    height: 42px;
    opacity: 1;
    background: rgba(5, 7, 12, 0.45);
  }
  .cinema-arrow.prev { left: 10px; }
  .cinema-arrow.next { right: 10px; }
}

/* ---------- Studio ---------- */

.studio-head {
  text-align: center;
}

.studio-intro {
  max-width: 680px;
  margin: -14px auto 0;
  color: #596573;
  font-family: var(--serif);
  font-size: clamp(16px, 1.45vw, 19px);
  text-align: center;
}

.dash-flow {
  margin-top: 30px;
}

.dash-panel {
  margin: 0;
  padding-top: 64px;
  opacity: 0;
  transform: translateY(56px) scale(0.97);
  filter: blur(8px);
  transition:
    opacity 950ms cubic-bezier(.16,1,.3,1),
    transform 950ms cubic-bezier(.16,1,.3,1),
    filter 950ms cubic-bezier(.16,1,.3,1);
}

.dash-panel.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.dash-panel figcaption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-num {
  font-family: var(--mono);
  font-size: 12px;
  color: #b0653c;
}

.panel-name {
  font-family: var(--sans);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  color: #16223a;
}


.panel-media {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(22, 34, 58, 0.16);
  background: #0b0c10;
  box-shadow:
    0 1px 2px rgba(22, 34, 58, 0.06),
    0 24px 56px -20px rgba(22, 34, 58, 0.32);
}

.panel-media img {
  width: 100%;
  aspect-ratio: 2557 / 1285;
  object-fit: cover;
  cursor: zoom-in;
  transform: translateY(var(--para, 0)) scale(1.05);
  will-change: transform;
}

/* ---------- Overview ---------- */

.overview-section {
  background:
    radial-gradient(circle at 84% 12%, rgba(182,163,255,0.24), transparent 30%),
    radial-gradient(circle at 10% 82%, rgba(128,215,255,0.2), transparent 32%),
    linear-gradient(180deg, #eef3f6, #f5f3ea 55%, #f8f6ef);
}

.overview-section .section-inner {
  width: min(1400px, 100%);
}

.overview-head {
  text-align: center;
  margin: 0 auto 26px;
}

.overview-head .eyebrow {
  margin-bottom: 0;
}

.overview-figure img { cursor: zoom-in; }

/* Overview diagram fills the viewport height at ALL desktop sizes — no abrupt
   threshold where it snaps small. Previously gated on min-width:1600 AND
   min-height:1000, so any screen below that band (common laptop heights, or a
   hi-DPI screen whose CSS height is < 1000) fell back to a tiny 1240px-capped
   figure floating in a full-height section. */
@media (min-width: 900px) {
  .overview-section {
    padding-top: clamp(84px, 9vh, 130px);
    padding-bottom: clamp(48px, 6vh, 96px);
  }

  .overview-section .section-inner {
    width: min(94vw, 2800px);
  }

  .overview-figure {
    width: 100%;
    margin-top: clamp(20px, 3vh, 40px);
  }

  .overview-figure img {
    width: auto;
    max-width: 90%;
    max-height: calc((100svh - 270px) * 0.9);
    margin-inline: auto;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(5, 7, 12, 0.93);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.footer {
  padding: 54px clamp(18px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(248,246,239,0.52);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Preloader: holds the page until the hero video is actually playing, so the
   first impression is the video already in motion — never a poster→video cut. */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070c;
  transition: opacity 700ms ease;
}
#preloader.hidden { opacity: 0; pointer-events: none; }
#preloader .pre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
#preloader .pre-logo {
  width: 78px;
  height: 78px;
  border-radius: 17px;
  will-change: transform;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
#preloader .pre-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(248, 246, 239, 0.16);
  border-top-color: rgba(255, 210, 122, 0.9);
  border-radius: 50%;
  animation: preSpin 0.8s linear infinite;
}
#preloader .pre-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 246, 239, 0.46);
}
@keyframes preSpin { to { transform: rotate(360deg); } }
@keyframes prePulse {
  0%, 100% { opacity: 0.6; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.03); }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 800ms cubic-bezier(.16,1,.3,1), transform 800ms cubic-bezier(.16,1,.3,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .intro-copy { top: 16vh; }
  .hero-content { padding-top: 18vh; }
  .feature-strip,
  .studio-stage {
    grid-template-columns: 1fr;
  }
  .feature-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(16,16,22,0.12);
  }
  .feature-strip article:last-child { border-bottom: 0; }
  .dash-panel { padding-top: 44px; }
  .footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .hero-brand { gap: 3px; }
  .hero-logo { width: 17vw; }
  .hero-title { font-size: 14vw; }
  .hero-actions {
    --hero-actions-scale: 1;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: calc(100vw - 24px);
  }
  .paper-btn {
    gap: 7px;
    padding: 9px 13px;
    font-size: 13px;
  }
  .paper-btn svg { width: 19px; height: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .intro-copy { display: none; }
  .hero.is-ready .hero-content {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: translateY(-26vh) scale(0.78);
  }
  .hero.is-ready .hero-subtitle {
    animation: none !important;
    opacity: 0;
  }
  .hero.is-ready .hero-actions {
    animation: none !important;
    opacity: 1;
    visibility: visible;
    translate: -50% 0;
  }
}

