/* Perasight landing — design tokens */
:root {
  /* Warm neutrals — cream with a pink hint */
  --paper: oklch(0.985 0.008 340);
  --paper-2: oklch(0.96 0.015 340);
  --paper-3: oklch(0.92 0.02 340);
  --ink: oklch(0.2 0.03 320);
  --ink-2: oklch(0.4 0.03 320);
  --ink-3: oklch(0.58 0.025 320);
  --hairline: oklch(0.9 0.015 340);
  --hairline-2: oklch(0.82 0.02 340);

  /* Accent — plum / fuchsia, loud */
  --emerald: oklch(0.6 0.24 340);
  --emerald-deep: oklch(0.4 0.22 338);
  --emerald-bg: oklch(0.94 0.08 340);
  --emerald-ink: oklch(0.34 0.2 340);
  --emerald-zing: oklch(0.75 0.26 338);

  /* Secondary accents */
  --terracotta: oklch(0.68 0.2 30);
  --terracotta-bg: oklch(0.94 0.06 30);
  --amber: oklch(0.84 0.18 85);
  --amber-bg: oklch(0.96 0.09 85);
  --plum: oklch(0.5 0.22 310);
  --plum-bg: oklch(0.93 0.08 310);
  --cyan: oklch(0.78 0.15 200);
  --cyan-bg: oklch(0.95 0.07 200);

  /* Dark slab — deep plum-ink */
  --slab: oklch(0.2 0.06 320);
  --slab-2: oklch(0.3 0.08 320);
  --on-slab: oklch(0.97 0.02 340);

  /* Type */
  --font-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --font-ui: "Figtree", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Spacing rhythm */
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 10vw, 144px);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  background-image:
    radial-gradient(1400px 640px at 90% -10%, color-mix(in oklab, var(--emerald-zing) 35%, transparent) 0%, transparent 55%),
    radial-gradient(1000px 520px at -10% 22%, color-mix(in oklab, var(--amber) 30%, transparent) 0%, transparent 55%),
    radial-gradient(900px 520px at 50% 110%, color-mix(in oklab, var(--cyan) 24%, transparent) 0%, transparent 60%);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
h1 { font-size: clamp(44px, 6.5vw, 88px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.3; font-family: var(--font-ui); font-weight: 600; }
p { margin: 0; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald-deep); }
.prose { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.prose-lg { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 56ch; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--section-y); }

.hairline { height: 1px; background: var(--hairline); border: 0; margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--emerald-deep); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--hairline-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn-emerald { background: var(--emerald); color: oklch(0.15 0.04 158); }
.btn-emerald:hover { background: var(--emerald-deep); color: var(--paper); }
.btn-arrow::after { content: "→"; transition: transform .2s ease; }
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(3px); }

.tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--hairline); font-size: 12.5px; color: var(--ink-2); font-family: var(--font-mono); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }

.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
}

/* small utilities */
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.emerald { color: var(--emerald-deep); }
.center { text-align: center; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; color: var(--ink-2); transition: color .15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.logo { display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.025em; color: var(--ink); font-weight: 500; }
.logo .dot { color: var(--emerald); font-style: italic; }

/* Footer */
.footer { background: var(--slab); color: var(--on-slab); padding: 80px 0 40px; margin-top: 80px; }
.footer a { color: color-mix(in oklab, var(--on-slab) 75%, transparent); transition: color .15s ease; }
.footer a:hover { color: var(--on-slab); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid color-mix(in oklab, var(--on-slab) 15%, transparent); }
.footer-col h5 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in oklab, var(--on-slab) 60%, transparent); margin: 0 0 16px; font-weight: 500; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; font-size: 13px; color: color-mix(in oklab, var(--on-slab) 55%, transparent); }

/* Lang toggle */
.lang-toggle { display: inline-flex; border: 1px solid var(--hairline-2); border-radius: var(--r-pill); padding: 3px; }
.lang-toggle button { padding: 5px 12px; border-radius: var(--r-pill); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--ink-3); }
.lang-toggle button.on { background: var(--ink); color: var(--paper); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  background: var(--paper); border: 1px solid var(--hairline-2);
  border-radius: 14px; padding: 16px 18px 18px;
  box-shadow: 0 20px 48px -16px rgba(0,0,0,.18), 0 2px 0 var(--hairline);
  width: 280px; display: none;
}
.tweaks.open { display: block; }
.tweaks h6 { margin: 0 0 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.tweaks label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 12px 0 6px; font-weight: 500; }
.tweaks-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks-chip { padding: 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--hairline-2); font-size: 12px; background: var(--paper); color: var(--ink-2); cursor: pointer; }
.tweaks-chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hairline-2); cursor: pointer; }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }
