/* ============================================================
   Boongon — Design System :: Tokens + Base
   Light default; [data-theme="dark"] override.
   ============================================================ */

:root {
  /* ── Surfaces (light) ───────────────────────────── */
  --bg:          #FBFBF9;   /* page */
  --bg-soft:     #F4F4F0;   /* soft band between sections */
  --surface:     #FFFFFF;   /* cards */
  --surface-2:   #FAFAF7;   /* recessed inside cards */

  /* ── Ink ────────────────────────────────────────── */
  --ink:    #15181E;        /* gray-900 — primary text + wordmark */
  --ink-2:  #41454F;        /* gray-700 — secondary */
  --ink-3:  #6E7480;        /* gray-500 — tertiary / captions */
  --ink-4:  #9AA0AA;        /* gray-400 — faint meta */

  /* ── Lines ──────────────────────────────────────── */
  --hairline:   rgba(20, 24, 30, 0.08);   /* gray-100 — the only card border */
  --line:       rgba(20, 24, 30, 0.12);   /* gray-200 — inputs, dividers */
  --line-faint: rgba(20, 24, 30, 0.05);

  /* ── Primary: emerald green (functional accent) ─── */
  --green:      #2E9E6B;
  --green-600:  #268A5C;    /* hover */
  --green-700:  #1F7048;
  --green-050:  #E8F5EE;    /* soft fill */
  --green-100:  #CDEAD9;
  --green-ink:  #1B7A4F;    /* green text on light */

  /* ── Brand violet (logo + rare brand moments) ───── */
  --violet:      #6C6AF1;
  --violet-2:    #8E8CF6;
  --violet-050:  #EEEEFC;

  /* ── Negative (payments, overdue, voided) ───────── */
  --neg:      #B5532E;
  --neg-050:  #F7E9E1;
  --neg-ink:  #9A4527;

  /* ── Accent aliases (functional) ────────────────── */
  --accent:     var(--green);
  --accent-600: var(--green-600);
  --accent-soft: var(--green-050);
  --accent-fg:  #FFFFFF;
  --pos:        var(--green);

  /* ── Radius ─────────────────────────────────────── */
  --r-xs: 6px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* ── Elevation (only floating elements) ─────────── */
  --shadow-pop: 0 1px 2px rgba(20,24,30,0.04), 0 12px 32px -8px rgba(20,24,30,0.14);
  --shadow-float: 0 2px 4px rgba(20,24,30,0.04), 0 24px 60px -16px rgba(20,24,30,0.20);

  /* ── Type ───────────────────────────────────────── */
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ── Layout ─────────────────────────────────────── */
  --maxw: 1200px;
  --gutter: 28px;

  /* ── Motion ─────────────────────────────────────── */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 320ms;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:        #0E0F0E;
  --bg-soft:   #15171A;
  --surface:   #17191C;
  --surface-2: #1C1F22;

  --ink:    #F2F3EF;
  --ink-2:  #BCC0BA;
  --ink-3:  #8B8F8A;
  --ink-4:  #6A6E69;

  --hairline:   rgba(255, 255, 255, 0.09);
  --line:       rgba(255, 255, 255, 0.14);
  --line-faint: rgba(255, 255, 255, 0.06);

  --green:      #36B27D;
  --green-600:  #2E9E6B;
  --green-050:  rgba(54, 178, 125, 0.14);
  --green-100:  rgba(54, 178, 125, 0.26);
  --green-ink:  #5FCB98;

  --violet-050: rgba(108, 106, 241, 0.18);

  --neg:      #D9774E;
  --neg-050:  rgba(217, 119, 78, 0.16);
  --neg-ink:  #E08C66;

  --accent-fg: #0E0F0E;

  --shadow-pop: 0 1px 2px rgba(0,0,0,0.4), 0 12px 32px -8px rgba(0,0,0,0.6);
  --shadow-float: 0 2px 4px rgba(0,0,0,0.4), 0 24px 60px -16px rgba(0,0,0,0.7);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; padding: 0; }

::selection { background: var(--green-100); color: var(--ink); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* ── Layout helpers ──────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: 880px; }

.section { padding: 116px 0; position: relative; }
.section-sm { padding: 76px 0; }
.section + .section { padding-top: 0; }

.band {
  background: var(--bg-soft);
  border-block: 1px solid var(--hairline);
}

/* ── Eyebrow ─────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green-ink);
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.eyebrow-muted { color: var(--ink-3); }
.eyebrow-muted::before { background: var(--ink-4); }

/* ── Section heading block ───────────────────────── */
.headline {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
  margin-top: 18px;
}
.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 18px;
  max-width: 60ch;
}

/* ── Mono / code (form names like 2550Q) ─────────── */
.code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--green-050);
  color: var(--green-ink);
  padding: 2px 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--green-100);
  white-space: nowrap;
  letter-spacing: 0;
}

/* ── Reveal on scroll ────────────────────────────── */
/* Hidden state is gated behind .js-anim so content is visible by default
   if JS never runs. site.js arms it and hard-reveals if transitions stall. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js-anim .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .js-anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Utility ─────────────────────────────────────── */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 76px 0; }
  :root { --gutter: 20px; }
}

@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .headline { font-size: clamp(26px, 7vw, 34px); }
}
