/* SpendSmart AI marketing site — tokens copied from src/theme/colors.ts (dark palette) */
:root {
  --bg: #0A0A0F;
  --bg-elev: #0E0E17;
  --surface: #13131A;
  --card: #181823;
  --card-2: #1C1C28;
  --border: #262633;
  --border-hi: #383850;
  --accent: #6C63FF;
  --accent-600: #5B52E6;
  --accent-300: #9C95FF;
  --accent-glow: rgba(108, 99, 255, 0.28);
  --green: #00D97E;
  --green-300: #4DE8A8;
  --green-glow: rgba(0, 217, 126, 0.18);
  --text: #F2F2F8;
  --muted: #9A9AC0;
  --text-3: #8585A8;
  --maxw: 1120px;
  /* Strong custom easing — the built-in ease-out is too weak to feel intentional
     (Emil Kowalski). Used on hovers, reveals, and the billing-toggle slide. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible keyboard focus across interactive elements (dark-theme friendly). */
a:focus-visible,
.btn:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- top nav (sticky; condenses + blurs on scroll) ---- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.navbar.scrolled {
  background: rgba(10, 10, 15, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--maxw); margin: 0 auto;
  transition: padding .25s ease;
}
.navbar.scrolled .nav { padding: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.01em; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.nav-links { margin-left: auto; }
.nav-links a { color: var(--muted); margin-left: 26px; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
/* Persistent Sign-up CTA. On desktop its space is reserved in the layout (so nothing
   shifts) but it fades in only once the nav condenses on scroll — never duplicating
   the hero CTA at the top, yet giving a sticky action the moment the hero scrolls
   away. On mobile it's always shown (see media query) since the links collapse. */
.nav-cta {
  display: inline-flex; padding: 9px 18px; font-size: 14px; margin-left: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease-out);
}
.navbar.scrolled .nav-cta { opacity: 1; pointer-events: auto; }
/* Hamburger toggle — hidden on desktop, shown on mobile (see media query). */
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  line-height: 1; cursor: pointer; padding: 6px 10px;
}
.nav-toggle svg { width: 24px; height: 24px; display: block; }

/* ---- buttons ---- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 12px;
  font-weight: 600; font-size: 16px; cursor: pointer; border: none;
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out);
}
/* Hover lift only where a real pointer can hover, so it doesn't stick after a tap
   on touch devices. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { text-decoration: none; transform: translateY(-1px); }
}
/* Press feedback — the UI should feel like it heard the tap (Emil Kowalski). */
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---- hero ---- */
.hero { position: relative; text-align: center; padding: 84px 0 72px; }
/* Soft indigo→green aurora behind the headline. Decorative, never interactive.
   max-width:100% keeps it inside the hero so it can never cause horizontal scroll. */
.hero .aurora {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 760px; max-width: 100%; height: 460px;
  background:
    radial-gradient(closest-side at 36% 42%, var(--accent-glow), transparent 72%),
    radial-gradient(closest-side at 68% 58%, var(--green-glow), transparent 72%);
  filter: blur(64px); opacity: .85; z-index: 0; pointer-events: none;
  will-change: transform;
}
.hero > *:not(.aurora) { position: relative; z-index: 1; }

.hero .eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-300);
}
.hero h1 {
  font-family: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.04; max-width: 15ch; margin: 0 auto;
}
.hero h1 .accent { color: var(--accent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .accent {
    background: linear-gradient(120deg, var(--accent), var(--accent-300));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}
.hero p.tag {
  font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--muted);
  margin: 22px auto 0; max-width: 620px;
}
.hero p.tag .pro { color: var(--accent-300); font-weight: 600; }
.hero .cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.hero .coming-soon {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--text-3);
}
.hero .coming-soon svg { width: 15px; height: 15px; }

