/* cahbi - static marketing site (cahbi.com on ICP assets canister).
   Self-contained, zero JS, same-origin only (IC "standard" CSP safe).
   Palette + radius + shadow mirror apps/web/src/styles/tokens.css. */

:root {
  --bg: #f5f0e8;          /* cream */
  --bg-dark: #1b4332;     /* deep forest */
  --brand: #2d6a4f;       /* brand green */
  --brand-dark: #1b4332;
  --panel: #ffffff;
  --text: #1b4332;
  --text-on-dark: #f1eadc;
  --muted: #3d5e54;       /* sage */
  --line: rgba(27, 67, 50, 0.10);
  --gold: #c9a227;        /* bright gold - accents on dark */
  --gold-deep: #7a5e00;   /* deep gold - eyebrows on cream (AA) */
  --radius: 22px;
  --shadow: 0 20px 50px rgba(27, 67, 50, 0.08);
  --maxw: 1180px;
  --font-display: "Avenir Next", "Avenir", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-deep);
}

/* skip link (WCAG 2.4.1) */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
}
.skip:focus {
  left: 16px; top: 16px; background: var(--bg); color: var(--brand-dark);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow);
}

/* ── header ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(241, 234, 220, 0.10);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 23px;
  letter-spacing: -0.02em; color: #fefae0; text-decoration: none;
}
.wordmark span { color: var(--gold); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: rgba(241, 234, 220, 0.80); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color 0.18s ease;
}
.nav-links a:hover { color: #fefae0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; text-decoration: none;
  border-radius: 999px; padding: 13px 22px; font-size: 14px;
  transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer; line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--brand-dark); }
.btn-cream { background: #fefae0; color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--text-on-dark); border: 1px solid rgba(241, 234, 220, 0.40); }
.btn-ghost:hover { border-color: rgba(241, 234, 220, 0.80); }
.btn-solid { background: var(--brand); color: #fff; }
.nav .btn { padding: 11px 18px; font-size: 13px; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 86vh; display: flex; align-items: center;
  background: var(--bg-dark);
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(27,67,50,0.55) 0%, rgba(27,67,50,0.40) 45%, rgba(27,67,50,0.72) 100%);
}
.hero-inner { position: relative; padding: 96px 0 120px; }
.hero h1 {
  color: var(--text-on-dark); font-size: clamp(40px, 6.5vw, 76px); line-height: 1.04;
  max-width: 17ch; text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.hero h1 .gold { color: var(--gold); }
.hero-sub {
  margin-top: 22px; max-width: 46ch; font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.6; color: rgba(241, 234, 220, 0.92); text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 14px; font-size: 13px; color: rgba(241, 234, 220, 0.72); }
.license {
  position: absolute; bottom: 18px; left: 0; right: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: rgba(241, 234, 220, 0.85); text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}

/* ── section primitives ─────────────────────────────────────────────────── */
section { padding: 84px 0; }
.section-head { max-width: 60ch; }
.section-head h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; color: var(--brand-dark); margin-top: 14px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }

/* trust strip */
.stats { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 44px; padding-bottom: 44px; }
.stat { text-align: center; }
.stat .ico { color: var(--brand); width: 26px; height: 26px; margin: 0 auto 10px; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); color: var(--brand-dark); letter-spacing: -0.02em; }
.stat .lbl { margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.35; }

/* cards (who) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.card .tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.card h3 { margin-top: 12px; font-size: 21px; line-height: 1.18; color: var(--brand-dark); font-weight: 700; }
.card p { margin-top: 12px; font-size: 15px; color: var(--muted); line-height: 1.55; }
.card .quote { margin-top: 20px; padding-left: 16px; border-left: 2px solid rgba(122, 94, 0, 0.5); font-style: italic; color: rgba(45, 106, 79, 0.95); font-size: 15px; }

/* steps (how) */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 48px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--bg); padding: 28px 22px; }
.step .ico { color: var(--brand); width: 28px; height: 28px; }
.step .n { margin-top: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold-deep); }
.step h3 { margin-top: 6px; font-size: 18px; color: var(--brand-dark); font-weight: 700; }
.step p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* pillars (why) - dark */
.pillars { position: relative; background: var(--bg-dark); color: var(--text-on-dark); overflow: hidden; }
.pillars-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.14; }
.pillars .wrap { position: relative; }
.pillars .section-head h2 { color: var(--text-on-dark); }
.pillars-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 50px; background: rgba(241, 234, 220, 0.12); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--bg-dark); padding: 28px 22px; }
.pillar .n { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold); }
.pillar h3 { margin-top: 12px; font-size: 17px; line-height: 1.22; color: var(--text-on-dark); font-weight: 700; }
.pillar p { margin-top: 12px; font-size: 14px; line-height: 1.55; color: rgba(241, 234, 220, 0.86); }
.pillar .motto { margin-top: 16px; font-size: 12.5px; font-style: italic; color: var(--gold); }

/* about */
.about .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.about h2 { font-size: clamp(28px, 3.6vw, 42px); color: var(--brand-dark); }
.about .sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
.about .lic { margin-top: 4px; font-family: var(--font-mono); font-size: 12px; color: rgba(61, 94, 84, 0.85); letter-spacing: 0.03em; }
.about .bio { margin-top: 22px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.about .bio + .bio { margin-top: 14px; }
.creds { display: grid; gap: 16px; }
.cred { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.cred .ico { color: var(--brand); width: 24px; height: 24px; margin-bottom: 10px; }
.cred h3 { font-size: 16px; color: var(--brand-dark); font-weight: 700; }
.cred p { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.about-figure { text-align: center; }
.about-figure img { border-radius: var(--radius); margin: 0 auto; max-width: 320px; }
.about-figure figcaption { margin-top: 12px; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* final cta */
.final { background: var(--brand); color: #fff; text-align: center; }
.final h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); max-width: 22ch; margin: 0 auto; }
.final p { margin: 18px auto 0; max-width: 52ch; color: rgba(255,255,255,0.92); font-size: 18px; }
.final .hero-cta { justify-content: center; margin-top: 30px; }

/* footer */
.foot { background: var(--bg-dark); color: var(--text-on-dark); padding: 64px 0 32px; }
.foot .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.foot h3 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.foot p { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: rgba(241, 234, 220, 0.82); }
.foot .fine { margin-top: 8px; font-size: 12px; color: rgba(241, 234, 220, 0.6); }
.foot .brandline { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.foot .brandline span { color: var(--gold); }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(241, 234, 220, 0.12);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.foot-bottom p { margin: 0; font-size: 12.5px; color: rgba(241, 234, 220, 0.6); }
.foot-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.foot-links a { color: rgba(241, 234, 220, 0.82); text-decoration: none; font-size: 13px; }
.foot-links a:hover { color: #fefae0; }

/* focus visibility (quality floor) */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* responsive */
@media (max-width: 980px) {
  .about .wrap { grid-template-columns: 1fr; gap: 36px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .steps, .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .foot .cols { grid-template-columns: 1fr; gap: 28px; }
  .steps, .pillars-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
  .btn:hover { transform: none; }
}
