/* Shared across index.html, terms.html, data-privacy.html and 404.html.
   Page-specific CSS (hero, pricing, feature rows, legal-page overrides of
   .container/.header-nav focus selectors) stays inline in each page. */

/* ----- Geist, self-hosted (variable: weight animates with focus) ----- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

/* ----- Field tokens (docs/DESIGN_FIELD_2026.md) — the app's, dark-first,
   light as the same field rendered as coloured light on paper. ----- */
:root {
  color-scheme: dark;
  --field-paper: #0b0c10;
  --sheet: #14161b;                       /* solid ground: cards, panels, the banner */
  --ink: #f3f2ee;
  --ink2: #9a9da8;
  --ink3: #585b66;
  --hair: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.03);     /* hover fill only */
  --warm: oklch(0.70 0.20 41);            /* needs you */
  --cool: oklch(0.85 0.10 220);           /* live */
  --warm-glow: rgba(255, 106, 43, 0.55);
  --warm-wash: rgba(255, 106, 43, 0.14);
  --cool-glow: rgba(127, 215, 255, 0.45);
  --cool-wash: rgba(80, 120, 255, 0.16);
  --cool-bloom: rgba(80, 120, 255, 0.26);
  --cool-rgb: 127, 215, 255;
  --panel-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  --pointer-light: rgba(255, 255, 255, 0.055);
  --field-noise-opacity: 0.3;                  /* ±1.5 levels of dither on the ink paper */
  /* The only four timings that animate. */
  --dur-morph: 460ms;
  --ease-morph: cubic-bezier(0.2, 0.9, 0.2, 1.08);
  --dur-focus: 300ms;
  --dur-press: 160ms;
  --ease-press: cubic-bezier(0.2, 0.9, 0.2, 1.2);
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --field-paper: #f5f5f2;
    --sheet: #ffffff;
    --ink: #15161a;
    --ink2: #5f6270;
    --ink3: #a4a7b1;
    --hair: rgba(0, 0, 0, 0.08);
    --glass: rgba(255, 255, 255, 0.55);
    --warm: oklch(0.62 0.20 41);
    --cool: oklch(0.62 0.14 235);
    --warm-glow: rgba(238, 90, 28, 0.3);
    --warm-wash: rgba(238, 90, 28, 0.1);
    --cool-glow: rgba(28, 142, 216, 0.3);
    --cool-wash: rgba(28, 142, 216, 0.12);
    --cool-bloom: rgba(28, 142, 216, 0.2);
    --cool-rgb: 28, 142, 216;
    --panel-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.28);
    --pointer-light: rgba(255, 255, 255, 0.5);
    --field-noise-opacity: 0.36;
  }
}

/* scroll-behavior is page-specific: index.html gates it on prefers-reduced-motion,
   the legal pages set it unconditionally — set inline per page. */