/* ---- hero product demo (animated) ---- */
.hero-visual { margin: 52px auto 0; width: 100%; max-width: 460px; }
.frame {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.03) inset,
    0 40px 90px -34px rgba(0,0,0,.85),
    0 0 60px -22px var(--accent-glow);
}
.frame-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.frame-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #34344a; }
.frame-bar .frame-title { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.frame-body { padding: 22px; text-align: left; }
.demo-label {
  margin-bottom: 9px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
}
.demo-input {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border-hi); border-radius: 10px;
  padding: 13px 15px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px; color: var(--text);
}
.demo-typed { white-space: nowrap; overflow: hidden; width: max-content; }
.demo-caret { width: 2px; height: 1.15em; margin-left: 1px; background: var(--accent); flex: none; }
.demo-arrow {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 15px 0; font-size: 12px; font-weight: 600; color: var(--accent-300);
}
.demo-arrow svg { width: 15px; height: 15px; }
.demo-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.demo-cat-ico {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--green-glow); color: var(--green);
}
.demo-cat-ico svg { width: 20px; height: 20px; }
.demo-card-main { flex: 1; min-width: 0; }
.demo-card-title { font-weight: 600; font-size: 15px; color: var(--text); }
.demo-card-sub { font-size: 13px; color: var(--muted); }
.demo-card-amt { font-weight: 700; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }

/* hero entrance — staggered rise-in (page load) */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* The headline gets a clip-path reveal instead of a plain rise — it wipes into view
   from the top down, reading as deliberate typography rather than a generic fade.
   Wrapping-agnostic (clips the painted block, gradient-accent span included). */
@keyframes headlineReveal {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(0.16em); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}
.hero .eyebrow { animation: riseIn .6s .04s both; }
.hero h1 { animation: headlineReveal .85s .12s var(--ease-out) both; }
.hero p.tag { animation: riseIn .7s .22s both; }
.hero .cta { animation: riseIn .7s .32s both; }
.hero .note, .hero .coming-soon { animation: riseIn .7s .4s both; }
.hero-visual { animation: riseIn .8s .5s both; }

/* Animated product demo — JS-driven (see index.html). The static markup renders one
   completed example; JS adds .anim to .hero-visual and choreographs a typewriter → AI
   "thinking" beat → staggered field reveal, cycling a few examples. No-JS / reduced-
   motion users keep the finished static example. */
.demo-caret { animation: demoCaret 1s steps(1) infinite; }
@keyframes demoCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.demo-mic { display: none; }                 /* shown by JS only for voice examples */
.demo-input.has-mic .demo-mic {
  display: inline-flex; align-items: center; margin-right: 8px; color: var(--accent-300); flex: none;
}
.demo-mic svg { width: 16px; height: 16px; }

