/* ==========================================================================
   BRILLIΛNTZ: Base
   Reset, typography, grid primitives, shared utilities.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  position: relative;
  margin: 0;
  padding-top: var(--header-h);   /* reserves space for the fixed .site-header */
  background: var(--c-warm-white);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

/* --- CONTAINER + GRID ----------------------------------------------------
   Every section shares these edges. UI Spec s.3: header, body sections, logo
   strip, article grids and footer must align to the same container.
   ------------------------------------------------------------------------ */
.page-container,
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--col-count), minmax(0, 1fr));
  column-gap: var(--col-gap);
}

/* ==========================================================================
   LAYOUT PRIMITIVES
   Deliberately thin. The homepage's own compositions (hero, entry points,
   Thinking grid) keep their page-specific classes: forcing them through
   generic primitives would flatten art direction the brief asks to protect.
   These exist so future pages share structure without re-deriving it.
   ========================================================================== */
.section-header { margin-bottom: var(--s-48); max-width: 62ch; }
.section-header .eyebrow { margin-bottom: var(--s-16); }

.two-column,
.three-column,
.four-column,
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(var(--col-count), minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--s-48);
}
.two-column   > * { grid-column: span 6; }
.three-column > * { grid-column: span 4; }
.four-column  > *,
.editorial-grid > * { grid-column: span 3; }

@media (max-width: 1279px) {
  .two-column > *, .three-column > * { grid-column: span 4; }
  .four-column > *, .editorial-grid > * { grid-column: span 4; }
}
@media (max-width: 767px) {
  .two-column > *, .three-column > *,
  .four-column > *, .editorial-grid > * { grid-column: 1 / -1; }
}

/* Page shells only. Removed once a page is designed. */
.shell-note { color: var(--c-ink-60); margin-top: var(--s-24); }

.section        { padding-block: var(--section-pad); }
.section--compact { padding-block: var(--section-pad-compact); }
/* Philosophy section sits ~18% shorter. Typography is untouched; only the
   block padding is reduced. */
.section--intro { padding-block: calc(var(--section-pad) * 0.82); }
@media (max-width: 767px) {
  /* The whole approach section is substantially tighter on mobile. */
  .section--intro { padding-block: calc(var(--section-pad) * 0.66); }
  .section--intro .intro__head { margin-bottom: var(--s-16); }
  .section--intro .intro__body .lede { font-size: 17px; line-height: 1.4; }
  .section--intro .intro__body p { margin-bottom: 10px; }
}
/* Tightens the lead-in to three sections that read as slightly empty.
   Only the top padding changes; internal type spacing is untouched. */
.section--tight-top { padding-top: calc(var(--section-pad) * 0.88); }

/* Snug: for sections whose content does not need the full editorial pad.
   Major statements keep --section-pad; this builds momentum between them. */
.section--snug    { padding-block: clamp(48px, 4.4vw, 64px); }
.section--paper { background: var(--c-paper); }
.section--ink   { background: var(--c-ink); color: var(--c-warm-white); }

/* --- TYPOGRAPHY ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-display);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: var(--lh-tight); }

p { margin: 0 0 var(--s-16); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--t-body-lg); line-height: var(--lh-body-lg); }

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-60);
  margin: 0 0 var(--s-24);
}
.section--ink .eyebrow { color: var(--c-rule-reverse); }

a { color: inherit; }

/* --- BUTTONS + LINKS (UI Spec s.13) -------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-12);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--t-small);
  line-height: 1;
  padding: 16px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.btn .arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--primary { background: var(--c-ink); color: var(--c-warm-white); }
.btn--primary:hover { background: #000; }

.btn--yellow { background: var(--c-yellow); color: var(--c-ink); }

.btn--outline { border-color: currentColor; background: transparent; color: inherit; }
.btn--outline:hover { background: var(--c-ink); color: var(--c-warm-white); border-color: var(--c-ink); }

/* text link with arrow */
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--t-small);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid var(--c-rule);
  transition: border-color var(--dur-fast) var(--ease);
}
.link:hover { border-bottom-color: currentColor; }
.link .arrow { transition: transform var(--dur-fast) var(--ease); }
.link:hover .arrow { transform: translateX(3px); }

/* --- FOCUS (WCAG 2.2 AA) ------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.hero :focus-visible { outline-color: var(--c-ink); }
.hero[data-text="light"] :focus-visible { outline-color: var(--c-warm-white); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--c-ink); color: var(--c-warm-white);
  padding: 14px 20px; font-size: var(--t-small); font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { left: var(--s-16); top: var(--s-16); }

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