html { background: var(--field-paper); }
html, body { overflow-x: hidden; }
body {
  font-family: var(--sans);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The ground (rule 5) and the pointer light (rule 4); painted by field-ground.js. */
.field-ground {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -1; pointer-events: none; background: var(--field-paper);
}
.field-light {
  position: fixed; left: 0; top: 0; z-index: -1; pointer-events: none; will-change: transform;
  /* Same (1 - r²)² falloff as the ground's blobs (field-ground.js): a plain
     two-stop gradient is a linear ramp, and its slope break at the rim reads
     as a ring around the light. Zero slope at the rim, no ring. */
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--pointer-light) 100.0%, transparent) 0%,
    color-mix(in srgb, var(--pointer-light) 99.5%, transparent) 5%,
    color-mix(in srgb, var(--pointer-light) 98.0%, transparent) 10%,
    color-mix(in srgb, var(--pointer-light) 95.6%, transparent) 15%,
    color-mix(in srgb, var(--pointer-light) 92.2%, transparent) 20%,
    color-mix(in srgb, var(--pointer-light) 87.9%, transparent) 25%,
    color-mix(in srgb, var(--pointer-light) 82.8%, transparent) 30%,
    color-mix(in srgb, var(--pointer-light) 77.0%, transparent) 35%,
    color-mix(in srgb, var(--pointer-light) 70.6%, transparent) 40%,
    color-mix(in srgb, var(--pointer-light) 63.6%, transparent) 45%,
    color-mix(in srgb, var(--pointer-light) 56.2%, transparent) 50%,
    color-mix(in srgb, var(--pointer-light) 48.7%, transparent) 55%,
    color-mix(in srgb, var(--pointer-light) 41.0%, transparent) 60%,
    color-mix(in srgb, var(--pointer-light) 33.4%, transparent) 65%,
    color-mix(in srgb, var(--pointer-light) 26.0%, transparent) 70%,
    color-mix(in srgb, var(--pointer-light) 19.1%, transparent) 75%,
    color-mix(in srgb, var(--pointer-light) 13.0%, transparent) 80%,
    color-mix(in srgb, var(--pointer-light) 7.7%, transparent) 85%,
    color-mix(in srgb, var(--pointer-light) 3.6%, transparent) 90%,
    color-mix(in srgb, var(--pointer-light) 1.0%, transparent) 95%,
    color-mix(in srgb, var(--pointer-light) 0.0%, transparent) 100%);
}
/* Dither: a static tiled-noise layer over the ground and the light so their
   large, faint gradients don't band (Chrome/Safari don't dither like Firefox
   does). Paints once, never repaints. The tile is opaque grey noise with mean
   128, painted by field-ground.js: under overlay that is mean-neutral, so the
   opacity can be high enough to move a whole 8-bit level on #0b0c10 — which
   soft-light at 5% never did. */
.field-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  mix-blend-mode: overlay;
  opacity: var(--field-noise-opacity);
  background-repeat: repeat;
  background-size: 192px 192px;
  image-rendering: pixelated;
}

/* Default prose width (legal pages); index.html overrides to 1120px inline. */
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Group heading: mono, quiet — the board's .g */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}

::selection { background: color-mix(in srgb, var(--cool) 30%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cool); outline-offset: 3px; }

/* ----- Header: words on the ground, the pill CTA ----- */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--field-paper) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
header .inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 500; font-variation-settings: 'wght' 560; font-size: 17px; letter-spacing: -0.02em; text-decoration: none;
}
/* The mark on Field (pl-496c): the settled field — a 3×3 grid of points,
   the data in order, in ink; the centre point is live, the cool emitter.
   Static (it does not turn toward the pointer any more); on hover the
   eight points scatter by at most 2 units and settle back at the morph
   timing. */
.logo svg { width: 18px; height: 18px; overflow: visible; }
.mark-live { fill: var(--cool); filter: drop-shadow(0 0 3px var(--cool-glow)); }
@media (prefers-reduced-motion: no-preference) {
  .logo .pt { transition: transform var(--dur-morph) var(--ease-morph); }
  .logo:hover .pt:nth-child(1) { transform: translate(-1.4px, -1.2px); }
  .logo:hover .pt:nth-child(2) { transform: translate(0.6px, -1.8px); }
  .logo:hover .pt:nth-child(3) { transform: translate(1.6px, -0.8px); }
  .logo:hover .pt:nth-child(4) { transform: translate(-1.8px, 0.5px); }
  .logo:hover .pt:nth-child(5) { transform: translate(1.9px, 0.3px); }
  .logo:hover .pt:nth-child(6) { transform: translate(-1.2px, 1.5px); }
  .logo:hover .pt:nth-child(7) { transform: translate(-0.4px, 1.9px); }
  .logo:hover .pt:nth-child(8) { transform: translate(1.3px, 1.4px); }
}
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a {
  font-size: 13.5px; font-weight: 400; font-variation-settings: 'wght' 400; color: var(--ink2);
  text-decoration: none; transition: color 150ms, font-variation-settings 200ms;
}
.header-nav a:hover { color: var(--ink); font-variation-settings: 'wght' 520; }
/* The small pill: ink on paper (the board's .btn). */
.btn-sm {
  background: var(--ink); color: var(--field-paper) !important;
  padding: 7px 14px; border-radius: 16px; font-weight: 500 !important; font-variation-settings: 'wght' 500 !important;
  transition: transform var(--dur-press) var(--ease-press), box-shadow 200ms;
}
.btn-sm:hover { transform: scale(1.03); box-shadow: 0 0 26px -6px rgba(255, 255, 255, 0.35); }
.btn-sm:active { transform: scale(0.97); }
@media (max-width: 640px) {
  .header-nav { gap: 16px; }
}

