/* ==========================================================================
   BASE — page defaults, the type system, the container and the 12-col grid.
   Depends on tokens.css. Contains no section-specific rules.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typeface
   Manrope carries the page; Cormorant Garamond is switched on by the heading
   roles below. Both are linked from Google Fonts in each page's <head>.
   -------------------------------------------------------------------------- */

html {
  font-family: var(--font-body);
  font-size: 100%;
}

body {
  background: var(--bg-page);
  color: var(--fg-default);
  font-size: var(--fs-text);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--c-navy);
  color: var(--c-ivory);
}

/* --------------------------------------------------------------------------
   2. Type roles
   Headings: Cormorant Garamond, sentence case, a touch of negative tracking.
   Labels:   Manrope, uppercase, opened up. Text: Manrope at normal tracking.
   Classes, not element selectors, so heading level stays free for semantics.
   -------------------------------------------------------------------------- */

.t-h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-variant-numeric: lining-nums;   /* the face defaults to old-style figures */
  text-transform: none;
}
.t-h2 { font-size: var(--fs-h2);  line-height: var(--lh-h2);       letter-spacing: var(--ls-h2); }

/* Eyebrows, nav, buttons — the only uppercase, and the only positive tracking. */
.t-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semi);
  line-height: 1.3;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   3. Layout primitives  [SPEC §3.4]
   -------------------------------------------------------------------------- */

/* The column, expressed as contentWidth / artboardWidth for each of the five
   original breakpoints, so the side margins are proportionally identical to
   the source at every width. Growth stops at a 1920 viewport, matching the
   type cap, so the whole composition scales as one piece. */
.container {
  width: var(--container);
  margin-inline: auto;
}

/* The composition grid every section reproduces its artboard layout on. */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}

@media (max-width: 1199px) { :root { --container: 95.833vw; } }  /* 920/960 */
@media (max-width:  959px) { :root { --container: 93.75vw;  --grid-cols: 8; } }  /* 600/640 [SPEC §8] */
@media (max-width:  639px) { :root { --container: 91.667vw; --grid-cols: 6; } }  /* 440/480 */
@media (max-width:  479px) { :root { --container: 87.5vw;   --grid-cols: 4; } }  /* 280/320 */

/* --------------------------------------------------------------------------
   4. Section shell
   Backgrounds and per-breakpoint min-heights live in sections.css; this only
   establishes the shared box so every section behaves the same way.
   -------------------------------------------------------------------------- */

/* The explicit 1fr row makes the section height definite, which is what lets
   the fr / percentage row tracks inside each .container resolve against the
   artboard height from §4. Without it they collapse to auto. */
.section {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: var(--h, auto);
  background-color: var(--bg, transparent);
  color: var(--fg, inherit);
  overflow: hidden;              /* [SPEC §8] contain full-bleed + marquees */
}

.section > .container { position: relative; }

/* --------------------------------------------------------------------------
   5. Utilities
   -------------------------------------------------------------------------- */

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

.u-skip-link {
  position: absolute;
  left: 20px;
  top: 0;
  z-index: var(--z-progress);
  padding: var(--sp-2xs) var(--sp-sm);
  background: var(--c-navy);
  color: var(--c-ivory);
  transform: translateY(-150%);
  transition: transform var(--dur-fast) var(--ease-css);
}
.u-skip-link:focus-visible { transform: translateY(0); }
