/* =========================================================================
   base.css — reset, web fonts, base typography
   Load order: tokens → base → layout → components → sections
   ========================================================================= */

/* ---- Web fonts (self-hosted, subset Latin+Swedish; see assets/fonts/LICENSE.txt) ---- */
@font-face {
  font-family: "Trade Gothic AJ"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/trade-gothic-aj.woff2") format("woff2");
}
@font-face {
  font-family: "Trade Gothic AJ"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../assets/fonts/trade-gothic-aj-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Domaine Display"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/domaine-display.woff2") format("woff2");
}
@font-face {
  font-family: "Domaine Display"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/domaine-display-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Adobe Caslon Pro"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/caslon.woff2") format("woff2");
}
@font-face {
  font-family: "Adobe Caslon Pro"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/caslon-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Adobe Caslon Pro"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../assets/fonts/caslon-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "News Gothic"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../assets/fonts/news-gothic-demi.woff2") format("woff2");
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-feature-settings: "onum" 1, "kern" 1; /* oldstyle numerals in running text */
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-orange-red); }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- Headings: Trade Gothic AJ, bold, impactful ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  text-transform: uppercase;   /* Trade Gothic AJ is always set in caps (per AJ brand book) */
  text-wrap: balance;
}
h1 { font-size: var(--step-4); line-height: var(--lh-tight); letter-spacing: -0.025em; text-transform: uppercase; }
h2 { font-size: var(--step-3); line-height: var(--lh-tight); letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p { max-width: var(--maxw-text); }

/* ---- Display / elegant serif (Domaine) for intros & quotes ---- */
.font-serif, .lead, blockquote {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.005em;
}
.lead { font-size: var(--step-1); color: var(--text); max-width: 52ch; }

/* ---- Caption / label (News Gothic) ---- */
.eyebrow, .caption {
  font-family: var(--font-caption);
  font-weight: 600;
  font-size: var(--step--1);
  line-height: var(--lh-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { color: var(--accent-energetic); display: inline-block; }

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

.skip-link {
  position: absolute; left: var(--space-2); top: -100%;
  background: var(--surface-dark); color: var(--text-on-dark);
  padding: .7rem 1.1rem; border-radius: var(--radius); z-index: 200;
  font-family: var(--font-caption); letter-spacing: .08em; text-transform: uppercase; font-size: var(--step--1);
}
.skip-link:focus { top: var(--space-2); color: var(--text-on-dark); }

.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;
}

::selection { background: var(--c-salmon); color: var(--c-near-black); }

/* ---- Global reduced-motion guard ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
