/* ==========================================================================
   Corvai — site styles
   Design tokens and components per 01. Corvai/Brand/2026-05-01-visual-identity.md
   Plain CSS, no build step. Mobile-first.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  /* Backgrounds */
  --linen: #F2EADC;       /* primary background */
  --stone: #DDD2C0;       /* cards, dividers */
  --offwhite: #FAF8F5;    /* light sections, form bg */
  --white: #FFFFFF;       /* inputs only */

  /* Text / navy */
  --navy: #162036;        /* headlines, dark surfaces */
  --navy-mid: #253050;    /* secondary text */
  --slate: #A8B0C4;       /* subtext on dark */
  --slate-dim: #6B7590;

  /* Accent + status */
  --copper: #A67448;      /* primary CTA, links, accents */
  --forest: #2E7D5B;      /* success, ROI figures */
  --amber: #C4892A;       /* warning */
  --rust: #B5443A;        /* error */

  /* Borders */
  --border-light: #CCC2B0;
  --border-dark: #2E3A54;
  --hairline: #E8DFD1;

  /* Type */
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', -apple-system, system-ui, sans-serif;
  --mono: 'Source Code Pro', monospace;

  /* Layout */
  --maxw: 1200px;
  --radius-card: 8px;
  --radius-btn: 6px;
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--copper); }
ul { list-style: none; }

/* --- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(34px, 5.2vw, 48px); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.6vw, 32px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
.subhead { font-family: var(--serif); font-weight: 400; font-size: clamp(18px, 2.4vw, 24px); line-height: 1.3; letter-spacing: -0.01em; color: var(--navy-mid); }
.lead { font-size: 18px; line-height: 1.7; }
.small { font-size: 14px; line-height: 1.6; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--copper);
}
.metric { font-family: var(--mono); font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
p + p { margin-top: 1em; }

/* --- Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (min-width: 700px) { .container { padding: 0 40px; } }
@media (min-width: 1000px) { .container { padding: 0 80px; } }

.section { padding: 48px 0; }
@media (min-width: 760px) { .section { padding: 80px 0; } }

/* Surface variants */
.surface-linen   { background: var(--linen);   color: var(--navy); }
.surface-offwhite{ background: var(--offwhite); color: var(--navy); }
.surface-navy    { background: var(--navy);    color: var(--linen); }
.surface-navy h1, .surface-navy h2, .surface-navy h3, .surface-navy h4 { color: var(--linen); }
.surface-navy .subhead { color: var(--slate); }
.surface-navy .eyebrow { color: var(--copper); }
.surface-navy a { color: var(--linen); }

