/* RavenBill — site styles. Design notes: docs/design/website-redesign-2026-11.md */

/* Geist (variable) and Geist Mono 500, self-hosted latin subsets. SIL Open Font License. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: optional; /* preloaded; never swap mid-load (no CLS) */
}
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"), local("Roboto");
  size-adjust: 105.4%;
  ascent-override: 95.35%;
  descent-override: 27.99%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: optional;
}

:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #0b1530;
  --ink-2: #444c63;          /* 8.6:1 on --bg */
  --ink-3: #5c6479;          /* 5.7:1 on --bg */
  --line: #e2e6ee;
  --line-strong: #cdd4e1;

  --brand: #0b2a6f;          /* RavenBill navy; white text 12.9:1 */
  --brand-hover: #071f56;
  --brand-soft: #e7edfa;
  --accent: #f2b43c;         /* RavenBill yellow: decorative, and buttons on dark */
  --accent-hover: #f6c463;
  --accent-soft: #fdf3dc;
  --success: #17804a;
  --success-soft: #e3f4ea;
  --danger: #b42318;
  --danger-soft: #fdecea;

  --dark: #071a45;
  --dark-2: #0d2457;
  --dark-line: #22396f;
  --dark-ink: #eef2fb;
  --dark-ink-2: #aab6d3;     /* 8.1:1 on --dark */

  --font: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 9vw, 120px);
  --section-sm: clamp(56px, 7vw, 88px);
  --head-gap: clamp(36px, 5vw, 56px);
  --layout-gap: clamp(40px, 6vw, 80px);
  --card-pad: clamp(22px, 2.5vw, 32px);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgb(11 21 48 / 4%), 0 8px 24px -12px rgb(11 21 48 / 14%);
  --shadow-lg: 0 2px 4px rgb(11 21 48 / 4%), 0 28px 56px -24px rgb(11 21 48 / 28%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 96.875%; /* 15.5px root */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.5rem); line-height: 1.03; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.08; }
h3 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--ink); }

.icon { flex: none; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-weight: 500;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section--tight { padding-block: var(--section-sm); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--dark-ink); }

