/* RisX runway landing kit. Shared by fly-split, fly-sequence, fly-runway, fly-mix.
   Self-contained: --void/--ease-out live in experience.css, not styles.css,
   so this file defines what it needs itself (fonts imported below;
   --ease-out falls back to plain "ease-out" everywhere it's used).
   Relies on the site header/footer from styles.css. */

@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,650&family=Spline+Sans+Mono:wght@400;500;600&display=swap");

body.fly-on { background: #000; color: #f5f5f7; }

/* styles.css constrains main sections to 1180px; the runway journey is full-bleed.
   The endcard keeps its own padding (set below under "End"), so only the
   scene half of this selector zeroes padding. */
body.fly-on .fly > .scene { width: auto; max-width: none; margin: 0; padding: 0; }
body.fly-on .fly > .end { width: auto; max-width: none; margin: 0; }

.fly .scene { position: relative; min-height: 165vh; }
.fly .scene.tall { min-height: 320vh; }
body[data-variant="split"] .scene.tall { min-height: 250vh; }   /* hero: scrub lands at ~150vh, short hold, then push */
.fly .stage {
  position: sticky; top: var(--hdr, 69px); height: calc(100vh - var(--hdr, 69px)); overflow: hidden;
  display: grid; place-items: stretch; background: #000; z-index: 2;
}

/* Clips */
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease-out, ease-out), filter .9s ease; }
.clip.is-active { opacity: 1; }
.clip.is-dim { filter: brightness(.55) saturate(.7); }
.clip.is-under { opacity: 1; z-index: 0; }
/* Split + mix: the first clip of every stage keeps its poster on screen before it plays, so scene changes push, never cut to black. */
body[data-variant="split"] .stage > .clip:first-of-type, body[data-variant="mix"] .stage > .clip:first-of-type,
body[data-variant="split"] .half > .clip:first-of-type { opacity: 1; }
.clip.is-over { z-index: 1; }
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.14) 40%, rgba(0,0,0,.80) 100%);
}

/* Copy */
.copy {
  position: relative; z-index: 2; align-self: end; justify-self: start;
  width: min(100% - 48px, 1180px); margin: 0 auto; padding: 0 0 clamp(40px, 8vh, 96px);
  opacity: var(--ct, 0); transform: translateY(calc(18px * (1 - var(--ct, 0))));
  transition: opacity .25s ease-out, transform .25s ease-out;
}
.copy h1, .copy h2, .copy .line { text-shadow: 0 2px 6px rgba(0,0,0,.7), 0 8px 32px rgba(0,0,0,.6); }
.copy .kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: #30d158; margin: 0 0 14px;
  text-shadow: 0 1px 12px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.6);
}
.copy h1, .copy h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: .96; letter-spacing: -.02em; margin: 0 0 18px; max-width: 14ch; }
.copy h1 { font-size: clamp(52px, 9vw, 118px); }
.copy h2 { font-size: clamp(36px, 6vw, 76px); }
.copy .line { font-size: clamp(19px, 1.7vw, 24px); color: #d6d6dc; max-width: 42ch; margin: 0; }
.copy.centered { justify-self: center; text-align: center; align-self: center; padding-bottom: 0; }
.copy.centered h1, .copy.centered h2 { margin-inline: auto; }
.stage.halves .copy.centered { top: 0; bottom: 0; padding-bottom: 0; }

/* A. Split */
.stage.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.stage.halves .half { position: relative; overflow: hidden; }
.stage.halves .half + .half { border-left: 1px solid rgba(245,245,247,.18); }
.stage.halves .copy { grid-column: 1 / -1; position: absolute; left: 0; right: 0; bottom: 0; width: auto; padding: 0 24px clamp(40px, 8vh, 96px); }
.stage.halves::after { background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,.55), rgba(0,0,0,.15) 55%, rgba(0,0,0,.6) 100%); }
.stage.halves .half .tag {
  position: absolute; top: 18px; left: 18px; z-index: 2; font-size: 12px; letter-spacing: .28em;
  text-transform: uppercase; color: #c9c9cf;
  text-shadow: 0 1px 12px rgba(0,0,0,.8), 0 0 2px rgba(0,0,0,.6);
}

