/*
 * Steele's site: one stylesheet for every page. The page tokens are the owner's (dark ground, one
 * orange, the app's values from src/ui/system/tokens.ts); the phone's screens are image files in shots/.
 */

@font-face { font-family: 'Familjen Grotesk'; src: url('fonts/familjen-grotesk-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('fonts/familjen-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('fonts/familjen-grotesk-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ground: #0b0b0c;
  --raised: #161618;
  --face: #1c1c1e;
  --face-lit: #26262a;
  --well: #131315;
  --line: #2e2e33;
  --control: #77777e;
  --ink: #f6f5f3;
  --ink2: #b8b8bd;
  --ink3: #96969c;
  --track: #333338;
  --elapsed: #7c7c83;
  /* Large fills (the badge, buttons) take the brand orange; text and thin lines on dark take the lifted one. */
  --orange: #d04a02;
  --on-orange: #000;
  --lume: #f0601a;
  --lume-tint: rgba(240, 96, 26, 0.14);
  --gold: #e0b44f;
  --gold-tint: rgba(224, 180, 79, 0.14);
  --protein: #e8b931;
  --carbs: #5cb8a6;
  --fat: #b08ad9;
  --margin: 16px;
  --gutter: 16px;
  --section: 96px;
  --radius: 24px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --font: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --margin: 24px; --gutter: 24px; --section: 128px; }
}
@media (min-width: 1100px) {
  :root { --margin: 32px; --section: 160px; }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-kerning: normal;
  overflow-x: hidden; overflow-x: clip; /* clip keeps the story's sticky stage working everywhere */
}
@media (min-width: 1100px) { body { font-size: 18px; } }

img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lume); }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 3px solid var(--lume); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: var(--margin); top: -80px; z-index: 50;
  background: var(--orange); color: var(--on-orange); padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- type: five steps ---------- */

