/*
 * base.css — Reset, global elements, typography, containers
 * Source: DESIGN-SYSTEM.md §7, §4, §10, §15
 * Supersedes previous base.css.
 */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-weight: var(--w-body);
  background: var(--surface);
  color: var(--body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover { color: var(--navy); text-decoration-color: var(--gold); }

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

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

strong { color: var(--ink); font-weight: 700; }
em { font-style: italic; }

p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  margin-bottom: 16px;
}
p:last-child { margin-bottom: 0; }

/* ── Heading defaults — Fraunces variable font ── */
h1, h2, h3, h4 {
  font-family: var(--serif) !important;
  font-variation-settings: var(--fr-heading);
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 5.8vw, 64px);
  font-variation-settings: var(--fr-display);
  line-height: 1.06;
  letter-spacing: 0;
  word-spacing: 0.03em;
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.10;
  letter-spacing: -.020em;
  margin-bottom: 18px;
}

h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.20;
  letter-spacing: -.012em;
  margin-bottom: 14px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.010em;
  margin-bottom: 10px;
}

/* ── Typography utility classes (DESIGN-SYSTEM.md §4) ── */

/* Superscript eyebrow (above headlines) */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 22px;
  display: block;
}
.eyebrow--light { color: var(--gold-soft); }
.eyebrow--gold  { color: var(--gold-text); font-weight: 600; letter-spacing: .12em; }

/* Pre-eyebrow frame line */
.hero-frame {
  font-family: var(--font-sans);
  font-variant-caps: all-small-caps;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--gold-text);
  margin-bottom: 14px;
  display: block;
}

/* Hero H1 utility class */
.hero {
  font-family: var(--serif);
  font-variation-settings: var(--fr-display);
  font-size: clamp(40px, 5.8vw, 64px);
  line-height: 1.06;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero em { font-style: italic; font-weight: 600; color: var(--gold-text); }

/* Section heading utility class */
.section-h {
  font-family: var(--serif);
  font-variation-settings: var(--fr-heading);
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.10;
  letter-spacing: -.020em;
  color: var(--ink);
  margin-bottom: 18px;
}

/* Sub-heading utility class */
.sub-h {
  font-family: var(--serif);
  font-variation-settings: var(--fr-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.20;
  letter-spacing: -.012em;
  color: var(--ink);
  margin-bottom: 14px;
}

/* Body lede */
.lede {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--body);
  max-width: 60ch;
  margin-bottom: 32px;
}

/* Caption / label */
.caption {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--dim);
  line-height: 1.5;
}

/* Serif body — leads, pull quotes, prose surfaces */
.lead, .statement, blockquote, .pull {
  font-family: var(--serif);
  font-variation-settings: var(--fr-body);
}

/* ── Layout containers (DESIGN-SYSTEM.md §10) ── */
/* 3-tier container system: narrow 640 / standard 760 / wide 960 */
.w-narrow   { max-width: 640px;  margin: 0 auto; padding: 0 24px; }
.w-standard { max-width: 760px;  margin: 0 auto; padding: 0 24px; }
.w-wide     { max-width: 960px;  margin: 0 auto; padding: 0 32px; }

/* Legacy aliases — kept for backward compatibility (do not use in new pages) */
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(22px, 5vw, 80px); }
.page-wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.w  { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.wm { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.wl { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.wx { max-width: 960px; margin: 0 auto; padding: 0 32px; }

@media (min-width: 600px) {
  .page-wrap  { padding: 0 40px; }
  .w-standard { padding: 0 40px; }
}
@media (min-width: 640px) {
  .w-narrow { padding: 0 40px; }
  .w  { padding: 0 40px; }
  .wm { padding: 0 40px; }
  .wl { padding: 0 48px; }
  .wx { padding: 0 48px; }
  .w-wide { padding: 0 48px; }
}

/* Two-column grid */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Key-value grid */
.kv-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-sans);
}
.kv-row:last-child { border-bottom: none; }
.kv-key {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-text);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-top: 2px;
}
.kv-value {
  font-size: 17px;
  font-weight: 500;
  color: var(--body);
  line-height: 1.5;
  letter-spacing: -.005em;
}

/* ── Horizontal divider ── */
hr.divider {
  border: none;
  border-top: 1px solid var(--rule-soft);
  margin: 36px 0;
}

/* ── Accessibility: focus ring (DESIGN-SYSTEM.md §15) ── */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: none;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Reduced motion guard (DESIGN-SYSTEM.md §13) ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .orbital-dot {
    animation: none !important;
    opacity: 0 !important;
  }
}
