/* Ingester landing. Tokens and sizes from design/ingester-landing/README.md.
   Everything inside .frame is laid out in key-frame pixels (1440×900, or 390×844 in
   .mode-phone); story.js scales the frame to fit the viewport and moves things. */

:root {
  --cobalt: #1949c5;
  --cobalt-deep: #0a2f94;
  --mist: #d1def9;
  --step-dim: #5d83d4;
  --pink: #ff9da9;
  --pink-tint: #ffd8dc;
  --po-highlight: #ffced3;
  --paper: #f9f5ec;
  --po-paper: #f3eee1;
  --ink: #131a29;
  --ink-soft: #4d5566;
  --rule: #dad7d0;
  --po-rule: #bcb7a9;
  --flag: #de3e2d;
  --flag-text: #ac1c0f;
  --stamp: #d33c33;
  --shadow: 0 30px 60px rgba(10, 20, 80, 0.4);
  --font-display: 'K2D', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-mono: 'Red Hat Mono', ui-monospace, monospace;
  --font-po: 'Courier Prime', 'Courier New', monospace;
}

html { background: var(--cobalt); }
body {
  margin: 0;
  background: var(--cobalt);
  color: var(--paper);
  font-family: var(--font-body);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* K2D is for display text only: the wordmark, headlines, step titles and the order number. */
.lockup, .hero-copy h2, .cap h2, .finale h2, .step-title, .order-no { font-family: var(--font-display); }

/* The mark replaces the i: 0.82em × 0.4em, stem bottom on the baseline. */
.lockup { font-weight: 800; white-space: nowrap; color: var(--paper); }
.lockup svg { height: 0.82em; width: 0.4em; vertical-align: baseline; overflow: visible; fill: var(--pink); }

.eyebrow {
  font: 500 15px/1.3 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink);
}

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; pointer-events: none; }
.nav a { pointer-events: auto; }
.nav-lockup {
  position: absolute; top: 30px; left: 64px;
  font-size: 30px; line-height: 1; letter-spacing: -0.02em;
  text-decoration: none; opacity: 0;
}
.demo-btn {
  position: absolute; top: 28px; right: 64px;
  font: 600 17px/1.2 var(--font-body);
  padding: 12px 22px; border-radius: 999px;
  background: var(--paper); color: var(--cobalt-deep);
  text-decoration: none;
}
.demo-btn:hover { color: var(--ink); }
.mode-phone .nav-lockup { top: 24px; left: 16px; font-size: 24px; }
.mode-phone .demo-btn { top: 20px; right: 16px; font-size: 14px; padding: 9px 16px; }

/* ---------- stage ---------- */
.track { position: relative; height: 900vh; height: 900svh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.frame { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; }
.frame > * { position: absolute; }

/* Reduced motion: the five beats as plain sections. */
.track.is-static { height: auto; }
.track.is-static .stage { position: relative; }

/* ---------- beat 1 ---------- */
.hero-lockup { top: 130px; left: 96px; font-size: 280px; line-height: 1.1; letter-spacing: -0.035em; z-index: 1; }
.hero-word { display: inline-block; }
.hero-copy { top: 560px; left: 96px; max-width: 880px; display: flex; flex-direction: column; gap: 18px; z-index: 1; }
.hero-copy h2 { font-size: 60px; line-height: 1.02; font-weight: 700; letter-spacing: -0.025em; }
.hero-copy p { font-size: 21px; line-height: 1.5; color: var(--mist); max-width: 680px; text-wrap: pretty; }
.hero-copy .eyebrow { margin-top: 12px; }

.mode-phone .hero-lockup { top: 220px; left: 16px; font-size: 76px; }
.mode-phone .hero-copy { top: 380px; left: 20px; right: 20px; gap: 14px; }
.mode-phone .hero-copy h2 { font-size: 36px; line-height: 1.04; }
.mode-phone .hero-copy p { font-size: 17px; }
.mode-phone .hero-copy .eyebrow { margin-top: 8px; font-size: 13px; }

/* ---------- captions ---------- */
.cap { top: 690px; left: 96px; max-width: 900px; display: flex; flex-direction: column; gap: 12px; opacity: 0; z-index: 1; }
.cap h2 { font-size: 52px; line-height: 1.02; font-weight: 700; letter-spacing: -0.025em; }
.cap p { font-size: 20px; line-height: 1.5; color: var(--mist); max-width: 640px; text-wrap: pretty; }
.cap-ready { top: 120px; }

.mode-phone .cap { top: 610px; left: 16px; right: 16px; gap: 10px; }
.mode-phone .cap .eyebrow { font-size: 13px; letter-spacing: 0.14em; }
.mode-phone .cap h2 { font-size: 32px; line-height: 1.04; }
.mode-phone .cap p { font-size: 17px; }
.mode-phone .cap-ready { top: 96px; }

/* ---------- the PO ---------- */
.po {
  left: 0; top: 0; width: 450px; box-sizing: border-box;
  padding: 30px 30px 26px;
  background: var(--po-paper); color: var(--ink);
  font-family: var(--font-po);
  transform-origin: 0 0;
  box-shadow: var(--shadow);
  visibility: hidden; z-index: 2;
}
.po-stamp {
  position: absolute; top: 26px; right: 24px;
  transform: rotate(8deg);
  border: 2px solid var(--stamp); border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: 0.08em;
  color: var(--stamp); text-align: center;
}
.po-title { font-size: 24px; font-weight: 700; letter-spacing: 0.02em; }
.po-from { font-size: 13px; line-height: 1.45; margin-top: 6px; }
.po-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  margin-top: 16px; padding: 14px 0;
  border-top: 1px solid var(--po-rule); border-bottom: 1px solid var(--po-rule);
}
.po-label, .po-head { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-soft); }
.po-value { font-size: 15px; font-weight: 700; }
.po-value.lifted { background: var(--po-highlight); }
.po-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px 52px; gap: 8px; }
.po-grid > :nth-child(n+3) { text-align: right; }
.po-head { margin-top: 12px; }
.po-row { padding: 8px 4px; margin: 0 -4px; font-size: 14px; border-bottom: 1px dashed var(--po-rule); }
.po-row.lifted { background: var(--po-highlight); }
.po-total { display: flex; justify-content: space-between; margin-top: 12px; font-size: 15px; font-weight: 700; }
.po-note { margin-top: 14px; font-size: 12px; line-height: 1.45; color: var(--ink-soft); }

