/* Carbonara Construction — Round 2 "Blueprint" — shared tokens + base. Owned by Task 0. */
:root {
  --navy: #31325d;
  --navy-deep: #1f2044;
  --paper: #f5f3ee;
  --ink: #1a1b33;
  --sand: #c9a56a;
  --line: rgba(245, 243, 238, 0.14);
  --line-paper: rgba(49, 50, 93, 0.16);
  /* Pre-fill state for the statement's word-by-word scroll-scrub reveal. rgba(49,50,93,.16)
     (--line-paper) composited over --paper is ~1.75:1 against paper — fails WCAG even at the
     3:1 large-text threshold, and Lighthouse audits this initial-render state. .6 alpha
     composites to ~3.5:1, clearing 3:1 with headroom. Large/bold text only (.statement is
     clamp(1.5rem,3vw,2.5rem) at weight 600) — do not reuse this token for body-size text. */
  --ink-soft: rgba(49, 50, 93, 0.6);
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: Manrope, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-pad: clamp(5rem, 12vh, 9rem);
  --grid-size: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }
p { margin: 0; }
section, footer { scroll-margin-top: 2rem; }
.container { width: min(100% - 2 * var(--gutter), 1440px); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--sand); color: var(--ink); z-index: 100; }
.skip-link:focus { left: var(--gutter); }

/* Eyebrow label: ■ SMALL CAPS */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 0.55em; height: 0.55em; background: var(--sand); flex: none; }

/* Pill button with sand dot */
.pill {
  display: inline-flex; align-items: center; gap: 0.75em;
  padding: 0.9rem 1.5rem; border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: inherit; background: transparent;
  transition: background-color 200ms ease, color 200ms ease;
}
.pill::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--sand); transition: transform 200ms ease; }
.pill:hover, .pill:focus-visible { background: rgba(201, 165, 106, 0.16); }
.pill:hover::before, .pill:focus-visible::before { transform: scale(1.3); }
.pill:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* All links get a visible, on-brand focus ring — not just .pill (tel:/mailto: links in
   about + contact rely on this since they have no other focus treatment). */
a:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* Graph-paper grid (hero + footer) */
.grid-paper { position: relative; isolation: isolate; }
.grid-paper::before {
  content: ""; position: absolute; inset: calc(-1 * var(--grid-size)); z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  transform: translate(var(--grid-x, 0px), var(--grid-y, 0px));
  transition: transform 120ms linear;
}

/* Scroll reveal — main.js animates these; without JS they are simply visible */
.reveal { opacity: 1; }
html.js .reveal { opacity: 0; transform: translateY(24px); }
html.js.reduced .reveal { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .grid-paper::before { transition: none; transform: none; }
}