/* ----- Content (legal-page prose: terms.html, data-privacy.html, 404.html) ----- */
.content { padding: 72px 0 104px; }
.content .label { display: block; margin-bottom: 16px; }
.content h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500; font-variation-settings: 'wght' 520; letter-spacing: -0.04em; line-height: 1.08;
}
.content .last-updated {
  font-family: var(--mono); font-size: 12px; color: var(--ink3);
  letter-spacing: 0.02em; margin-top: 16px; padding-bottom: 40px;
  border-bottom: 1px solid var(--hair);
}
.content h2 {
  font-size: 1.3rem; font-weight: 500; font-variation-settings: 'wght' 540; letter-spacing: -0.025em;
  margin-top: 52px; margin-bottom: 16px; color: var(--ink);
}
.content p, .content li {
  color: var(--ink2); font-size: 15.5px; line-height: 1.72; margin-bottom: 12px;
}
.content ul { list-style: none; margin-bottom: 16px; }
.content li {
  position: relative; padding-left: 22px;
}
.content li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid var(--ink3); box-sizing: border-box;
}
.content strong { color: var(--ink); font-weight: 500; font-variation-settings: 'wght' 560; }
.content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink3); text-underline-offset: 3px; transition: text-decoration-color 150ms; }
.content a:hover { text-decoration-color: var(--ink); }

/* ----- Footer ----- */
footer { border-top: 1px solid var(--hair); padding: 28px 0; }
/* Width/margin/padding is page-specific: index.html wraps this in .container
   (already 1120px there); the legal pages set it directly on .inner inline. */
footer .inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
footer p { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
footer .links { display: flex; gap: 20px; }
footer .links a { font-size: 12.5px; color: var(--ink2); text-decoration: none; transition: color 150ms; }
footer .links a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .content { padding: 48px 0 80px; }
  .content h2 { margin-top: 40px; }
}

/* ----- Shared marketing-page components (vs-*.html, for-*.html) -----
   index.html keeps its own richer inline versions of the button and section
   patterns; these are the plain versions reused by the comparison and
   persona pages so the CSS isn't re-typed six times. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  padding: 11px 22px; border-radius: 24px;
  transition: transform var(--dur-press) var(--ease-press), box-shadow 200ms;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.97); }
.btn-quiet { background: var(--ink); color: var(--field-paper); }
.btn-lg { font-size: 16px; padding: 14px 30px; border-radius: 28px; }
.btn-quiet:hover { box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.4); }
@media (prefers-color-scheme: dark) {
  .btn-quiet:hover { box-shadow: 0 0 26px -6px rgba(255, 255, 255, 0.35); }
}
.trial-note, .cta-note { font-size: 13px; color: var(--ink2); }

@media (prefers-reduced-motion: no-preference) {
  .reveal { transform: scale(0.96); transform-origin: 50% 100%; transition: transform var(--dur-morph) var(--ease-morph); }
  .reveal.in { transform: none; }
}

.lp-hero { padding: 84px 0 60px; text-align: center; }
.lp-hero .label { display: block; margin-bottom: 20px; }
.lp-hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem); font-weight: 500; font-variation-settings: 'wght' 520;
  letter-spacing: -0.045em; line-height: 1.06; text-wrap: balance; max-width: 18ch; margin: 0 auto;
}
.lp-hero .subtitle {
  margin: 22px auto 0; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--ink2);
  max-width: 54ch; line-height: 1.6; text-wrap: pretty;
}
.lp-hero .cta-group { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }

.lp-section { padding: 68px 0; border-top: 1px solid var(--hair); }
.lp-section .sec-head { margin-bottom: 38px; max-width: 640px; }
.lp-section.center .sec-head { margin-left: auto; margin-right: auto; text-align: center; }
.sec-h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 500; font-variation-settings: 'wght' 520; letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }
.sec-desc { margin-top: 14px; font-size: 15px; color: var(--ink2); max-width: 56ch; }
.lp-section.center .sec-desc { margin-left: auto; margin-right: auto; }

/* Pain list, the same pattern index.html uses for "the problem" */
.pain-list { border-top: 1px solid var(--hair); }
.pain-item { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.pain-item .x { font-family: var(--mono); font-size: 13px; color: var(--ink3); }
.pain-item p { font-size: 15px; color: var(--ink2); max-width: 68ch; }
.pain-item strong { color: var(--ink); font-weight: 500; font-variation-settings: 'wght' 560; }

/* Plain three-across feature grid: no graphics, for persona pages */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.feat-grid .feat .label { display: block; margin-bottom: 10px; }
.feat-grid .feat h3 { font-size: 16px; font-weight: 500; font-variation-settings: 'wght' 520; letter-spacing: -0.015em; }
.feat-grid .feat p { margin-top: 8px; font-size: 14px; color: var(--ink2); line-height: 1.6; }
@media (max-width: 760px) { .feat-grid { grid-template-columns: 1fr; gap: 26px; } }

/* Comparison table: honest, including where Klarity is the one with less */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--hair); font-size: 14px; }
.compare-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink3); font-weight: 500; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; width: 130px; }
.compare-table .yes { color: var(--cool); font-weight: 500; }
.compare-table .no { color: var(--ink3); }
.compare-note { margin-top: 16px; font-size: 12.5px; color: var(--ink3); }

