/* ==========================================================================
   Fomo7 — Design System v2
   Concept unchanged: the signal-map (identity graph flagging a ring) is the
   one signature visual, now with depth (glow, gradient, subtle motion).
   Everything around it stays quiet: flat surfaces, restrained color, real
   hierarchy instead of identical rounded cards everywhere.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --void: #0a0c12;
  --void-raised: #12151f;
  --paper: #fafaf7;
  --paper-raised: #f2f0e9;
  --ink: #12141c;
  --muted: #656b7a;
  --muted-on-void: #8b91a3;
  --line: #e5e2d8;
  --line-strong: #cfccc0;
  --line-on-void: #232a3c;
  --signal: #e6a23c;
  --signal-ink: #8a5c17;
  --signal-glow: rgba(230, 162, 60, 0.35);
  --flag: #e0503f;
  --verified: #3fa372;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Type */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Shadow */
  --shadow-soft: 0 1px 2px rgba(10,12,18,0.04), 0 8px 24px rgba(10,12,18,0.06);
  --shadow-glow: 0 8px 32px -8px var(--signal-glow);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--signal); color: var(--void); }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.22rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--muted); }
.on-void p { color: var(--muted-on-void); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(60px, 9vw, 120px) 0; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-body); font-weight: 600; font-size: 0.95rem;
  padding: 13px 25px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn-primary { background: var(--signal); color: #211404; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -6px var(--signal-glow); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-raised); }
.on-void .btn-ghost { border-color: var(--line-on-void); color: #eceae2; }
.on-void .btn-ghost:hover { border-color: var(--muted-on-void); background: var(--void-raised); }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(10,12,18,0.02); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); max-width: var(--max); margin: 0 auto; }
.logo { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 24px; height: 24px; flex: none; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); position: relative; padding: 4px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--signal); transition: width 0.18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 66px 0 0 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; padding: 24px var(--gutter);
    gap: 22px; transform: translateY(-110%); transition: transform 0.25s ease;
    border-bottom: 1px solid var(--line); overflow-y: auto; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; background: none; border: none; cursor: pointer; color: var(--ink); }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------- Footer ---------- */
#site-footer {
  background: radial-gradient(120% 140% at 15% 0%, #171b28 0%, var(--void) 55%);
  color: #eceae2; padding: 68px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-on-void); }
.footer-grid h4 { font-family: var(--f-body); font-size: 0.82rem; font-weight: 600; color: var(--muted-on-void); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--muted-on-void); font-size: 0.92rem; transition: color 0.15s ease; }
.footer-grid a:hover { color: #eceae2; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.82rem; color: var(--muted-on-void); flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 100px); position: relative; overflow: hidden; }
.hero.bg-dots::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: radial-gradient(60% 60% at 30% 20%, black, transparent 75%);
  opacity: 0.5;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 10px; margin-bottom: 24px;
  background: var(--paper);
}
.eyebrow-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--flag); box-shadow: 0 0 0 3px rgba(224,80,63,0.15); }

.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 14px; margin-top: 46px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 140px; padding: 18px 20px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.6); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.stat-card b { display: block; font-family: var(--f-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-card span { font-size: 0.83rem; color: var(--muted); }

/* ---------- Feature cards w/ icons ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 800px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card { padding: 30px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.feat-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.feat-icon {
  width: 42px; height: 42px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  background: rgba(230,162,60,0.12); color: var(--signal-ink); margin-bottom: 18px;
}
.feat-icon svg { width: 22px; height: 22px; stroke: var(--signal-ink); }

/* ---------- Glass panel (used sparingly: featured pricing tier, quote card) ---------- */
.glass {
  background: rgba(255,255,255,0.55); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.6); border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}
.on-void .glass { background: rgba(255,255,255,0.04); border-color: var(--line-on-void); }

/* ---------- Grids / cards (generic) ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.card { border: 1px solid var(--line); padding: 30px; border-radius: var(--r-md); background: var(--paper); }
.card h3 { margin-bottom: 10px; }

.tag-index { font-family: var(--f-mono); font-size: 0.78rem; color: var(--signal-ink); margin-bottom: 10px; display: block; }
.badge { display: inline-flex; align-items: center; font-family: var(--f-mono); font-size: 0.74rem; padding: 4px 10px; border-radius: 999px; background: var(--paper-raised); color: var(--muted); border: 1px solid var(--line); }
.badge-verified { color: var(--verified); border-color: rgba(63,163,114,0.3); background: rgba(63,163,114,0.08); }
.badge-flag { color: var(--flag); border-color: rgba(224,80,63,0.3); background: rgba(224,80,63,0.08); }

/* ---------- Section headers ---------- */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin: 0; }
.kicker { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }

