/* ============================================================================
   buddy — landing page
   Design system: "Margin Notes". Dark-first, editorial. A single luminous
   chartreuse highlighter mark is the only saturated thing on the page, used
   like an editor's annotation in the margin.
   ========================================================================= */

/* ─── Tokens ─── */
:root {
  --brand: #aee23f;
  --brand-hover: #c2ee63;
  --brand-ink: #16201a;
  --brand-quiet: rgba(174, 226, 63, 0.12);
  --brand-line: rgba(174, 226, 63, 0.34);

  --bg: #141d18;
  --bg-2: #18221c;
  --surface: #1f2a23;
  --surface-2: #26312a;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);

  --ink: #f2f5ef;
  --muted: #b3bcae;
  --faint: #828b7e;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 18px 48px -16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.7);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1160px;
}

/* ─── Reset & base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main { display: block; }

/* The editorial highlighter mark — the brand's signature annotation. */
.mark {
  color: var(--brand-ink);
  font-style: italic;
  background: var(--brand);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0.02em 0.16em;
  border-radius: 5px;
  box-shadow: 0 0 28px -6px rgba(174, 226, 63, 0.45);
}

/* ─── Buttons ─── */
.btn {
  --pad-y: 0.62rem;
  --pad-x: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  padding: var(--pad-y) var(--pad-x);
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s,
    transform 0.12s var(--ease), box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 10px 30px -10px rgba(174, 226, 63, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--faint); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }

.btn-lg { --pad-y: 0.85rem; --pad-x: 1.7rem; font-size: 1rem; }

/* ─── Auth-conditional visibility ───
   Logged-out elements show by default (works without JS). When the page learns
   the visitor is authenticated, body.is-authed flips them. */
.js-auth-in { display: none; }
body.is-authed .js-auth-out { display: none; }
body.is-authed .js-auth-in { display: inline-flex; }
body.is-authed a.js-auth-in.build-link,
body.is-authed .footer-col a.js-auth-in { display: inline-flex; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}
.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-right: auto;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--ink); }
.header-cta { display: flex; gap: 0.6rem; align-items: center; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5.5rem);
  background:
    radial-gradient(70% 55% at 78% 0%, var(--brand-quiet), transparent 60%),
    radial-gradient(60% 50% at 0% 8%, rgba(255, 255, 255, 0.03), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy { max-width: 36rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--brand-quiet);
  color: var(--ink);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 1.6rem;
}
.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-quiet);
}

.hero h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.4rem, 5vw, 3.85rem);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.hero-sub {
  margin: 1.5rem 0 2.2rem;
  max-width: 46ch;
  font-size: 1.12rem;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hero-note {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  color: var(--faint);
  font-family: var(--font-mono);
}

/* Product demonstration window */
.hero-demo { perspective: 1600px; }
.demo-window {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(1.5deg);
  transform-origin: center right;
  transition: transform 0.5s var(--ease);
}
.hero-demo:hover .demo-window { transform: rotateY(-3deg); }

.demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.demo-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.demo-url {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  background: var(--bg);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.demo-site { padding: 1.5rem 1.5rem 5.5rem; }
.demo-site-h {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
}
.demo-site-p { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; max-width: 34ch; }
.demo-site-row {
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  margin-top: 1.4rem;
}
.demo-site-row.short { width: 55%; margin-top: 0.7rem; }

/* Embedded chat widget, anchored bottom-right like the real launcher */
.demo-widget {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  width: min(78%, 320px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-widget-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.demo-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}
.demo-widget-id { display: flex; flex-direction: column; line-height: 1.25; }
.demo-name { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.demo-status {
  font-size: 0.7rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.demo-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.demo-thread {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.bubble {
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  max-width: 88%;
}
.bubble-user {
  align-self: flex-end;
  background: var(--brand-quiet);
  border: 1px solid var(--brand-line);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}
.bubble-agent {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.bubble-note {
  display: block;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--brand-line);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--brand);
  letter-spacing: 0.01em;
}
.demo-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0.9rem 0.9rem;
  padding: 0.55rem 0.5rem 0.55rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.demo-input-text { color: var(--faint); font-size: 0.8rem; }
.demo-send {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── Section scaffolding ─── */
.build, .capabilities, .pricing { padding: clamp(4rem, 8vw, 7rem) 0; }
.steps { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--bg-2); border-block: 1px solid var(--border); }

h2.section-title,
.build h2, .steps h2, .capabilities h2, .pricing h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}
.build h2, .capabilities h2, .pricing h2 { text-align: center; }
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0.9rem auto 0;
  max-width: 52ch;
  font-size: 1.05rem;
  text-wrap: pretty;
}

/* ─── What you build ─── */
.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.build-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}
.build-card:hover {
  border-color: var(--brand-line);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.build-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}
.build-tag--studio { background: var(--brand-quiet); color: var(--brand); border: 1px solid var(--brand-line); }
.build-tag--companion { background: rgba(255,255,255,0.06); color: var(--ink); border: 1px solid var(--border-strong); }

.build-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.build-card > p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 42ch;
}
.build-list {
  list-style: none;
  margin: 1.3rem 0 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.build-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.build-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg) translateY(-50%);
}
.build-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand);
  text-decoration: none;
}
.build-link span { transition: transform 0.2s var(--ease); }
.build-link:hover span { transform: translateX(4px); }

