/* ============================================================
   FLOWDESK — shared stylesheet for every page
   Tokens match the product apps exactly so the site and the
   tools feel like one continuous product.
   ============================================================ */

:root {
  /* Surfaces & text — lifted verbatim from the product apps */
  --bg: #0a0c10;
  --surface: #14171c;
  --surface-2: #1c2027;
  --surface-3: #242931;
  --border: #2a2f38;
  --border-strong: #3a4150;
  --text: #e8eaed;
  --text-2: #9097a3;
  --text-3: #5a626f;

  /* Accent — Flowdesk green */
  --accent: #10b981;
  --accent-bright: #34d399;
  --accent-dim: #059669;
  --accent-glow: rgba(16, 185, 129, 0.12);
  --accent-glow-strong: rgba(16, 185, 129, 0.25);

  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 1px 0 rgba(255,255,255,0.05) inset, 0 12px 48px rgba(0,0,0,0.45);

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --maxw: 1120px;
  --maxw-narrow: 760px;
}

/* Light variant — free, driven by the products' own light theme.
   Activated only if a visitor sets data-theme="light". Dark is primary. */
html[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e6e9ee;
  --border: #dfe3e9;
  --border-strong: #c4cbd4;
  --text: #1a1d23;
  --text-2: #5a626f;
  --text-3: #9097a3;
  --shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 4px 20px rgba(20,25,35,0.08);
  --shadow-lg: 0 1px 0 rgba(255,255,255,0.7) inset, 0 12px 40px rgba(20,25,35,0.12);
}

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

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

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

img { max-width: 100%; height: auto; display: block; }

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

/* Numbers, prices, stats, counts are always mono */
.mono, .price, .stat-num, .count { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: var(--s-2);
  background: var(--accent);
  color: #04140d;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: var(--s-2); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-4); }
.narrow { max-width: var(--maxw-narrow); }
.section { padding: var(--s-8) 0; }
.section-sm { padding: var(--s-7) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

h1, h2, h3, h4 { line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
p { color: var(--text-2); }
.lead { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--text-2); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 650; color: var(--text); font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
  display: grid; place-items: center; color: #04140d; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.35), 0 4px 14px var(--accent-glow-strong);
}
.nav-links { display: none; gap: var(--s-5); align-items: center; }
.nav-links a { color: var(--text-2); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.header-cta { display: none; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .header-cta { display: inline-flex; }
}

/* Minimal header variant (free funnel page) */
.site-header.minimal .nav-links,
.site-header.minimal .header-cta { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font); font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-align: center; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #04140d;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 6px 20px var(--accent-glow-strong);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 8px 26px var(--accent-glow-strong); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--text-3); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); }

.btn[aria-disabled="true"], .btn.is-disabled {
  background: var(--surface-2); color: var(--text-3);
  border-color: var(--border); cursor: not-allowed;
  box-shadow: none; pointer-events: none;
}

.btn-block { display: flex; width: 100%; }

/* ---------- Chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 11px; border-radius: 999px;
}
.chip svg { width: 13px; height: 13px; color: var(--accent); }

.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent-glow); color: var(--accent-bright);
  border: 1px solid rgba(16,185,129,0.3);
}
.tag-flag { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--s-8) 0 var(--s-7);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% -8%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { margin-bottom: var(--s-4); max-width: 16ch; }
.hero .lead { max-width: 46ch; margin-bottom: var(--s-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-5); }
.hero-sub { font-size: 0.9rem; color: var(--text-3); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Problem blocks ---------- */
.problem { display: flex; flex-direction: column; gap: var(--s-3); }
.problem-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--warn);
}
.problem-icon svg { width: 20px; height: 20px; }

/* ---------- Product grid ---------- */
.products { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 680px) { .products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .products { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s-5);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card.flagship { border-color: rgba(16,185,129,0.4); box-shadow: 0 0 0 1px rgba(16,185,129,0.15), var(--shadow); }
.product-card .pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.product-card h3 { font-size: 1.2rem; }
.product-card .pc-promise { color: var(--text-2); font-size: 0.95rem; min-height: 2.6em; }
.product-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.product-card .pc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); }
.pc-price { font-family: var(--mono); font-size: 1.35rem; font-weight: 600; color: var(--text); }
.pc-price.free { color: var(--accent-bright); }
.pc-price small { font-size: 0.7rem; color: var(--text-3); font-weight: 400; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.feature-list li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text-2); }
.feature-list .check {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  border-radius: 6px; background: var(--accent-glow);
  display: grid; place-items: center; color: var(--accent-bright);
}
.feature-list .check svg { width: 12px; height: 12px; }
.feature-list li strong { color: var(--text); font-weight: 600; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: var(--s-5); }
.step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--accent-bright); display: grid; place-items: center;
  margin-bottom: var(--s-3);
}
.step h3 { font-size: 1.1rem; margin-bottom: var(--s-2); }