/* ---------- Process / steps (genuine sequence: numbering justified) ---------- */
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 60px 1fr; gap: 22px; padding: 30px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--f-mono); font-size: 0.95rem; color: var(--signal-ink); padding-top: 4px; }

/* ---------- Industry pills ---------- */
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pill { border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 16px; font-size: 0.85rem; }
.on-void .pill { border-color: var(--line-on-void); color: var(--muted-on-void); }

/* ---------- On-void (dark) section ---------- */
.on-void { background: var(--void); color: #eceae2; }
.on-void h1, .on-void h2, .on-void h3 { color: #eceae2; }
.on-void .line { border-color: var(--line-on-void); }
.on-void .card { background: var(--void-raised); border-color: var(--line-on-void); }
.on-void .card h3 { color: #eceae2; }
.on-void .card p { color: var(--muted-on-void); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { font-family: var(--f-mono); font-weight: 500; color: var(--muted); font-size: 0.78rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-family: var(--f-body); font-size: 0.95rem; background: var(--paper); color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--signal); box-shadow: 0 0 0 3px rgba(230,162,60,0.15); outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { padding: 32px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--signal); box-shadow: var(--shadow-glow); position: relative; }
.price-card .price { font-family: var(--f-display); font-size: 2rem; font-weight: 700; margin: 16px 0; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 11px; }
.price-card li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--muted); align-items: flex-start; }
.price-card li svg { flex: none; width: 17px; height: 17px; stroke: var(--verified); margin-top: 2px; }
.price-card .btn { margin-top: auto; justify-content: center; width: 100%; }

/* ---------- Testimonial / quote ---------- */
.quote-card { padding: 40px; }
.quote-card blockquote { margin: 0 0 22px; font-family: var(--f-display); font-size: 1.4rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.quote-attr { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; color: var(--muted); }
.quote-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--signal), var(--flag)); flex: none; }

/* ---------- Blog ---------- */
.post-list { display: flex; flex-direction: column; }
.post-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); transition: background 0.15s ease; }
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row:hover { background: var(--paper-raised); margin: 0 -20px; padding-left: 20px; padding-right: 20px; border-radius: var(--r-md); }
.post-date { font-family: var(--f-mono); font-size: 0.82rem; color: var(--muted); padding-top: 3px; }
.post-row h3 { margin-bottom: 6px; }
@media (max-width: 600px) { .post-row { grid-template-columns: 1fr; gap: 6px; } }

.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { max-width: 68ch; color: var(--ink); }
.prose ul { padding-left: 20px; }

/* ---------- CTA band ---------- */
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ---------- Related / byline ---------- */
.byline { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); margin: 18px 0 0; }
.related-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.related-posts a.card { display: block; transition: border-color 0.18s ease, transform 0.18s ease; }
.related-posts a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.related-posts .tag-index { margin-bottom: 8px; }
@media (max-width: 800px) { .related-posts { grid-template-columns: 1fr; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span.sep { color: var(--line-strong); }
.breadcrumb span[aria-current] { color: var(--ink); }

/* ---------- misc ---------- */
.line { border: none; border-top: 1px solid var(--line); margin: 0; }
.small { font-size: 0.85rem; color: var(--muted); }
.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; }

/* trust strip */
.trust-strip { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--muted); }

/* ==========================================================================
   Backward-compatible aliases (v1 -> v2) so existing page markup upgrades
   automatically without a full rewrite of every file.
   ========================================================================== */
:root {
  --text-on-ink: #eceae2;
  --text-on-ink-dim: var(--muted-on-void);
  --text-on-paper: var(--ink);
  --text-on-paper-dim: var(--muted);
  --line-soft: var(--line);
  --ink-soft: var(--void-raised);
  --signal-dim: var(--signal-ink);
}
.on-ink { background: var(--void); color: #eceae2; }
.on-ink h1, .on-ink h2, .on-ink h3 { color: #eceae2; }
.on-ink p { color: var(--muted-on-void); }
.on-ink .line { border-color: var(--line-on-void); }
.on-ink .card { background: var(--void-raised); border-color: var(--line-on-void); }
.on-ink .card h3 { color: #eceae2; }
.on-ink .card p { color: var(--muted-on-void); }
.on-ink .btn-ghost { border-color: var(--line-on-void); color: #eceae2; }
.on-ink .btn-ghost:hover { border-color: var(--muted-on-void); background: var(--void-raised); }
.on-ink .pill { border-color: var(--line-on-void); color: var(--muted-on-void); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-3 > div { background: var(--paper); padding: 34px; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.on-ink .grid-3, .on-void .grid-3 { background: var(--line-on-void); border-color: var(--line-on-void); }
.on-ink .grid-3 > div, .on-void .grid-3 > div { background: var(--void-raised); }
