/* ═════════════════════════════════════════════════════════════════════════
   Marketing-page design tokens. Shared across /features /pricing /about
   /contact /privacy /terms. Mirrors the in-app theme (Bricolage Grotesque
   display + Geist sans + paper/ink palette) so static pages don't feel
   like a different brand. Single source of truth — every page links
   <link rel="stylesheet" href="/css/marketing.css"> and inherits.
   ═════════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #0A0A0B; --paper: #F5F1E8; --chalk: #FBF9F4; --coal: #15151A;
  --line: rgba(10,10,11,0.08); --mute: #6F6B62;
  --lime: #D6FF3E; --limeDeep: #A8D200;
  --magenta: #FF2D6A; --ultra: #6B5BFF; --ultraSoft: #E8E4FF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper); color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
.font-mono    { font-family: 'Geist Mono', ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ultra); }

/* Page container — single source of truth for site-wide max-width and
   horizontal padding. Matches the SPA LandingNav (max-w-7xl = 1280px,
   px-5 sm:px-8 = 20/32px) so navigating between / and /features doesn't
   change the chrome width. .wrap-sm stays narrower for long-form text
   (privacy, terms) but inherits the same padding scale. */
.wrap, .wrap-sm, .page-container, .wrap--wide {
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.wrap, .wrap--wide { max-width: 1280px; }
.wrap-sm,
.page-container    { max-width: 800px; }

@media (min-width: 640px) {
  .wrap, .wrap-sm, .page-container, .wrap--wide {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Bottom safety: every page leaves room above the footer. */
main { padding-bottom: 96px; }

/* ─── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 20px; letter-spacing: -0.03em;
  color: var(--ink);
}
.logo:hover { color: var(--ink); opacity: 0.85; }
.logo-img { display: block; height: 28px; width: auto; }
.logo .dot { color: var(--magenta); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a { color: var(--mute); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Right-side actions: theme toggle + Sign in + Start free trial.
   Mirrors the home-page LandingNav so navigating from / → /features
   doesn't change the chrome. */
.nav-actions { display: inline-flex; align-items: center; gap: 6px; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 999px;
  background: transparent; border: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
  transition: background 120ms;
}
.theme-toggle:hover { background: rgba(10,10,11,0.05); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
.nav-signin {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: var(--ink);
}
.nav-signin:hover { background: rgba(10,10,11,0.05); color: var(--ink); }

/* CTA pill — selector specificity bumped to .nav-links a.nav-cta so it
   wins over the .nav-links a { color: var(--mute) } rule above. Without
   that, the button rendered black-on-grey instead of black-on-paper. */
.nav-links a.nav-cta,
.nav-actions a.nav-cta,
a.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px; font-weight: 500;
}
.nav-links a.nav-cta:hover,
.nav-actions a.nav-cta:hover,
a.nav-cta:hover {
  background: var(--ultra);
  color: var(--paper);
}

/* Hamburger toggle — visible only on mobile. Same hit-area as the theme
   toggle so the header bar stays balanced. */
.nav-toggle {
  display: none;
  width: 36px; height: 36px; border-radius: 999px;
  background: transparent; border: none; padding: 0;
  align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
}
.nav-toggle:hover { background: rgba(10,10,11,0.05); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 720px) {
  /* On mobile, the nav links collapse into a slide-down panel anchored
     below the header bar. The panel matches the header background and
     stretches edge-to-edge so it doesn't look pinched on small phones. */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    background: rgba(245, 241, 232, 0.98);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 14px 0;
    font-size: 15px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }

  .nav-actions .theme-toggle,
  .nav-actions .nav-signin { display: none; }
  .nav-toggle { display: inline-flex; }
}
html.dark .nav-links { background: rgba(10, 10, 11, 0.98); }
html.dark .nav-toggle:hover { background: rgba(245,241,232,0.06); }

/* ─── Page typography ──────────────────────────────────────────────────── */
/* Eyebrow pill — used at the top of every page hero. Same pill style
   across all marketing pages for visual consistency. */
.eyebrow,
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ultra);
  padding: 6px 12px; border-radius: 99px;
  background: var(--ultraSoft); border: 1px solid rgba(107, 91, 255, 0.2);
  margin-bottom: 16px;
}

/* Display + heading scale. tracking-tight stops at -0.02em so even big
   sizes don't overhang the container edge. */
.h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(40px, 5.5vw, 56px);
  line-height: 1.04; font-weight: 700; letter-spacing: -0.02em;
  margin: 12px 0 16px;
  /* Optical fix: nudge slightly right so glyph overhang from heavy
     weights doesn't clip on the left edge. */
  text-indent: 0.005em;
}
.h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 24px; line-height: 1.2; font-weight: 700;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
}
.h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  margin: 28px 0 10px;
}

