/* Tremorline website: same palette and type as the app, so the demo feels like the page it came from. */
/* Self-hosted (no requests to font services): Space Grotesk for headings, Inter for text, JetBrains Mono for code. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Tremorline brand: indigo for actions and identity, amber only for the tremor itself. */
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #eff0f6;
  --line: #dcdee8;
  --fg: #14182b;
  --muted: #5b6078;
  --accent: #4338ca;
  --accent-fg: #ffffff;
  --accent-soft: #eae8fb;
  --signal: #fbbf24;
  --ok: #1d7a46;
  --ok-bg: #e2f3e9;
  --warn: #8a5a00;
  --warn-bg: #fdf0d5;
  --bad: #b3261e;
  --bad-bg: #fbe4e2;
  --neutral-bg: #e9eaf2;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1220;
    --surface: #171b2e;
    --surface-2: #1e2338;
    --line: #2c3250;
    --fg: #e8eaf3;
    --muted: #9aa0ba;
    --accent: #a5a0ff;
    --accent-fg: #0f1220;
    --accent-soft: #25234a;
    --signal: #fbbf24;
    --ok: #6fd39b;
    --ok-bg: #173527;
    --warn: #f2c260;
    --warn-bg: #3a2e12;
    --bad: #ff8b82;
    --bad-bg: #3e1d1b;
    --neutral-bg: #252a42;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; font-family: var(--font-display); }
p { margin: 0; }
a { color: var(--accent); }
code, pre { font-family: var(--mono); font-size: 0.86em; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 640px; }
section { padding: 72px 0; }
section.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
.section-lead { margin-top: 12px; color: var(--muted); max-width: 60ch; font-size: 1.05rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.15rem var(--font-display); letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 24px; }
.top nav a:not(.button) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:not(.button):hover { color: var(--fg); }
@media (max-width: 720px) { .top nav a:not(.button) { display: none; } }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); font: 600 0.98rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--accent); }
.button.small { min-height: 36px; padding: 0 14px; font-size: 0.9rem; }
.button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* Hero */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .hero { padding: 40px 0 56px; } }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; }
.hero h1 { margin-top: 12px; font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -0.02em; }
.lead { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { margin-top: 12px; font-size: 0.88rem; color: var(--muted); }

/* Product mock: three cards that tell the story change → impact → fix */
.mock { margin: 0; display: grid; gap: 12px; }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05); min-width: 0; }
.mock-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mock-head code { color: var(--muted); }
.mock-head .muted { font-size: 0.88rem; margin-left: auto; }
.mock-head .pill.ok { margin-left: auto; }
.mock ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.mock-changes li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mock-hits li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--surface-2); border-radius: 6px; }
.mock-hits code { overflow-wrap: anywhere; }
.mock-diff { margin: 10px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 6px; overflow-x: auto; line-height: 1.55; }
.mock-diff .del { color: var(--bad); }
.mock-diff .add { color: var(--ok); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.step-2 { margin-left: 24px; }
.step-3 { margin-left: 48px; }
@media (max-width: 520px) { .step-2, .step-3 { margin-left: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .mock-card { animation: rise 0.6s ease-out both; }
  .step-2 { animation-delay: 0.5s; }
  .step-3 { animation-delay: 1s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* How it works */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.step-no { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps h3, .cards h3, .plans h3 { margin-top: 14px; font-size: 1.1rem; }
.steps p, .cards p { margin-top: 8px; color: var(--muted); }

/* Comparison */
.table-scroll { margin-top: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tr.ours { background: var(--accent-soft); }
.compare tr.ours th { color: var(--accent); }

/* Trust cards and plans */
.cards, .plans { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards li { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.cards h3 { margin-top: 0; }
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plans > li { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.plans > li.featured { border: 2px solid var(--accent); }
.plans h3 { margin-top: 0; }
.plans ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.plans ul li + li { margin-top: 6px; }

/* Waitlist */
.waitlist { margin-top: 24px; display: grid; gap: 10px; }
.waitlist > label { font-weight: 600; font-size: 0.95rem; }
.field-row { display: flex; gap: 10px; }
@media (max-width: 480px) { .field-row { flex-direction: column; } }
.waitlist input[type=email] { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); font-weight: 400 !important; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin-top: 16px; padding: 10px 14px; border-radius: 8px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }

/* Footer and plain pages */
footer { padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }
.page { padding: 56px 0 72px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.page h2 { font-size: 1.2rem; margin-top: 32px; }
.page p, .page ul { margin-top: 12px; color: var(--muted); max-width: 68ch; }
.page .actions { margin-top: 28px; }

/* Brand page */
.brand-page h2 { margin-top: 40px; }
.brand-page code { color: var(--fg); }
.logo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0 0; }
.logo-tile { margin: 0; padding: 28px 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #f7f7fb; display: grid; justify-items: center; gap: 20px; }
.logo-tile.dark { background: #0f1220; border-color: #2c3250; }
.logo-tile figcaption { font-size: 0.85rem; color: #5b6078; }
.logo-tile.dark figcaption { color: #9aa0ba; }
.logo-tile.dark figcaption a { color: #a5a0ff; }
.swatches, .type-specimens { list-style: none; padding: 0; margin: 20px 0 0 !important; display: grid; gap: 12px; max-width: none !important; }
.swatches { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.swatches li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.swatches .chip { grid-row: span 3; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); }
.swatches code, .swatches span:last-child { font-size: 0.85rem; color: var(--muted); }
.type-specimens li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.type-specimens span:last-child { color: var(--muted); font-size: 0.9rem; }
.specimen { font-size: 1.6rem; color: var(--fg); }
.specimen.display { font-family: var(--font-display); font-weight: 600; }
.specimen.mono { font-family: var(--mono); font-size: 1.35rem; }
