/* BUILD MODULE 04: DESIGN SYSTEM (style.css) — edit _shared/style.css, synced to /css by apply_shell.py. repro: BUILD-MODULES.md #04 */
/* =========================================================================
   RankOps style.css — shared design system
   SOURCE OF TRUTH: _shared/style.css  →  synced to /css/style.css by apply_shell.py.
   Pair with shell.css (nav/footer/hamburger). Link in <head> of any new page:
     <link rel="stylesheet" href="/css/style.css">
     <link rel="stylesheet" href="/css/shell.css">

   Editing rules:
   - All page-level color/typography/spacing decisions live HERE.
   - Page-specific layout (grids unique to one page) stays in that page.
   - Never override these vars per-page — extend with new vars instead.
   ========================================================================= */

/* ---------- Design tokens (the only place colors are defined) ---------- */
:root {
  --black: #0D0D0D;
  --deep: #111111;
  --surface: #181818;
  --surface-2: #1d1d1d;
  --border: #222222;
  --green: #00C853;
  --green-dim: #009e40;
  --green-dark: #002d12;
  --gold: #FFD700;
  --gold-dim: #c9a030;
  --white: #F0F0F0;
  --muted: #8a8a8a;
  --text: #BBBBBB;
  --red: #ff4444;

  --font-sans: 'Inter', sans-serif;
  --nav-height: 64px;
  --max-container: 1200px;
  --max-readable: 760px;
}

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

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; color: var(--white); }
h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; color: var(--white); }
h3 { font-size: 20px; font-weight: 800; color: var(--white); letter-spacing: -0.3px; }
p  { color: var(--text); line-height: 1.7; }

.accent { color: var(--green); }
.gold   { color: var(--gold); }
.text-center { text-align: center; }
.muted { color: var(--muted); }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.section-sub  { font-size: 17px; color: var(--text); max-width: 640px; line-height: 1.75; }
.eyebrow      { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--green); }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--max-container); margin: 0 auto; padding: 0 24px; }
.readable  { max-width: var(--max-readable); margin: 0 auto; }
section    { padding: 80px 24px; }

/* ---------- Navigation (opt-in: only pages linking style.css) ----------
   Markup comes from _shared/nav.html. shell.css adds the mobile hamburger
   pinning + the overflow guard that are safe to load everywhere. */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: var(--nav-height);
  background: rgba(13, 13, 13, 0.95);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.nav-logo { font-weight: 900; font-size: 22px; letter-spacing: -0.5px; color: var(--white); text-decoration: none; }
.nav-logo span { color: var(--green); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links li a { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; letter-spacing: 0.3px; transition: color 0.2s; }
.nav-links li a:hover { color: var(--white); text-decoration: none; }
.nav-cta { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--black); background: var(--green); padding: 10px 20px; text-decoration: none; transition: background 0.2s, transform 0.15s; white-space: nowrap; }
.nav-cta:hover { background: var(--gold); transform: translateY(-1px); text-decoration: none; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); transition: all 0.3s; }
.mobile-menu { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--deep); border-bottom: 1px solid var(--border); padding: 24px; z-index: 199; flex-direction: column; gap: 20px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

/* ---------- Skip link (a11y: keyboard jump to <main id="main">) ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--green); color: var(--black); padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 28px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: var(--font-sans);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { color: var(--black); background: var(--green); }
.btn-primary:hover { background: var(--gold); }

.btn-ghost { color: var(--green); background: transparent; border-color: var(--green); }
.btn-ghost:hover { background: var(--green); color: var(--black); }

.btn-gold { color: var(--black); background: var(--gold); }
.btn-gold:hover { background: var(--green); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); padding: 36px 32px; }
.card-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}

/* ---------- Form fields ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%; background: var(--black); border: 1px solid var(--border);
  color: var(--white); padding: 12px 14px; font-family: var(--font-sans);
  font-size: 14px; outline: none; transition: border-color 0.2s;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--green); }
.field textarea { min-height: 96px; resize: vertical; }

/* ---------- Reveal (pure-CSS entrance — NO JS dependency) ----------
   Content is visible by default (opacity:1). The keyframe animates from
   hidden->visible on load and ends visible (fill-mode: both), so a failed/slow
   shell.js can never blank the page. shell.js's `.visible` add is now a no-op.
   This is deliberate: these styles are inlined into the funnel/service pages,
   so gating visibility on external JS made them blank if that JS didn't run. */
@keyframes ro-reveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 1; animation: ro-reveal 0.6s ease-out both; }
.reveal.visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* ---------- Speakable highlight (for AI assistants) ---------- */
.speakable strong { color: var(--white); font-weight: 600; }

/* =========================================================================
   Funnel components (used by the dedicated tier pages: snapshot/fix/build/
   takeover and the packages comparison). Namespaced .pkg-* so they never
   collide with the homepage's inline .offer-* styles.
   ========================================================================= */
.pkg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pkg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pkg-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 32px 28px; display: flex; flex-direction: column;
  position: relative;
}
.pkg-card.featured { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.pkg-card.gold { border-color: var(--gold); }
.pkg-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 10px; margin-bottom: 14px;
  background: var(--surface-2); color: var(--muted); align-self: flex-start;
}
.pkg-badge.active { background: var(--green); color: var(--black); }
.pkg-badge.gold { background: var(--gold-dim); color: var(--black); }
.pkg-title { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 6px; }
.pkg-price { font-size: 38px; font-weight: 900; color: var(--white); letter-spacing: -1px; }
.pkg-price span { font-size: 15px; font-weight: 400; color: var(--muted); }
.pkg-price-note { font-size: 12px; color: var(--muted); margin: 6px 0 16px; }
.pkg-divider { height: 1px; background: var(--border); margin: 8px 0 18px; }
.pkg-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pkg-features li { font-size: 13px; color: var(--text); line-height: 1.55; padding-left: 22px; position: relative; }
.pkg-features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.pkg-do-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--green); margin: 6px 0 6px; }
.pkg-do { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.pkg-cta { margin-top: auto; display: block; text-align: center; }

/* Funnel stepper (Free → Snapshot → Fix → Build → Takeover) */
.funnel { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.funnel-step {
  flex: 1 1 0; min-width: 120px; background: var(--surface); border: 1px solid var(--border);
  padding: 14px 12px; text-align: center; text-decoration: none;
}
.funnel-step.is-current { border-color: var(--green); }
.funnel-step .fs-name { display: block; font-size: 13px; font-weight: 800; color: var(--white); }
.funnel-step .fs-price { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Trust / "you keep everything" block */
.trust-block {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--green);
  padding: 22px 26px; border-radius: 4px;
}
.trust-block h3 { font-size: 16px; margin-bottom: 8px; }
.trust-block p { font-size: 13px; color: var(--text); line-height: 1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 56px 20px; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  h2 { font-size: 24px; }
  section { padding: 48px 16px; }
  .container { padding: 0 16px; }
  .btn { width: 100%; text-align: center; padding: 16px 24px; }
  .pkg-grid, .pkg-grid-4 { grid-template-columns: 1fr; }
  .funnel-step { flex-basis: 45%; }
}
