/* Pistachio /try marketing landing (AND-1540). Same tokens and look as the web app (src/client/tokens.css, style.css):
   white canvas, SF system type, black/white UI; the only color is the cat and her Siri glow around the orb.
   Dark mode follows the system (iOS dark tokens from design/src/kit.css); every text pair is AA, checked numerically.
   Light secondary ink is rgba(60,60,67,.75), not iOS's .6 (3.4:1 on white): 5.2:1 on #fff, 4.9:1 on cards, 4.8:1 on the field fill.
   One black (primary) button per screen: the hero or final CTA, the email Join, Watch "Yes", or Join the beta when install shows;
   the top-bar pill, Share and "Not yet" are grey. Font sizes are px, so every row wraps and long words break at 200% text. */
:root {
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
  --color-label: #000;
  --color-secondary: rgba(60, 60, 67, .75);
  --color-fill: rgba(118, 118, 128, .12);
  --color-fill-press: rgba(118, 118, 128, .2);
  --color-card: #F5F5F7;
  --color-bg: #fff;
  --color-raised: #fff;                  /* buttons, inputs and pills that sit on a card */
  --color-edge: rgba(0, 0, 0, .08);
  --color-ink: #000;                     /* solid buttons, numbers, checks and focus rings */
  --color-on-ink: #fff;
  --color-bar: rgba(255, 255, 255, .72);
  --rgb-bg: 255, 255, 255;               /* --color-bg as r, g, b: the /try top's scroll-edge fade (try-v3.css .v3-edge) */
  /* The primary is flat (parity §17, iPhone OnboardingV3Theme.swift primaryFill): one colour, no gloss, no shadow; disabled
     is the same fill at 30% opacity. Label #fff on #1D1D1F is 16.9:1. */
  --cta-fill: #1D1D1F;
  --glow-1: #6FD3FF;
  --glow-2: #B48CFF;
  --glow-3: #FF8FA3;
  --glow-4: #FFC46B;
  --glow-5: #8FB8FF;
  --margin: 20px;
  --size-hit: 44px;
  --size-cta: 54px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.32, 1.25, 0.5, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

/* Dark: black canvas, white ink. Ratios (WCAG): label #fff 21:1 on #000, 17:1 on cards #1C1C1E, 13.9:1 on raised #2C2C2E;
   secondary rgba(235,235,245,.6) 6.4:1 on #000, 5.9:1 on cards, 5.3:1 on raised and the placeholder on the field;
   the flat primary: #000 on #FFFFFF 21:1. The cat sits on her colour glow alone, no disc (PRINCIPLES.md "Controls float"). */
@media (prefers-color-scheme: dark) {
  :root {
    --color-label: #fff;
    --color-secondary: rgba(235, 235, 245, .6);
    --color-fill: rgba(118, 118, 128, .24);
    --color-fill-press: rgba(118, 118, 128, .32);
    --color-card: #1C1C1E;
    --color-bg: #000;
    --color-raised: #2C2C2E;
    --color-edge: rgba(255, 255, 255, .10);
    --color-ink: #fff;
    --color-on-ink: #000;
    --color-bar: rgba(22, 22, 24, .72);
    --rgb-bg: 0, 0, 0;
    --cta-fill: #FFFFFF;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--color-bg); color: var(--color-label); }
body {
  font: 400 17px/1.45 var(--font-text); letter-spacing: -.43px;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 3px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
/* Flow v3 (try-v3.js) is taking over: hide the landing until it does. The class only exists when v3 runs. */
.v3-boot .bar, .v3-boot main, .v3-boot .foot { visibility: hidden; }

/* ---------- top bar: glass, sticky ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px;
  padding: calc(var(--safe-t) + 10px) max(var(--margin), calc(50vw - 520px)) 10px;
  background: var(--color-bar); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 19px/1 var(--font-display); letter-spacing: -.3px; min-height: var(--size-hit); }
.brand .cat { width: 26px; height: 26px; }
.barcta {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border-radius: 18px; text-decoration: none;
  background: var(--color-fill); color: var(--color-label); font: 600 15px/1.2 var(--font-text); letter-spacing: -.2px;
  transition: transform 120ms var(--ease-out), opacity 300ms;
}
.barcta:active { transform: scale(.96); }

main { max-width: 640px; margin: 0 auto; padding: 0 var(--margin); }
section { padding: 56px 0; }
h2 { font: 700 28px/1.18 var(--font-display); letter-spacing: .2px; margin-bottom: 14px; }
h1, h2, h3, .err { overflow-wrap: anywhere; }
section p + p { margin-top: 12px; }
section > p, .watch p { color: var(--color-secondary); }

/* ---------- hero ---------- */
.hero, .joined { overflow-x: clip; } /* the orb's glow never widens the page */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 48px; padding-bottom: 40px; }
.hero h1 { font: 800 44px/1.04 var(--font-display); letter-spacing: -1.2px; max-width: min(12ch, 100%); margin-top: 34px; text-wrap: balance; }
.lede { margin-top: 16px; color: var(--color-secondary); max-width: 34ch; text-wrap: pretty; }

/* the orb: the cat on her soft colour glow, with no disc, ring or fill behind her (PRINCIPLES.md "Controls float, nothing sits
   behind them": the cat has no backing disc; design SPEC §18.1). The box itself never paints: no background, border or shadow. */
.orb { --orb: 148px; position: relative; width: min(var(--orb), 100%); aspect-ratio: 1; flex: none; border-radius: 50%; isolation: isolate; }
.orb > .aura, .orb > .cat { position: absolute; }
.orb > .aura { inset: -22%; border-radius: 50%; filter: blur(20px); opacity: .6; animation: orbspin 9s linear infinite; z-index: -1;
  background: conic-gradient(from 0deg, var(--glow-1), var(--glow-2), var(--glow-3), var(--glow-4), var(--glow-5), var(--glow-1)); }
.orb > .cat { left: 20%; top: 21%; width: 60%; height: 60%; }
.orb.small { --orb: 92px; }
@keyframes orbspin { to { transform: rotate(360deg); } }

/* the pixel cat: awake cats blink now and then; asleep shows Zzz; happy hops once */
.cat { display: block; overflow: visible; }
.cat .eyes-shut { opacity: 0; animation: blink 5s step-end infinite; }
@keyframes blink { 0%, 95% { opacity: 0; } 96%, 98% { opacity: 1; } 99% { opacity: 0; } }
.cat .zzz { animation: zzz 2.6s ease-in-out infinite; }
@keyframes zzz { 0%, 100% { opacity: .35; transform: translateY(.3px); } 50% { opacity: 1; transform: translateY(-.4px); } }
.cat.happy { animation: hop 900ms var(--ease-spring) 2; transform-origin: 50% 100%; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-9%) scale(1.04); } 60% { transform: translateY(0) scale(.98); } }

/* heard -> done ticker: all three readable without JS; with JS one at a time */
.ticker { margin-top: 28px; width: 100%; max-width: 360px; display: grid; gap: 10px; text-align: left; }
.ticker li { display: grid; gap: 4px; padding: 14px 16px; border-radius: 20px; background: var(--color-card); }
.ticker .heard { font-size: 15px; line-height: 20px; color: var(--color-secondary); font-style: italic; }
.ticker .done { font-size: 15px; line-height: 20px; }
.ticker .done b { font-weight: 600; margin-right: 6px; }
.js .ticker { display: grid; grid-template-areas: "card"; gap: 0; min-height: 86px; }
.js .ticker li { grid-area: card; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.js .ticker li.on { opacity: 1; transform: none; }
.js .ticker li .done { opacity: 0; transition: opacity 400ms 900ms; }
.js .ticker li.on .done { opacity: 1; }

/* ---------- the join block: CTA -> inline email -> success ---------- */
.join { width: 100%; max-width: 380px; margin: 28px auto 0; text-align: center; }
.cta, .send {
  display: grid; place-items: center; min-height: var(--size-cta); padding: 8px 22px; border-radius: calc(var(--size-cta) / 2); text-decoration: none;
  background: var(--cta-fill); color: var(--color-on-ink); font: 600 17px/1.2 var(--font-text); letter-spacing: -.43px;
  transition: transform 120ms var(--ease-out), opacity 300ms;
}
.cta { width: 100%; }
.cta:active, .send:active { transform: scale(.96); }
.cta:disabled, .cta[aria-disabled="true"], .send:disabled { opacity: .3; }
.field { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 30px; background: var(--color-fill); animation: rise 380ms var(--ease-out); }
.field input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; padding: 0 14px; font-size: 17px; outline: none; }
.field input::placeholder { color: var(--color-secondary); }
.field .send { min-height: 48px; padding: 6px 22px; border-radius: 24px; }
.field:focus-within { box-shadow: 0 0 0 2px var(--color-ink); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.err { margin-top: 10px; font-size: 15px; font-weight: 600; }
.err.wait { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--color-secondary); } /* "Waiting for network" while a join retries */
.fine { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--color-secondary); }
section > p.cite { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--color-secondary); } /* the source under a research claim */
.cite a { text-underline-offset: 2px; }

