/* ==========================================================================
   BASE — reset, root element defaults, typography, layout primitives
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

p { margin: 0; }

/* ---- Background texture: subtle noise-free gradient wash ---- */
body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(185, 151, 90, 0.16), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(212, 178, 115, 0.08), transparent);
  background-repeat: no-repeat;
}

/* ---- Focus states: visible, accessible, on-brand ---- */
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: #fff;
}

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

.section {
  padding-block: var(--section-pad-y);
  position: relative;
}

.section-tight { padding-block: clamp(2.5rem, 2.5rem + 2vw, 4.5rem); }

.grid {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }

.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---- Typography utility classes ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--sp-4);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
}

h1, .h1 { font-size: var(--fs-4xl); }
h2, .h2 { font-size: var(--fs-3xl); }
h3, .h3 { font-size: var(--fs-2xl); }
h4, .h4 { font-size: var(--fs-xl); }
h5, .h5 { font-size: var(--fs-md); }

.lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
  max-width: 56ch;
}

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--sp-8);
}

.section-head.center { margin-inline: auto; }

/* ---- Visually hidden (a11y) ---- */
.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;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--accent);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }
