/* ============================================================
   BASE — reset + global element styling
   Loads AFTER design-system.css so it can use the tokens.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

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

button { cursor: pointer; background: none; border: none; }

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

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

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-display);   /* tight poster tracking */
}
 h2 {
-webkit-text-stroke: 1.5px currentColor;  /* tight poster tracking */
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }

p { max-width: 68ch; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */

/* Centered content container with responsive gutters */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Vertical rhythm for full-width sections */
.section {
  padding-block: var(--section-y);
}

/* Section heading pattern (title + optional subtitle, centered) */
.section-head {
  text-align: center;
  margin-bottom: var(--space-7);
}
.section-head h2 {
  font-size: var(--fs-h2);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  color: var(--text-color);              /* your text color variable */
  -webkit-text-stroke: 2px var(--text-color); /* stroke same as text */
}
.section-head p {
  margin: var(--space-3) auto 0;
  color: var(--color-text-muted);
  font-size: var(--fs-lead);
  max-width: 60ch;
}

/* Small uppercase eyebrow/label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary);
}

/* Utility: visually hidden but screen-reader accessible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Accessible focus ring */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   PAGE BACKGROUND WASH  (both themes)
     light -> assets/images/light-bg-mage.png   soft cloud photo
     dark  -> assets/images/dark-bg-start.png   transparent gold
              sparkle overlay, sitting on the navy --bg-page colour
   ============================================================ */
:root:not([data-theme="dark"]) body {
  background-image: url("../assets/images/light-bg-mage.png");
}
:root[data-theme="dark"] body {
  background-image: url("../assets/images/dark-bg-start.png");
}
body {
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: fixed;
}

/* Let the wash show through: these sections paint a solid page colour of
   their own, which would hide it. Applies to BOTH themes.
   NOTE: the ":root " prefix is load-bearing — the section rules live in
   <style> blocks injected after this file, so a bare ".partners" (0,1,0)
   ties on specificity and LOSES on order. ":root .partners" is 0,2,0. */
:root .projects,
:root .dreams,
:root .reviews,
:root .blogs,
:root .partners {
  background: transparent;
}