/* Phone (rise + dock). --rise 0..1 raises it into view, .is-docked pins it beside the copy. */
.phone {
  position: absolute; z-index: 3; left: 50%; bottom: 8vh; width: min(260px, 30vw); aspect-ratio: 390 / 844;
  border-radius: 36px; overflow: hidden; background: #000; border: 6px solid #111; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  opacity: var(--rise, 0);
  transform: translate(-50%, calc(12vh * (1 - var(--rise, 0)))) scale(calc(.78 + .22 * var(--rise, 0)));
  transition: transform .2s linear, opacity .2s linear;
}
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage.with-phone .copy { padding-right: min(360px, 40vw); }
.stage.with-phone .phone { left: auto; right: max(24px, calc((100% - 1180px) / 2)); transform: translateY(calc(12vh * (1 - var(--rise, 0)))); }

/* C. Runway strip + readout */
.strip { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.strip svg { width: 100%; height: 100%; }
.strip .tarmac { stroke: #f5f5f7; stroke-width: .5; stroke-linecap: butt; fill: none; stroke-dasharray: 1px; stroke-dashoffset: calc((1 - var(--len, 0)) * 1px); }
.strip .trees { stroke: #30d158; stroke-width: .5; stroke-linecap: round; }
/* Mid-frame text sits over bright footage: keep it readable without a full scrim. */
.copy.centered, .readout { text-shadow: 0 2px 24px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6); }
.readout {
  position: absolute; z-index: 3; top: 12vh; left: max(24px, calc((100% - 1180px) / 2));
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #f5f5f7;
}
.readout .n { display: block; font-size: clamp(56px, 10vw, 140px); line-height: 1; letter-spacing: -.03em; }
.readout .l { display: block; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: #9a9aa3; margin-top: 8px; }

/* End */
.fly .end { position: relative; z-index: 2; background: #000; padding: clamp(80px, 14vh, 160px) 24px; }
.fly .end .bed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.fly .end .end-inner { position: relative; z-index: 1; }

/* Mobile */
@media (max-width: 720px) {
  .stage.halves { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .stage.halves .half + .half { border-left: 0; border-top: 1px solid rgba(245,245,247,.18); }
  .stage.halves .half .tag { z-index: 4; }
  .stage.halves .copy.centered { top: auto; bottom: 0; padding-bottom: 34px; }
  .copy { width: min(100% - 32px, 1180px); padding-bottom: 28px; }
  .copy h1 { font-size: clamp(40px, 12vw, 64px); }
  .copy h2 { font-size: clamp(28px, 8.5vw, 44px); }
  .phone, .stage.with-phone .phone { width: min(200px, 52vw); left: 50%; right: auto; bottom: auto; top: 10vh; transform: translate(-50%, calc(8vh * (1 - var(--rise, 0)))); }
  .stage.with-phone .copy { padding-right: 0; }
  .readout { top: 8vh; }
  .readout .n { font-size: clamp(48px, 18vw, 96px); }
  body[data-variant="sequence"] .copy { align-self: end; }
  /* Mix (production landing) on phones: the 16:9 clip sits in the top 62vh instead of being
     cover-cropped to a 9:16 sliver, the copy owns the bottom band, and each clip is framed on
     its subject. The phone dock is small and right-aligned inside the video band. */
  body[data-variant="mix"] .stage { background: #000; }
  body[data-variant="mix"] .clip { top: 0; bottom: auto; height: 62vh; }
  body[data-variant="mix"] .clip[data-clip="check"] { object-position: 78% 50%; }
  body[data-variant="mix"] .clip[data-clip="strip-wide"] { object-position: 50% 45%; }
  body[data-variant="mix"] .clip[data-clip="flight"] { object-position: 53% 50%; }
  body[data-variant="mix"] .stage::after { background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 46vh, rgba(0,0,0,.9) 62vh, #000 100%); }
  body[data-variant="mix"] .copy { padding-bottom: 32px; }
  body[data-variant="mix"] .phone, body[data-variant="mix"] .stage.with-phone .phone { width: min(132px, 34vw); left: auto; right: 14px; top: 7vh; transform: translateY(calc(8vh * (1 - var(--rise, 0)))); }
  body[data-variant="mix"] .end .bed { object-position: 58% 50%; }
  /* Scenes whose subject sits low in frame (the trader's phone): copy goes to the top on phones. */
  .stage.copy-top .copy { align-self: start; padding-top: 22px; padding-bottom: 0; }
  .stage.copy-top::after { background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.10) 100%); }
  /* Variant B on phones: the tick is a short cross-mark, not a tall bar, and the
     whole strip sits below the plane instead of cutting through it. */
  body[data-variant="sequence"] .strip svg { transform: translateY(18%); }
  body[data-variant="sequence"] .strip .trees { display: none; }
  /* Variant C on phones: the strip runs vertically down the page, readout above, phone below. */
  body[data-variant="runway"] .strip svg line.tarmac { transform: rotate(-90deg); transform-origin: 50% 50%; }
  body[data-variant="runway"] .stage.with-phone .copy { padding-right: 44px; }
  body[data-variant="runway"] .readout { top: 8vh; left: 16px; }
  body[data-variant="runway"] .stage.with-phone .phone { top: auto; bottom: 36vh; width: min(120px, 32vw); }
}

/* Reduced motion: posters, end state, no scrub. fly.js adds .fly-reduced to body. */
body.fly-reduced .clip { transition: none; }
body.fly-reduced .copy { opacity: 1; transform: none; }
/* Driver paints --rise: 1 under reduced motion, so the existing transform
   already resolves to the docked state; only drop the transition. */
body.fly-reduced .stage .phone { opacity: 1; transition: none; }
body.fly-reduced .strip:not([data-static]) .tarmac { stroke-dashoffset: 0; }

/* No-JS guard: if fly.js never runs, body never gets .fly-on and --ct stays
   unset, so show the copy in its resting state instead of hidden. */
body:not(.fly-on) .copy { opacity: 1; transform: none; }

/* endcard (copied from experience.css) */

/* Tokens used by the endcard rules below; styles.css does not define these
   (it uses --muted/--green with different values), so pull the exact
   experience.css values in under the fly scope. --ease-out already has an
   inline fallback everywhere else in this file. */
body.fly-on {
  --paper: #f5f5f7;
  --green: #30d158;
  --mute: #9a9aa3;
}

.fly .end .kicker {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.9);
}

.fly .end {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: left;
}

.fly .end-inner { width: min(100%, 820px); }

.fly .end h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 650;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin: 0 0 16px;
  max-width: 14ch;
  font-size: clamp(40px, 7vw, 84px);
}

.fly .end p {
  color: var(--paper);
  opacity: 0.86;
  max-width: 46ch;
  line-height: 1.55;
}

.fly .end .prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.fly .end .prices article {
  border: 1px solid rgba(245, 245, 247, 0.14);
  border-radius: 14px;
  padding: 16px;
}

.fly .end .prices span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

.fly .end .prices strong {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 650;
  font-size: 40px;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.fly .end .prices article:last-child {
  border-color: rgba(48, 209, 88, 0.5);
}

.fly .jx-cta {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--green);
  color: #061007;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fly .jx-cta.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(245, 245, 247, 0.28);
  margin-left: 10px;
}

.fly .legal-slim {
  font-size: 12px;
  color: var(--mute);
  max-width: 62ch;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .fly .end .prices { grid-template-columns: 1fr; }
  .fly .jx-cta.ghost { margin-left: 0; margin-top: 10px; }
}