.hero-visual.anim .demo-arrow { opacity: 0; transition: opacity .3s var(--ease-out); }
.hero-visual.anim .demo-arrow.show { opacity: 1; }
.hero-visual.anim .demo-card {
  opacity: 0; transform: translateY(10px) scale(.985);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.hero-visual.anim .demo-card.is-in { opacity: 1; transform: none; }

/* Per-field stagger — each field rises + fades in; the category icon wipes in (clip-path).
   This sequenced reveal is what makes the parse read as "the AI is filling it in". */
.hero-visual.anim .demo-card .demo-card-title,
.hero-visual.anim .demo-card .demo-card-sub,
.hero-visual.anim .demo-card .demo-card-amt {
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.hero-visual.anim .demo-card .demo-cat-ico {
  opacity: 0; clip-path: inset(0 100% 0 0);
  transition: opacity .3s var(--ease-out), clip-path .4s var(--ease-out);
}
.hero-visual.anim .demo-card.is-in .demo-cat-ico { opacity: 1; clip-path: inset(0 0 0 0); transition-delay: .02s; }
.hero-visual.anim .demo-card.is-in .demo-card-title { opacity: 1; transform: none; transition-delay: .09s; }
.hero-visual.anim .demo-card.is-in .demo-card-sub { opacity: 1; transform: none; transition-delay: .15s; }
.hero-visual.anim .demo-card.is-in .demo-card-amt { opacity: 1; transform: none; transition-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero h1, .hero p.tag, .hero .cta, .hero .note, .hero .coming-soon,
  .hero-visual { animation: none !important; }
  /* Static fallback: the markup's first completed example stays put (no .anim added). */
  .demo-caret { animation: none !important; opacity: 0; }
}

/* ---- section ---- */
.section { padding: 84px 0; }
.section h2 {
  font-family: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -.01em;
  text-align: center; margin-bottom: 10px;
}
.section .sub { text-align: center; color: var(--muted); margin-bottom: 44px; font-size: 1.0625rem; }

/* ---- trust strip ---- */
.trust { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust .wrap {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px;
  padding-top: 22px; padding-bottom: 22px;
}
.trust-item { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 500; font-size: 14.5px; }
.trust-item svg { width: 18px; height: 18px; color: var(--green); flex: none; }

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.step-num {
  position: absolute; top: 22px; right: 22px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 14px; color: var(--text-3);
}
.step-ico {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(108, 99, 255, .12); color: var(--accent); margin-bottom: 16px;
}
.step-ico svg { width: 23px; height: 23px; }
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
.step .pro { color: var(--accent-300); font-weight: 600; }

/* ---- feature cards ---- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 22px;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
/* Keep card content above the cursor-glow layer (shared by all three card types).
   .step-num is absolutely positioned — lift it with z-index only; resetting its
   position would unpin it from the corner. */
.feature > *, .plan > *,
.step .step-ico, .step h3, .step p { position: relative; z-index: 1; }
.step .step-num { z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  /* Cursor-following glow — a soft radial highlight tracks the pointer (JS sets the
     --mx/--my custom props). Shared by feature cards, how-it-works steps, and pricing
     plans. Decorative, hover-only, GPU-cheap; no cost on touch. */
  .feature::before, .step::before, .plan::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(108, 99, 255, .18), transparent 60%);
    opacity: 0; transition: opacity .25s var(--ease-out); pointer-events: none;
  }
  .feature:hover::before, .step:hover::before, .plan:hover::before { opacity: 1; }
  /* Features + steps share the lift; plans keep their own (the Pro card retains its
     accent shadow) in the pricing block below. */
  .feature:hover, .step:hover {
    transform: translateY(-3px); border-color: var(--border-hi);
    box-shadow: 0 16px 44px -24px var(--accent-glow);
  }
}
.feature .ico {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(108, 99, 255, .12); color: var(--accent);
}
.feature .ico svg { width: 23px; height: 23px; }
.feature h3 { font-size: 18px; font-weight: 600; margin: 16px 0 8px; }
.feature p { color: var(--muted); font-size: 15px; }
/* Center a lone trailing card (the 5th in a 4-up row) so it doesn't sit orphaned on
   the left. Spans the row but keeps one-column width, centered — equal size to the rest.
   Reset/re-applied per breakpoint below. */
.grid > .feature:last-child:nth-child(4n + 1) {
  grid-column: 1 / -1;
  max-width: calc((100% - 3 * 20px) / 4);
  margin-inline: auto;
}

/* ---- pricing ---- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; }
.plan {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 32px; text-align: center;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.plan.pro { border-color: var(--accent); box-shadow: 0 10px 40px var(--accent-glow); }
@media (hover: hover) and (pointer: fine) {
  .plan:hover { transform: translateY(-3px); border-color: var(--border-hi); }
  .plan.pro:hover { border-color: var(--accent); box-shadow: 0 16px 50px var(--accent-glow); }
}
.plan h3 { font-size: 22px; font-weight: 700; }
.plan .price { font-size: 38px; font-weight: 800; margin: 14px 0 4px; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; margin: 22px 0 26px; text-align: left; }
.plan li { padding: 7px 0; color: var(--muted); }
.plan li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.plan .price-yearly { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.price-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 22px; }

/* Monthly / Annual billing toggle (centered above the plan cards). */
.billing-toggle {
  position: relative;
  display: flex; width: max-content; margin: 0 auto 28px; gap: 4px;
  padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
/* Sliding highlight — progressive enhancement. JS measures the active option and
   slides this pill under it (smoother than the highlight teleporting between pills).
   Until JS adds .has-ind, the per-option background below is the no-JS fallback. */
.billing-ind {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 9px; background: var(--accent); opacity: 0; z-index: 0;
  pointer-events: none;
  transition: transform .25s var(--ease-out), width .25s var(--ease-out);
}
.billing-toggle.has-ind .billing-ind { opacity: 1; }
.billing-opt {
  position: relative; z-index: 1;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 0;
  background: transparent; color: var(--muted); padding: 9px 18px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .18s var(--ease-out);
}
.billing-opt.is-active { color: #fff; }
/* No-JS fallback highlight — superseded by .billing-ind once JS initializes. */
.billing-toggle:not(.has-ind) .billing-opt.is-active { background: var(--accent); }
.save-badge {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--green-glow); color: var(--green-300);
}
.billing-opt.is-active .save-badge { background: rgba(255,255,255,.22); color: #fff; }

/* ── Blog ─────────────────────────────────────────────────────────────────────
   Listing (/blog) + individual posts (/blog/<slug>), generated by
   scripts/build-blog.mjs. Reuses the site tokens so it matches the marketing pages. */
.blog-head { text-align: center; padding: 56px 24px 8px; }
.blog-head h1 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.blog-head p { color: var(--muted); font-size: 17px; margin-top: 10px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 32px 0 16px; }
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, border-color .12s ease;
}
.blog-card:hover { transform: translateY(-2px); border-color: var(--border-hi); }
.blog-card-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface); }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-card-body h2 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.blog-card-body h2 a { color: var(--text); }
.blog-card-body h2 a:hover { color: var(--accent-300); text-decoration: none; }
.blog-card-meta { color: var(--text-3); font-size: 13px; }
.blog-card-excerpt { color: var(--muted); font-size: 15px; line-height: 1.55; }
.blog-card-more { color: var(--accent-300); font-weight: 600; font-size: 14px; margin-top: 4px; }
.blog-empty { color: var(--muted); text-align: center; padding: 48px 0; }

