/* =============================================================================
   NGA — /cross-promo. A self-contained page on the "Signal" design system.
   Tokens, header and footer are copied from the home page rather than
   linked, so this page doesn't shift when the root styles.css changes.

   <main> carries the cross-promo story in three beats: the offer, the unit,
   the integration. The phone mockups are the artboards from the
   "NGA Cross-Promo Surfaces" design canvas, embedded as live markup rather
   than screenshots so they stay crisp at any size. The "Oak" games and their
   icons are generated, not real titles. Their shadows, colors and type belong
   to the games being drawn and deliberately do not follow Signal — everything
   around them does.

   Scaling those artboards is pure CSS: each .mock declares the artboard's own
   pixel size (--w/--h) and a scale (--s); the wrapper is sized from the same
   numbers so layout sees the scaled box, not the full-size original.
   ============================================================================= */

:root {
  --paper: #FBFAF7;
  --ink: #14161A;
  --body: #4A4F57;
  --label: #6E6A60;
  --line-soft: #EDEAE3;
  --line: #E3DFD6;

  --signal: oklch(0.72 0.17 152);
  --signal-deep: oklch(0.54 0.14 152);   /* lightest green text that holds 4.5:1 on paper */
  --signal-ink: #08130f;
  --signal-wash: oklch(0.72 0.17 152 / 0.10);

  /* The one place Signal green would lie: the cost the studio pays today.
     Clay — expensive rather than broken, which is what this number is. Holds
     5.5:1 on paper, and stays usable wherever that argument is made again. */
  --alarm: oklch(0.52 0.09 30);

  --shell: 1160px;
  --gutter: 28px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, li, figure, figcaption { margin: 0; padding: 0; }
li { list-style: none; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
/* Logo tile + product name on one line: this is a product page of NGA's,
   not a loose page, and the lockup is what says so. It also absorbs the
   hero's kicker — the label is stated once, at the top. */
.site-header {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }

.brand-rule { width: 1px; height: 21px; background: var(--line); flex: none; }

.brand-product {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--signal);
  color: var(--signal-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ---------- Background ---------- */
/* Three circles drift and breathe behind the page, one per game in a
   portfolio. Each multiplies onto the others, so where two overlap the colour
   turns — sky and lime make green, the way players cross between titles. The
   layer sits at half opacity, so --label text holds 4.6:1 even where all
   three overlap. Only translate and scale animate: a slow drift and a quicker
   breath, on periods that never line up, so the picture rarely repeats. The
   animations only attach when the visitor has no reduced-motion preference;
   otherwise the circles hold still where they start, sky and lime already
   overlapping. */
.orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  opacity: 0.5;
}
.orbs i {
  --d: clamp(220px, 34vmax, 520px);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--d);
  height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  background: var(--c);
  mix-blend-mode: multiply;
}
.orbs i:nth-child(1) { --x: 28%; --y: 28%; --c: oklch(0.975 0.022 225); }
.orbs i:nth-child(2) { --x: 48%; --y: 40%; --c: oklch(0.98 0.05 118); }
.orbs i:nth-child(3) { --x: 84%; --y: 82%; --c: oklch(0.972 0.025 300); }
@media (prefers-reduced-motion: no-preference) {
  .orbs i:nth-child(1) { animation: orb-sky 67s ease-in-out infinite alternate, orb-breathe 11s ease-in-out infinite alternate; }
  .orbs i:nth-child(2) { animation: orb-lime 83s ease-in-out infinite alternate, orb-breathe 14s ease-in-out -5s infinite alternate; }
  .orbs i:nth-child(3) { animation: orb-lilac 97s ease-in-out infinite alternate, orb-breathe 17s ease-in-out -11s infinite alternate; }
}
@keyframes orb-sky   { 33% { translate: 24vw 22vh; }  66% { translate: 40vw -8vh; }   100% { translate: 10vw 42vh; } }
@keyframes orb-lime  { 33% { translate: -30vw 8vh; }  66% { translate: -8vw 34vh; }   100% { translate: 20vw -24vh; } }
@keyframes orb-lilac { 33% { translate: -18vw -40vh; } 66% { translate: -60vw -20vh; } 100% { translate: -44vw 4vh; } }
@keyframes orb-breathe { from { scale: 0.6; } to { scale: 1.3; } }

/* ---------- Page shell ---------- */
.page { flex: 1; }

.band {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.band + .band { padding-top: clamp(56px, 8vw, 104px); }

/* ---------- Type ---------- */
.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-deep);
  display: flex;
  align-items: center;
  gap: 11px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--signal-deep); }

h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 17ch;
  margin-top: 18px;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--signal-deep); }

h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 22ch;
  margin-top: 16px;
  text-wrap: balance;
}
h2 em { font-style: normal; color: var(--signal-deep); }