/* ---------- chips ---------- */
.chips { top: 0; height: 900px; width: 6000px; overflow: hidden; pointer-events: none; z-index: 3; }
.chip {
  position: absolute; left: 0; top: 0;
  font: 500 17px/1.25 var(--font-mono);
  padding: 12px 20px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  white-space: nowrap; transform-origin: 0 0;
  visibility: hidden;
}
.chip.po-chip {
  font-size: 21px; font-weight: 600; padding: 16px 28px;
  background: var(--pink);
  box-shadow: 0 0 0 6px rgba(255, 157, 169, 0.25);
}
.mode-phone .chips { height: 844px; }
.mode-phone .chip { font-size: 14px; padding: 9px 14px; }
.mode-phone .chip.po-chip { font-size: 16px; padding: 12px 18px; }

/* ---------- beat 4: between the jaws ---------- */
.band { left: 0; top: 0; width: 100%; height: 0; overflow: hidden; visibility: hidden; z-index: 4; }
.band-meta {
  position: absolute; top: 28px; left: 96px; right: 96px;
  display: flex; justify-content: space-between;
  font: 500 15px/1.3 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mist);
}
.steps { position: absolute; inset: 0; }
.steps li { position: absolute; left: 0; right: 0; top: 0; }
.step-title {
  position: absolute; left: 64px; right: 64px; top: 0;
  text-align: center; text-wrap: balance;
  font-size: 72px; line-height: 1.02; font-weight: 800; letter-spacing: -0.03em;
  transform-origin: 50% 0;
}
.step-title.dim { font-weight: 700; letter-spacing: -0.02em; }
.step-chip-row { position: absolute; left: 64px; right: 64px; top: 0; display: flex; justify-content: center; }
.step-chip {
  display: flex; align-items: center; gap: 12px;
  font: 500 19px/1.3 var(--font-mono);
  padding: 12px 22px; border-radius: 999px;
  background: var(--cobalt-deep); color: var(--paper);
}
.step-chip.exception { background: var(--paper); color: var(--ink); }
.step-chip .flag { width: 14px; height: 14px; border-radius: 4px; background: var(--flag); flex: none; }

.mode-phone .band-meta { top: 16px; left: 16px; right: 16px; font-size: 12px; letter-spacing: 0.14em; }
.mode-phone .band-po { display: none; }
.mode-phone .step-title { left: 16px; right: 16px; font-size: 36px; }
.mode-phone .step-chip-row { left: 16px; right: 16px; }
.mode-phone .step-chip {
  align-items: flex-start; gap: 10px;
  font-size: 14px; line-height: 1.4; text-align: left;
  padding: 10px 16px; border-radius: 14px;
}
.mode-phone .step-chip .flag { width: 12px; height: 12px; border-radius: 3px; margin-top: 4px; }

