/* ============================================================
   BASE - reset, typography, layout primitives, a11y
   ============================================================ */

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* guard against transient reveal-transform overflow */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01" 1, "cv01" 1;
}

/* Subtle ambient gold field + fine grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(232, 199, 122, 0.10), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(200, 150, 47, 0.07), transparent 55%);
}

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

a { color: inherit; text-decoration: none; }

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

ul, ol { list-style: none; padding: 0; }

::selection { background: var(--gold-300); color: var(--on-gold); }

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}

/* ---- Focus visibility (a11y) ---- */
:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: var(--z-overlay);
  background: var(--gold-300);
  color: var(--on-gold);
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  z-index: var(--z-base);
  padding-block: var(--section-y);
}

/* Split layout (text + media), grid not flex-math */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
/* Allow grid items to shrink below content min-width (prevents track blowout) */
.split > * { min-width: 0; }

/* ---- Section headers ---- */
.section__head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__title {
  font-size: var(--fs-h2);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--lh-tight);
}
.section__lead {
  margin-top: 1.1rem;
  font-size: var(--fs-lg);
  color: var(--text-2);
  max-width: 62ch;
}
.section__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: var(--gold-300);
  margin-bottom: 0.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.02em;
  color: var(--gold-200);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: var(--gold-grad-soft);
}
.eyebrow i { font-size: 1.05em; color: var(--gold-300); }

/* ---- Utilities ---- */
.text-gold {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.order-1 { order: 1; }
.order-2 { order: 2; }

/* Reduced motion: kill transitions/animations globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