/* Body copy — 17px, relaxed leading, soft ink for prose readability. */
.lead {
  font-size: 18px; color: rgba(10, 10, 11, 0.7);
  max-width: 720px; line-height: 1.55;
}
.prose p, .prose ul, .prose ol {
  margin: 0 0 14px;
  font-size: 17px; line-height: 1.65;
  color: rgba(10, 10, 11, 0.8);
  max-width: 740px;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li, .prose ol li { margin: 0 0 6px; }
.prose a { color: var(--ultra); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Hero band — standard top spacing under the nav across all pages */
.hero { padding-top: 64px; padding-bottom: 32px; }
@media (min-width: 640px) { .hero { padding-top: 96px; padding-bottom: 32px; } }

/* ─── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.card-dark {
  background: var(--ink); color: var(--paper);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 24px;
}

/* ─── Pricing-specific ────────────────────────────────────────────────── */
.price-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 40px 0;
}
@media (max-width: 1100px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: white; border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column;
}
.price-card.featured {
  background: var(--ink); color: var(--paper);
  border-color: transparent;
  position: relative; box-shadow: 0 16px 48px -8px rgba(107,91,255,.2);
}
.price-card.featured::before {
  content: 'Most popular';
  position: absolute; top: -10px; right: 20px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--lime); color: var(--ink);
  padding: 4px 10px; border-radius: 99px; font-weight: 600;
}
.price-tier {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
}
.price-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 44px; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1; margin: 14px 0 4px;
}
.price-num .unit { font-size: 14px; color: var(--mute); font-weight: 500; }
.price-card.featured .price-num .unit { color: rgba(245,241,232,0.5); }
.price-features { list-style: none; padding: 18px 0; margin: 18px 0 24px; border-top: 1px solid var(--line); }
.price-card.featured .price-features { border-color: rgba(245,241,232,0.1); }
.price-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; line-height: 1.5; padding: 6px 0;
}
.price-features li::before {
  content: '✓'; color: var(--limeDeep); font-weight: 700; flex-shrink: 0;
  margin-top: -1px;
}
.price-card.featured .price-features li::before { color: var(--lime); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 12px;
  font-size: 14px; font-weight: 500; cursor: pointer; border: none;
  text-decoration: none;
}
.btn-ink  { background: var(--ink);  color: var(--paper); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ink:hover { background: #1A1A1F; color: var(--paper); }

/* ─── Features grid ───────────────────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin: 24px 0 36px;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-cell {
  background: white; border: 1px solid var(--line);
  border-radius: 14px; padding: 22px;
}
.feature-cell .label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ultra);
  font-weight: 600; margin-bottom: 8px;
}
.feature-cell h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.feature-cell p { font-size: 14px; color: var(--mute); line-height: 1.55; }

/* ─── Contact form ────────────────────────────────────────────────────── */
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block; font-family: 'Geist Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); font-weight: 600; margin-bottom: 6px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: white; color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 14.5px; line-height: 1.4;
  outline: none; transition: border-color 0.15s;
}
.form-field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239A958A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--ultra); }
.form-status {
  margin-top: 12px; padding: 10px 14px;
  border-radius: 10px; font-size: 13px;
}
.form-status.ok  { background: rgba(168,210,0,0.15); color: #5b8800; border: 1px solid rgba(168,210,0,0.3); }
.form-status.err { background: rgba(255,45,106,0.10); color: var(--magenta); border: 1px solid rgba(255,45,106,0.3); }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  margin-top: 96px;
}
.site-footer .inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  padding: 56px 0 24px;
}
/* Mobile: stack to a single column so the brand block doesn't get
   squeezed into the top-left of a 2-col grid. Matches the home page's
   sm:grid-cols-2 default-1-col behaviour for footer parity. */
@media (max-width: 720px) {
  .site-footer .inner { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
}
.site-footer h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mute);
  font-weight: 600; margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a { font-size: 14px; color: var(--ink); }
.site-footer ul li a:hover { color: var(--ultra); }
.site-footer .meta {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--mute);
}
@media (max-width: 720px) {
  .site-footer .meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.site-footer .meta a { color: var(--mute); }

/* Social row in the brand column of the footer. Small icon chips that
   pick up brand accent on hover — same treatment across every marketing
   page. Sized to sit comfortably under the 14px tagline copy. */
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  color: var(--mute); border: 1px solid var(--line);
  transition: color 120ms, border-color 120ms, background 120ms;
}
.social-row a:hover {
  color: var(--ultra); border-color: var(--ultra);
  background: rgba(107, 91, 255, 0.06);
}
.social-row svg { width: 16px; height: 16px; display: block; }

/* ─── Misc utilities ──────────────────────────────────────────────────── */
.divider { border-top: 1px solid var(--line); margin: 36px 0; }
section { padding: 32px 0; }
.muted { color: var(--mute); }

/* ─── Dark mode ───────────────────────────────────────────────────────────
   Triggered by adding html.dark — same toggle pattern as the SPA, same
   localStorage key (pulse_theme) so the preference persists across the
   home page and the marketing pages. Most rules use var(--ink) and
   var(--paper) and flip automatically; only a handful of hardcoded
   `white` backgrounds need explicit dark overrides below. */
html.dark {
  --ink: #F5F1E8;
  --paper: #0A0A0B;
  --chalk: #15151A;
  --line: rgba(245,241,232,0.1);
  --mute: #9F9B92;
}
html.dark .site-header { background: rgba(10, 10, 11, 0.85); }
html.dark .card,
html.dark .feature-cell,
html.dark .price-card:not(.featured) { background: var(--chalk); }
html.dark .form-field input,
html.dark .form-field textarea,
html.dark .form-field select { background: var(--chalk); color: var(--ink); }
html.dark .btn-outline { border-color: rgba(245,241,232,0.18); color: var(--ink); }
html.dark .btn-outline:hover { border-color: var(--ink); }
html.dark .theme-toggle:hover,
html.dark .nav-signin:hover { background: rgba(245,241,232,0.06); }
html.dark .theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun  { display: block; }
html.dark .social-row a:hover { background: rgba(107, 91, 255, 0.12); }
