/* RigLabs site. One stylesheet, no build step.
   Brand (see brand/README.md in the repo): charcoal + orange, Inter, and the
   two-tone name rule ("Rig" bright, second word grey). The macro data visuals
   use the RigMacro app's own protein / carbs / fat colours and its rounded
   numerals, so the demos look like the app. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #f5f2eb;
  --bg-2: #ece8df;
  --surface: #ffffff;
  --ink: #1c1e23;
  --muted: #5d6067;
  --faint: #8a8c93;
  --line: #e1dcd1;
  --accent: #f26b1f;       /* brand orange-500: decoration, fills, large type */
  --accent-text: #b2470d;  /* orange that passes AA as text on --bg */
  --name-grey: #6b6e75;     /* second word of a product name, on light */
  --peach: #fcc49b;
  --orange-400: #f8955a;
  --protein: #e85c66;
  --carbs: #f2a13a;
  --fat: #4f8cf0;
  --protein-soft: rgba(232, 92, 102, 0.16);
  --carbs-soft: rgba(242, 161, 58, 0.18);
  --fat-soft: rgba(79, 140, 240, 0.16);
  --bubble-me: #1c1e23;
  --bubble-me-ink: #ffffff;
  --shadow: 0 1px 2px rgba(19, 19, 22, 0.04), 0 12px 32px -12px rgba(19, 19, 22, 0.14);
  --todo-bg: #fff1a8;
  --todo-text: #5a4a00;
  --pending-line: #c9a227;
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1120px;
  --prose: 720px;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Inter", system-ui, -apple-system, sans-serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --bg-2: #1c1e23;
    --surface: #22252b;
    --ink: #f5f2eb;
    --muted: #a3a5ad;
    --faint: #7b7d85;
    --line: #30333a;
    --accent: #f26b1f;
    --accent-text: #f8955a;
    --name-grey: #8c8f96;
    --protein: #ff6f78;
    --carbs: #ffb24f;
    --fat: #6aa1ff;
    --protein-soft: rgba(255, 111, 120, 0.18);
    --carbs-soft: rgba(255, 178, 79, 0.18);
    --fat-soft: rgba(106, 161, 255, 0.18);
    --bubble-me: #f5f2eb;
    --bubble-me-ink: #131316;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    --todo-bg: #4a3d00;
    --todo-text: #ffe680;
    --pending-line: #a88a20;
  }
}

