/* ==========================================================================
   Base: element defaults + type styles. Sits on top of Bootstrap Reboot.
   ========================================================================== */

html {
  background: var(--c-bg);
  color-scheme: dark;
  scroll-padding-top: calc(var(--header-h) + var(--sp-2));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: var(--text-weight);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-variation-settings: var(--display-variation);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-leading);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
:where(ul, ol)[role="list"] { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-hover);
}

/* Underline only links inside running text; nav lists, top bar and footer stay clean */
p a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--c-line-strong);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
p a:not([class]):hover { color: var(--c-accent-text); text-decoration-color: currentColor; }

strong, b { font-weight: var(--text-weight-bold); }

::selection { background: var(--c-accent); color: var(--c-accent-ink); }

/* Focus: brand-coloured, always visible for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: fixed;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: var(--z-intro);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-weight: var(--text-weight-bold);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-hover);
}
.skip-link:focus-visible { transform: none; }

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

/* ── Type styles ─────────────────────────────────────────────────────────── */

.t-display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-variation-settings: var(--display-variation);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
}
.t-h1, .t-h2, .t-h3, .t-h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-variation-settings: var(--display-variation);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-leading);
}
.t-h1 { font-size: var(--fs-title); letter-spacing: var(--display-tracking); line-height: 0.98; }
.t-h2 { font-size: var(--fs-h2); }
.t-h3 { font-size: var(--fs-h3); }
.t-h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; line-height: 1.2; }
.t-display, .t-h1, .t-h2, .t-h3, .t-h4 { text-wrap: balance; }

.t-lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--c-text-muted);
  max-width: 52ch;
}
.t-body  { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-small { font-size: var(--fs-small); line-height: 1.5; }
.t-muted { color: var(--c-text-muted); }
.t-measure { max-width: var(--measure); }

/* Eyebrow / overline: index + label, uppercase, letter-spaced */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-text);
  font-size: var(--fs-eyebrow);
  font-weight: var(--text-weight-bold);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}
.eyebrow__index { color: var(--c-accent-text); }
/* a small point of light between the number and the label (the client asked for no dashes) */
.eyebrow__index::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: var(--sp-1);
  vertical-align: middle;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Rare emphasis word inside a headline: serif italic, lit like the key light */
.accent-word {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-variation-settings: normal;
  font-size: calc(1em * var(--accent-scale));
  letter-spacing: -0.01em;
  color: var(--c-accent-text);
}

/* Lit text: a soft highlight of accent light across a word (used once per viewport, max) */
.lit {
  color: var(--c-accent-text);
  text-shadow: 0 0 0.6em rgb(var(--c-accent-rgb) / 0.35);
}

/* ── Icons (sprite) ──────────────────────────────────────────────────────── */
.icon {
  display: inline-block;
  flex: none;
  width: var(--icon-size);
  height: var(--icon-size);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ── Placeholder marker (only visible in the style guide / debug mode) ──── */
.debug-placeholders [data-placeholder] {
  outline: 1px dashed var(--c-accent);
  outline-offset: 2px;
}

/* ── Lenis smooth scroll ─────────────────────────────────────────────────── */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ── Reduced motion: keep fades only ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── App-standard touch behaviour ────────────────────────────────────────────
   Phones and tablets: no grey tap flash, no sideways drift, comfortable targets,
   and press feedback in place of hover (hover styles still exist but nothing
   important depends on them). */
html { -webkit-tap-highlight-color: transparent; overflow-x: clip; }
