/* Kean on Biz brand foundation for Conversation to Coverage.
   Source of truth: KOBWEBSITE-1.2 client/src/index.css and the kob-brand-system
   skill. Same token names and values, so the two sites read as one family.

   Rules carried over from the KOB brand system:
   - One dark editorial world. Navy ink, never pure black; off-white, never #fff.
   - One hue: the logo blue (#0081F1). Amber is for primary calls to action only.
   - Archivo for headings, Libre Franklin for body.
   - Motifs: outline type, hairline rules and big numerals, film grain.
   - Never re-set or recolor the KOB wordmark; it is an image (/img/kob-logo-*.webp).
   C2C exception (agreed): pass / miss keep a muted green and red, for status only.

   Served at /kob-brand.css. Pages link it, then map their own variable names
   onto these tokens. */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/archivo-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Libre Franklin Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/libre-franklin-latin-wght-normal.woff2) format('woff2-variations');
}

:root {
  color-scheme: dark;

  /* Ink */
  --background: oklch(0.155 0.022 252);
  --foreground: oklch(0.95 0.008 250);
  --surface-elevated: oklch(0.21 0.026 252);
  --surface-sunken: oklch(0.125 0.018 252);
  --card: oklch(0.19 0.025 252);
  --input: oklch(0.24 0.02 252);

  /* The logo blue, and the lifted blue for small text on dark (AA) */
  --brand: oklch(0.61 0.19 253);
  --brand-bright: oklch(0.74 0.14 250);
  --brand-deep: oklch(0.45 0.16 253);
  --brand-tint: oklch(0.61 0.19 253 / 0.12);

  /* Text */
  --text-secondary: oklch(0.76 0.018 250);
  --text-tertiary: oklch(0.64 0.02 250);
  --link: oklch(0.74 0.14 250);

  /* Lines */
  --rule: oklch(0.95 0.008 250 / 0.12);
  --rule-strong: oklch(0.95 0.008 250 / 0.22);

  /* Conversion accent: primary CTA buttons only */
  --amber: oklch(0.8 0.16 80);
  --amber-foreground: oklch(0.16 0.04 80);

  /* Status only (pass / miss). Muted so they never compete with the blue. */
  --ok: oklch(0.74 0.11 160);
  --ok-tint: oklch(0.74 0.11 160 / 0.12);
  --miss: oklch(0.7 0.13 25);
  --miss-tint: oklch(0.7 0.13 25 / 0.12);

  --shadow-sm: 0 1px 2px oklch(0.06 0.02 250 / 0.45);
  --shadow-md: 0 2px 6px oklch(0.06 0.02 250 / 0.35), 0 8px 20px oklch(0.05 0.02 250 / 0.45);
  --shadow-lg: 0 4px 10px oklch(0.06 0.02 250 / 0.4), 0 18px 44px oklch(0.04 0.02 250 / 0.6);
  --edge-highlight: inset 0 1px 0 oklch(1 0 0 / 0.06);
  --amber-glow: 0 6px 28px oklch(0.8 0.16 80 / 0.28);
  --amber-glow-strong: 0 10px 40px oklch(0.8 0.16 80 / 0.42);

  --font-display: 'Archivo Variable', 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Libre Franklin Variable', 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 0.375rem;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }
::selection { background: oklch(0.61 0.19 253 / 0.45); color: var(--foreground); }
:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-bright);
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; flex: none; }

.display-xl { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.75rem, 6.6vw, 6.75rem); line-height: 0.94; letter-spacing: -0.045em; }
.display-lg { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.25rem, 4.4vw, 4.25rem); line-height: 1; letter-spacing: -0.04em; }
.display-md { font-family: var(--font-display); font-weight: 750; font-size: clamp(1.75rem, 2.8vw, 2.625rem); line-height: 1.04; letter-spacing: -0.03em; }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.6; color: var(--text-secondary); }

/* Motif: outline type */
.text-outline { color: transparent; -webkit-text-stroke: 1.5px var(--foreground); }
.text-outline-brand { color: transparent; -webkit-text-stroke: 1.5px var(--brand-bright); }
.text-brand { color: var(--brand-bright); }

/* Motif: hairline rules */
.rule-top { border-top: 1px solid var(--rule); }
.rule-bottom { border-bottom: 1px solid var(--rule); }

/* Left-rule callout */
.callout-rule { padding-left: 1.25rem; border-left: 2px solid var(--brand); color: var(--foreground); }

/* ---------- buttons ---------- */
.btn-primary, .btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
@media (min-width: 640px) { .btn-primary, .btn-ghost { white-space: nowrap; } }
.btn-primary { background: var(--amber); color: var(--amber-foreground); box-shadow: var(--amber-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--amber-glow-strong); }
.btn-ghost { background: transparent; color: var(--foreground); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--foreground); }
.btn-arrow { transition: transform 0.35s var(--ease-out); flex: none; }
.btn-primary:hover .btn-arrow, .btn-ghost:hover .btn-arrow { transform: translateX(4px); }
.btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; }

/* Underline that draws in on hover */
.link-draw {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease-out), color 0.3s var(--ease-out);
}
.link-draw:hover, .link-draw:focus-visible { background-size: 100% 1px; }

/* ---------- surfaces ---------- */
.surface-raised { background: var(--surface-elevated); box-shadow: var(--shadow-md), var(--edge-highlight); }
.section { padding-block: clamp(5rem, 11vw, 10rem); }
.section-tight { padding-block: clamp(3.5rem, 7vw, 6rem); }

/* Motif: film grain */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Soft brand light behind heroes: a light source, not a gradient panel */
.brand-light {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  background: oklch(0.61 0.19 253 / 0.22);
}

/* The KOB wordmark: always the image, never re-set in type */
.kob-wordmark { display: block; height: 26px; width: auto; aspect-ratio: 360 / 56; }

@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-ghost, .btn-arrow, .link-draw { transition: none; }
  .btn-primary:hover { transform: none; }
}