.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--body);
  max-width: 62ch;
  margin-top: 18px;
  text-wrap: pretty;
}
.lede b { color: var(--ink); font-weight: 600; }
.lede em { font-style: italic; }

/* ---------- Mock scaling (see file header) ---------- */
.mock {
  --s: 1;
  flex: none;
  width: calc(var(--w) * var(--s));
  height: calc(var(--h) * var(--s));
  overflow: hidden;
}
.mock > * { transform: scale(var(--s)); transform-origin: top left; }

.m-hero  { --w: 360px; --h: 700px; --s: 0.88; }
.m-host  { --w: 360px; --h: 700px; --s: 0.86; }
.m-break { --w: 393px; --h: 818px; --s: 0.77; }

/* ---------- Hero ---------- */
/* Centred, like the heroes on nga.io and /vision, and unlike
   everything below it here: the page opens on one figure, then settles into
   its left-aligned rhythm. Nothing sits beside the number, so the number is
   free to be the largest thing on the page. */
.hero { padding-top: clamp(24px, 4vw, 44px); text-align: center; }
.hero h1 { max-width: 30ch; margin-left: auto; margin-right: auto; }

/* The headline lives inside the grid's left cell, not above it, so the copy
   column and the mockup start at the same altitude. With three two-line
   points the text runs shorter than a 700px phone; sharing the top edge is
   what keeps the leftover space at the bottom from reading as a hole. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(20px, 3vw, 32px);
}

.hero-copy h1 { margin-top: 0; }
.points { display: flex; flex-direction: column; gap: 30px; margin-top: clamp(30px, 4vw, 46px); }
.point { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.point .n {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--signal-deep); padding-top: 4px;
}
/* Each point names the status quo it kills before it makes its claim, so the
   three answers read as answers rather than as a feature list. */
.point .was { font-size: 14px; line-height: 1.5; color: var(--label); margin-bottom: 9px; text-wrap: pretty; }
.point .was .tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 9px;
}

.point .t { font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.28; }
.point .d { font-size: 15px; line-height: 1.55; color: var(--body); margin-top: 6px; text-wrap: pretty; }

/* ---------- What it costs today: two fields, one number ---------- */
.calc {
  margin: clamp(30px, 4vw, 50px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 4vw, 46px);
}

/* Bottom-aligned: one label runs to two lines and the other does not, and
   it is the boxes that should line up, not the text above them. */
.calc-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 18px 24px; }
.calc-in .f { width: 240px; text-align: left; }
.calc-in label {
  display: block; font-size: 13.5px; line-height: 1.45;
  color: var(--label); text-wrap: pretty;
}

/* The box is the control, not the input: the border, the padding and the
   focus ring live on the wrapper, so the unit sits inside the field with the
   number and the number itself carries no chrome of its own. */
.field {
  display: flex; align-items: baseline; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; margin-top: 9px;
}
.field:focus-within { border-color: transparent; outline: 2px solid var(--signal-deep); }
.field input {
  flex: 1; min-width: 0; border: 0; padding: 0; background: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 19px; line-height: 1.2; color: var(--ink);
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none;
}
.field input:focus { outline: none; }
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field .unit {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px; color: var(--label); flex: none;
}

.calc-out .h {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--label); margin: 0;
}
.calc-out .v {
  font-size: clamp(60px, 10vw, 128px); font-weight: 800; letter-spacing: -0.04em;
  color: var(--alarm); margin: 10px 0 0; font-variant-numeric: tabular-nums;
  line-height: 0.95;
}

/* ---------- Three hosts ---------- */
/* Flex rather than a 3-column grid: the row holds two surfaces now and may hold
   three again, and a fixed track count leaves a hole when the count changes.
   Centred so any count reads as a deliberate set. */
.hosts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(28px, 4vw, 44px);
  align-items: flex-start;
}
.host { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Every mockup is a drawing of the format, not a screenshot of the SDK: each says so. */
.shot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.illus {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); text-align: center;
}
.host .illus { margin-top: 4px; }
.host figcaption { text-align: center; }
.host .h {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-deep);
}

/* ---------- Fixed / model rail ---------- */
.rail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(26px, 3vw, 40px); }
.rail .box { border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; background: #fff; }
.rail .box .h {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label);
}
.rail .box .b { font-size: 15px; line-height: 1.55; color: var(--body); margin-top: 10px; text-wrap: pretty; }
.rail .box .b b { color: var(--ink); font-weight: 600; }

/* ---------- Handoff ---------- */
.handoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(20px, 3vw, 32px);
}

/* Same move as the hero: the kicker and headline sit in the grid's left cell
   so the copy column and the phone start at the same altitude. */
.handoff-grid h2 { margin-top: 14px; }