/* ---------- Comparison table ---------- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.95rem; }
table.compare th, table.compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.compare thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
table.compare thead th.col-flowdesk { color: var(--accent-bright); }
table.compare tbody th { font-weight: 500; color: var(--text-2); }
table.compare td.col-flowdesk { color: var(--text); font-weight: 600; }
table.compare col.col-flowdesk, table.compare .col-flowdesk { background: var(--accent-glow); }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: none; }
.cell-yes { color: var(--accent-bright); font-family: var(--mono); }
.cell-no { color: var(--text-3); font-family: var(--mono); }
.cell-mono { font-family: var(--mono); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: var(--s-3); }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0;
}
.faq summary {
  cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 600; color: var(--text);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); font-size: 1.3rem; color: var(--accent-bright);
  transition: transform .15s ease; flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-body { padding: var(--s-4) var(--s-5); color: var(--text-2); }
.faq .faq-body p + p { margin-top: var(--s-3); }

/* ---------- Screenshot frames ---------- */
.shot {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg);
}
.shot img { width: 100%; display: block; }
.shot-caption { font-size: 0.85rem; color: var(--text-3); margin-top: var(--s-3); text-align: center; }
.shot-placeholder {
  aspect-ratio: 16 / 10; width: 100%;
  background:
    linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  display: grid; place-items: center; text-align: center; padding: var(--s-5);
  color: var(--text-3); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em;
}
.shot-placeholder span { display: block; }
.shot-placeholder .ph-dims { color: var(--text-2); margin-top: var(--s-2); }

/* ---------- Feature split ---------- */
.split { display: grid; gap: var(--s-6); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-media { order: -1; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(80% 120% at 50% 0%, var(--accent-glow) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-5); text-align: center;
}
.cta-band h2 { margin-bottom: var(--s-3); }
.cta-band p { max-width: 48ch; margin: 0 auto var(--s-5); }

/* ---------- Pricing block ---------- */
.pricing {
  text-align: center; max-width: 480px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--s-7) var(--s-5);
  box-shadow: var(--shadow-lg);
}
.pricing .big-price { font-family: var(--mono); font-size: 3rem; font-weight: 600; color: var(--text); line-height: 1; }
.pricing .big-price .cur { font-size: 1.6rem; color: var(--text-2); vertical-align: top; }
.pricing .once { color: var(--text-2); margin: var(--s-2) 0 var(--s-5); }
.pricing .fine { font-size: 0.85rem; color: var(--text-3); margin-top: var(--s-4); }

/* ---------- Cross-sell ---------- */
.crosssell { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 680px) { .crosssell { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .crosssell { grid-template-columns: repeat(4, 1fr); } }
.mini-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s-4);
  transition: border-color .15s ease, transform .15s ease;
}
.mini-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.mini-card .mc-name { color: var(--text); font-weight: 600; }
.mini-card .mc-price { font-family: var(--mono); color: var(--accent-bright); font-size: 0.95rem; }
.mini-card .mc-desc { color: var(--text-2); font-size: 0.85rem; }

/* ---------- Legal / prose ---------- */
.prose { max-width: var(--maxw-narrow); }
.prose h2 { margin: var(--s-6) 0 var(--s-3); }
.prose h3 { margin: var(--s-5) 0 var(--s-2); }
.prose p, .prose li { color: var(--text-2); margin-bottom: var(--s-3); }
.prose ul, .prose ol { padding-left: var(--s-5); margin-bottom: var(--s-4); }
.prose li { margin-bottom: var(--s-2); }
.prose strong { color: var(--text); }
.prose .updated { font-family: var(--mono); font-size: 0.85rem; color: var(--text-3); }
.callout {
  background: var(--accent-glow); border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5); margin: var(--s-4) 0;
}
.callout p { color: var(--text); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: var(--s-7) 0 var(--s-6); margin-top: var(--s-8); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: var(--s-3); font-weight: 600; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-col a { color: var(--text-2); font-size: 0.95rem; }
.footer-col a:hover { color: var(--text); }
.footer-brand p { font-size: 0.9rem; max-width: 40ch; margin-top: var(--s-3); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: var(--s-6); padding-top: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  font-size: 0.85rem; color: var(--text-3);
}
.footer-social { display: flex; gap: var(--s-3); }
.footer-social a { color: var(--text-2); display: inline-flex; }
.footer-social a:hover { color: var(--accent-bright); }
.footer-social svg { width: 20px; height: 20px; }

/* ---------- Section headers ---------- */
.section-head { max-width: 52ch; margin-bottom: var(--s-6); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: var(--s-3); }

/* ---------- Misc ---------- */
.hr { border: none; border-top: 1px solid var(--border); margin: var(--s-7) 0; }
.text-center { text-align: center; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
