/* ============================================================================
   WhiteBoxForge — shared baseline stylesheet
   ----------------------------------------------------------------------------
   Loaded once per page via <link rel="stylesheet" href="/site.css"> in <head>.
   Contains design tokens, reset, a11y baseline, and primitive UI rules that
   every page must inherit. Page-specific styles stay inline in each page's
   own <style> block (hero variants, section grids, page-unique components).

   Source of truth for design tokens. Update here once, every page picks it up.
   ========================================================================== */

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

/* === DESIGN TOKENS === */
:root {
  /* Background scale (dark) */
  --bg:      #000;
  --bg-2:    #060606;
  --bg-3:    #0a0a0a;

  /* Foreground scale */
  --fg:        #fff;       /* 21:1 on --bg — primary text */
  --fg-2:      #d8d8d8;    /* 14.73:1 — body copy */
  --muted:     #a8a8a8;    /* 8.83:1 — secondary text, eyebrows, labels (WCAG AA pass) */
  --muted-dim: #8a8a8a;    /* 6.08:1 — tertiary mono labels only (>=3:1 large-text) */

  /* Strokes / dividers (decorative) */
  --line:    #181818;
  --line-2:  #242424;

  /* Layout */
  --max:     1240px;

  /* Typography */
  --mono:    ui-monospace, "SF Mono", Menlo, Monaco, "Roboto Mono", monospace;
  --sans:    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Motion */
  --ease-out:    cubic-bezier(0.2, 0, 0, 1);
  --dur-fast:    .2s;
  --dur-mid:     .35s;
  --dur-reveal:  .9s;
}

html { scroll-behavior: smooth }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Grain overlay — subtle texture on every page */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none }
img, object { display: block; max-width: 100% }
::selection { background: var(--fg); color: var(--bg) }

/* === LAYOUT PRIMITIVES === */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px }
.mono { font-family: var(--mono) }

/* === ACCESSIBILITY BASELINE === */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; top: -40px; left: 16px; z-index: 9999;
  background: var(--fg); color: var(--bg);
  padding: 10px 16px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
  transition: top var(--dur-fast); text-decoration: none;
}
.skip-link:focus { top: 16px }

.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;
}

/* === REVEAL ANIMATION === */
/* Used with class="reveal" on any element you want to fade-in on scroll.
   IntersectionObserver in /mobile-nav.js adds .in when 12% in viewport.
   Reduced-motion override above forces .in instantly. */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-reveal) ease, transform var(--dur-reveal) ease }
.reveal.in { opacity: 1; transform: none }

/* === BUTTON SYSTEM === */
.btn {
  padding: 15px 26px;
  font-weight: 700; font-size: 12px;
  font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--dur-fast);
  cursor: pointer;
}
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg) }
.btn.primary:hover { background: var(--bg); color: var(--fg) }
.btn.ghost { border-color: var(--line-2); color: var(--fg-2) }
.btn.ghost:hover { border-color: var(--fg); color: var(--fg); background: var(--bg-2) }

/* === EYEBROW (section mono label) === */
.eyebrow {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--fg) }

/* === END BASELINE ===
   Page-specific rules (.hero, .services-grid, .work-card, .testi, etc.)
   stay in each page's inline <style>. Document at:
   /Users/dimitri/Documents/Claude/Projects/WhiteBox/whiteboxlab/BRAND-COMPONENTS.md
   ========================================================================== */