.blog-tag {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  margin: 0 6px 6px 0;
}

/* Post page */
.post-wrap { max-width: 760px; padding-top: 28px; padding-bottom: 8px; }
.post-back a { color: var(--muted); font-weight: 500; font-size: 14px; }
.post-tags { margin-bottom: 12px; }
.post-title { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 40px; font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.post-meta { color: var(--text-3); font-size: 14px; margin-top: 14px; }
.post-cover { width: 100%; border-radius: 14px; margin: 24px 0; border: 1px solid var(--border); }
.post-body { margin-top: 26px; color: var(--text); font-size: 17px; line-height: 1.75; }
.post-body h2 { font-size: 26px; font-weight: 700; margin: 38px 0 14px; letter-spacing: -0.4px; }
.post-body h3 { font-size: 21px; font-weight: 700; margin: 30px 0 10px; }
.post-body p { margin: 16px 0; color: var(--muted); }
.post-body ul, .post-body ol { margin: 16px 0; padding-left: 24px; color: var(--muted); }
.post-body li { margin: 8px 0; }
.post-body a { color: var(--accent-300); }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 22px 0; padding: 4px 0 4px 18px; color: var(--muted); font-style: italic; }
.post-body code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: 14px; }
.post-body pre { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; margin: 20px 0; }
.post-body pre code { background: none; border: none; padding: 0; }
.post-body img { max-width: 100%; border-radius: 12px; margin: 20px 0; }

.post-cta { margin: 48px 0 8px; padding: 32px; text-align: center; background: var(--card); border: 1px solid var(--accent); border-radius: 18px; box-shadow: 0 10px 40px var(--accent-glow); }
.post-cta h2 { font-size: 24px; font-weight: 800; margin: 0; }
.post-cta p { color: var(--muted); font-size: 15px; margin: 12px auto 22px; max-width: 460px; line-height: 1.6; }

@media (max-width: 860px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-head h1, .post-title { font-size: 30px; }
}
.pricing-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; opacity: 0.8; }

/* ---- legal / content pages ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 24px; }
.doc h1 { font-size: 38px; font-weight: 800; margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 22px; font-weight: 700; margin: 32px 0 10px; }
.doc p, .doc li { color: #c9c9da; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-weight: 500; }

/* ---- contact form ---- */
.form { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 15px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.confirm { display: none; background: rgba(0,217,126,.12); border: 1px solid var(--green);
  color: var(--green); padding: 14px 16px; border-radius: 10px; margin-top: 16px; }
.confirm.show { display: block; }
.promise { color: var(--muted); font-size: 14px; margin: 0 0 28px; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--border); margin-top: 96px; padding: 56px 0 40px; background: var(--bg-elev); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; align-items: start; }
.footer-brand .brand { font-size: 20px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 240px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
}
.footer-col a { display: block; color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-base {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 13px;
}

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }

/* ---- scroll-to-top ---- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--card); color: var(--text); border: 1px solid var(--border-hi); border-radius: 12px;
  cursor: pointer; opacity: 0; transform: translateY(8px); pointer-events: none;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: var(--card-2); }
}
.to-top:active { transform: scale(0.94); }
.to-top svg { width: 20px; height: 20px; }

/* ---- responsive ---- */
@media (max-width: 768px) {
  .hero { padding: 56px 0 56px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
  .grid { grid-template-columns: 1fr 1fr; }
  /* At 2-up the lone trailing card centers across both columns instead. */
  .grid > .feature:last-child:nth-child(4n + 1) { grid-column: auto; max-width: none; margin-inline: 0; }
  .grid > .feature:last-child:nth-child(2n + 1) {
    grid-column: 1 / -1;
    max-width: calc((100% - 20px) / 2);
    margin-inline: auto;
  }
  .pricing { grid-template-columns: 1fr; }
  .nav { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: inline-flex; padding: 8px 14px; margin-left: auto; margin-right: 10px; opacity: 1; pointer-events: auto; }
  /* Collapse the links into a tap-to-open dropdown below the bar. */
  .nav-links {
    display: none; position: absolute; top: calc(100% - 4px); left: 24px; right: 24px;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 6px; z-index: 30;
  }
  .nav-links.open { display: flex; }
  .nav-links a { margin-left: 0; padding: 11px 14px; border-radius: 8px; color: var(--text); }
  .section { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; }
  .trust .wrap { gap: 12px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  /* Single column — no orphan to center. */
  .grid > .feature:last-child:nth-child(2n + 1) { grid-column: auto; max-width: none; margin-inline: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Honor reduced-motion for the scroll/hover system (hero has its own block above). */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .feature, .step, .plan, .navbar, .nav, .nav-cta, .to-top, .testimonial, .billing-ind, .billing-opt { transition: none !important; }
  .feature:hover, .step:hover, .plan:hover, .testimonial:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- testimonials ---- */
/* Self-contained grid (not .grid) so its breakpoints don't fight the 4-up feature grid:
   3 columns desktop → 2 at 768 → 1 at 460, matching the rest of the site. */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 22px; margin: 0;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .testimonial:hover {
    transform: translateY(-3px); border-color: var(--border-hi);
    box-shadow: 0 16px 44px -24px var(--accent-glow);
  }
}
.testimonial.featured { border-color: var(--accent); box-shadow: 0 10px 40px -20px var(--accent-glow); }
.t-stars { font-size: 15px; letter-spacing: 2px; line-height: 1; }
.t-on { color: var(--accent); }
.t-off { color: var(--border); }
.t-quote { color: var(--text); font-size: 15px; line-height: 1.55; margin: 0; }
.t-by { color: var(--text); font-weight: 600; font-size: 14px; margin-top: auto; }
.t-meta { color: var(--muted); font-weight: 400; }
@media (max-width: 768px) { .testimonial-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---- FAQ (/faq) ---- */
.faq-wrap { max-width: 820px; }
.faq-head { margin-bottom: 28px; }
.faq-title { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: clamp(28px, 5vw, 40px); margin: 0 0 8px; }
.faq-sub { color: var(--muted); font-size: 16px; margin: 0 0 18px; }
.faq-search {
  width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; font-size: 15px; color: var(--text); font-family: inherit;
}
.faq-search:focus { outline: none; border-color: var(--accent); }
.faq-category { margin: 0 0 30px; }
.faq-cat-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.faq-cat-desc { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.faq-item {
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  margin: 0 0 10px; overflow: hidden;
}
.faq-item[open] { border-color: var(--border-hi); }
.faq-q {
  list-style: none; cursor: pointer; padding: 16px 18px;
  font-weight: 600; font-size: 16px; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; flex: none; }
.faq-item[open] .faq-q::after { content: '–'; }
.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.faq-answer { padding: 0 18px 18px; color: var(--text); line-height: 1.6; }
.faq-answer p:first-child { margin-top: 0; }
.faq-answer a { color: var(--accent); }
.faq-empty, .faq-empty-search { color: var(--muted); text-align: center; padding: 32px 0; }