.steps { border-top: 1px solid var(--line-soft); margin-top: 32px; }
.step {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.step .w {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label);
}
.step .t { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.step .t s { display: block; text-decoration: none; font-weight: 400; color: var(--body); font-size: 14.5px; margin-top: 4px; }

/* The close is its own full-width band rather than a box in the left column
   of the integration grid: in that column it sat under the steps with the
   phone still running beside it, so it read as a fourth step rather than the
   end of the page. Across the full width it has nothing to align against. */
.ask {
  border-radius: 20px;
  background: var(--signal-wash);
  padding: clamp(28px, 4vw, 46px) clamp(26px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ask .h { font-size: clamp(21px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.ask .b { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: var(--body); max-width: 60ch; }
.ask a { color: var(--signal-deep); font-weight: 600; }
/* Sign up free (/nav.css), the email as the second way in. */
.ask .signup-row { margin-top: 8px; }
.ask .signup-cta { color: var(--signal-ink); font-weight: 800; }
.ask-alt { font-size: clamp(15px, 1.4vw, 17px); color: var(--body); }
.hero-signup { justify-content: center; margin-top: clamp(24px, 3vw, 34px); }
/* The answer to the number above, then the button. */
.hero-signup-lead { font-size: clamp(18px, 1.8vw, 22px); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }

/* ---------- Closing note ---------- */
.note {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--label);
  max-width: 88ch;
  margin: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}

/* ---------- Narrow ---------- */
@media (max-width: 1020px) {
  .m-hero { --s: 0.76; }
  .m-host { --s: 0.72; }
  .m-break { --s: 0.68; }
}
@media (max-width: 860px) {
  .hero-grid, .handoff-grid { grid-template-columns: 1fr; }
  .hosts { flex-direction: column; align-items: center; }
  .rail { grid-template-columns: 1fr; }
  .mock { margin: 0 auto; }
  .m-hero { --s: 0.92; }
  .m-host { --s: 0.9; }
  .m-break { --s: 0.85; }
}
@media (max-width: 460px) {
  .m-hero { --s: 0.78; }
  .m-host { --s: 0.76; }
  .m-break { --s: 0.70; }
}

/* ---------- The AI flair, ported from the root styles.css ----------
   An aurora that starts at the brand green and runs out to violet, a glint
   sweeping through it, and a soft haze of the same colours behind. Every stop
   sits near oklch L 0.52, so the words hold >=4.5:1 on paper at any frame. */
@property --ai-flow  { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --ai-shine { syntax: "<percentage>"; inherits: false; initial-value: 110%; }

.ai-native {
  --ai-green:  oklch(0.52 0.13 152);
  --ai-teal:   oklch(0.53 0.09 195);
  --ai-blue:   oklch(0.52 0.17 262);
  --ai-violet: oklch(0.52 0.21 298);
  position: relative;
  white-space: nowrap;
  font-weight: 700;
}

/* The haze lives on the wrapper, not the clipped text, so Safari's
   background-clip: text never has a composited layer inside it. */
.ai-native::before {
  content: "";
  position: absolute;
  inset: -0.2em -0.45em;
  z-index: -1;
  background:
    radial-gradient(closest-side, oklch(0.88 0.11 152), transparent) 0 50% / 65% 100% no-repeat,
    radial-gradient(closest-side, oklch(0.86 0.10 290), transparent) 100% 50% / 65% 100% no-repeat;
  opacity: 0.45;
  animation: ai-haze 7s ease-in-out infinite alternate;
  pointer-events: none;
}

h1 .ai-native { font-weight: inherit; }         /* in the headline, match its 800 */

h1 .ai-native, h2 .ai-native { font-weight: inherit; }   /* match the headline it sits in */

.ai-native > span { color: var(--ai-green); }   /* where text clipping isn't supported */

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .ai-native > span {
    background-image:
      linear-gradient(100deg, transparent 44%, rgb(255 255 255 / 0.7) 50%, transparent 56%),
      linear-gradient(90deg, var(--ai-green), var(--ai-teal), var(--ai-blue), var(--ai-violet), var(--ai-blue), var(--ai-teal), var(--ai-green));
    background-size: 250% 100%, 200% 100%;
    background-repeat: no-repeat, repeat;
    background-position: var(--ai-shine) 0, var(--ai-flow) 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ai-flow 8s linear infinite, ai-shine 4.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s infinite;
  }
}

@keyframes ai-flow  { from { --ai-flow: 200%; } to { --ai-flow: 0%; } }
@keyframes ai-shine { 0% { --ai-shine: 110%; } 40%, 100% { --ai-shine: -10%; } }
@keyframes ai-haze {
  from { background-position: 0 50%, 100% 50%; opacity: 0.3; }
  to   { background-position: 100% 50%, 0 50%; opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-native::before, .ai-native > span { animation: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 26px var(--gutter);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--label);
}
.site-footer a { color: var(--label); }
