/* Button Energy — Design tokens (v2 redesign) */

/* ---------- @font-face: self-hosted ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/webfonts/be-geist-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/webfonts/be-geist-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/webfonts/be-geist-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/webfonts/be-geist-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/webfonts/be-geist-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/webfonts/be-instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  /* Brand greens (from logo) */
  --be-green: #009040;
  --be-green-mid: #70b040;
  --be-lime: #efde00;
  --be-yellow: #efde00;
  --be-gold: #efde00;

  /* Deep forest surface palette */
  --ink-950: #061f10;
  --ink-900: #0a2c17;
  --ink-850: #0d361c;
  --ink-800: #114224;
  --ink-700: #1a5a30;
  --ink-600: #267543;
  --ink-500: #389560;

  /* Light palette */
  --paper: #f5f3ee;
  --paper-warm: #ebe7dd;
  --bone: #ffffff;
  --char: #0d1411;

  /* Functional aliases */
  --bg: var(--ink-900);
  --bg-elev: var(--ink-850);
  --bg-card: var(--ink-800);
  --fg: #f4f1e6;
  --fg-muted: #b6c5b8;
  --fg-dim: #7a9485;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: var(--be-gold);
  --accent-hot: var(--be-gold);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--be-gold); color: var(--ink-950); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-700); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-600); }

/* Utility */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; letter-spacing: -0.01em; }
.serif { font-family: var(--font-serif); font-style: italic; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}

/* Grain overlay (apply to body) */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Dot pattern (logo motif) */
.dot-pattern {
  background-image: radial-gradient(circle at center, var(--ink-600) 1.2px, transparent 1.6px);
  background-size: 18px 18px;
}

/* Reduced-motion fallback */
@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;
  }
}