/* ─── How it works ─── */
.steps h2 { max-width: 22ch; }
.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  counter-reset: step;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.steps-list li {
  position: relative;
  padding-top: 1.6rem;
  border-top: 2px solid var(--border-strong);
}
.steps-list li:first-child { border-top-color: var(--brand); }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.step-body h3 {
  margin-top: 0.7rem;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
}
.step-body p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

/* ─── Capabilities ─── */
.cap-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cap {
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.cap:hover { background: var(--surface); }
.cap-key {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.55rem;
  padding-bottom: 0.2rem;
  box-shadow: inset 0 -0.45em 0 var(--brand-quiet);
}
.cap p { color: var(--muted); font-size: 0.94rem; text-wrap: pretty; }

/* ─── Pricing ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  align-items: stretch;
}
.pricing-card {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pricing-card--featured {
  border-color: var(--brand-line);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--brand-line), var(--shadow);
}
.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pricing-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.price { display: flex; align-items: baseline; gap: 0.3rem; margin-top: 0.3rem; }
.price .amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.price .period { font-size: 0.85rem; color: var(--muted); }
.price-line { font-size: 0.86rem; color: var(--faint); margin-bottom: 0.6rem; }
.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.5rem 0 1.4rem;
}
.price-features li { display: flex; gap: 0.55rem; align-items: baseline; }
.price-features li::before {
  content: "\2713";
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
}
.pricing-card .btn { width: 100%; margin-top: auto; }
.pricing-foot {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.84rem;
  color: var(--faint);
}

/* ─── CTA banner ─── */
.cta-banner { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.cta-inner {
  position: relative;
  text-align: center;
  background:
    radial-gradient(90% 130% at 50% 0%, var(--brand-quiet), transparent 65%),
    var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  padding: clamp(2.8rem, 5vw, 4.5rem) 1.5rem;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.cta-inner p { color: var(--muted); margin: 0.8rem auto 2rem; font-size: 1.06rem; max-width: 44ch; }
.cta-inner .hero-actions { justify-content: center; }

/* ─── Footer ─── */
.site-footer {
  padding: clamp(3rem, 5vw, 4.5rem) 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.footer-logo { font-size: 1.15rem; }
.footer-tag { margin-top: 0.8rem; color: var(--muted); font-size: 0.92rem; max-width: 28ch; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.footer-col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
  width: fit-content;
}
.footer-col a:hover { color: var(--ink); }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 2rem;
}
.footer-copy { font-size: 0.8rem; color: var(--faint); font-family: var(--font-mono); }
.footer-mail {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
}
.footer-mail:hover { color: var(--brand); }

/* ─── Entrance reveal (enhances already-visible content) ─── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 100%; }
  .hero-demo { max-width: 460px; margin-inline: auto; width: 100%; }
  .demo-window { transform: none; }
  .hero-demo:hover .demo-window { transform: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  /* NOTE: .site-header has backdrop-filter, which makes it the containing
     block for these position:fixed children. Since the header is sticky at
     top:0, its top edge aligns with the viewport top, so 100dvh-based sizing
     resolves correctly against the viewport. Avoid relying on `bottom`. */
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    bottom: auto;
    height: calc(100dvh - 66px);
    background: var(--bg);
    padding: 1.75rem 1.5rem 7rem;
    gap: 1.1rem;
    z-index: 99;
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }
  .site-nav.open a { font-size: 1.05rem; color: var(--ink); }
  .header-cta.open {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: fixed;
    left: 1.5rem;
    right: 1.5rem;
    top: calc(100dvh - 1.5rem);
    bottom: auto;
    transform: translateY(-100%);
    z-index: 100;
  }
  .header-cta.open .btn { width: 100%; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .demo-window { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================================
   Legal / prose pages (privacy, terms)
   ========================================================================= */
.legal {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem);
  border-top: 1px solid var(--border);
}
.legal-inner { max-width: 760px; }
.legal-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
}
.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 2.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.legal-lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.4rem;
  scroll-margin-top: 90px;
}
.legal h2 .legal-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand);
  margin-right: 0.7rem;
  vertical-align: 0.12em;
}
.legal h3 {
  font-weight: 600;
  font-size: 1.02rem;
  margin: 1.6rem 0 0.35rem;
  color: var(--ink);
}
.legal p { color: var(--muted); margin: 0.7rem 0; }
.legal ul { margin: 0.7rem 0 0.7rem 0; padding-left: 0; list-style: none; }
.legal ul li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted);
  margin: 0.4rem 0;
}
.legal ul li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--brand);
}
.legal a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; }
.legal a:hover { text-decoration-color: var(--brand); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal-note {
  margin-top: 3rem;
  padding: 1.25rem 1.4rem;
  background: var(--brand-quiet);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--muted);
}
.legal-note strong { color: var(--brand); }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--faint);
  text-decoration: none;
}
.legal-back:hover { color: var(--brand); }
