/* ==========================================================================
   Base — font, reset, focus, utilities
   ========================================================================== */

/* Instrument Sans, variable (wght 400–700, wdth 75–100), self-hosted from Google Fonts v4. */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext carries ₹ (U+20B9); only downloaded when such a glyph is on the page. */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Newsreader Display 600, subset to A–Z a–z 0–9 & ' ’ - . , : + (11 KB). Only downloaded
   on pages that set var(--font-serif); missing glyphs fall back to Georgia. */
@font-face {
  font-family: "Newsreader Display";
  src: url("../fonts/newsreader-display-600-subset.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

main:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: calc(var(--z-header) + 1);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; outline-color: var(--color-focus-on-ink); }

/* Section eyebrow "02 / Label" (resources/views/components/eyebrow.blade.php). */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-900);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow > span { flex-shrink: 0; white-space: nowrap; }
.eyebrow__num { color: var(--slate-600); font-variant-numeric: tabular-nums; }

@media (max-width: 479.98px) {
  .eyebrow { gap: 8px; letter-spacing: 0.1em; }
}
.eyebrow__slash { color: var(--slate-400); }

/* The rule gives way first on narrow screens, so long labels stay on one line. */
.eyebrow::after {
  content: "";
  flex: 0 1 clamp(56px, 9vw, 136px);
  min-width: 0;
  height: 2px;
  margin-left: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-600), transparent);
}

/* Service tones — one colour identity per service wherever it appears (sections 03, 06):
   pastel wash, border, hover edge, mark (icons, ≥3:1) and ink (text links, AA on the wash). */
[data-tone="sky"]    { --tone-bg: #EAF1FE; --tone-line: #D6E3FB; --tone-edge: #93B4F4; --tone-mark: #2563EB; --tone-ink: #1D4ED8; }
[data-tone="amber"]  { --tone-bg: #FEF2E2; --tone-line: #F6DFBF; --tone-edge: #E9B36E; --tone-mark: #B45309; --tone-ink: #A1470A; }
[data-tone="rose"]   { --tone-bg: #FDEDF0; --tone-line: #F5D4DB; --tone-edge: #EA9BAC; --tone-mark: #E11D48; --tone-ink: #BE123C; }
[data-tone="mint"]   { --tone-bg: #E7F6F1; --tone-line: #CBE9DE; --tone-edge: #7FCBB2; --tone-mark: #0D9488; --tone-ink: #0F6B63; }
[data-tone="indigo"] { --tone-bg: #EEEEFD; --tone-line: #DADAF7; --tone-edge: #A5A5EA; --tone-mark: #4F46E5; --tone-ink: #4338CA; }

/* Scroll reveal (public/js/reveal.js adds .reveal only to elements that start
   off-screen, so no-JS and reduced motion always show content). Stagger: --i. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* One column on phones: items enter one at a time, so no stagger. */
@media (max-width: 639.98px) {
  .reveal.is-in { transition-delay: 0ms; }
}

/* Vary the entrance by content type (design-critic, 2026-09-29: one identical fade-up
   everywhere is a template tell). Text blocks rise (above); media settles in place;
   lists, tables and rows only fade, with no stagger; decorative asides fade. */
:is(figure, picture, [class*="__media"], [class*="__frame"], [class*="-frame"]).reveal {
  transform: scale(0.985);
}
:is(figure, picture, [class*="__media"], [class*="__frame"], [class*="-frame"]).reveal.is-in {
  transition-duration: 700ms;
}
:is(ul, ol, table, dl, [class*="__list"], [class*="__grid"], [class*="matrix"]).reveal {
  transform: none;
}
:is(ul, ol, table, dl, [class*="__list"], [class*="__grid"], [class*="matrix"]).reveal.is-in {
  transition: opacity 420ms var(--ease-out);
  transition-delay: 0ms;
}

/* The mobile menu locks page scroll while open. */
html.nav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
