/* ==========================================================================
   FlowForge marketing site — design system
   Mirrors the app's brand: emerald + creamy off-white, navy secondary.
   No purple, anywhere.
   ========================================================================== */

:root {
  --bg: #f7f5ee;
  --bg-2: #f1eee3;
  --surface: #fffefa;
  --surface-2: #f3f1e8;
  --border: #e7e3d5;
  --border-strong: #d8d3c2;

  --text: #17231f;
  --text-muted: #5a655e;
  --text-faint: #66706a;

  --accent: #059669;
  --accent-hover: #047857;
  --accent-press: #065f46;
  --accent-soft: #e2f3ea;

  --navy: #14273e;
  --navy-2: #0f2f37;
  --navy-3: #0c3a31;
  --ink: #0c1512;

  --info: #2563eb;
  --amber: #d97706;

  --grad: linear-gradient(120deg, #059669 0%, #10b981 52%, #2563eb 118%);
  --grad-soft: linear-gradient(120deg, #e2f3ea, #e6edfb);

  --shadow-sm: 0 1px 2px rgba(20, 39, 30, 0.06), 0 1px 3px rgba(20, 39, 30, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 39, 30, 0.08), 0 2px 6px rgba(20, 39, 30, 0.05);
  --shadow-lg: 0 30px 70px rgba(15, 40, 45, 0.18), 0 8px 20px rgba(20, 39, 30, 0.08);
  --shadow-window: 0 40px 90px rgba(13, 40, 45, 0.28), 0 12px 28px rgba(20, 39, 30, 0.12);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --maxw: 1180px;
  --pad: 24px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 680; letter-spacing: -0.025em; line-height: 1.08; color: var(--text); }
p { margin: 0; }

::selection { background: var(--accent-soft); }

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 92px 0; position: relative; }
.section-sm { padding: 60px 0; }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--text-muted); font-size: 18px; margin-top: 16px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 620;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.26);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1.5px); box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--text-faint); transform: translateY(-1.5px); }
.btn-lg { padding: 16px 28px; font-size: 16.5px; border-radius: 13px; }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.28); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,0.2); }
.btn-on-dark-primary { background: #fff; color: var(--navy); box-shadow: 0 10px 26px rgba(0,0,0,0.28); }
.btn-on-dark-primary:hover { background: #eef4f0; transform: translateY(-1.5px); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav-inner { display: flex; align-items: center; gap: 30px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 720; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 5px 16px rgba(5,150,105,0.3); flex: 0 0 auto; }
.brand-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: 12px; }
.nav-links a { font-size: 15px; font-weight: 550; color: var(--text-muted); transition: color 0.14s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--text); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 74px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; inset: -20% 0 auto 0; height: 620px;
  background: radial-gradient(900px 420px at 50% -10%, rgba(5,150,105,0.12), transparent 65%),
              radial-gradient(700px 380px at 82% 8%, rgba(37,99,235,0.08), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 860px; margin: 0 auto; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 7px 15px 7px 11px; font-size: 13.5px; font-weight: 600;
  color: var(--text-muted); box-shadow: var(--shadow-sm); margin-bottom: 26px;
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(5,150,105,0.15); }
.badge-pill b { color: var(--accent); font-weight: 700; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); letter-spacing: -0.035em; }
.hero-sub { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-muted); max-width: 640px; margin: 22px auto 30px; line-height: 1.55; }
.hero .btn-row { justify-content: center; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--text-faint); }
.hero-note b { color: var(--text-muted); font-weight: 600; }