.joined { display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise 420ms var(--ease-out); }
.joined .orb { margin: 12px 0 18px; }
.joined h3 { font: 700 28px/1.2 var(--font-display); outline: none; }
.joined > p { margin-top: 6px; color: var(--color-secondary); }
.qualify, .share { width: 100%; margin-top: 22px; padding: 16px; border-radius: 22px; background: var(--color-card); }
.qualify p, .share p { font-size: 15px; font-weight: 600; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.choices button { flex: 1 1 auto; min-width: 0; min-height: var(--size-hit); padding: 8px 16px; border-radius: 22px; font-weight: 600; overflow-wrap: anywhere; transition: transform 120ms var(--ease-out); }
.choices button:active { transform: scale(.96); }
.choices [data-watch="yes"] { flex-grow: 2; background: var(--color-ink); color: var(--color-on-ink); } /* the one primary */
.choices [data-watch="no"] { color: var(--color-secondary); }                                       /* a grey text button */
/* answered: the picked answer gets a check (Not yet also a ring); the other becomes a grey text button, still tappable */
.qualify.done .choices button:not([aria-pressed="true"]) { background: none; color: var(--color-secondary); box-shadow: none; }
.choices [data-watch="no"][aria-pressed="true"] { background: var(--color-raised); color: var(--color-label); box-shadow: inset 0 0 0 2px var(--color-label); }
.choices button[aria-pressed="true"]::before {
  content: ""; display: inline-block; width: .32em; height: .62em; margin: 0 .55em 0 .1em; border: solid currentColor; border-width: 0 .13em .13em 0;
  transform: translateY(-.12em) rotate(45deg);
}
/* install showing: Join the beta is the one primary, so Yes is a plain button and picked shows as the ring */
.install-on .choices [data-watch="yes"] { background: var(--color-raised); color: var(--color-label); box-shadow: inset 0 0 0 1px var(--color-edge); }
.install-on .choices [data-watch="yes"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--color-label); }
.qualify .answer { margin-top: 12px; font-weight: 400; text-wrap: pretty; }
.link { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.link input { flex: 1 1 8em; min-width: 0; height: var(--size-hit); border: 0; border-radius: 22px; padding: 0 14px; background: var(--color-raised); font-size: 15px; color: var(--color-secondary); box-shadow: inset 0 0 0 1px var(--color-edge); }
.link button { flex: none; min-height: var(--size-hit); padding: 0 18px; border-radius: 22px; background: var(--color-fill); color: var(--color-label); font-weight: 600; }
.install { width: 100%; margin-top: 22px; padding: 16px; border-radius: 22px; background: var(--color-card); text-align: left; }
.install .title { font-size: 17px; font-weight: 700; }
.install ol { counter-reset: install; display: grid; gap: 14px; margin-top: 12px; }
.install li { counter-increment: install; position: relative; padding-left: 36px; font-size: 15px; line-height: 21px; }
.install li::before {
  content: counter(install); position: absolute; left: 0; top: -2px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-ink); color: var(--color-on-ink); font: 600 13px/1 var(--font-text);
}
.install li > a:not(.go) { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.install .go { display: flex; align-items: center; justify-content: center; min-height: var(--size-hit); margin-top: 8px; border-radius: 22px; background: var(--color-ink); color: var(--color-on-ink); font-weight: 600; text-decoration: none; }
.install input { display: block; width: 100%; height: var(--size-hit); margin-top: 8px; border: 0; border-radius: 22px; padding: 0 14px; background: var(--color-raised); font-size: 15px; color: var(--color-label); box-shadow: inset 0 0 0 1px var(--color-edge); }

/* ---------- pain ---------- */
.moments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.moments li { flex: 1 1 5.5em; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 20px; background: var(--color-card); font-size: 15px; font-weight: 600; }

/* ---------- watch / always on ---------- */
.watch h2 + p { margin-bottom: 30px; }
.watch p:last-child { margin-bottom: 0; }

/* ---------- how it works ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; margin-top: 6px; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; color: var(--color-secondary); }
.steps li b { color: var(--color-label); font-weight: 600; display: block; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-ink); color: var(--color-on-ink); font: 600 15px/1 var(--font-text);
}
.off { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 16px; border-radius: 22px; background: var(--color-card); }
.off .cat { width: 44px; height: 44px; flex: none; opacity: .8; }
.off p { color: var(--color-secondary); }
.off b { color: var(--color-label); font-weight: 600; }

/* ---------- examples: a horizontal scroller on phones ---------- */
.cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px calc(-1 * var(--margin)) 0; padding: 4px var(--margin) 10px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.cards li { flex: 0 0 78%; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 20px; border-radius: 24px; background: var(--color-card); min-height: 150px; }
.cards q { font: 600 19px/1.3 var(--font-display); letter-spacing: -.3px; }
.cards span { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 14px; background: var(--color-raised); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.cards span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px;
  background: conic-gradient(var(--glow-1), var(--glow-2), var(--glow-3), var(--glow-4), var(--glow-1)); }

/* ---------- privacy ---------- */
.checks { display: grid; gap: 14px; margin-top: 4px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--color-ink);
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 71%); mask: radial-gradient(circle, #000 70%, transparent 71%);
}
.checks li::after { content: ""; position: absolute; left: 8px; top: 8px; width: 4px; height: 8px; border: solid var(--color-on-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- final CTA ---------- */
.final { text-align: center; padding-bottom: 72px; }
.final h2 { font-size: 34px; letter-spacing: -.6px; text-wrap: balance; }
.foot { text-align: center; padding: 0 var(--margin) calc(var(--safe-b) + 28px); font-size: 13px; color: var(--color-secondary); }

/* ---------- desktop ---------- */
@media (min-width: 820px) {
  main { max-width: 1080px; padding: 0 40px; }
  section { padding: 84px 0; }
  .hero { padding-top: 56px; }
  .hero .orb { --orb: 188px; }
  .hero h1 { font-size: 72px; letter-spacing: -2.4px; max-width: 14ch; }
  .lede { font-size: 21px; line-height: 1.45; max-width: 38ch; }
  .ticker { max-width: 440px; }
  h2 { font-size: 40px; letter-spacing: -.6px; }
  section > p, .watch p { font-size: 19px; max-width: 40ch; }
  .pain, .watch, .how, .privacy { max-width: 720px; margin: 0 auto; }
  .watch { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .watch h2 { grid-row: 1; } .watch p { grid-row: 2; margin: 0 !important; }
  .cards { margin: 6px 0 0; padding: 4px 0 10px; display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .final h2 { font-size: 52px; }
  .bar { padding-left: max(40px, calc(50vw - 500px)); padding-right: max(40px, calc(50vw - 500px)); }
}

/* Dark overrides of rules above that the tokens can't carry; they sit after those rules so they win at equal specificity. */
@media (prefers-color-scheme: dark) {
  .cards span { box-shadow: inset 0 0 0 1px var(--color-edge); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb > .aura, .cat .eyes-shut, .cat .zzz, .cat.happy, .field, .joined { animation: none !important; }
  .js .ticker li, .js .ticker li .done { transition: none; }
}
