/* ==========================================================================
   BILORAUX — base.css
   Reset, self-hosted fonts, global typography, and shared primitives.
   ========================================================================== */

/* ---- Self-hosted fonts (variable, latin subset) --------------------------
   One variable file per family covers every weight we use. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201E, U+2020-2022,
                 U+2026, U+2032-2033, U+2039-203A, U+2044, U+2212, U+2215;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-var-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201E, U+2020-2022,
                 U+2026, U+2032-2033, U+2039-203A, U+2044, U+2212, U+2215;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* offset for the sticky header when jumping to #anchors */
  scroll-padding-top: 6rem;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: var(--leading-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; }

/* ---- Headings & prose ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }
p, li { max-width: var(--measure); }

strong, b { font-weight: 600; }

/* Numeric alignment for prices and data tables */
.tabular { font-variant-numeric: tabular-nums; }

/* ---- Links --------------------------------------------------------------- */
a:not([class]) {
  color: var(--gold-deep);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}
a:not([class]):hover { text-decoration-color: var(--gold); }

/* ---- Focus (visible on any background thanks to the offset gap) ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Inside dark bands, flip the ring so it stays visible */
.band--ink :focus-visible,
[data-theme="dark"] :focus-visible {
  outline-color: var(--ring-dark);
}

/* ---- Layout primitives --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: var(--z-skiplink);
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: var(--s-3); }

/* Eyebrow / label-band text motif from the packaging */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--gold-deep);
}

/* Reduced motion: kill smooth scroll + long transitions */
@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;
  }
}