/* Mac-window frame around screenshots */
.window {
  border-radius: var(--r-lg);
  background: #e9e6db;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; background: linear-gradient(var(--surface-2), #ece9dd); border-bottom: 1px solid var(--border); }
.window-bar i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.window-bar i:nth-child(1) { background: #f0665a; }
.window-bar i:nth-child(2) { background: #f5bd4f; }
.window-bar i:nth-child(3) { background: #61c554; }
.window-bar span { margin-left: 10px; font-size: 12.5px; color: var(--text-faint); font-weight: 550; }
.window img { display: block; width: 100%; height: auto; }

.hero-shot { max-width: 1040px; margin: 54px auto 0; position: relative; }
.hero-shot::after {
  content: ''; position: absolute; inset: auto 8% -30px 8%; height: 60px;
  background: radial-gradient(60% 100% at 50% 0, rgba(15,40,45,0.16), transparent 70%);
  filter: blur(8px); z-index: -1;
}

/* ── Trust bar ──────────────────────────────────────────────────────────── */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 30px 0; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; }
.trust-item .ico svg { width: 21px; height: 21px; }
.trust-item b { display: block; font-size: 15px; font-weight: 660; }
.trust-item span { font-size: 13.5px; color: var(--text-muted); }

/* ── How it works ───────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.step-n { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 720; font-size: 15px; margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 9px; }
.step p { color: var(--text-muted); font-size: 15.5px; }
.how-shot { margin-top: 54px; max-width: 980px; margin-left: auto; margin-right: auto; }

/* ── Feature grid ───────────────────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin-bottom: 9px; }
.feature p { color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.feature.wide { grid-column: span 2; }

/* Split feature (text + screenshot) */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 54px; align-items: center; }
.split.rev { grid-template-columns: 1.15fr 1fr; }
.split.rev .split-copy { order: 2; }
.split-copy h2 { font-size: clamp(26px, 3.4vw, 38px); }
.split-copy p { color: var(--text-muted); font-size: 17.5px; margin-top: 16px; }
.split-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 13px; }
.split-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.split-list li .chk { width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.split-list li .chk svg { width: 15px; height: 15px; }
.split-list li b { font-weight: 640; }

/* ── Use cases ──────────────────────────────────────────────────────────── */
.usecases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.usecase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.usecase .ico { font-size: 26px; margin-bottom: 14px; }
.usecase h3 { font-size: 17.5px; margin-bottom: 8px; }
.usecase p { color: var(--text-muted); font-size: 14.5px; }
.usecase ul { list-style: none; padding: 0; margin: 14px 0 0; }
.usecase li { font-size: 14px; color: var(--text-muted); padding: 6px 0; border-top: 1px solid var(--border); }

/* ── Templates ──────────────────────────────────────────────────────────── */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tpl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; transition: transform 0.16s, box-shadow 0.16s; }
.tpl:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tpl-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tpl-emoji { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; flex: 0 0 auto; }
.tpl-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.tpl h3 { font-size: 17px; margin-bottom: 6px; }
.tpl p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.tpl-steps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 15px; }
.tpl-chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Dark band (local-first / security) ─────────────────────────────────── */
.dark {
  background:
    radial-gradient(680px 340px at 88% -10%, rgba(16,185,129,0.28), transparent 66%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 120%);
  color: #eaf1ee;
}
.dark h2 { color: #fff; }
.dark .eyebrow { color: #6ee7b7; }
.dark .section-head p { color: rgba(233,240,238,0.72); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: var(--r-lg); padding: 28px; backdrop-filter: blur(4px); }
.pillar .ico { width: 46px; height: 46px; border-radius: 12px; background: rgba(110,231,183,0.14); color: #6ee7b7; display: grid; place-items: center; margin-bottom: 18px; }
.pillar .ico svg { width: 24px; height: 24px; }
.pillar h3 { color: #fff; font-size: 19px; margin-bottom: 9px; }
.pillar p { color: rgba(233,240,238,0.72); font-size: 15px; line-height: 1.55; }
.dark .split-copy p { color: rgba(233,240,238,0.72); }
.dark .split-list li .chk { background: rgba(110,231,183,0.16); color: #6ee7b7; }

/* ── AI band ────────────────────────────────────────────────────────────── */
.ai-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; max-width: 1000px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px 28px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 24px 60px rgba(5,150,105,0.18); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-md); }
.plan h3 { font-size: 21px; }
.plan .plan-desc { color: var(--text-muted); font-size: 14.5px; margin-top: 7px; min-height: 42px; }
.plan .price { margin: 20px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.plan .price .amt { font-size: 46px; font-weight: 720; letter-spacing: -0.03em; }
.plan .price .per { color: var(--text-muted); font-size: 15px; font-weight: 550; }
.plan .price-note { font-size: 13px; color: var(--text-faint); min-height: 20px; }
.plan .btn { width: 100%; margin: 22px 0; }
.plan-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-muted); }
.plan-features li .chk { width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.plan-features li .chk svg { width: 13px; height: 13px; }
.plan-features li b { color: var(--text); font-weight: 600; }
.price-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin: 0 auto 40px; gap: 4px; }
.price-toggle button { border: none; background: transparent; font-family: inherit; font-size: 14.5px; font-weight: 620; color: var(--text-muted); padding: 8px 20px; border-radius: 999px; cursor: pointer; transition: all 0.15s; }
.price-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.price-toggle .save { color: var(--accent); font-size: 12px; font-weight: 700; }
.all-plans { max-width: 760px; margin: 44px auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 30px; }
.all-plans h4 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 16px; }
.all-plans ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.all-plans li { display: flex; gap: 9px; align-items: center; font-size: 14.5px; color: var(--text-muted); }
.all-plans li .chk { color: var(--accent); flex: 0 0 auto; }
.all-plans li .chk svg { width: 16px; height: 16px; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 22px 4px; font-size: 18px; font-weight: 620; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--accent); transition: transform 0.2s; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 24px; color: var(--text-muted); font-size: 16px; line-height: 1.65; }

