/*
 * Nuve Lume base: font faces, reset, element defaults, the small helpers every page uses.
 * Load order: tokens.css, base.css, components.css, then the page files in css/pages/. Dashboard: ops.css instead of nothing; it sits after components.css.
 */

/* ===================================================================== */
/* Fonts: self-hosted WOFF2 subsets built by `manage.py build_fonts`.      */
/* Preload Inter 400, Jost 500 and, where names print, Special Elite.     */
/* ===================================================================== */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost";  src: url("../fonts/jost-500.woff2") format("woff2");  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("../fonts/special-elite-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Metric-matched fallbacks (computed against Arial with fontTools) hold layout shift down while the files load. */
@font-face { font-family: "Jost Fallback";  src: local("Arial"); size-adjust: 99.8%;  ascent-override: 107.3%; descent-override: 37.6%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107.5%; ascent-override: 90.1%;  descent-override: 22.4%; line-gap-override: 0%; }
/* Special Elite against Courier New (fontTools, 2026-10-24): size-adjust = mean advance of the product names and a-z (0.579 em / 0.600 em),
   ascent/descent = hhea 1440/-608 of 2048 divided by that. Special Elite is preloaded on the pages that print names (base_site.html). */
@font-face { font-family: "Special Elite Fallback"; src: local("Courier New"); size-adjust: 96.5%; ascent-override: 72.9%; descent-override: 30.8%; line-gap-override: 0%; }

/* ===================================================================== */
/* Reset                                                                  */
/* ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--nl-color-bg);
  color: var(--nl-color-text);
  font: var(--nl-weight-body) var(--nl-text-body)/var(--nl-lh-body) var(--nl-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { display: block; flex: 1 0 auto; }
main:focus { outline: none; }
img, picture, video, canvas { max-width: 100%; }
img { height: auto; }
svg { display: block; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure, blockquote, pre { margin: 0; }
hr { border: 0; border-top: 1px solid var(--nl-hairline); margin: 0; }
table { border-collapse: collapse; border-spacing: 0; }
th { text-align: start; }

/* ===================================================================== */
/* Type                                                                   */
/* ===================================================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--nl-font-display);
  font-weight: var(--nl-weight-display);
  letter-spacing: 0;
  text-wrap: balance;
}
h1 { font-size: var(--nl-text-h1); line-height: var(--nl-lh-h1); }
h2 { font-size: var(--nl-text-h2); line-height: var(--nl-lh-h2); }
h3 { font-size: var(--nl-text-h3); line-height: var(--nl-lh-h3); }
h4, h5, h6 { font-size: var(--nl-text-h4); line-height: var(--nl-lh-h4); }
p { margin: 0; text-wrap: pretty; }
strong, b { font-weight: 600; }
small { font-size: var(--nl-text-caption); }

a { color: var(--nl-color-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

/* Focus is never removed: 2px Ink outline, 2px offset. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--nl-focus-width) solid var(--nl-color-focus);
  outline-offset: var(--nl-focus-offset);
}

::selection { background: var(--nl-ink); color: var(--nl-paper); }

/* Display helpers */
.nl-display { font-family: var(--nl-font-display); font-weight: 500; font-size: var(--nl-text-display); line-height: var(--nl-lh-display); }
.nl-h1 { font-size: var(--nl-text-h1); line-height: var(--nl-lh-h1); }
.nl-h2 { font-size: var(--nl-text-h2); line-height: var(--nl-lh-h2); }
.nl-h3 { font-size: var(--nl-text-h3); line-height: var(--nl-lh-h3); }
.nl-lede { font-size: var(--nl-text-lede); line-height: var(--nl-lh-lede); }
.nl-muted { color: var(--nl-color-text-muted); }
.nl-small { font-size: var(--nl-text-body-sm); line-height: var(--nl-lh-body-sm); }
.nl-caption { font-size: var(--nl-text-caption); line-height: var(--nl-lh-caption); }
.nl-tnum, .nl-price { font-variant-numeric: tabular-nums lining-nums; }
.nl-price { font-weight: 600; }
/* Section labels: Jost caps, 0.06em. The page-level label (eyebrow) is wider. */
.nl-label { font-family: var(--nl-font-display); font-weight: 500; font-size: var(--nl-text-label); letter-spacing: var(--nl-track-label); text-transform: uppercase; line-height: 1.3; }
.nl-eyebrow { font-family: var(--nl-font-display); font-weight: 500; font-size: var(--nl-text-eyebrow); letter-spacing: var(--nl-track-eyebrow); text-transform: uppercase; line-height: 1.2; }
.nl-prose { max-width: var(--nl-prose-max); }
.nl-prose > * + * { margin-top: 1em; }
.nl-prose h2, .nl-prose h3 { margin-top: 1.75em; }
.nl-prose h2 + *, .nl-prose h3 + * { margin-top: 0.5em; }
.nl-prose ul { list-style: disc; padding-inline-start: 1.25em; }
.nl-prose ol { list-style: decimal; padding-inline-start: 1.5em; }
.nl-prose li + li { margin-top: 0.4em; }
.nl-nowrap { white-space: nowrap; }

/* Visually hidden, still read by assistive tech. */
.nl-vh, .nl-visually-hidden {
  position: absolute !important;
  inset-inline-start: 0;   /* never at its static position: inside a scrolling table that would widen the page */
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Skip link: first focusable element on every page. */
.nl-skip {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--nl-ink);
  color: var(--nl-paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.nl-skip:focus { transform: none; outline: 2px solid var(--nl-paper); outline-offset: -4px; }

/* Layout primitives */
/* The content column lines up with the header, footer and the Colour Press text grid (.nl-wrap, css/press.css): 1280px plus margins. */
.nl-container { width: 100%; max-width: calc(var(--nl-content-max) + 2 * var(--nl-page-margin)); margin-inline: auto; padding-inline: var(--nl-page-margin); }
.nl-container--narrow { max-width: calc(var(--nl-narrow-max) + 2 * var(--nl-page-margin)); }
.nl-section { padding-block: var(--nl-section-space); }
.nl-section--tight { padding-block: clamp(24px, 3vw, 48px); }
.nl-stack > * + * { margin-top: var(--nl-stack, 1rem); }
.nl-stack--lg { --nl-stack: 2rem; }
.nl-stack--sm { --nl-stack: 0.5rem; }
.nl-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nl-cluster-gap, 12px); }
.nl-rule { border: 0; border-top: 1px solid var(--nl-hairline); margin: 0; }

@media (forced-colors: active) {
  a { text-decoration-thickness: 2px; }
}
@media print {
  .nl-header, .nl-footer, .nl-consent, .nl-skip { display: none !important; }
  body { background: #fff; }
}