.measure { max-width: 720px; }
.measure-narrow { max-width: 560px; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-5 { margin-top: 40px; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  padding: 13px 24px; border-radius: var(--radius-btn);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary   { background: var(--copper); color: var(--white); }
.btn-primary:hover { background: #95673f; box-shadow: 0 4px 14px rgba(166,116,72,.28); }
.btn-secondary { background: var(--navy); color: var(--linen); }
.btn-secondary:hover { background: #0f1626; }
.btn-tertiary  { background: var(--linen); color: var(--navy); border-color: var(--border-light); }
.btn-tertiary:hover { background: #e9dec9; }
.btn-ghost     { background: transparent; color: var(--linen); border-color: var(--linen); }
.btn-ghost:hover { background: rgba(242,234,220,.12); }
.btn-lg { padding: 16px 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

/* --- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242,234,220,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; color: var(--navy); text-decoration: none; }
.nav-links { display: none; align-items: center; gap: 28px; }
.nav-links a { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--navy-mid); text-decoration: none; }
.nav-links a:hover { color: var(--navy); }
.nav-cta { display: none; align-items: center; gap: 10px; }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
.nav-mobile { display: none; padding: 8px 0 20px; border-top: 1px solid var(--border-light); }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; padding: 12px 0; font-weight: 600; color: var(--navy-mid); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.nav-mobile .btn-row { margin-top: 16px; }

@media (min-width: 920px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 64px 0 72px; }
@media (min-width: 760px) { .hero { padding: 96px 0 104px; } }
.hero h1 { max-width: 16ch; }
.hero .subhead { max-width: 54ch; margin-top: 20px; }
.reassure { margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--copper); }
.surface-navy .reassure { color: var(--copper); }

/* --- Cards & grids ------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--offwhite); border: 1px solid var(--border-light);
  border-radius: var(--radius-card); padding: 24px;
}
.surface-navy .card { background: rgba(255,255,255,.04); border-color: var(--border-dark); }
.surface-navy .card h3 { color: var(--linen); }

/* Numbered step cards */
.step .step-num {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--copper); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step .price-tag { font-family: var(--mono); color: var(--forest); font-weight: 600; }

/* Why-Corvai blocks */
.feature h3 { margin-bottom: 8px; }
.feature { padding: 4px 0; }

/* Deliverables list */
.checklist li { position: relative; padding-left: 30px; margin-bottom: 14px; line-height: 1.6; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--forest);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ROI / guarantee callout */
.callout {
  background: var(--navy); color: var(--linen);
  border-radius: var(--radius-card); padding: 28px 28px;
}
.callout .metric { color: var(--copper); }
.callout strong { color: var(--copper); }

.price-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-block .amount { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--navy); }
.surface-navy .price-block .amount { color: var(--linen); }
.price-block .ccy { font-family: var(--mono); font-size: 14px; color: var(--copper); }

/* --- FAQ (native accordion, works without JS) ---------------------------- */
.faq details {
  border-bottom: 1px solid var(--border-light); padding: 6px 0;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 36px 16px 0; position: relative;
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 24px; font-weight: 400; color: var(--copper);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 36px 18px 0; color: var(--navy-mid); }

/* --- Forms / inputs ------------------------------------------------------ */
input[type="email"], input[type="text"] {
  width: 100%; height: 44px; padding: 0 14px;
  font-family: var(--sans); font-size: 16px; color: var(--navy);
  background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius-btn);
}
input:focus { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.field-note { font-size: 13px; color: var(--navy-mid); margin-top: 8px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 220px; }
.form-msg { margin-top: 12px; font-size: 14px; }
.form-msg.error { color: var(--rust); }
.form-msg.ok { color: var(--forest); }

/* Number-matching instruction box */
.note-box {
  background: var(--offwhite); border: 1px solid var(--border-light);
  border-left: 3px solid var(--copper); border-radius: var(--radius-btn);
  padding: 14px 16px; font-size: 14px; color: var(--navy-mid);
}

/* --- Footer -------------------------------------------------------------- */
.footer { background: var(--navy); color: var(--slate); padding: 56px 0 36px; }
.footer .brand { color: var(--linen); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer a { color: var(--slate); text-decoration: none; }
.footer a:hover { color: var(--linen); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-dark);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--slate-dim);
}

/* --- Minimal page header (quiz / legal / success) ----------------------- */
.mini-header { border-bottom: 1px solid var(--border-light); }
.mini-header .nav-inner { height: 64px; }
.mini-header .back { font-size: 14px; font-weight: 600; color: var(--navy-mid); text-decoration: none; }
.mini-header .back:hover { color: var(--navy); }

/* --- Legal / long-form content ------------------------------------------ */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 32px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--navy-mid); }
.prose ul { list-style: disc; padding-left: 22px; margin: 12px 0; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--navy); }
.prose .updated { font-family: var(--mono); font-size: 12px; color: var(--slate-dim); }

/* ==========================================================================
   Quiz
   ========================================================================== */
.quiz-wrap { max-width: 680px; margin: 0 auto; padding: 40px 0 80px; }
.progress {
  height: 6px; background: var(--stone); border-radius: 99px; overflow: hidden; margin-bottom: 28px;
}
.progress-bar { height: 100%; width: 0; background: var(--copper); border-radius: 99px; transition: width .3s ease; }
.progress-label { font-family: var(--mono); font-size: 12px; color: var(--navy-mid); margin-bottom: 8px; letter-spacing: 0.04em; }

.question h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 24px; }
.options { display: grid; gap: 12px; }
.option {
  text-align: left; background: var(--offwhite); border: 1px solid var(--border-light);
  border-radius: var(--radius-card); padding: 16px 18px; cursor: pointer;
  font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--navy);
  transition: border-color .12s ease, background .12s ease, transform .06s ease;
}
.option:hover { border-color: var(--copper); background: #fffdf9; }
.option:active { transform: translateY(1px); }
.option.selected { border-color: var(--copper); box-shadow: inset 0 0 0 1px var(--copper); }

.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.quiz-back { background: none; border: 0; cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--navy-mid); }
.quiz-back:hover { color: var(--navy); }
.quiz-back[hidden] { visibility: hidden; }

/* Results */
.result-band { background: var(--navy); color: var(--linen); border-radius: var(--radius-card); padding: 32px; }
.result-band .score { font-family: var(--mono); font-size: 14px; color: var(--copper); letter-spacing: 0.06em; }
.result-band h2 { color: var(--linen); margin: 8px 0 14px; }
.result-band p { color: var(--slate); }
.insight {
  background: var(--offwhite); border: 1px solid var(--border-light);
  border-left: 3px solid var(--copper); border-radius: var(--radius-btn);
  padding: 18px 20px; margin-top: 16px;
}
.insight h3 { font-size: 17px; margin-bottom: 6px; }
.insight p { color: var(--navy-mid); font-size: 15px; }

.bridge { background: var(--stone); border-radius: var(--radius-card); padding: 28px; margin-top: 28px; }
.bridge h2 { font-size: 24px; margin-bottom: 12px; }
.gate { margin-top: 24px; }

/* --- Accessibility helpers ---------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
[hidden] { display: none !important; }