/* ── Final CTA ──────────────────────────────────────────────────────────── */
.cta-band { text-align: center; }
.cta-card {
  background:
    radial-gradient(600px 300px at 82% -20%, rgba(16,185,129,0.3), transparent 66%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 120%);
  border-radius: var(--r-xl); padding: 66px 40px; color: #fff; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-card h2 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); }
.cta-card p { color: rgba(233,240,238,0.8); font-size: 19px; max-width: 560px; margin: 18px auto 30px; }
.cta-card .btn-row { justify-content: center; }
.cta-card .fine { margin-top: 18px; font-size: 14px; color: rgba(233,240,238,0.6); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 66px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; margin-top: 16px; max-width: 280px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--text-muted); padding: 6px 0; transition: color 0.14s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 14px; }
.footer-bottom span { font-size: 13.5px; color: var(--text-faint); }
.footer-badges { display: flex; gap: 16px; }
.footer-badges span { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* ── Reveal on scroll ───────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s cubic-bezier(0.2,0.8,0.3,1), transform 0.6s cubic-bezier(0.2,0.8,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .features, .steps, .pillars, .pricing-grid, .tpl-grid { grid-template-columns: 1fr; }
  .usecases, .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 34px; }
  .split.rev .split-copy { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: span 2; }
  .feature.wide { grid-column: span 1; }
  .section { padding: 68px 0; }
  .all-plans ul { grid-template-columns: 1fr; }
  /* mobile nav drawer */
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px var(--pad) 20px; box-shadow: var(--shadow-md); }
  .nav-links.open a { padding: 10px 0; font-size: 16px; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .usecases, .trust-inner { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 20px; }
  .cta-card { padding: 46px 24px; }
  .btn-row .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  * { animation: none !important; }
}

/* ── Keyboard focus (a11y) ─────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn-light:focus-visible, .btn-on-dark-primary:focus-visible, .dark a:focus-visible { outline-color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   Motion graphics · infographics · annotations
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Annotated screenshots ──────────────────────────────────────────────── */
.shot { position: relative; }
.annot {
  position: absolute; z-index: 6; opacity: 0; transform: translateY(12px) scale(0.94);
  transition: opacity 0.6s cubic-bezier(0.2,0.8,0.3,1), transform 0.6s cubic-bezier(0.2,0.8,0.3,1);
  pointer-events: none;
}
.annot.in { opacity: 1; transform: none; }
.annot-pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(18,34,29,0.94); color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 11px; box-shadow: 0 14px 34px rgba(13,40,45,0.4);
  backdrop-filter: blur(8px); white-space: nowrap;
}
.annot-pill .d { width: 8px; height: 8px; border-radius: 50%; background: #6ee7b7; box-shadow: 0 0 0 4px rgba(110,231,183,0.28); animation: annotPulse 1.9s ease-in-out infinite; }
.annot-float { animation: annotFloat 3.6s ease-in-out infinite; }
@keyframes annotFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes annotPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.55); opacity: 0.5; } }

