/* ============================================================
   BASE — Reset, Typography, Utilities, Sections
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--color-text); background: var(--color-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: var(--lh-heading);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); margin-bottom: 0.5em; }
h2 { font-size: var(--fs-h2); margin-bottom: 0.4em; }
h3 { font-size: var(--fs-h3); margin-bottom: 0.35em; }
h4 { font-size: var(--fs-h4); margin-bottom: 0.3em; }

p { margin-bottom: 0.75em; color: var(--color-text-sec); }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.0625rem; line-height: 1.65; color: var(--color-text); }

blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  border-left: 3px solid var(--color-primary);
  font-style: italic;
  color: var(--color-text-sec);
  background: var(--color-primary-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

/* ===== FOCUS ===== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ===== SECTIONS (compact) ===== */
.section {
  padding: var(--space-3xl) 0;
}

.section--sm {
  padding: var(--space-2xl) 0;
}

.section--xs {
  padding: var(--space-xl) 0;
}

.section--lg {
  padding: var(--space-4xl) 0;
}

/* ---- Section Alt ---- */
.section-alt {
  background: var(--color-bg-alt);
}

.section-warm {
  background: var(--color-bg-warm);
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section-dark p { color: rgba(255,255,255,0.7); }
.section-dark h2, .section-dark h3 { color: white; }

/* ---- Section Title (centered) ---- */
.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title .accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  margin: 0.75rem auto;
  border-radius: var(--radius-full);
}

.section-title p {
  max-width: 560px;
  margin: 0 auto;
  font-size: var(--fs-small);
}

/* ---- Section Header (editorial) ---- */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header__overline {
  display: block;
  font-family: var(--font-accent);
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.section-header__title {
  margin-bottom: var(--space-sm);
}

.section-header__subtitle {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  max-width: 480px;
}

.section-header__subtitle--full {
  max-width: none;
}

/* ===== ACCENT LINE ===== */
.accent-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  border-radius: var(--radius-full);
  margin: var(--space-sm) 0;
}

.accent-line--center {
  margin-left: auto;
  margin-right: auto;
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
}

.badge--primary,
.badge-primary {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

.badge--secondary,
.badge-secondary {
  background: var(--color-secondary-pale);
  color: var(--color-secondary-dark);
}

.badge--gold {
  background: var(--color-gold-pale);
  color: var(--color-gold-dark);
}

.badge--lavender {
  background: var(--color-lavender-pale);
  color: var(--color-lavender-dark);
}

/* ===== UTILITY: Flex ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

/* ===== UTILITY: Grid ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

/* ===== UTILITY: Text ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-gold { color: var(--color-gold); }
.text-burgundy { color: var(--color-burgundy); }
.text-muted { color: var(--color-text-muted); }
.text-white { color: var(--color-text-light); }
.font-head { font-family: var(--font-head); }
.font-accent { font-family: var(--font-accent); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ===== UTILITY: Spacing ===== */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

/* ===== UTILITY: Image ===== */
.img-cover { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.img-rounded { border-radius: var(--radius-lg); }

/* ===== SR ONLY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}