/* ==========================================================================
   TECHIE ZEST — BASE / RESET / TYPOGRAPHY
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Reserve the scrollbar gutter so centered layout never shifts between
     short and tall pages (avoids a subtle horizontal jump on navigation). */
  scrollbar-gutter: stable;
  accent-color: var(--emerald);   /* native controls, checkboxes, radios */
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-flat);
  font-optical-sizing: auto;      /* Plus Jakarta Sans reads crisper at every size */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Brand-tinted text selection — small premium touch, on-brand emerald */
::selection { background: color-mix(in srgb, var(--emerald) 22%, transparent); color: var(--navy-ink); }
::-moz-selection { background: color-mix(in srgb, var(--emerald) 22%, transparent); color: var(--navy-ink); }

img, picture, svg, video, canvas { display: block; max-width: 100%; height: auto; }
svg { fill: currentColor; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* ---- Headings ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: var(--weight-x); }
h2 { font-size: var(--step-3); font-weight: var(--weight-x); }
h3 { font-size: var(--step-2); line-height: var(--leading-snug); letter-spacing: var(--tracking-flat); }
h4 { font-size: var(--step-1); line-height: var(--leading-snug); }

p { text-wrap: pretty; }
strong, b { font-weight: var(--weight-semi); }

/* Display treatment — opt-in on the largest headlines / big numerals.
   Plus Jakarta Sans at its heaviest optical weight, tightly tracked. */
.font-serif,
.font-display {
  font-family: var(--font-display);
  font-weight: var(--weight-x);
  letter-spacing: var(--tracking-tight);
}

/* ---- Type utilities ------------------------------------------------- */
.eyebrow {
  font-size: var(--step--1);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  display: inline-flex; align-items: center; gap: var(--space-2xs);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: var(--gold); display: inline-block; }
.eyebrow--plain::before { display: none; }
.eyebrow--on-dark { color: var(--text-invert-soft); }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text-soft); }
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }
.text-accent { color: var(--emerald); }

.index-num {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---- Accessibility -------------------------------------------------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute; left: var(--space-sm); top: -3.5rem;
  background: var(--navy); color: var(--white);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius); z-index: var(--z-overlay);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-sm); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
