/* ============================================================
   David Holdings — Base
   Reset, document typography, base elements, layout helpers,
   and accessibility primitives. Import AFTER tokens.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-dark);
  background: var(--color-bg-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--color-gold-primary); color: var(--color-bg-dark); }

/* ---------- Headings & text ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0;
  line-height: 1.05;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); line-height: 1.15; }
h4 { font-size: var(--text-xl); line-height: 1.25; }
p  { margin: 0 0 1em; }

/* ---------- Type primitives (utility classes) ---------- */
.serif { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num   { font-variant-numeric: tabular-nums; }
.gold  { color: var(--color-gold-primary); }

.small-caps {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 500;
}

/* Section eyebrow — "— PRIVATE WEALTH" */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-gold-deep);
  display: inline-block;
}
.eyebrow.dash::before {
  content: "—";
  background: none;
  width: auto;
  color: var(--color-gold-primary);
  font-weight: 600;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule      { height: 1px; background: var(--rule); width: 100%; }
.rule-dark { height: 1px; background: var(--rule-dark); width: 100%; }

/* Ornamental fleuron divider — used sparingly */
.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  color: var(--color-gold-primary);
  font-family: var(--font-display);
  font-size: 14px;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 0 0 80px;
  height: 1px;
  background: var(--color-gold-deep);
  opacity: 0.5;
}

/* ---------- Inline icon helper (references the shared sprite) ---------- */
.ico {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  flex: none;
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--color-gold-primary); outline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-gold-primary); outline-offset: 3px; }

/* Skip link — first focusable element on every page */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--color-gold-primary);
  color: var(--color-bg-dark);
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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