/* ==========================================================================
   MODEL G20 2026 — BASE
   Reset, document ground, typography primitives, layout primitives,
   motion primitives, accessibility.
   ========================================================================== */

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

/* The hidden attribute has to beat any component's own display rule.
   Without this, a .btn or .form-note carrying [hidden] stays on screen,
   because an author `display: inline-flex` outranks the UA sheet. */
[hidden] { display: none !important; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 2rem);
  -moz-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-book);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The parchment ground carries a whisper of warmth at the top so the hero
   feels lit rather than flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 78% at 50% -12%, var(--parchment-100) 0%, transparent 58%),
    radial-gradient(88% 60% at 92% 8%, var(--a-maroon-06) 0%, transparent 62%),
    var(--parchment-300);
  pointer-events: none;
}

/* Fine paper grain — the single texture that separates "premium print" from
   "flat web". Kept at ~3% so it reads as substrate, never as noise. */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
}

img, svg, video, canvas, picture {
  display: block;
  max-width: 100%;
}
img, video { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

ul[class], ol[class] { list-style: none; padding: 0; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
}

::selection {
  background: var(--maroon-600);
  color: var(--parchment-100);
}
.on-dark ::selection {
  background: var(--parchment-300);
  color: var(--maroon-800);
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, .display, .hero-type {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  color: var(--text);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

.hero-type {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
}
.t-display { font-size: var(--fs-display); line-height: 1.04; letter-spacing: var(--ls-display); }
h1, .t-h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: var(--ls-display); }
h2, .t-h2 { font-size: var(--fs-h2); }
h3, .t-h3 { font-size: var(--fs-h3); }
h4, .t-h4 { font-size: var(--fs-h4); font-family: var(--font-sans); font-weight: var(--fw-semi); letter-spacing: var(--ls-tight); }

.t-lead {
  font-size: var(--fs-lead);
  line-height: 1.58;
  color: var(--text-body);
  font-weight: var(--fw-light);
  letter-spacing: -0.005em;
}
.t-body  { font-size: var(--fs-body); }
.t-sm    { font-size: var(--fs-sm); line-height: 1.6; }
.t-xs    { font-size: var(--fs-xs); line-height: 1.55; }
.t-muted { color: var(--text-muted); }
.t-faint { color: var(--text-faint); }
.t-accent{ color: var(--accent); }
.t-serif { font-family: var(--font-display); }
.t-mono  { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.t-num   { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* Italic serif — used for the theme line and pull quotes. */
.t-quiet-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
}

/* The eyebrow: small caps, wide tracking, hairline rule. The single most
   recognisable typographic signature of the identity. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}
.eyebrow::before {
  content: "";
  width: clamp(18px, 3vw, 34px);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: clamp(18px, 3vw, 34px);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.eyebrow--bare::before, .eyebrow--bare::after { display: none; }

.seal-text {
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-seal);
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  color: var(--text-faint);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--d-fast) var(--e-out), opacity var(--d-fast) var(--e-out);
}
a:hover { color: var(--accent-hover); }

/* Inline link with a rule that draws itself in from the left. */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 1px;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--d-base) var(--e-out-expo);
}
.link-underline:hover::after,
.link-underline:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose p { max-width: var(--container-text); }
.prose ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  max-width: var(--container-text);
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.72em;
  width: 6px; height: 6px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.prose strong { color: var(--text); font-weight: var(--fw-semi); }

/* --------------------------------------------------------------------------
   LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.shell--text { max-width: calc(var(--container-text) + var(--gutter) * 2); }
.shell--flush { padding-inline: 0; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: var(--section-y-tight); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.stack { display: grid; gap: var(--sp-4); }
.stack-2 { display: grid; gap: var(--sp-2); }
.stack-3 { display: grid; gap: var(--sp-3); }
.stack-5 { display: grid; gap: var(--sp-5); }
.stack-6 { display: grid; gap: var(--sp-6); }
.stack-8 { display: grid; gap: var(--sp-8); }

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.row--end { justify-content: flex-end; }
.row--tight { gap: var(--sp-2); }
.row--top { align-items: flex-start; }
.row--baseline { align-items: baseline; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid-auto-lg { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

/* Editorial split: sticky heading column beside a flowing content column. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.split__sticky { position: sticky; top: calc(var(--nav-h) + 2.5rem); }

@media (max-width: 900px) {
  .split, .split--even, .split--wide-left { grid-template-columns: minmax(0, 1fr); }
  .split__sticky { position: static; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
  border: 0;
}
.divider--accent {
  background: linear-gradient(90deg, transparent, var(--line-accent) 20%, var(--line-accent) 80%, transparent);
}

/* Section header block, used on nearly every page. */
.section-head { max-width: 62ch; display: grid; gap: var(--sp-4); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--wide { max-width: 76ch; }

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-nowrap { white-space: nowrap; }
.u-hide { display: none !important; }
.u-full { width: 100%; }
.u-relative { position: relative; }
.u-clip { overflow: hidden; }
.u-mt-auto { margin-top: auto; }
.u-balance { text-wrap: balance; }
.u-pretty { text-wrap: pretty; }
.u-caps { text-transform: uppercase; letter-spacing: var(--ls-wide); }
.u-maxw-sm { max-width: 46ch; }
.u-maxw-md { max-width: 62ch; }

@media (max-width: 760px) { .u-hide\@sm { display: none !important; } }
@media (min-width: 761px) { .u-show\@sm { display: none !important; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: var(--z-curtain);
  background: var(--maroon-600);
  color: var(--parchment-100);
  padding: 0.85rem 1.6rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  transition: transform var(--d-base) var(--e-out);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--parchment-100); }

/* --------------------------------------------------------------------------
   MOTION PRIMITIVES — scroll reveal
   Elements opt in with [data-reveal]; app.js adds .is-in when observed.
   The un-revealed state is only applied when JS is active (html.js), so a
   no-JS visitor sees fully rendered content.
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity var(--d-slower) var(--e-out-expo),
    transform var(--d-slower) var(--e-out-expo),
    filter var(--d-slower) var(--e-out-expo);
  filter: blur(4px);
  will-change: opacity, transform;
}
.js [data-reveal="fade"]  { transform: none; }
.js [data-reveal="left"]  { transform: translate3d(-34px, 0, 0); }
.js [data-reveal="right"] { transform: translate3d(34px, 0, 0); }
.js [data-reveal="scale"] { transform: scale(0.955); }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Line-by-line mask reveal for display headings. */
.reveal-mask { display: block; overflow: hidden; padding-block: 0.06em; }
.js .reveal-mask > * {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform var(--d-cine) var(--e-out-expo);
}
.js .reveal-mask.is-in > * { transform: none; }

/* Stagger children by index — set via --i on the child. */
.js [data-reveal][style*="--i"] { transition-delay: calc(var(--i) * 85ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .js .reveal-mask > * { transform: none; }
  body::after { display: none; }
}

/* Print — position papers get printed. Make it dignified. */
@media print {
  body::before, body::after { display: none; }
  .site-nav, .site-footer, .cursor, .curtain, .to-top, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.2rem; }
  a { color: #000; text-decoration: underline; }
}
