/* swe4vibe landing — design system (warm editorial minimalism)
 *
 * The :root token block below is the SINGLE SOURCE OF TRUTH for the rebrand
 * surface (color, type, space, radii, shadow, texture). Every archetype reads
 * from it via var(--…); no hex or size is re-decided per section. To rebrand,
 * edit tokens here only. Spec: saas-landing-page skill / design-system.md.
 */

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
  /* Color: light field (warm bone — never #fff) */
  --bg:            #f1efe9;
  --bg-2:          #e9e7df;
  --ink:           #1a1814;
  --ink-muted:     #6b665d;
  --hairline:      rgba(26, 24, 20, 0.10);

  /* Color: dark surfaces (cards, nav, CTA band) */
  --surface:       #161412;
  --surface-top:   #211e1a;
  --on-surface:    #f5f3ee;
  --on-surface-muted: #9b958a;
  --ring:          rgba(245, 243, 238, 0.14);

  /* One restrained accent — warm terracotta (the "floor / poured ground") */
  --accent:        #c8643c;

  /* Texture — faint dotted grid ("not flat" tell) */
  --dot:           rgba(26, 24, 20, 0.06);
  --dot-size:      22px;

  /* Type */
  --font-display:  "Instrument Serif", "Tiempos Headline", Georgia, serif;
  --font-sans:     "Inter", system-ui, -apple-system, sans-serif;
  --tracking-tag:  0.14em;

  /* Type scale (fluid) */
  --t-hero:   clamp(3rem, 7vw, 5.5rem);
  --t-h2:     clamp(2rem, 4vw, 3rem);
  --t-h3:     clamp(1.35rem, 2vw, 1.75rem);
  --t-lead:   clamp(1.05rem, 1.6vw, 1.25rem);
  --t-body:   1rem;
  --t-small:  0.8125rem;

  /* Space scale */
  --s-1: 0.5rem;  --s-2: 0.75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;    --s-6: 3rem;    --s-7: 4.5rem; --s-8: 7rem;

  /* Radii */
  --r-card: 22px;  --r-btn: 12px;  --r-pill: 999px;

  /* Shadow — soft, large-radius, low-opacity (cards float) */
  --shadow-card: 0 24px 48px -24px rgba(26, 24, 20, 0.45),
                 0 2px 6px rgba(26, 24, 20, 0.08);

  /* Content measure */
  --measure: 62ch;
}

/* ── FOUNDATIONS ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: var(--dot-size) var(--dot-size);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap { max-width: 1140px; margin-inline: auto; padding-inline: var(--s-4); }
.serif { font-family: var(--font-display); font-weight: 400; line-height: 1.05; }

/* Screen-reader-only: kept in the a11y tree, removed from the visual layout. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--ink-muted); }
.accent { color: var(--accent); }
section { padding-block: var(--s-8); }

/* Uppercase letter-spaced eyebrow above section headings */
.eyebrow {
  display: inline-block;
  font-size: var(--t-small);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tag);
  color: var(--ink-muted);
  margin-bottom: var(--s-3);
}

/* ── NAV (floating pill) ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: var(--s-4); z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface); color: var(--on-surface);
  border-radius: var(--r-pill); box-shadow: var(--shadow-card);
}
.nav .links { display: flex; gap: var(--s-4); align-items: center; }
.nav a { color: var(--on-surface-muted); text-decoration: none; font-size: var(--t-small); }
.nav a:hover { color: var(--on-surface); }
.brand { font-family: var(--font-display); font-size: 1.4rem; color: var(--on-surface); }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding-block: var(--s-8) var(--s-7); }
.hero h1 { font-size: var(--t-hero); margin-bottom: var(--s-4); }
.hero .lead {
  font-size: var(--t-lead); color: var(--ink-muted);
  max-width: 46ch; margin-inline: auto; margin-bottom: var(--s-5);
}
/* The staircase-meme hero image (near-square source, so capped by height
 * rather than the old 16:9 frame). What it shows is owned by landing-copy §1. */
.hero-visual {
  margin: var(--s-6) auto 0;
  display: block;
  width: 100%; max-width: 480px; height: auto;
  border: 1px solid var(--hairline); border-radius: var(--r-card);
}

/* ── EMAIL CAPTURE (the single action; appears at each CTA) ───────────────── */
/* Markup is real but unwired — capture + delivery is swe4vibe-landing-p0x.4.
 * One .capture class single-sources the look across every instance. */