.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: var(--head-gap); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--split { max-width: none; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.15fr 1fr; gap: 48px; } }
.section-head p, .lead { color: var(--ink-2); font-size: clamp(1.15rem, 1.5vw, 1.3rem); line-height: 1.55; }
.section--dark .section-head p { color: var(--dark-ink-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .8125rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent); flex: none;
}
.section--dark .eyebrow { color: var(--dark-ink-2); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--brand); --btn-fg: #fff; --btn-bg-hover: var(--brand-hover); --btn-border: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--btn-border); border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-size: 1rem; font-weight: 550; line-height: 1.2; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn--primary { box-shadow: 0 1px 2px rgb(11 42 111 / 20%), inset 0 1px 0 rgb(255 255 255 / 8%); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--ink); --btn-bg-hover: var(--accent-hover); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bg-hover: var(--surface); --btn-border: var(--line-strong); }
.btn--ghost-dark { --btn-bg: transparent; --btn-fg: var(--dark-ink); --btn-bg-hover: var(--dark-2); --btn-border: var(--dark-line); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .7; cursor: progress; }
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 550; color: var(--brand);
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.section--dark .link-arrow { color: var(--accent); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(246 247 250 / 82%);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgb(246 247 250 / 92%); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { width: auto; height: 38px; }
.nav { display: none; margin-left: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  border-radius: 8px; color: var(--ink-2); font-size: 1rem; font-weight: 500;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after {
  content: ""; width: 5px; height: 5px; margin-left: 8px; border-radius: 50%; background: var(--accent);
}
.header-cta { display: none; min-height: 42px; padding: 10px 18px; font-size: .95rem; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: auto; margin-right: -8px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px var(--gutter) 32px; overflow-y: auto;
  background: var(--bg); border-top: 1px solid var(--line);
  animation: drop .25s var(--ease);
}
.mobile-nav a:not(.btn) {
  display: flex; align-items: center; min-height: 56px;
  border-bottom: 1px solid var(--line); font-size: 1.35rem; font-weight: 550; letter-spacing: -.02em;
}
.mobile-nav a[aria-current="page"] { color: var(--brand); }
.mobile-nav .btn { margin-top: 24px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
@media (min-width: 1024px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Toasts (Django messages) ---------- */

.toasts {
  position: fixed; z-index: 60; right: 16px; bottom: 16px; left: 16px;
  display: grid; gap: 8px; justify-items: end; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px; max-width: 460px;
  padding: 14px 14px 14px 16px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  font-size: 1rem; line-height: 1.45; pointer-events: auto;
  animation: toast-in .4s var(--ease);
}
.toast .icon { width: 20px; height: 20px; margin-top: 1px; }
.toast--success .icon { color: #6fe0a2; }
.toast--error .icon, .toast--warning .icon { color: #ffb4a8; }
.toast p { flex: 1; }
.toast__close { border: 0; background: none; color: inherit; opacity: .7; padding: 2px; cursor: pointer; }
.toast__close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Hero ---------- */

.hero { padding: clamp(32px, 6vw, 88px) 0 var(--section-sm); overflow: hidden; }
.hero__grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; } }
.hero__copy { display: grid; gap: 24px; justify-items: start; }
.hero__copy .lead { max-width: 560px; }
.hero h1 { isolation: isolate; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; z-index: -1;
  background: var(--accent); border-radius: 2px; opacity: .75;
  transform-origin: left; animation: underline 1s .6s var(--ease) both;
}
@keyframes underline { from { transform: scaleX(0); } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.proof { display: grid; gap: 10px; margin-top: 12px; color: var(--ink-2); font-size: 1rem; }
.proof li { display: flex; gap: 10px; align-items: center; }
.proof .icon { width: 18px; height: 18px; color: var(--success); }

.hero__media { position: relative; }
@media (min-width: 960px) { .hero__media { padding: 0 0 48px 48px; } }
.hero__photo {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.6;
  background: var(--surface-2); box-shadow: var(--shadow);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }

/* Claim tracker: illustrative card that walks one example claim through to payment. */
.claim {
  position: absolute; left: 12px; right: 12px; bottom: 0;
  max-width: 380px; padding: 18px 18px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-lg);
}
@media (max-width: 959px) {
  .claim { position: relative; left: auto; right: auto; bottom: auto; max-width: 420px; margin: -72px 16px 0; }
}
@media (min-width: 960px) { .claim { left: 0; right: auto; width: 360px; } }
.claim__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.claim__id { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); letter-spacing: .04em; }
.claim__amount { font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.claim__payer { font-size: .9rem; color: var(--ink-3); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 550; white-space: nowrap;
  background: var(--brand-soft); color: var(--brand);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.claim[data-step="4"] .pill { background: var(--success-soft); color: var(--success); }
.claim__steps { display: grid; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.claim__step {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: .95rem; color: var(--ink-3);
  transition: color .3s var(--ease);
}
.claim__dot {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.claim__dot .icon { width: 12px; height: 12px; color: #fff; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity .25s var(--ease), transform .3s var(--ease); }
.claim__step.is-done { color: var(--ink); }
.claim__step.is-done .claim__dot { background: var(--success); border-color: var(--success); }
.claim__step.is-done .claim__dot .icon { opacity: 1; transform: none; }
.claim__step.is-active { color: var(--ink); }
.claim__step.is-active .claim__dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.claim__time { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); opacity: 0; transition: opacity .3s var(--ease); }
.claim__step.is-done .claim__time { opacity: 1; }
.claim__note { margin-top: 8px; font-size: .75rem; color: var(--ink-3); }

.chip-float {
  position: absolute; top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 12px; background: var(--dark); color: var(--dark-ink);
  font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.chip-float .icon { width: 18px; height: 18px; color: var(--accent); }
.claim[data-step="4"] ~ .chip-float, .no-demo .chip-float { opacity: 1; transform: none; transition-delay: .25s; }
@media (min-width: 960px) { .chip-float { right: 24px; top: 32px; } }

/* ---------- Services (home) ---------- */

.svc-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .svc-grid { grid-template-columns: repeat(4, 1fr); } }
.svc-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: var(--card-pad); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.svc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.svc-card__num { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.svc-card h3 { font-size: 1.3rem; }
.svc-card p { color: var(--ink-2); font-size: 1rem; }
.svc-card .link-arrow { margin-top: auto; padding-top: 8px; font-size: .95rem; }
.svc-card .link-arrow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.svc-card--featured { background: var(--brand); border-color: var(--brand); color: #fff; }
.svc-card--featured p, .svc-card--featured .svc-card__num { color: #c9d4ef; }
.svc-card--featured .link-arrow { color: var(--accent); }

/* ---------- Revenue cycle (dark) ---------- */

.cycle { display: grid; gap: 12px; counter-reset: cycle; }
@media (min-width: 1000px) { .cycle { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.cycle__item {
  position: relative; display: grid; gap: 12px; align-content: start;
  padding: 24px; border: 1px solid var(--dark-line); border-radius: var(--radius);
  background: var(--dark-2);
}
@media (min-width: 1000px) {
  .cycle__item { border-radius: 0; border-left-width: 0; }
  .cycle__item:first-child { border-left-width: 1px; border-radius: var(--radius) 0 0 var(--radius); }
  .cycle__item:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
}
.cycle__stage { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; }
.cycle__stage::before {
  counter-increment: cycle; content: "0" counter(cycle);
  font-family: var(--mono); font-size: .75rem; font-weight: 500; color: var(--accent);
}
.cycle__label { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-ink-2); }
.cycle__leak { color: #ffb4a8; font-size: .98rem; line-height: 1.45; }
@media (min-width: 1000px) { .cycle__leak { min-height: 2.9em; } }
.cycle__fix { color: var(--dark-ink); font-size: .98rem; line-height: 1.45; }
.cycle__rule { height: 1px; background: var(--dark-line); }
.cycle-foot { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; margin-top: 40px; }
.cycle-foot p { color: var(--dark-ink-2); max-width: 620px; }

/* ---------- Split (image + copy) ---------- */

.split { display: grid; gap: var(--layout-gap); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split__copy { display: grid; gap: 20px; justify-items: start; }
.split__copy p { color: var(--ink-2); }
.media { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.media--wide { aspect-ratio: 4 / 3; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; width: 100%; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.facts div { padding: 16px 18px; background: var(--surface); }
.facts dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 4px 0 0; font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }
.checks { display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 1.02rem; }
.checks .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--success); }

/* ---------- Timeline ---------- */

.timeline { position: relative; display: grid; gap: 28px; counter-reset: step; }
.timeline__step { position: relative; display: grid; gap: 8px; padding-left: 56px; }
.timeline__node {
  position: absolute; left: 0; top: -2px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-family: var(--mono); font-size: .8rem; color: var(--ink-3);
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.timeline.is-drawn .timeline__node { background: var(--brand); border-color: var(--brand); color: #fff; }
.timeline.is-drawn .timeline__step:nth-child(2) .timeline__node { transition-delay: .2s; }
.timeline.is-drawn .timeline__step:nth-child(3) .timeline__node { transition-delay: .4s; }
.timeline.is-drawn .timeline__step:nth-child(4) .timeline__node { transition-delay: .6s; }
.timeline__step h3 { font-size: 1.25rem; }
.timeline__step p { color: var(--ink-2); font-size: 1rem; }
.timeline__out { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; font-size: .95rem; color: var(--ink); }
.timeline__out span { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.timeline::before {
  content: ""; position: absolute; left: 17.5px; top: 18px; bottom: 18px; width: 1px; background: var(--line-strong);
}
.timeline__progress {
  position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--brand);
  transform: scaleY(0); transform-origin: top; transition: transform 1.2s var(--ease);
}
.timeline.is-drawn .timeline__progress { transform: none; }
@media (min-width: 960px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .timeline__step { padding: 60px 0 0; }
  .timeline::before { left: 18px; right: 18px; top: 17.5px; bottom: auto; width: auto; height: 1px; }
  .timeline__progress { left: 18px; right: 18px; top: 17px; bottom: auto; width: auto; height: 2px; transform: scaleX(0); transform-origin: left; }
}

/* ---------- Commitments ---------- */

.commit-grid { display: grid; gap: 16px; }
@media (min-width: 680px) { .commit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .commit-grid { grid-template-columns: repeat(4, 1fr); } }
.commit { display: grid; gap: 12px; align-content: start; padding: var(--card-pad); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.commit h3 { font-size: 1.15rem; }
.commit p { color: var(--ink-2); font-size: 1rem; }
.icon-tile {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
}
.icon-tile .icon { width: 22px; height: 22px; }

/* ---------- CTA ---------- */

.cta {
  position: relative; display: grid; gap: var(--layout-gap); align-items: start;
  padding: clamp(32px, 5vw, 64px); border-radius: var(--radius-lg);
  background: var(--dark); color: var(--dark-ink); overflow: hidden; isolation: isolate;
}
.cta::before {
  content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -220px;
  border-radius: 50%; background: radial-gradient(circle, rgb(242 180 60 / 16%), transparent 65%);
}
@media (min-width: 960px) { .cta { grid-template-columns: 1fr 1fr; } }
.cta__copy { display: grid; gap: 20px; }
.cta__copy p { color: var(--dark-ink-2); font-size: 1.15rem; }
.routes { display: grid; gap: 4px; margin-top: 8px; }
.routes a {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--dark-line); color: var(--dark-ink);
}
.routes a:hover strong { color: var(--accent); }
.routes small { display: block; color: var(--dark-ink-2); font-size: .85rem; }
.routes strong { font-weight: 550; transition: color .2s var(--ease); }
.routes .icon-tile { background: var(--dark-2); color: var(--accent); }
.routes--light { width: 100%; }
.routes--light a { color: var(--ink); border-color: var(--line); }
.routes--light a:hover strong { color: var(--brand); }
.routes--light small { color: var(--ink-3); }
.routes--light .icon-tile { background: var(--brand-soft); color: var(--brand); }

/* ---------- Forms ---------- */

.form { display: grid; gap: 14px; }
.form--card { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.form__row { display: grid; gap: 14px; }
@media (min-width: 600px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field__label { font-size: .9rem; font-weight: 550; color: var(--ink); }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a91a3; }
.field input:hover, .field textarea:hover { border-color: #b4bccc; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field--invalid input, .field--invalid textarea { border-color: var(--danger); }
.field__error, .errorlist { color: var(--danger); font-size: .88rem; }
.errorlist { margin: 0; padding: 0; list-style: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand); flex: none; }
.form__note { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--ink-3); }
.form__note .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--success); }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.page-hero__inner { display: grid; gap: 20px; max-width: 820px; }
.page-hero--split .page-hero__inner { max-width: none; }
@media (min-width: 960px) { .page-hero--split .page-hero__inner { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 64px; } }
.page-hero p { color: var(--ink-2); font-size: clamp(1.15rem, 1.5vw, 1.3rem); line-height: 1.55; }

/* ---------- Services page ---------- */

.svc-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .svc-layout { grid-template-columns: 260px 1fr; gap: 72px; } }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.toc__title { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; margin-left: -1px; padding: 8px 0 8px 16px; border-left: 2px solid transparent;
  color: var(--ink-3); font-size: .98rem; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--brand); font-weight: 550; }
.toc__cta { margin-top: 32px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.toc__cta p { font-size: .95rem; color: var(--ink-2); }

.svc-detail { display: grid; gap: 28px; padding-bottom: 64px; margin-bottom: 64px; border-bottom: 1px solid var(--line); }
.svc-detail:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.svc-detail__head { display: grid; gap: 12px; }
.svc-detail__head p { color: var(--ink-2); font-size: 1.2rem; }
.svc-detail__body { display: grid; gap: 28px; }
@media (min-width: 760px) { .svc-detail__body { grid-template-columns: 1fr 1fr; align-items: start; } }
.svc-detail__body > p { color: var(--ink-2); }
.svc-detail .media { aspect-ratio: 16 / 8; }
.included { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.included h3 { font-size: .8rem; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }

/* ---------- Training ---------- */

.training { display: grid; gap: var(--layout-gap); align-items: start; }
@media (min-width: 960px) { .training { grid-template-columns: 1.25fr 1fr; } }
.modules { display: grid; counter-reset: mod; border-top: 1px solid var(--line); }
.module { display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.module::before { counter-increment: mod; content: "0" counter(mod); grid-row: span 2; font-family: var(--mono); font-size: .85rem; color: var(--brand); padding-top: 4px; }
.module h3 { font-size: 1.2rem; }
.module p { color: var(--ink-2); font-size: 1rem; }
.enroll { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; padding: 0 0 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.enroll .media { border-radius: 0; aspect-ratio: 16 / 9; }
.enroll__body { display: grid; gap: 18px; padding: 0 28px; }
.enroll__price { font-size: 2.4rem; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.enroll__price small { display: block; margin-top: 8px; font-size: .95rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.enroll .facts { margin: 0; }
.enroll__help { font-size: .9rem; color: var(--ink-3); }
.enroll__help a { color: var(--brand); font-weight: 550; }

/* ---------- Status card (M-Pesa) ---------- */

.status-card { max-width: 560px; margin-inline: auto; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); text-align: center; display: grid; gap: 20px; }
.status-card__timer { font-family: var(--mono); font-size: 3rem; font-weight: 500; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.status-card__label { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.status-card__spinner { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.status-card__result .icon { width: 56px; height: 56px; margin: 0 auto 8px; }
.status-card__result.is-success .icon { color: var(--success); }
.status-card__result.is-failure .icon { color: var(--danger); }
.status-card__manual { text-align: left; padding: 18px; border-radius: var(--radius); background: var(--surface-2); font-size: .98rem; color: var(--ink-2); }
.status-card__manual strong { color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer { padding: 64px 0 32px; background: var(--dark); color: var(--dark-ink-2); font-size: 1rem; }
.site-footer__grid { display: grid; gap: 40px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: 16px; max-width: 340px; }
@media (min-width: 900px) { .site-footer__brand { grid-column: auto; } }
.site-footer__brand img { width: auto; height: 40px; }
.site-footer__title { font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-ink); margin-bottom: 8px; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--dark-ink-2); transition: color .2s var(--ease); word-break: break-word; }
.site-footer__links a:hover { color: var(--dark-ink); }
.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--dark-line); color: var(--dark-ink); transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.social a:hover { background: var(--dark-2); border-color: var(--dark-ink-2); }
.social .icon { width: 18px; height: 18px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--dark-line); font-size: .9rem; }

/* ---------- Motion ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .hero__copy > * { animation: rise .6s var(--ease) both; }
.js .hero__copy > :nth-child(2) { animation-delay: .07s; }
.js .hero__copy > :nth-child(3) { animation-delay: .14s; }
.js .hero__copy > :nth-child(4) { animation-delay: .21s; }
.js .hero__copy > :nth-child(5) { animation-delay: .28s; }
.js .hero__media { animation: rise-media .8s .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise-media { from { opacity: 0; transform: translateY(24px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 679px) {
  h1 { font-size: clamp(2.3rem, 10vw, 2.75rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__photo { aspect-ratio: 4 / 3.2; }
  .svc-card { padding: 22px; }
  .cycle__item { padding: 20px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