.display {
  font-size: clamp(36px, 11.2vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
@media (min-width: 1100px) { .display { font-size: clamp(56px, 6vw, 104px); } }

.heading {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.subhead {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
@media (min-width: 1100px) { .subhead { font-size: 24px; } }

.lead { font-size: 18px; line-height: 1.5; max-width: 44ch; }
@media (min-width: 1100px) { .lead { font-size: 20px; } }

.small { font-size: 15px; line-height: 1.5; color: var(--ink2); }
.soft { color: var(--ink2); }
.figures { font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--margin); }

.section { padding-top: var(--section); }

/* ---------- buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--orange); color: var(--on-orange);
  font-size: 18px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color 150ms var(--ease);
}
.button:hover { background: #e05208; color: var(--on-orange); }
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.button[disabled] { opacity: 0.6; cursor: progress; }

.text-link { color: var(--ink); font-weight: 500; }

/* ---------- header ---------- */

.bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand img:first-child { width: 30px; height: 30px; }
.brand img + img { width: 108px; height: auto; }
.bar nav { display: none; margin-left: auto; gap: 28px; }
.bar nav a { color: var(--ink2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 0; }
.bar nav a:hover { color: var(--ink); }
.bar .button { margin-left: auto; }
@media (min-width: 768px) {
  .bar nav { display: flex; }
  .bar .button { margin-left: 12px; }
}

/* ---------- hero: the words, then the phone rises under them ---------- */

.hero-words {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  min-height: calc(72vh - 72px); min-height: calc(72svh - 72px);
  padding-block: 40px 56px;
  text-align: center;
}
.hero-words .display { max-width: 10em; font-size: clamp(38px, 10.4vw, 64px); }
@media (min-width: 768px) { .hero-words .display { font-size: clamp(64px, 8vw, 128px); } }
.hero-words .lead { max-width: 40ch; text-wrap: balance; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }

/* ---------- the story: one phone, six screens ----------
 * Plain: a readable stack, every screen and every word on the page. With script and motion allowed
 * (.pin, set in the head): the phone pins and site.js changes the screen as each chapter passes. */

.story {
  --pw: min(72vw, 300px);          /* the screen's width; everything on the phone derives from it */
  --bezel: calc(var(--pw) * 0.032);
  padding-bottom: var(--section);
}
.stage { display: flex; flex-direction: column; gap: 96px; }
.chapter { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-inline: var(--margin); }

.shot {
  position: relative; flex: none; box-sizing: content-box;
  width: var(--pw); aspect-ratio: 393 / 852;
  border: var(--bezel) solid var(--face);
  border-radius: calc(var(--pw) * 0.17);
  box-shadow: 0 0 0 1px var(--line); /* taste-skill-ignore: a hairline, the device edge against the black */
  background: var(--ground);
}
/* The dynamic island, over the blank status-bar band of each screenshot. */
.shot::before {
  content: ''; position: absolute; z-index: 2;
  top: calc(var(--pw) * 0.028); left: calc(var(--pw) * 0.34);
  width: calc(var(--pw) * 0.32); height: calc(var(--pw) * 0.094);
  border-radius: 999px; background: #000;
}
.shot img { width: 100%; height: 100%; border-radius: calc(var(--pw) * 0.17 - var(--bezel)); }

.copy { text-align: center; }
.chapter-title {
  font-size: clamp(28px, 7.6vw, 40px);
  font-weight: 500; line-height: 1.06; letter-spacing: -0.03em;
  text-wrap: balance;
}
.copy p { margin: 12px auto 0; max-width: 34ch; color: var(--ink2); font-size: 17px; line-height: 1.45; }

@media (min-width: 900px) {
  .stage { gap: 128px; }
  .chapter { flex-direction: row; justify-content: center; gap: 96px; }
  .copy { text-align: left; width: 520px; }
  .copy p { margin: 20px 0 0; font-size: 20px; }
  .chapter-title { font-size: clamp(40px, 4vw, 60px); }
}

.pin .story {
  /* Each chapter holds for 80 % of a screen; the last 100 is the stage itself. */
  height: calc(var(--n, 6) * 80vh + 100vh); height: calc(var(--n, 6) * 80svh + 100svh);
  padding: 0;
  --pw: min(68vw, calc((100vh - 232px) * 0.4613));
}
@supports (height: 100svh) {
  .pin .story { --pw: min(68vw, calc((100svh - 232px) * 0.4613)); }
}
.pin .stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  justify-items: center; gap: 0;
  padding: 20px var(--margin) 12px;
  overflow: hidden;
}
.pin .chapter { display: contents; }
.pin .shot {
  grid-area: 1 / 1;
  background: transparent;
  /* --enter runs 0 to 1 as the stage scrolls into place: the phone settles from larger and lower. */
  transform: translate3d(0, calc((1 - var(--enter, 1)) * 6vh), 0) scale(calc(1.16 - 0.16 * var(--enter, 1)));
  transform-origin: 50% 0;
  will-change: transform;
}
.pin .chapter:first-child .shot { background: var(--ground); }
/* The screen coming in fades over the one going out, which waits a beat before it leaves. */
.pin .shot img { opacity: 0; transition: opacity 400ms ease 200ms; }
.pin .is-active .shot img { opacity: 1; transition: opacity 450ms ease; }
.pin .copy {
  grid-area: 2 / 1; align-self: center;
  opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity 250ms ease, transform 500ms var(--ease);
}
.pin .is-active .copy { opacity: 1; transform: none; transition-delay: 140ms; }

@media (min-width: 900px) {
  .pin .story { --pw: min(360px, calc((100vh - 140px) * 0.4613)); }
  @supports (height: 100svh) {
    .pin .story { --pw: min(360px, calc((100svh - 140px) * 0.4613)); }
  }
  .pin .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    align-items: center; column-gap: var(--gutter);
    max-width: 1440px; margin-inline: auto; padding-block: 0;
  }
  /* Under the hero the phone sits in the middle of the page; it moves to its column as it settles. */
  .pin .shot {
    grid-area: 1 / 2; transform-origin: 50% 50%;
    transform: translate3d(calc((1 - var(--enter, 1)) * max(-25vw, -360px)), calc((1 - var(--enter, 1)) * 6vh), 0) scale(calc(1.16 - 0.16 * var(--enter, 1)));
  }
  .pin .copy { grid-area: 1 / 1; justify-self: end; margin-right: clamp(0px, 3vw, 64px); }
}

/* ---------- below the story: tiles, one idea each ---------- */

.narrow { max-width: 1144px; }
.section-head {
  margin-bottom: 32px;
  text-align: center;
  font-size: clamp(30px, 7.6vw, 56px); line-height: 1.04; letter-spacing: -0.03em;
}
@media (min-width: 900px) { .section-head { margin-bottom: 56px; } }

.tile {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 24px;
  background: var(--raised); border-radius: var(--radius);
}
.tile-title { font-size: 26px; font-weight: 500; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.tile-line { color: var(--ink2); font-size: 16px; line-height: 1.4; text-wrap: pretty; }
.tile-note { color: var(--ink3); font-size: 14px; line-height: 1.4; text-wrap: pretty; }
.stat { font-size: clamp(34px, 9vw, 60px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
/* Gold marks Pro and nothing else. */
.pro-tag {
  display: inline-block; padding: 4px 9px; border-radius: 8px;
  background: var(--gold-tint); color: var(--gold);
  font-size: 12px; font-weight: 600; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}

.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bento > li { grid-column: span 2; }
.bento > .tile-stat { grid-column: span 1; padding: 20px; justify-content: space-between; gap: 20px; }
.tile-art { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.tile-art > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tile-art svg { flex: none; }
/* The Next up card, cut out of the Today screenshot (786 wide; the card is x 32 to 754, y 482 to 946). */
.crop { margin-top: 12px; overflow: hidden; border-radius: 20px; aspect-ratio: 722 / 464; }
.crop img { width: 108.86%; max-width: none; height: auto; margin: -66.76% 0 0 -4.43%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--face-lit); font-size: 16px; font-weight: 500; line-height: 1.3; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .bento > li { grid-column: span 6; padding: 32px; }
  .bento > .tile-next { grid-row: span 2; }
  .bento > .tile-stat { grid-column: span 3; padding: 28px; }
  .tile-next .crop { margin-top: auto; }
  .tile-next .tile-line { margin-bottom: 24px; max-width: 34ch; }
  .tile-title { font-size: 32px; }
  .tile-line { font-size: 17px; }
  .chips { gap: 6px; }
  .chips li { padding: 6px 11px; font-size: 15px; }
}

/* ---------- switch: four tiles ---------- */

.switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.switch .tile { padding: 20px; gap: 6px; }
.from { color: var(--ink2); font-size: 14px; font-weight: 500; line-height: 1.3; }
.gain { margin-bottom: 6px; font-size: clamp(24px, 6.4vw, 32px); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.switch .tile-line { font-size: 15px; text-wrap: balance; }
@media (min-width: 900px) {
  .switch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .switch .tile { padding: 28px; }
}

/* ---------- free and Pro, side by side ---------- */

.plans { display: grid; gap: 12px; }
.plan { gap: 0; padding: 28px 24px; border: 1px solid transparent; }
.plan-pro { border-color: var(--gold); }
.plan-name {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  font-size: 32px; font-weight: 500; line-height: 1.05; letter-spacing: -0.03em;
}
.plan-terms { margin-top: 8px; color: var(--ink2); }
.checks { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.checks li { position: relative; padding-left: 30px; line-height: 1.35; text-wrap: balance; }
.checks li::before {
  content: ''; position: absolute; left: 5px; top: 0.22em; width: 7px; height: 13px;
  border: solid var(--lume); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.plan-pro .checks li::before { border-color: var(--gold); }
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 28px; }
.prices div { padding: 12px; background: var(--face); border-radius: 14px; }
.prices dt { color: var(--ink2); font-size: 13px; line-height: 1.3; }
.prices dd { font-size: 20px; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; }
.plan .small { margin-top: 14px; }
@media (min-width: 768px) {
  .plans { grid-template-columns: 1fr 1fr; gap: 16px; }
  .plan { padding: 36px 32px; }
}

/* ---------- waitlist ---------- */

.join {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 48px 20px;
  background: var(--raised); border-radius: var(--radius);
  text-align: center;
}
.join-mark { width: 56px; height: 56px; }
.join .heading { font-size: clamp(36px, 10vw, 72px); line-height: 1.02; letter-spacing: -0.035em; }
.join .lead { max-width: 30ch; color: var(--ink2); text-wrap: balance; }
.wait-form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; margin-top: 12px; }
.wait-form label { font-weight: 600; font-size: 15px; text-align: left; }
.wait-row { display: flex; flex-direction: column; gap: 12px; }
.wait-row input {
  min-height: 52px; padding: 0 18px;
  background: var(--face); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  font: 400 18px/1 var(--font);
}
.wait-row input::placeholder { color: var(--ink3); }
.wait-row input:focus-visible { outline-offset: 0; border-color: var(--lume); }
.wait-row input[aria-invalid='true'] { border-color: var(--lume); }
.hp { display: none; }
.wait-status:empty { display: none; }
.wait-status { font-weight: 500; }
.thanks { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--face); border-radius: var(--radius); }
.thanks .subhead { color: var(--ink); }
@media (min-width: 600px) {
  .wait-row { flex-direction: row; }
  .wait-row input { flex: 1; min-width: 0; }
}
@media (min-width: 768px) { .join { padding: 96px 48px; } }

/* ---------- questions: one open at a time ---------- */

.faq { max-width: 760px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  display: flex; align-items: center;
  min-height: 64px; padding: 16px 40px 16px 0;
  font-size: 19px; font-weight: 500; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
/* The plus: two bars; the upright one folds away when the answer is open. */
.faq summary::before, .faq summary::after {
  content: ''; position: absolute; top: 50%; right: 4px; width: 14px; height: 2px; margin-top: -1px;
  background: var(--ink2); border-radius: 1px;
  transition: transform 200ms var(--ease), background-color 150ms var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::before, .faq details[open] summary::after { background: var(--lume); }
.faq details[open] summary::after { transform: none; }
.faq details p { padding: 0 40px 22px 0; max-width: 60ch; color: var(--ink2); }

/* ---------- footer ---------- */

.foot { margin-top: var(--section); padding-block: 24px 28px; border-top: 1px solid var(--line); }
.foot .brand { margin-bottom: 8px; }
.foot-line { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink3); }
.foot-line nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-line nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink2); }
.foot-line nav a:hover { color: var(--ink); }
@media (min-width: 900px) {
  .foot-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .foot-line > :last-child { text-align: right; }
}

/* ---------- plain pages: support, privacy, add, thanks ---------- */

.page-main { padding-bottom: 32px; }
.prose { max-width: 680px; padding-top: 32px; }
.prose h1 { margin-bottom: 20px; }
.prose h2 { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 56px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 28px 0 6px; }
.prose p, .prose li { color: var(--ink); }
.prose p + p { margin-top: 14px; }
.prose ul { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.prose ul li { padding-left: 20px; position: relative; }
.prose ul li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); }
.prose .muted { color: var(--ink2); }
.prose a { color: var(--ink); }
.prose a:hover { color: var(--lume); }
@media (min-width: 1100px) { .prose { margin-left: calc(100% / 6); } }

.code-figure { font-size: 48px; font-weight: 500; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; margin: 20px 0; color: var(--ink); }

/* ---------- entrances (only with script, never under reduced motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
    transition-delay: calc(var(--d, 0) * 80ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .shot img, .copy, .faq summary::before, .faq summary::after { transition: none !important; }
}