/* --- base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface); }
::selection { background: var(--carbs-soft); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: var(--bg); }

/* --- header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/1 var(--display); letter-spacing: -0.03em; text-decoration: none; }
.brand:hover { color: inherit; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex: none; }
.mark svg { width: 17px; height: 17px; }
.site-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.site-nav .nav-cta { color: var(--bg); background: var(--ink); font-weight: 600; margin-left: 6px; }
.site-nav .nav-cta:hover { color: var(--bg); background: var(--ink); opacity: 0.88; }
@media (max-width: 640px) {
  .site-nav .hide-sm { display: none; }
  .site-nav a { padding: 8px 9px; }
}
@media (max-width: 440px) { .site-nav .hide-xs { display: none; } }
.site-nav .nav-cta { white-space: nowrap; padding-left: 16px; padding-right: 16px; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { color: var(--bg); opacity: 0.9; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--faint); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn small { font-weight: 500; opacity: 0.7; font-size: 13px; }

/* App Store-style button. Apple's official badge artwork goes here at launch. */
.store-btn { background: #000; color: #fff; border-color: #000; padding: 8px 20px 8px 16px; gap: 10px; }
.store-btn:hover { color: #fff; }
.store-btn .store-text { display: grid; text-align: left; line-height: 1.1; }
.store-btn .store-text span:first-child { font-size: 11px; font-weight: 500; }
.store-btn .store-text span:last-child { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.store-btn svg { width: 22px; height: 22px; }
.store-btn[aria-disabled="true"] { cursor: default; }
.store-btn[aria-disabled="true"]:hover { transform: none; }
@media (prefers-color-scheme: dark) { .store-btn { border-color: #3a3a40; } }

/* --- type helpers -------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 18px; }
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); max-width: 50ch; margin: 0; }
.muted { color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.dot-p { background: var(--protein); }
.dot-c { background: var(--carbs); }
.dot-f { background: var(--fat); }

/* --- hero ---------------------------------------------------------------- */
.hero { padding: clamp(36px, 6vw, 80px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(44px, 7.4vw, 84px); font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; margin: 0 0 24px; }
.hero h1 .hl { color: var(--accent-text); }
.hero .lead { margin-bottom: 32px; }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; }

/* Decorative rings that sit behind the hero art. */
.hero-rings { position: absolute; right: -180px; top: -120px; width: 620px; opacity: 0.5; pointer-events: none; z-index: -1; }
@media (max-width: 920px) { .hero-rings { right: -260px; top: -200px; opacity: 0.35; } }

/* --- the chat + diary demo ---------------------------------------------- */
.demo { position: relative; display: grid; gap: 14px; max-width: 520px; width: 100%; justify-self: center; }
.chat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px;
}
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.chat-top strong { color: var(--ink); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip .live { width: 7px; height: 7px; border-radius: 50%; background: #2fb36a; }
.msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; }
.msg p { margin: 0; }
.msg-me { justify-self: end; background: var(--bubble-me); color: var(--bubble-me-ink); border-bottom-right-radius: 6px; }
.msg-ai { justify-self: start; background: var(--bg-2); border-bottom-left-radius: 6px; }
.tool-call { justify-self: start; font: 500 12.5px/1.3 var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.tool-call b { color: var(--ink); font-weight: 600; }
.logged { display: grid; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.logged-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.logged-row span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

.today {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
}
.today .rings { width: 108px; height: 108px; }
.today-num { font: 700 38px/1 var(--round); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.today-num small { font: 600 14px/1 var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.today-label { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.macro { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.macro b { font: 700 16px/1 var(--round); color: var(--ink); font-variant-numeric: tabular-nums; }
.macro b small { font: 500 11px/1 var(--sans); color: var(--muted); }
.bar { height: 6px; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; }
.bar-p { background: var(--protein-soft); } .bar-p i { background: var(--protein); width: 85%; }
.bar-c { background: var(--carbs-soft); } .bar-c i { background: var(--carbs); width: 73%; }
.bar-f { background: var(--fat-soft); } .bar-f i { background: var(--fat); width: 83%; }
@media (max-width: 420px) {
  .today { grid-template-columns: 1fr; justify-items: start; }
  .today .rings { width: 92px; height: 92px; }
  .today-body { width: 100%; }
}

/* Rings: SVG circles drawn with stroke-dasharray (pathLength=100). */
.rings circle { fill: none; stroke-linecap: round; }
.rings .track-p { stroke: var(--protein-soft); }
.rings .track-c { stroke: var(--carbs-soft); }
.rings .track-f { stroke: var(--fat-soft); }
.rings .arc-p { stroke: var(--protein); }
.rings .arc-c { stroke: var(--carbs); }
.rings .arc-f { stroke: var(--fat); }
.rings .arc { transform: rotate(-90deg); transform-origin: 50% 50%; }
.r85 { stroke-dasharray: 85 100; }
.r73 { stroke-dasharray: 73 100; }
.r83 { stroke-dasharray: 83 100; }
.r72 { stroke-dasharray: 72 100; }
.r58 { stroke-dasharray: 58 100; }
.r86 { stroke-dasharray: 86 100; }
@media (prefers-reduced-motion: no-preference) {
  .rings .arc { animation: ring-in 1.4s cubic-bezier(.2, .8, .2, 1) both; }
  .rings .arc-c { animation-delay: 0.12s; }
  .rings .arc-f { animation-delay: 0.24s; }
}
@keyframes ring-in { from { stroke-dasharray: 0 100; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* --- sections ------------------------------------------------------------ */
.section { padding: clamp(48px, 6.5vw, 88px) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; letter-spacing: -0.035em; margin: 0 0 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }

/* --- app family ---------------------------------------------------------- */
.apps { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; }
@media (max-width: 920px) { .apps { grid-template-columns: 1fr 1fr; } .app-card.featured { grid-column: 1 / -1; } }
@media (max-width: 600px) { .apps { grid-template-columns: 1fr; } }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; text-decoration: none; }
.app-card h3 { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -0.035em; }
.app-card h3 span { color: var(--name-grey); }
.app-card p { margin: 0; color: var(--muted); }
.app-card.featured { box-shadow: var(--shadow); }
a.app-card:hover { color: inherit; border-color: var(--faint); }
a.app-card:hover .arrow { transform: translateX(4px); }
.app-card .arrow { transition: transform 0.2s ease; display: inline-block; }
.app-card .more { margin-top: auto; font-weight: 600; }
.app-icon { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; background: var(--ink); }
.app-icon svg { width: 36px; height: 36px; }
.app-card.soon .app-icon { background: var(--bg-2); border: 1px dashed var(--line); }
.app-card.soon .app-icon svg { opacity: 0.55; }
.status { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.status.live { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* --- surfaces strip (iOS / web / Claude / ChatGPT) ---------------------- */
.surfaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .surfaces { grid-template-columns: repeat(2, 1fr); } }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; display: grid; gap: 6px; align-content: start; }
.surface svg { width: 26px; height: 26px; margin-bottom: 6px; }
.surface h3 { font-size: 18px; margin: 0; }
.surface p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* --- pillars ------------------------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar { border-top: 3px solid var(--ink); padding-top: 18px; }
.pillar:nth-child(1) { border-color: var(--protein); }
.pillar:nth-child(2) { border-color: var(--carbs); }
.pillar:nth-child(3) { border-color: var(--fat); }
.pillar h3 { font-size: 22px; margin: 0 0 8px; }
.pillar p { margin: 0; color: var(--muted); }

/* --- feature grid -------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; }
.feature.wide { grid-column: span 2; }
@media (max-width: 600px) { .feature.wide { grid-column: auto; } }
.feature h3 { font-size: 21px; margin: 0; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.f-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.f-icon svg { width: 22px; height: 22px; }
.f-p { background: var(--protein-soft); color: var(--protein); }
.f-c { background: var(--carbs-soft); color: var(--carbs); }
.f-f { background: var(--fat-soft); color: var(--fat); }
.f-i { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.quote-list { display: grid; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.quote-list li { font-size: 15px; padding: 9px 14px; border-radius: 14px; background: var(--bg-2); border-bottom-left-radius: 4px; justify-self: start; }

/* --- steps --------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps > li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.steps > li::before { content: counter(step); font: 700 44px/1 var(--round); color: var(--accent); display: block; margin-bottom: 14px; letter-spacing: -0.04em; }
.steps h3 { font-size: 20px; margin: 0 0 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* --- pricing ------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.plan.best { border: 2px solid var(--ink); box-shadow: var(--shadow); }
.plan h3 { font-size: 20px; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan .price { font: 700 44px/1 var(--round); letter-spacing: -0.04em; margin: 4px 0 0; }
.plan .price small { font: 500 15px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.plan p { margin: 0; color: var(--muted); font-size: 15px; }
.plan ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: var(--carbs-soft); border: 4px solid var(--carbs); box-sizing: border-box; }
.badge { font: 700 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.fineprint { font-size: 14px; color: var(--muted); margin: 20px 0 0; max-width: 80ch; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font: 700 17.5px/1.35 var(--round); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--sans); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > :not(summary) { margin: 0 0 18px; color: var(--muted); }

/* --- CTA band ------------------------------------------------------------ */
.cta { background: var(--ink); color: var(--bg); border-radius: calc(var(--radius) + 6px); padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; overflow: hidden; position: relative; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }
.cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin: 0 0 8px; letter-spacing: -0.035em; }
.cta p { margin: 0; opacity: 0.75; }
.cta .btn-primary { background: var(--bg); color: var(--ink); }
.cta .btn-primary:hover { color: var(--ink); }
.cta .btn-ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.cta .btn-ghost:hover { color: var(--bg); border-color: var(--bg); }
.cta a:not(.btn):hover { color: var(--bg); }

/* --- product hero -------------------------------------------------------- */
.product-hero h1 .rig { color: var(--ink); }
.product-mark { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; font: 700 22px/1 var(--display); letter-spacing: -0.03em; }
.product-mark .app-icon { width: 44px; height: 44px; border-radius: 12px; }
.product-mark .app-icon svg { width: 28px; height: 28px; }

/* --- docs ---------------------------------------------------------------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding-top: 48px; padding-bottom: 96px; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; padding-top: 32px; } }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14.5px; }
.toc p { font-weight: 700; margin: 0 0 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 860px) {
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
  .toc ol { grid-template-columns: 1fr 1fr; border: 0; gap: 0 12px; }
  .toc a { padding-left: 0; border: 0; }
}
.doc { max-width: 760px; min-width: 0; }
.doc h1 { font-size: clamp(36px, 5.4vw, 56px); font-weight: 700; letter-spacing: -0.04em; margin: 0 0 14px; }
.doc > .lead { margin-bottom: 28px; }
.doc h2 { font-size: clamp(26px, 3.4vw, 32px); font-weight: 700; margin: 64px 0 14px; letter-spacing: -0.03em; }
.doc h3 { font-size: 20px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--muted); font-weight: 600; }
.callout { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; font-size: 15.5px; display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.callout svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent-text); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.url-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 8px 16px; margin: 12px 0 20px; box-shadow: var(--shadow); }
.url-box code { background: none; border: 0; padding: 0; font-size: 15px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.copy-btn[hidden] { display: none; }

.setup-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 700px) { .setup-tabs { grid-template-columns: 1fr; } }
.setup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.setup h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.setup ol { margin: 0; }

.tools { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.tools th, .tools td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.tools th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tools td:first-child { white-space: nowrap; }
.tools td:last-child { white-space: nowrap; }
.tag { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: 0.04em; padding: 4px 8px; border-radius: 999px; }
.tag-read { background: var(--fat-soft); color: var(--ink); }
.tag-write { background: var(--carbs-soft); color: var(--ink); }
.tag-delete { background: var(--protein-soft); color: var(--ink); }
@media (max-width: 600px) {
  .tools thead { display: none; }
  .tools, .tools tbody, .tools tr, .tools td { display: block; }
  .tools tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tools td { border: 0; padding: 2px 0; white-space: normal !important; }
}
.prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0 !important; margin: 16px 0; }
@media (max-width: 600px) { .prompts { grid-template-columns: 1fr; } }
.prompts li { margin: 0 !important; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 4px; padding: 12px 16px; font-size: 15.5px; }
.prompts li span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; font-weight: 600; letter-spacing: 0.02em; }

/* --- support ------------------------------------------------------------- */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 860px) { .support-grid { grid-template-columns: 1fr; } }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; align-content: start; }
.support-card h2, .support-card h3 { font-size: 21px; margin: 0; }
.support-card p { margin: 0; color: var(--muted); font-size: 16px; }
.support-card a.more { font-weight: 600; margin-top: 6px; }
.mail-big { font: 700 clamp(26px, 5vw, 48px)/1.05 var(--round); letter-spacing: -0.035em; text-decoration: none; overflow-wrap: anywhere; }
.mail-big:hover { color: var(--accent-text); }

/* --- footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14.5px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h2 { font: 700 12px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin: 6px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .brand { color: var(--ink); margin-bottom: 12px; }
.site-footer p { margin: 0; max-width: 34ch; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.soon-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-left: 6px; }

/* --- legal pages --------------------------------------------------------- */
.legal { max-width: var(--prose); margin: 0 auto; padding: 64px 20px 96px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 10px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 44px 0 10px; }
.legal h3 { font-size: 18px; margin: 28px 0 8px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--muted); font-weight: 600; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.legal-nav a { font-size: 14px; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.legal-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* --- 404 ----------------------------------------------------------------- */
.lost { text-align: center; padding: 96px 20px 120px; display: grid; justify-items: center; gap: 18px; }
.lost .rings { width: 140px; height: 140px; }
.lost h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 700; margin: 0; letter-spacing: -0.04em; }
.lost p { margin: 0; color: var(--muted); }

/* Unfilled placeholders that must be resolved before deploy.
   scripts/check-placeholders.sh refuses to deploy while any element with
   class="todo" is left in public/. */
.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 4px; border-radius: 4px; }

/* Decisions not made yet, with copy that is honest to ship as-is
   (e.g. "Price at launch"). check-placeholders.sh lists them as warnings so
   they stay visible, but does not block a deploy. */
.pending { border-bottom: 2px dashed var(--pending-line); }

/* ==========================================================================
   Motion and interaction layer.
   Everything here is progressive: without JS (or with reduced motion) the
   page shows its static state. site.js adds .js to <html>.
   ========================================================================== */

/* --- glow backdrop ------------------------------------------------------- */
.glow { position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none; overflow: hidden; }
.glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.glow .g1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; background: var(--protein); left: 52%; top: 4%; }
.glow .g2 { width: 36vw; height: 36vw; max-width: 480px; max-height: 480px; background: var(--carbs); left: 70%; top: 34%; }
.glow .g3 { width: 32vw; height: 32vw; max-width: 440px; max-height: 440px; background: var(--fat); left: 40%; top: 46%; }
@media (prefers-color-scheme: dark) { .glow i { opacity: 0.32; } }
@media (max-width: 920px) { .glow .g1 { left: 20%; top: 30%; width: 80vw; height: 80vw; } .glow .g2 { left: 50%; top: 52%; width: 60vw; height: 60vw; } .glow .g3 { left: -10%; top: 60%; width: 60vw; height: 60vw; } }
.grid-lines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 10%, transparent 70%);
  opacity: 0.6;
}
@media (prefers-reduced-motion: no-preference) {
  .glow .g1 { animation: drift1 18s ease-in-out infinite alternate; }
  .glow .g2 { animation: drift2 22s ease-in-out infinite alternate; }
  .glow .g3 { animation: drift3 26s ease-in-out infinite alternate; }
}
@keyframes drift1 { to { transform: translate(-12%, 14%) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-30%, -18%) scale(0.9); } }
@keyframes drift3 { to { transform: translate(22%, -10%) scale(1.2); } }

/* Frosted cards over the glow. */
.chat, .today { background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }

/* --- gradient text + word rotator ---------------------------------------- */
.grad {
  background: linear-gradient(100deg, var(--protein) 0%, var(--carbs) 45%, var(--fat) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-reduced-motion: no-preference) { .grad { animation: sheen 6s ease-in-out infinite alternate; } }
@keyframes sheen { to { background-position: 100% 0; } }
.swap { display: inline-block; transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease; }
.swap.fading { opacity: 0; filter: blur(8px); transform: translateY(-0.12em); }

/* --- demo player --------------------------------------------------------- */
.demo { perspective: 1200px; }
.demo-stage { display: grid; gap: 14px; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.chat { min-height: 300px; align-content: start; }
.typing::after { content: "▍"; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thinking { justify-self: start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--bg-2); }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: bob 1s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: 0.15s; } .thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 50% { transform: translateY(-4px); opacity: 0.5; } }
.pop { animation: rise 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.rings .arc { transition: stroke-dasharray 1.1s cubic-bezier(.2, .8, .2, 1); }
.bar i { transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.demo-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.demo-tabs button { white-space: nowrap; }
.demo-tabs button {
  font: 600 13px/1 var(--sans); color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 999px; cursor: pointer; position: relative; overflow: hidden;
}
.demo-tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.demo-tabs button .prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); width: 0; }
.demo-tabs button[aria-pressed="true"] .prog.run { animation: prog var(--dur, 7s) linear forwards; }
@keyframes prog { to { width: 100%; } }

/* --- reveal on scroll ---------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(.2, .8, .2, 1), transform 0.8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* --- spotlight cards ----------------------------------------------------- */
.spot { position: relative; isolation: isolate; overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.spot:hover::before { opacity: 1; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .spot:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}

/* --- marquee ------------------------------------------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); padding: 6px 0; }
.marquee-track { display: flex; gap: 12px; width: max-content; }
.marquee-track span { white-space: nowrap; font-size: 16px; padding: 12px 18px; border-radius: 18px; border-bottom-left-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.marquee-track span:nth-child(3n+1) { border-color: color-mix(in srgb, var(--protein) 45%, var(--line)); }
.marquee-track span:nth-child(3n+2) { border-color: color-mix(in srgb, var(--carbs) 45%, var(--line)); }
.marquee-track span:nth-child(3n) { border-color: color-mix(in srgb, var(--fat) 45%, var(--line)); }
.marquee + .marquee { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee.rev .marquee-track { animation-direction: reverse; animation-duration: 56s; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { flex-wrap: wrap; width: auto; } .marquee-track [aria-hidden="true"] { display: none; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

/* --- try-it playground --------------------------------------------------- */
.try { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
@media (max-width: 860px) { .try { grid-template-columns: 1fr; } }
.meal-picks { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 10px; }
.meal-picks button {
  font: 600 15px/1.2 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  padding: 11px 16px; border-radius: 999px; cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.meal-picks button:hover { transform: translateY(-2px); border-color: var(--faint); }
.meal-picks button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.try-panel { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.try-said { font: 700 19px/1.35 var(--round); margin: 0; min-height: 2.7em; }
.try-said::before { content: "“"; color: var(--accent); }
.try-said::after { content: "”"; color: var(--accent); }
.try-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 130px; align-content: start; }
.try-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); font-size: 15px; }
.try-items li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.try-total { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.try-total .rings { width: 96px; height: 96px; }
.big-num { font: 700 44px/1 var(--round); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big-num small { font: 600 14px/1 var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.mini-macros { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.mini-macros b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-macros i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.demo-note { font-size: 13px; color: var(--faint); margin: 0; }

/* --- dark showcase section ----------------------------------------------- */
.section-dark { background: #1c1e23; color: #f5f2eb; border-top: 0; position: relative; overflow: hidden; isolation: isolate; }
.section-dark .section-head p, .section-dark .muted, .section-dark .fineprint { color: #a3a5ad; }
.section-dark .steps > li { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.section-dark .steps p { color: #a3a5ad; }
.section-dark code { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: #fff; }
.section-dark a:hover { color: #ffb08a; }
.section-dark .glow i { opacity: 0.28; }

/* --- bento --------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; grid-auto-flow: dense; }
.bento > * { grid-column: span 2; }
.bento > .b-wide { grid-column: span 4; }
.bento > .b-half { grid-column: span 3; }
@media (max-width: 920px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento > *, .bento > .b-half { grid-column: span 1; } .bento > .b-wide { grid-column: span 2; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento > .b-wide { grid-column: auto; } }
.viz { margin-top: 8px; min-height: 96px; display: flex; align-items: flex-end; }
.week-bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; width: 100%; }
.week-bars i { flex: 1; border-radius: 8px 8px 4px 4px; background: linear-gradient(var(--carbs), color-mix(in srgb, var(--carbs) 40%, transparent)); height: var(--h); transform-origin: bottom; }
.week-bars i.today-bar { background: linear-gradient(var(--protein), color-mix(in srgb, var(--protein) 40%, transparent)); }
.week-bars i.fast { background: transparent; border: 2px dashed var(--line); height: 12%; }
.viz svg { width: 100%; height: 96px; overflow: visible; }
.trend-raw { fill: var(--faint); opacity: 0.5; }
.trend-line { fill: none; stroke: var(--fat); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-goal { stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 5; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal .week-bars i { transform: scaleY(0); transition: transform 0.9s cubic-bezier(.2, .8, .2, 1); }
  .js .reveal .week-bars i:nth-child(2) { transition-delay: 0.05s; } .js .reveal .week-bars i:nth-child(3) { transition-delay: 0.1s; }
  .js .reveal .week-bars i:nth-child(4) { transition-delay: 0.15s; } .js .reveal .week-bars i:nth-child(5) { transition-delay: 0.2s; }
  .js .reveal .week-bars i:nth-child(6) { transition-delay: 0.25s; } .js .reveal .week-bars i:nth-child(7) { transition-delay: 0.3s; }
  .js .reveal.in .week-bars i { transform: none; }
  .js .reveal .trend-line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s cubic-bezier(.2, .8, .2, 1) 0.2s; }
  .js .reveal.in .trend-line { stroke-dashoffset: 0; }
}
.chat-mini { display: grid; gap: 8px; margin-top: 6px; }
.chat-mini .msg { font-size: 14.5px; padding: 9px 13px; max-width: 92%; }
.health-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.health-flow span { padding: 7px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.health-flow .arrow2 { border: 0; background: none; padding: 0; color: var(--faint); }
.micro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; color: var(--muted); width: 100%; }
.micro-list div { display: grid; gap: 4px; }
.micro-list .bar { height: 5px; background: var(--fat-soft); }
.micro-list .bar i { background: var(--fat); width: var(--w); }
.week-bars .h64 { --h: 64%; } .week-bars .h70 { --h: 70%; } .week-bars .h78 { --h: 78%; }
.week-bars .h88 { --h: 88%; } .week-bars .h92 { --h: 92%; } .week-bars .h96 { --h: 96%; }
.micro-list .w48 { --w: 48%; } .micro-list .w64 { --w: 64%; } .micro-list .w82 { --w: 82%; } .micro-list .w100 { --w: 100%; }
.section-title { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; letter-spacing: -0.035em; margin: 0 0 14px; }
.site-header { transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.25); }
.lost .rings .track-p, .lost .rings .track-c, .lost .rings .track-f { animation: none; }
@media (prefers-reduced-motion: no-preference) { .lost .rings { animation: spin 14s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero, .section-dark { isolation: isolate; }
.feature .viz { margin-top: auto; padding-top: 8px; }
.feature { align-content: stretch; display: flex; flex-direction: column; }
.product-hero h1 { font-size: clamp(42px, 6.2vw, 74px); }

/* --- brand assets -------------------------------------------------------- */
.brand img { height: 30px; width: auto; display: block; }
.site-footer .brand img { height: 28px; }
.app-icon-img { width: 56px; height: 56px; border-radius: 14px; display: block; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5); }
.product-mark .app-icon-img { width: 48px; height: 48px; border-radius: 12px; }
.hero h1 { letter-spacing: -0.05em; }
.grad { background-image: linear-gradient(100deg, var(--accent) 0%, var(--orange-400) 40%, var(--protein) 75%, var(--accent) 100%); }
.glow .g1 { background: var(--accent); }
.status.live { background: var(--accent); border-color: var(--accent); color: #1c1e23; }
.btn-primary:focus-visible, .nav-cta:focus-visible { outline-color: var(--accent); }
.name-2 { color: var(--name-grey); }
.plan .price .pending { font-size: 26px; letter-spacing: -0.02em; display: inline-block; margin: 10px 0 6px; }
@media (max-width: 480px) { .try-items li { flex-direction: column; gap: 2px; } }

/* ==========================================================================
   v2: RigMacro-first home, early-access form, real app screens.
   ========================================================================== */
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* --- product mark in the home hero --------------------------------------- */
.product-mark.small { font-size: 19px; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; }
.product-mark.small .app-icon-img { width: 40px; height: 40px; border-radius: 10px; }
.product-tag { font: 600 13.5px/1 var(--sans); letter-spacing: 0; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); }
.home-hero h1 { font-size: clamp(46px, 7.2vw, 86px); }
.home-hero .lead { margin-bottom: 26px; }

/* --- privacy promise strip ----------------------------------------------- */
.promise { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.promise li { display: inline-flex; align-items: center; gap: 6px; }
.promise svg { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.promise li:not(:has(svg))::before { content: "✓"; color: var(--accent); font-weight: 700; }

.works-with { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: clamp(28px, 4vw, 44px) 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.works-with span { display: inline-flex; align-items: center; gap: 6px; }
.works-with span:first-child { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.works-with svg { width: 16px; height: 16px; }

/* --- device frame around real screenshots -------------------------------- */
.device {
  margin: 0; position: relative; padding: 9px; border-radius: 46px;
  background: linear-gradient(145deg, #3b3e45, #15171b 40%, #2a2d33);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.2), 0 30px 60px -28px rgba(19, 19, 22, 0.55);
}
.device img { width: 100%; height: auto; border-radius: 37px; background: var(--bg-2); }
@media (prefers-color-scheme: dark) { .device { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 60px -28px rgba(0, 0, 0, 0.9); } }

/* --- screen-recording slot (the owner records it) ------------------------- */
.video-slot { margin: clamp(32px, 5vw, 56px) auto 0; max-width: 860px; display: grid; gap: 12px; }
.video-frame {
  aspect-ratio: 16 / 10; border-radius: var(--radius); border: 2px dashed var(--line); background: var(--bg-2);
  display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--muted); overflow: hidden;
}
.video-frame:has(video) { border: 0; padding: 0; background: #000; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); box-shadow: var(--shadow); }
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-slot figcaption { text-align: center; font-size: 14px; color: var(--muted); }

/* --- where the numbers come from ----------------------------------------- */
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .numbers { grid-template-columns: 1fr; } }
.num-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); display: grid; gap: 12px; align-content: start; }
.num-card h3 { font-size: 22px; margin: 0; }
.ticks, .flow { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15.5px; color: var(--muted); }
.ticks b, .flow b { color: var(--ink); }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--carbs); }
.flow { counter-reset: flow; }
.flow li { counter-increment: flow; padding-left: 38px; position: relative; }
.flow li::before { content: counter(flow); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--round); background: var(--protein-soft); color: var(--ink); }

/* --- made by RigLabs ------------------------------------------------------ */
.maker { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
@media (max-width: 860px) { .maker { grid-template-columns: 1fr; } }
.maker-main { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.maker-main .eyebrow { margin-bottom: 10px; }
.maker-main h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; letter-spacing: -0.03em; }
.maker-main p:last-child { margin: 0; color: var(--muted); }
.maker-avatar img { width: 56px; height: 56px; border-radius: 14px; }
.family { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.family li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: 700 17px/1 var(--display); letter-spacing: -0.02em; }
.family img, .family-icon { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.family-icon { display: grid; place-items: center; background: var(--bg-2); border: 1px dashed var(--line); color: var(--muted); }
.family-icon svg { width: 18px; height: 18px; }
.family small { margin-left: auto; font: 700 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.family small.live { color: var(--accent-text); }

/* --- RigMacro page hero -------------------------------------------------- */
.hero-actions { margin-bottom: 4px; }
@media (max-width: 480px) { .hero-actions { display: grid; grid-template-columns: 1fr; } .hero-actions .btn { width: 100%; } }
.product-hero .hero-note { margin-top: 14px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jump a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.jump a:hover { color: var(--ink); border-color: var(--faint); }
.hero-phones { position: relative; display: grid; justify-items: center; padding: 10px 0 20px; }
.hero-phones .device { width: min(260px, 54%); }
.hero-phones .device-back { position: absolute; left: 6%; top: 40px; width: min(230px, 46%); transform: rotate(-6deg); opacity: 0.96; }
.hero-phones .device-front { position: relative; margin-left: 28%; transform: rotate(3deg); }
@media (max-width: 920px) {
  .hero-phones { padding-top: 0; }
  .hero-phones .device-back { left: 4%; top: 24px; }
  .hero-phones .device-front { margin-left: 34%; width: min(240px, 56%); }
}

/* v2 fixes */
.section-head .eyebrow { color: var(--accent-text); font-size: 13px; margin: 0 0 14px; }
.section-tight + .section-tight { border-top: 0; padding-top: 0; }
/* Until the recording exists the slot is a slim strip, not an empty band. */
.video-frame:not(:has(video)) { aspect-ratio: auto; grid-auto-flow: column; justify-content: center; gap: 16px; padding: 20px 24px; text-align: left; }
.video-frame:not(:has(video)) .video-play { width: 48px; height: 48px; }
.video-frame:has(video) { aspect-ratio: 16 / 10; }
@media (max-width: 560px) { .video-frame:not(:has(video)) { grid-auto-flow: row; justify-items: center; text-align: center; } }

/* ==========================================================================
   Launch funnel: download / sign-up blocks, phone ring, comparison.
   ========================================================================== */

/* --- get RigMacro (App Store + web + connector) -------------------------- */
.get { margin: 0 0 22px; }
.get-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.get-row .store-btn, .get-row .btn { min-height: 54px; }
.get-row .btn-primary { padding: 12px 24px; font-size: 16.5px; }
.store-btn.pending { border-bottom: 1px solid #000; }
.store-btn.on-dark { border-color: rgba(255, 255, 255, 0.35); }
.get-ai { margin: 14px 0 0; font-size: 15px; font-weight: 600; }
.get-ai a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.get-ai a:hover { color: var(--accent-text); }
.get-note { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
/* Android has no app yet: the web app leads and the badge is not shown. */
.is-android .get-ios { display: none; }
/* iPhone: the badge leads. Desktop and Android: the web app leads. */
.get-row .get-web { order: -1; }
.is-ios .get-row .get-web { order: 1; }
@media (max-width: 440px) {
  .get-row { display: grid; grid-template-columns: 1fr; }
  .get-row .store-btn, .get-row .btn { width: 100%; justify-content: center; }
}

/* --- home hero visual: real diary behind a sample conversation ------------ */
.hero-visual { position: relative; display: grid; justify-items: end; align-items: start; }
.device-hero { width: min(290px, 62%); margin-right: 2%; }
.hero-visual .demo { position: absolute; left: 0; bottom: 6%; width: min(400px, 74%); max-width: none; }
.hero-visual .chat { min-height: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 28px 56px -24px rgba(19, 19, 22, 0.45); }
.hero-visual .demo-tabs { justify-content: flex-start; }
@media (max-width: 920px) {
  .hero-visual { display: block; }
  .device-hero { display: none; }
  .hero-visual .demo { position: static; width: 100%; max-width: 520px; margin: 0 auto; }
  .hero-visual .demo-tabs { justify-content: center; }
}

/* --- app screens row ----------------------------------------------------- */
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px); }
.screen { margin: 0; display: grid; gap: 18px; justify-items: center; align-content: start; }
.screen .device { width: min(272px, 100%); }
.screen figcaption { font-size: 15px; color: var(--muted); text-align: center; max-width: 32ch; line-height: 1.5; }
.screen figcaption b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }
@media (max-width: 760px) {
  .screens {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(70%, 260px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -20px; padding: 4px 20px 16px; scrollbar-width: none;
  }
  .screens::-webkit-scrollbar { display: none; }
  .screen { scroll-snap-align: center; }
}

/* --- comparison with named apps ------------------------------------------ */
.vs-wrap { display: grid; gap: 12px; }
.vs-wrap > * { min-width: 0; }
.vs-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.vs { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15.5px; }
.vs th, .vs td { padding: 15px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.vs tbody tr:last-child > * { border-bottom: 0; }
.vs thead th { font: 700 14px/1.2 var(--sans); color: var(--muted); padding-top: 18px; }
.vs thead th.us { color: var(--ink); font-size: 15px; }
.vs thead th.us img { width: 28px; height: 28px; border-radius: 7px; margin: 0 auto 6px; }
.vs tbody th { text-align: left; font-weight: 600; width: 34%; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.vs tbody th small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.vs .us, .vs td:nth-child(2) { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.yes, .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.yes { background: var(--accent); color: #fff; }
.vs td:not(:nth-child(2)) .yes { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }
.no { color: var(--faint); }
.yes svg, .no svg { width: 15px; height: 15px; }
.vs .note { font-size: 13px; color: var(--muted); line-height: 1.3; display: inline-block; max-width: 13ch; }
.vs sup { font-size: 10px; }
.vs-foot { font-size: 12.5px; color: var(--faint); margin: 0; max-width: 100ch; line-height: 1.5; }
.vs-foot a { color: inherit; }
@media (max-width: 700px) {
  .vs { font-size: 14px; min-width: 560px; }
  .vs th, .vs td { padding: 12px 10px; }
  .vs tbody th { width: 150px; box-shadow: 1px 0 0 var(--line); }
}
.inline-get { margin-top: clamp(24px, 4vw, 36px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 20px 24px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.inline-get p { margin: 0; color: var(--muted); }
.inline-get p b { color: var(--ink); }
@media (max-width: 440px) { .inline-get { padding: 18px; } .inline-get .get-row { width: 100%; } }

/* --- closing: three ways to start ---------------------------------------- */
.start-cta { grid-template-columns: 1fr; gap: 28px; }
.start-head { text-align: center; }
.start-head p { margin: 0 auto; max-width: 52ch; }
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }
.path { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 22px; border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 7%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 16%, transparent); }
.path h3 { margin: 4px 0 0; font-size: 20px; }
.path p { margin: 0 0 8px; font-size: 15px; }
.path-icon { width: 28px; height: 28px; color: var(--orange-400); }
.path .btn, .path .store-btn { margin-top: auto; }
.start-cta .promise { justify-content: center; color: color-mix(in srgb, var(--bg) 72%, transparent); }
.start-cta .promise li::before { color: var(--orange-400); }
.is-android .path-ios { opacity: 0.55; }
.cta .get-ai a { color: var(--bg); }
.cta .get { margin: 0; }

/* --- killer features: sticky pill bar + scroll-driven stage --------------- */
.feats { padding-bottom: clamp(40px, 6vw, 72px); }
.feats .section-head { margin-bottom: 20px; }
.feat-bar {
  position: sticky; top: 64px; z-index: 4; padding: 10px 0 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.feat-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.feat-pills::-webkit-scrollbar { display: none; }
.feat-pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
  font: 600 14.5px/1 var(--sans); text-decoration: none; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.feat-pill:hover { color: var(--ink); border-color: var(--faint); }
.feat-pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.feat-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 12px/1 var(--round); background: var(--bg-2); color: var(--ink); flex: none; }
.feat-pill.is-active .feat-num { background: var(--accent); color: #1c1e23; }
.feat-progress { height: 2px; background: transparent; margin: 0 -20px; }
.feat-progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); transition: width 0.15s linear; }

.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); }
.feat { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; scroll-margin-top: 140px; }
.feat-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.feat-kicker .feat-num { background: var(--accent); color: #1c1e23; }
.feat h3 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.035em; margin: 0 0 14px; }
.feat > p { margin: 0 0 16px; color: var(--muted); font-size: 17.5px; max-width: 46ch; }
.feat .ticks { font-size: 15.5px; }
.feat-inline { display: none; }
.feat-stage { position: relative; }
.feat-stage-inner { position: sticky; top: 140px; height: calc(100vh - 170px); min-height: 520px; max-height: 760px; display: grid; place-items: center; }
.feat-visual {
  grid-area: 1 / 1; width: 100%; display: grid; place-items: center; opacity: 0; visibility: hidden;
  transform: translateY(24px) scale(0.97); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0.6s;
}
.feat-visual.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.feat-phone { width: min(290px, 70%); }
.feat-stage .feat-phone { width: auto; height: min(100%, 640px); aspect-ratio: 552 / 1200; }
.feat-stage .feat-phone img { height: 100%; width: auto; }
.browser { width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 30px 60px -28px rgba(19, 19, 22, 0.45); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-bar span { margin-left: 10px; flex: 1; text-align: center; font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 6px; padding: 3px 10px; max-width: 240px; margin-inline: auto; }
.browser img { width: 100%; height: auto; }
.feat-chat { width: min(460px, 100%); display: grid; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -28px rgba(19, 19, 22, 0.45); }
.dictated { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; opacity: 0.7; margin-bottom: 4px; }
.dictated svg { width: 13px; height: 13px; }

@media (max-width: 860px) {
  .feat-grid { grid-template-columns: 1fr; }
  .feat-stage { display: none; }
  .feat-inline { display: grid; place-items: center; margin-top: 22px; }
  .feat { min-height: 0; padding: 36px 0 12px; scroll-margin-top: 130px; }
  .feat + .feat { border-top: 1px solid var(--line); }
}
/* Without JavaScript the stage can't follow the scroll: show each visual inline. */
html:not(.js) .feat-stage { display: none; }
html:not(.js) .feat-grid { grid-template-columns: 1fr; }
html:not(.js) .feat-inline { display: grid; place-items: center; margin-top: 22px; }
html:not(.js) .feat { min-height: 0; }
@media (prefers-reduced-motion: reduce) { .feat-visual, .feat-visual.is-active, .feat-pill, .feat-progress i { transition: none; } }
.feat-stage .feat-phone picture { display: block; height: 100%; }

/* --- rotating headline: one word changes per beat ----------------------- */
.home-hero h1.rot-head { font-size: clamp(46px, 6.6vw, 80px); line-height: 1; }
.rot-line { display: block; }
.rot-sub { display: block; margin-top: 0.22em; font-size: 0.5em; letter-spacing: -0.035em; color: var(--muted); }
.rot-sub .rot-agent { color: var(--ink); }
.rot { display: inline-block; transition: opacity 0.38s ease, filter 0.38s ease, transform 0.38s ease; }
.rot.fading { opacity: 0; filter: blur(8px); transform: translateY(-0.14em); }
@media (prefers-reduced-motion: reduce) { .rot { transition: none; } }
@media (max-width: 440px) { .product-mark.small { row-gap: 8px; } .product-tag { flex-basis: 100%; border-left: 0; padding-left: 0; } }
