/* unignosis - base.css
   Tokens, reset, base typography, layout primitives.
   Light theme. Geist Sans + Geist Mono only - no serif anywhere. */

/* ---------- Fonts (self-hosted, fetched by scripts/fetch-fonts.sh) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2-variations"),
       url("/assets/fonts/Geist-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "GeistMono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2-variations"),
       url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  /* ── Colour - current palette, kept exactly ──────────────── */
  --paper:       #FFFFFF;
  --paper-2:     #FAFAF9;
  --paper-3:     #F1F1F0;

  --ink:         #0A0A0F;
  --ink-2:       #1F2024;
  --ink-3:       #4A4D55;
  --ink-mute:   #767982;
  --ink-soft:   rgba(10, 10, 15, 0.42);

  --hairline:    rgba(10, 10, 15, 0.08);
  --hairline-2:  rgba(10, 10, 15, 0.14);
  --hairline-d:  rgba(255, 255, 255, 0.10);

  --orange-50:  #FFF4EA;
  --orange-100: #FFE2C4;
  --orange-300: #FBB87A;
  --orange:     #F58220;
  --orange-2:   #E16F0E;
  --orange-700: #B85814;
  --orange-pale:#FFEEDB;

  --on-ink:      #F4F2EE;
  --on-ink-mute: rgba(244, 242, 238, 0.66);

  /* ── Typography (Geist) ─────────────────────────────────── */
  --font-ui:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  "GeistMono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Type scale (modular, 1.25 step) */
  --fs-12:  0.75rem;
  --fs-13:  0.8125rem;
  --fs-14:  0.875rem;
  --fs-16:  1rem;
  --fs-17:  1.0625rem;
  --fs-20:  1.25rem;
  --fs-24:  1.5rem;
  --fs-30:  1.875rem;
  --fs-36:  2.25rem;
  --fs-48:  3rem;
  --fs-60:  3.75rem;

  /* Fluid display (hero H1) */
  --fs-display: clamp(2.5rem, 4.5vw + 1rem, 4.5rem);   /* 40 → 72 px */
  --fs-h1:      clamp(1.875rem, 2.4vw + 1rem, 3rem);    /* 30 → 48 px */
  --fs-h2:      clamp(1.25rem, 1vw + 0.875rem, 1.5rem); /* 20 → 24 px */
  --fs-lead:    clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);

  /* Weight: medium-display, never 700+ on display */
  --fw-display: 600;
  --fw-head:    600;
  --fw-medium:  500;
  --fw-body:    400;

  /* Letter-spacing - tightens with size */
  --ls-display: -0.022em;
  --ls-h1:      -0.018em;
  --ls-h2:      -0.012em;
  --ls-body:    -0.005em;
  --ls-eyebrow:  0.06em;

  /* Line-heights */
  --lh-display: 1.05;
  --lh-head:    1.15;
  --lh-body:    1.6;

  /* ── Spacing (8-px grid) ─────────────────────────────────── */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;
  --s-11: 160px;

  /* Section vertical rhythm */
  --section-y:       clamp(96px, 11vw, 144px);
  --section-y-tight: clamp(64px, 7vw, 96px);

  /* ── Radii - 6 / 8 / 12 / 16 / 24 / pill ──────────────── */
  --r-xs:   6px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* ── Shadows - layered on light ─────────────────────────── */
  --shadow-1:
    0 1px 2px rgba(10, 10, 15, 0.04),
    0 4px 12px rgba(10, 10, 15, 0.04);
  --shadow-2:
    0 1px 2px rgba(10, 10, 15, 0.04),
    0 4px 12px rgba(10, 10, 15, 0.05),
    0 16px 32px -8px rgba(10, 10, 15, 0.06);
  --shadow-3:
    0 1px 2px rgba(10, 10, 15, 0.05),
    0 8px 24px rgba(10, 10, 15, 0.07),
    0 32px 56px -12px rgba(10, 10, 15, 0.10);
  --shadow-button:
    0 1px 2px rgba(184, 88, 20, 0.20),
    0 6px 18px rgba(245, 130, 32, 0.28);
  --shadow-button-hover:
    0 1px 2px rgba(184, 88, 20, 0.24),
    0 12px 28px rgba(245, 130, 32, 0.34);

  /* ── Layout ────────────────────────────────────────────── */
  --container:        1240px;
  --container-narrow: 880px;
  --container-prose:  680px;
  --gutter:           clamp(20px, 4vw, 40px);

  /* ── Motion ────────────────────────────────────────────── */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);    /* arrivals (the 2026 default) */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);    /* general UI */
  --ease-out:       cubic-bezier(0.4, 0, 0.2, 1);     /* hovers */
  --ease-apple:     cubic-bezier(0.32, 0.72, 0, 1);   /* overlays */

  --t-fast:    180ms;
  --t-med:     240ms;
  --t-slow:    400ms;
  --t-reveal:  720ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 4; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--orange-100); color: var(--ink); }

/* ---------- Base typography & body ---------- */
html {
  font-family: var(--font-ui);
  font-size: 16px;
  font-feature-settings: "ss01", "ss02";
  font-optical-sizing: auto;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background: var(--paper);
  overflow-x: hidden;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: var(--fw-head);
}
h1 {
  font-family: var(--font-ui);
  font-size: var(--fs-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-display);
}
h2 {
  font-size: var(--fs-h1);
  letter-spacing: var(--ls-h1);
  line-height: var(--lh-head);
}
h3 {
  font-size: var(--fs-h2);
  letter-spacing: var(--ls-h2);
  line-height: 1.25;
}
h4 {
  font-size: var(--fs-20);
  letter-spacing: -0.012em;
  line-height: 1.3;
}
p {
  font-size: var(--fs-17);
  line-height: var(--lh-body);
  color: var(--ink-3);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1;
}

a.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease-out);
}
a.text-link:hover { text-decoration-color: var(--ink); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow {
  width: 100%; max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-prose {
  width: 100%; max-width: var(--container-prose);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section       { padding-block: var(--section-y); }
.section-tight { padding-block: var(--section-y-tight); }

.stack > * + * { margin-top: var(--s-stack, var(--s-5)); }
.stack-sm  { --s-stack: var(--s-3); }
.stack-md  { --s-stack: var(--s-5); }
.stack-lg  { --s-stack: var(--s-7); }

.cluster {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center;
}

.grid       { display: grid; gap: var(--s-5); }
.grid-2     { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3     { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4     { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -48px; left: 16px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-size: var(--fs-14);
  z-index: 1000;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