/* ---------- beat 5: the order card ---------- */
.order {
  left: 0; top: 0; width: 530px; box-sizing: border-box;
  padding: 26px 30px 22px;
  background: var(--paper); color: var(--ink);
  border-radius: 20px; box-shadow: var(--shadow);
  transform-origin: 0 0;
  visibility: hidden; z-index: 5;
}
.order-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "no badges" "sub sub"; align-items: center; gap: 8px 16px; }
.order-no { grid-area: no; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.badges { grid-area: badges; display: flex; gap: 8px; }
.badge { font: 500 13px/1.3 var(--font-mono); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.badge.pending { background: var(--pink-tint); }
.badge.terms { padding: 5px 11px; border: 1px solid var(--rule); }
.order-sub { grid-area: sub; font-size: 16px; color: var(--ink-soft); }
.order-lines { margin-top: 16px; }
.line {
  position: relative;
  display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px 80px; gap: 0 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--rule);
  font-size: 15px;
}
.line .sku { font: 600 14px var(--font-mono); }
.line .qty { font: 14px var(--font-mono); color: var(--ink-soft); text-align: right; }
.line .amt { font: 14px var(--font-mono); text-align: right; }
.line.flagged { padding-bottom: 10px; }
/* Sticks 12px out of the card's left edge (rows are inset by the 30px padding). */
.line .tab { position: absolute; left: -42px; top: 8px; width: 22px; height: 24px; border-radius: 5px 0 0 5px; background: var(--flag); }
.line .note {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  font: 13px var(--font-mono); color: var(--flag-text);
}
.line .note .flag { width: 10px; height: 10px; border-radius: 3px; background: var(--flag); flex: none; }
.order-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid var(--ink); padding-top: 12px; margin-top: 2px;
  font-size: 17px; font-weight: 700;
}
.order-total .amt { font: 600 19px var(--font-mono); }
.order-foot { font: 12px var(--font-mono); color: var(--ink-soft); margin-top: 12px; }

.mode-phone .order { width: 286px; padding: 16px 16px 14px; border-radius: 16px; box-shadow: 0 20px 40px rgba(10, 20, 80, 0.4); }
.mode-phone .order-top { grid-template-columns: 1fr; grid-template-areas: "no" "sub" "badges"; gap: 6px 0; }
.mode-phone .order-no { font-size: 22px; }
.mode-phone .order-sub { font-size: 13px; }
.mode-phone .badges { gap: 6px; margin-top: 4px; }
.mode-phone .badge { font-size: 11px; padding: 4px 9px; }
.mode-phone .badge.terms { padding: 3px 8px; }
.mode-phone .order-lines { margin-top: 10px; }
.mode-phone .line { grid-template-columns: minmax(0, 1fr) 36px 70px; gap: 0 8px; padding: 7px 0; font: 13px var(--font-mono); }
.mode-phone .line .desc { display: none; }
.mode-phone .line .sku, .mode-phone .line .qty, .mode-phone .line .amt { font-size: 13px; }
.mode-phone .line .tab { left: -26px; top: 6px; width: 14px; height: 20px; border-radius: 4px 0 0 4px; }
.mode-phone .line .note { margin-top: 4px; font-size: 11px; line-height: 1.4; }
.mode-phone .line .note .flag { display: none; }
.mode-phone .order-total { font-size: 14px; padding-top: 9px; }
.mode-phone .order-total .amt { font-size: 15px; }
.mode-phone .order-foot { font-size: 11px; line-height: 1.4; margin-top: 8px; }

.finale { top: 120px; left: 96px; width: 620px; display: flex; flex-direction: column; gap: 22px; opacity: 0; z-index: 1; }
.finale h2 { font-size: 62px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; white-space: nowrap; }
.finale h2 span { color: var(--pink); }
.finale p { font-size: 21px; line-height: 1.5; color: var(--mist); max-width: 470px; text-wrap: pretty; }
.forward { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.forward-label { font: 500 14px/1.3 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); }
.forward-pill {
  align-self: flex-start;
  font: 500 21px/1.3 var(--font-mono);
  padding: 13px 22px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
}
.mode-phone .finale { top: 96px; left: 16px; right: 16px; width: auto; gap: 14px; }
.mode-phone .finale h2 { font-size: 30px; line-height: 1.02; }
.mode-phone .finale p { font-size: 16px; }
.mode-phone .forward { margin-top: 0; }
.mode-phone .forward-label { display: none; }
.mode-phone .forward-pill { font-size: 15px; padding: 11px 16px; }

.mark-layer { left: 0; top: 0; overflow: visible; pointer-events: none; fill: var(--pink); z-index: 6; }
.halo { fill: none; stroke: var(--pink); stroke-width: 6; opacity: 0; }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px;
  padding: 48px 64px 56px;
  background: var(--cobalt-deep); color: var(--mist);
  font-size: 16px; line-height: 1.5;
}
.foot-lockup { font-size: 30px; line-height: 1; letter-spacing: -0.02em; }
.foot a { color: var(--paper); }
.mode-phone .foot { padding: 32px 16px 40px; }
