/*
 * ILTTU styles. Tokens and components from the ilttu design system (the
 * Highlighter system, ported from the Design Bible v1.0); layout from the
 * Landing screen of the ILTTU Design canvas. Both are linked from CLAUDE.md.
 * All colors are OKLCH.
 *
 * Served under style-src 'self': this file is the only place styling may live.
 * A style="…" attribute in a template is blocked by the CSP.
 */

/* Webfonts, vendored and self-hosted — see ../fonts/VENDORED.md. Variable
 * fonts, so one file per family covers every weight the bible uses. */
@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/gabarito-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* Color: mostly paper and ink. */
  --air: oklch(0.99 0.005 150);
  --surface: oklch(1 0 0);
  --ink: oklch(0.23 0.02 165);
  --ink-hover: oklch(0.32 0.025 165);
  --pine: oklch(0.20 0.015 165);
  --muted: oklch(0.46 0.02 165);
  --body-text: oklch(0.40 0.02 165);
  --line: oklch(0.92 0.01 150);
  --line-soft: oklch(0.94 0.008 150);
  --control-line: oklch(0.88 0.01 150);
  --mint: oklch(0.86 0.14 165);
  --mint-text: oklch(0.48 0.10 165);
  --lemon: oklch(0.91 0.17 95);
  --lemon-soft: oklch(0.95 0.11 95);
  --mark-dot: oklch(0.72 0.17 80);
  --stripe-a: oklch(0.975 0.004 150);
  --stripe-b: oklch(0.955 0.006 150);

  /* Type: three families, one job each. */
  --font-display: "Gabarito", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape and motion. */
  --radius-control: 12px;
  --radius-panel: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --slow: 320ms;
  --fast: 120ms;

  /* Layout: marketing grid, 1200px max, 32px outer margin (20px on mobile). */
  --wrap-max: 1200px;
  --gutter: 32px;
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--air);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--ink); text-decoration: none; }

:focus-visible { outline: 2px solid var(--mint-text); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* The short mark: the name in a mint pill with a full stop. */
.mark { font-family: var(--font-display); font-weight: 800; display: inline-flex; align-items: center; }
.mark-pill { background: var(--mint); color: var(--pine); padding: 1px 10px; border-radius: 999px; }
.mark-dot { color: var(--mark-dot); font-size: 1.35em; line-height: .5; }
.mark-pill-sm { font-family: var(--font-display); font-weight: 800; font-size: 14px; padding: 1px 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--air) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.mark-link { font-size: 21px; }
.site-nav { display: flex; gap: 24px; align-items: center; font-size: 15px; }
.nav-text { font-weight: 600; }

/* Buttons. Sentence case, 12px radius; primary is ink on light surfaces. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: var(--radius-control);
  white-space: nowrap;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-xs { padding: 6px 12px; border-radius: 9px; font-size: 13px; }

/* The highlighter. One per view: here, the payoff of the hero headline. */
.hl {
  background: var(--lemon);
  color: var(--pine);
  padding: 0 .14em;
  border-radius: .18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* The one signature animation: the lemon sweeps in left to right. Shown static
 * when the visitor prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hl {
    background: linear-gradient(var(--lemon), var(--lemon)) no-repeat 0 0 / 100% 100%;
    animation: hl-sweep var(--slow) var(--ease) both;
  }
  @keyframes hl-sweep {
    from { background-size: 0 100%; }
    to { background-size: 100% 100%; }
  }
}

/* Hero */
.hero {
  padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; min-width: 0; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 80px);
  line-height: 1;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.hero-lede {
  margin: 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--body-text);
  max-width: 540px;
  text-wrap: pretty;
}

/* The report-viewer preview beside the hero copy. */
.preview { position: relative; padding-bottom: 28px; min-width: 0; }
.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: 0 32px 64px -36px oklch(0.3 0.04 165 / .4);
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.preview-bar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.preview-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-body {
  height: 300px;
  background: repeating-linear-gradient(135deg, var(--stripe-a) 0 10px, var(--stripe-b) 10px 20px);
}

/* Toast: ink surface, the accent on the container, the link in the highlighter. */
.toast {
  position: absolute;
  left: -16px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--surface);
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 20px 40px -16px oklch(0.23 0.02 165 / .55);
  max-width: calc(100% - 16px);
  font-size: 14px;
  line-height: 1.4;
}
.toast-check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--mint);
  color: var(--pine);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.toast-link { font-family: var(--font-mono); background: var(--lemon); color: var(--pine); padding: 0 4px; border-radius: 4px; }

@media (max-width: 640px) {
  .toast { left: 0; max-width: 100%; }
}

/* Not found */
.notfound { padding-block: clamp(48px, 8vw, 104px); display: flex; flex-direction: column; gap: 24px; }
.notfound-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: 760px;
  text-wrap: balance;
}
.notfound p { margin: 0; }

/* Text link: the underline marker the bible uses in running text. */
.text-link { font-weight: 600; background: linear-gradient(transparent 60%, var(--lemon-soft) 60%); }
.text-link:hover { background: var(--lemon); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 28px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .mark { font-size: 18px; color: var(--ink); }