/* ── Flow infographic (trigger → action → done) ─────────────────────────── */
.flow-viz { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; margin: 50px auto 0; max-width: 900px; }
.flow-node {
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 16px;
  padding: 18px 22px; min-width: 210px; box-shadow: var(--shadow-md); text-align: left;
  display: flex; align-items: center; gap: 13px;
}
.flow-node.trigger { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 75%); }
.flow-node.done { border-color: color-mix(in srgb, #16a34a 45%, var(--border-strong)); background: linear-gradient(180deg, #e4f4e9, var(--surface) 75%); }
.flow-node .fn-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; color: #fff; flex: 0 0 auto; }
.flow-node.trigger .fn-ico { background: var(--grad); }
.flow-node.action .fn-ico { background: #0e7490; }
.flow-node.done .fn-ico { background: #16a34a; }
.flow-node .fn-t { font-weight: 670; font-size: 15px; }
.flow-node .fn-s { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.flow-wire { position: relative; width: 68px; height: 3px; flex: 0 0 auto; align-self: center;
  background: repeating-linear-gradient(to right, color-mix(in srgb, var(--accent) 60%, transparent) 0 6px, transparent 6px 12px); }
.flow-wire::after { content: ''; position: absolute; top: 50%; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px 1px rgba(5,150,105,0.6); transform: translateY(-50%); animation: wireDot 2.1s linear infinite; }
.flow-wire.w2::after { animation-delay: 1.05s; }
@keyframes wireDot { 0% { left: -4px; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 4px); opacity: 0; } }

/* ── Count-up stats strip ───────────────────────────────────────────────── */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 940px; margin: 0 auto; }
.stat-big { text-align: center; }
.stat-big .num { font-size: clamp(38px, 5vw, 52px); font-weight: 720; letter-spacing: -0.03em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-big .lbl { color: var(--text-muted); font-size: 15px; font-weight: 550; margin-top: 10px; }

@media (max-width: 760px) {
  .annot { display: none; }
  .flow-wire { width: 3px; height: 40px; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--accent) 60%, transparent) 0 6px, transparent 6px 12px); }
  .flow-wire::after { animation: none; top: 0; left: 50%; transform: translateX(-50%); }
  .flow-node { min-width: 240px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 30px 22px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Dark theme — driven by [data-theme="dark"] on <html>. Set from the OS
   preference on first load, overridable via the nav toggle (persisted to
   localStorage). The site is variable-driven, so dark mode is mostly just
   re-pointing tokens; only a few hard-coded light surfaces need a nudge.
   ══════════════════════════════════════════════════════════════════════════ */
:root[data-theme="dark"] {
  --bg: #0e1512;
  --bg-2: #0a100e;
  --surface: #151d19;
  --surface-2: #1c251f;
  --border: #29332c;
  --border-strong: #3a463d;

  --text: #eaf1ec;
  --text-muted: #9eaaa2;
  --text-faint: #7a867e;

  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-press: #059669;
  --accent-soft: rgba(16, 185, 129, 0.14);

  --info: #3b82f6;
  --amber: #f59e0b;

  --grad-soft: linear-gradient(120deg, rgba(16, 185, 129, 0.16), rgba(37, 99, 235, 0.14));

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.62), 0 8px 20px rgba(0, 0, 0, 0.45);
  --shadow-window: 0 40px 90px rgba(0, 0, 0, 0.72), 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Hard-coded light surfaces that the variables don't reach */
:root[data-theme="dark"] .window { background: #1b2420; }
:root[data-theme="dark"] .window-bar { background: linear-gradient(#212b25, #18211c); }
:root[data-theme="dark"] .flow-node.done { background: linear-gradient(180deg, rgba(22, 163, 74, 0.20), var(--surface) 78%); }
:root[data-theme="dark"] ::selection { background: rgba(16, 185, 129, 0.32); }

/* Screenshot swap — show the app's own dark captures in dark mode.
   `img.` prefix keeps specificity above `.window img` so the hidden variant
   stays hidden even inside a window frame. */
img.shot-dark { display: none; }
:root[data-theme="dark"] img.shot-light { display: none; }
:root[data-theme="dark"] img.shot-dark { display: block; }

/* ── Theme toggle button ────────────────────────────────────────────────── */
.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  border-radius: 10px; display: grid; place-items: center;
  color: var(--text-muted); transition: background 0.15s, color 0.15s; flex: 0 0 auto;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
