/* ------------ Base ------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: 0.005em;
}

/* Skip link — first focusable element, only visible on keyboard focus */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 18px;
  background: var(--brass-deep);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--ink);
  transform: translateY(-200%);
  transition: transform 180ms ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* Defer rendering of large below-fold sections until they scroll into view.
   Per-section intrinsic-size approximates measured heights so the scrollbar
   and anchor links land correctly, with a small over-pad to absorb growth
   before the section ever renders. */
.about    { content-visibility: auto; contain-intrinsic-size: 0 1400px; }
.practice { content-visibility: auto; contain-intrinsic-size: 0 1100px; }
.approach { content-visibility: auto; contain-intrinsic-size: 0  900px; }
.voci     { content-visibility: auto; contain-intrinsic-size: 0  360px; }
.contact  { content-visibility: auto; contain-intrinsic-size: 0 1200px; }
footer    { content-visibility: auto; contain-intrinsic-size: 0  320px; }

/* About-row map: brass gradient placeholder is visible while the lazy
   iframe is still fetching; the iframe paints over it on load. */
.about-figure--map {
  position: relative;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brass) 16%, var(--paper)) 0%, var(--paper) 100%);
}
.about-map-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Editorial scrollbar — applies to the page, the dev tweaks panel, and the
   mobile nav drawer. The chat (.chat-messages) keeps its own slimmer
   6px override via more-specific selectors further down. */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--brass) transparent;
}
html::-webkit-scrollbar,
#tweaks-panel::-webkit-scrollbar,
.nav-links.open::-webkit-scrollbar {
  width: 10px;
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  border: none;
}
html::-webkit-scrollbar-track,
html::-webkit-scrollbar-track-piece,
#tweaks-panel::-webkit-scrollbar-track,
#tweaks-panel::-webkit-scrollbar-track-piece,
.nav-links.open::-webkit-scrollbar-track,
.nav-links.open::-webkit-scrollbar-track-piece {
  background: transparent;
  background-color: transparent;
  box-shadow: none;
  border: none;
}
html::-webkit-scrollbar-thumb,
#tweaks-panel::-webkit-scrollbar-thumb,
.nav-links.open::-webkit-scrollbar-thumb {
  background-color: var(--brass);
  border-radius: 1px;
}
html::-webkit-scrollbar-thumb:hover,
#tweaks-panel::-webkit-scrollbar-thumb:hover,
.nav-links.open::-webkit-scrollbar-thumb:hover {
  background-color: var(--brass-deep);
}
html::-webkit-scrollbar-thumb:active,
#tweaks-panel::-webkit-scrollbar-thumb:active,
.nav-links.open::-webkit-scrollbar-thumb:active {
  background-color: var(--ink);
}
html::-webkit-scrollbar-button,
html::-webkit-scrollbar-corner,
#tweaks-panel::-webkit-scrollbar-button,
#tweaks-panel::-webkit-scrollbar-corner,
.nav-links.open::-webkit-scrollbar-button,
.nav-links.open::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  -webkit-appearance: none;
}

/* Grain overlay — width: 100vw (instead of inset: 0) so the texture covers
   the scrollbar gutter on Windows too, otherwise the gutter shows pure --bg
   while the page shows --bg × grain and reads as a "lighter strip".
   The background-image (a fractalNoise SVG data URI) is injected at idle
   time by the script below so it doesn't slow first paint. */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(40px, 5.6vw, 84px); font-weight: 400; }
h2 { font-size: clamp(36px, 5.5vw, 80px); font-weight: 400; }
h3 { font-size: clamp(22px, 2.6vw, 36px); }
p  { margin: 0; }

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
  position: relative;
  z-index: 2;
}

/* ------------ Eyebrow / small caps ------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--brass);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brass-deep);
  text-transform: uppercase;
}