/* Gap list: what Klarity doesn't do yet, stated plainly rather than hidden */
.gap-list { border-top: 1px solid var(--hair); }
.gap-item { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.gap-item .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink3); }
.gap-item p { font-size: 14.5px; color: var(--ink2); }
.gap-item strong { color: var(--ink); font-weight: 500; font-variation-settings: 'wght' 560; }

/* FAQ, the plain version of index.html's pattern */
.faq-list { border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 2px; cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 500; font-variation-settings: 'wght' 520; letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex: 0 0 auto; color: var(--ink3); font-family: var(--mono); font-size: 17px; font-weight: 300; line-height: 1; }
.faq-item[open] summary::after { content: '−'; color: var(--cool); }
.faq-answer { max-width: 640px; padding: 0 32px 18px 2px; color: var(--ink2); font-size: 13.5px; line-height: 1.6; }

.final-cta { text-align: center; padding: 76px 0; border-top: 1px solid var(--hair); }
.final-cta h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 500; font-variation-settings: 'wght' 520; letter-spacing: -0.03em; }
.final-cta p { margin: 12px 0 26px; color: var(--ink2); }

@media (max-width: 640px) {
  .lp-hero { padding: 52px 0 36px; }
  .lp-section, .final-cta { padding: 44px 0; }
  .feat-grid { gap: 22px; }
  .compare-table { font-size: 12.5px; }
  .compare-table th, .compare-table td { padding: 10px 5px; }
  .gap-item { grid-template-columns: 78px 1fr; }
}

/* ----- Consent banner (index.html, terms.html, data-privacy.html) -----
   The banner is a sheet that morphs out of the bottom edge (rule 1). */
#consent-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--sheet);
  border-radius: 14px;
  padding: 20px;
  z-index: 100;
  box-shadow: var(--panel-shadow), 0 0 0 1px var(--hair);
  transform-origin: 50% 100%;
}
@keyframes morph-in { from { transform: scale(0.7); border-radius: 28px; } }
@media (prefers-reduced-motion: no-preference) {
  #consent-banner:not([hidden]) { animation: morph-in var(--dur-morph) var(--ease-morph); }
}
#consent-banner p { font-size: 14px; color: var(--ink2); margin: 0 0 14px; line-height: 1.55; }
#consent-banner p strong { color: var(--ink); font-weight: 500; font-variation-settings: 'wght' 560; }
#consent-banner .consent-actions { display: flex; gap: 10px; align-items: center; }
#consent-banner .consent-actions .btn-sm { cursor: pointer; border: none; font: inherit; font-size: 14px; }
#consent-banner .consent-decline {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 14px; color: var(--ink2); padding: 8px 12px; transition: color 150ms;
}
#consent-banner .consent-decline:hover { color: var(--ink); }