.capture {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  max-width: 30rem; margin-inline: auto;
}
.capture input[type="email"] {
  flex: 1 1 14rem; min-width: 0;
  padding: 0.75em 1em; font: inherit; font-size: var(--t-body);
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: var(--r-btn);
}
.capture input[type="email"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.capture .note {
  flex-basis: 100%; margin-top: var(--s-2);
  font-size: var(--t-small); color: var(--ink-muted); text-align: center;
}
/* Capture forms that sit on a dark surface invert their input chrome. */
.on-dark .capture input[type="email"] {
  color: var(--on-surface); background: var(--surface-top);
  border-color: var(--ring);
}
.on-dark .capture .note { color: var(--on-surface-muted); }

/* Capture states (wired by js/capture.js — swe4vibe-landing-p0x.4).
 * .msg.ok replaces the form on confirmed signup; .msg.err sits above the note
 * while the form stays usable. Links use the accent on light and dark alike. */
.capture .msg {
  flex-basis: 100%; margin-top: var(--s-2);
  font-size: var(--t-small); text-align: center;
}
.capture .msg.ok { font-size: var(--t-body); }
.capture .msg a { color: var(--accent); }
.capture .msg.err strong { color: var(--accent); }
.capture button[disabled] { opacity: 0.6; cursor: wait; }

/* ── MANIFESTO (block 2 — "the enemy: staircase with no floor") ───────────── */
.manifesto { max-width: var(--measure); margin-inline: auto; text-align: center; }
.manifesto h2 { font-family: var(--font-display); font-size: var(--t-h2); margin-bottom: var(--s-5); }
.manifesto p { margin-bottom: var(--s-4); }
.pullquote {
  font-family: var(--font-display); font-size: var(--t-h2); line-height: 1.15;
  margin-block: var(--s-6); color: var(--ink);
}

/* ── PROOF (block 3 — free lesson, pride of place: featured dark card) ─────── */
.proof {
  background: linear-gradient(180deg, var(--surface-top), var(--surface));
  color: var(--on-surface); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: var(--s-7); max-width: 780px; margin-inline: auto;
  text-align: center;
}
.proof h2 { font-family: var(--font-display); font-size: var(--t-h2); margin-bottom: var(--s-4); }
.proof .lesson-title {
  font-family: var(--font-display); font-size: var(--t-h3);
  color: var(--on-surface); margin-bottom: var(--s-3);
}
.proof p { color: var(--on-surface-muted); max-width: 54ch; margin-inline: auto; margin-bottom: var(--s-5); }

/* ── CURRICULUM GRID (block 4 — replaces the pricing grid) ─────────────────── */
/* The finite set of named defects. NOT a pricing grid: v1 has no price/checkout.
 * Each cell is one scar the course kills. The free lesson is highlighted with a
 * thin ring only (loud "popular" treatment is an anti-pattern). */
.curriculum .grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3); margin-top: var(--s-6);
}
.defect {
  background: linear-gradient(180deg, var(--surface-top), var(--surface));
  color: var(--on-surface); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3);
}
.defect .symptom { font-family: var(--font-display); font-size: var(--t-h3); }
.defect .verdict {
  align-self: flex-start; margin-top: auto;
  padding: 0.3em 0.9em; font-size: var(--t-small);
  text-transform: uppercase; letter-spacing: var(--tracking-tag);
  color: var(--on-surface-muted);
  border: 1px solid var(--ring); border-radius: var(--r-pill);
}
.defect.is-free { outline: 1px solid var(--accent); }
.defect.is-free .verdict { color: var(--accent); border-color: var(--accent); }

/* ── AUDIENCE (block 5 — for / not-for, two-column) ───────────────────────── */
.audience .cols {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4); margin-top: var(--s-6);
}
.audience .col {
  background: var(--bg-2); border: 1px solid var(--hairline);
  border-radius: var(--r-card); padding: var(--s-5);
}
.audience h3 { font-family: var(--font-display); font-size: var(--t-h3); margin-bottom: var(--s-4); }
.checklist { list-style: none; display: grid; gap: var(--s-3); padding: 0; }
.checklist li { display: flex; gap: var(--s-2); }
.checklist.yes li::before { content: "✓"; color: var(--accent); }
.checklist.no  li::before { content: "✕"; color: var(--ink-muted); }

/* ── OFFER (block 6 — no-price "first access" tease) ──────────────────────── */
.offer {
  max-width: 780px; margin-inline: auto; text-align: center;
}
.offer h2 { font-family: var(--font-display); font-size: var(--t-h2); margin-bottom: var(--s-4); }
.offer p { color: var(--ink-muted); max-width: 54ch; margin-inline: auto; margin-bottom: var(--s-5); }

/* ── FAQ (block 7 — objections, answered straight) ────────────────────────── */
.faq { max-width: var(--measure); margin-inline: auto; }
.faq h2 { font-family: var(--font-display); font-size: var(--t-h2); text-align: center; margin-bottom: var(--s-6); }
.faq-item { padding-block: var(--s-4); border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-item .q { font-family: var(--font-display); font-size: var(--t-h3); margin-bottom: var(--s-2); }
.faq-item .a { color: var(--ink-muted); }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0.75em 1.25em; border-radius: var(--r-btn);
  font: inherit; font-size: var(--t-body);
  text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
}
.btn-dark  { background: var(--ink); color: var(--bg); }
.btn-light { background: var(--on-surface); color: var(--surface); }
.btn-ghost { background: transparent; color: var(--on-surface); border: 1px solid var(--ring); }
.btn-block { width: 100%; }

/* ── CTA band (inverted, block 8) ─────────────────────────────────────────── */
.cta {
  background: var(--surface); color: var(--on-surface);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  text-align: center; padding: var(--s-7);
}
.cta h2 { font-family: var(--font-display); font-size: var(--t-h2); margin-bottom: var(--s-4); }
.cta p { color: var(--on-surface-muted); margin-bottom: var(--s-5); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: var(--s-3); padding-block: var(--s-6);
  font-size: var(--t-small); color: var(--ink-muted);
}
footer a { color: var(--ink-muted); text-decoration: none; margin-left: var(--s-4); }
footer a:hover { color: var(--ink); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 780px) {
  .curriculum .grid { grid-template-columns: 1fr; }
  .audience .cols { grid-template-columns: 1fr; }
  .nav .links a:not(.btn) { display: none; }
}
