/* ============================================================
   BASE — resets, typography, shared utilities.
   Every value here references a token. No raw px.

   This file owns the primitives (.wrap, .eyebrow, .lede, .btn, .rv)
   and the section rhythm. sections.css owns per-section layout ONLY
   and must never redefine anything in here.
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-weight: var(--weight-normal);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- TYPOGRAPHY DEFAULTS ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  letter-spacing: var(--tracking-tight);
  font-optical-sizing: auto;
}
h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); }
h2 { font-size: var(--text-2xl); line-height: var(--leading-head); }
h3 { font-size: var(--text-xl);  line-height: var(--leading-head); }

p  { font-size: var(--text-base); line-height: var(--leading-body); }

em { font-style: italic; color: var(--gold); }

/* A heading's gold accent clause. It sits INLINE by default, so the heading
   reads as one flowing sentence — there must always be a space before the
   <em> in the markup. Add .stack to drop the clause onto its own line, for
   headings that are two separate statements (e.g. "Seven disciplines." /
   "One standard."). */
h2 em.stack, h3 em.stack { display: block; }

/* ---- THE SECTION RHYTHM ----
   ONE declaration, applied to every top-level section on the site. This is
   why the rhythm is consistent: no section is able to invent its own. If you
   are reaching for a custom padding-block on a <section>, don't. */
section { position: relative; padding-block: var(--section-y); }

/* ---- SHARED UTILITIES ---- */

/* The content column — used by every section's inner wrapper.
   ONE definition of the max width and gutter, applied everywhere. */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--space-3);
  top: var(--space-3);
  z-index: 999;
  background: var(--gold);
  color: var(--void);
  padding: var(--space-2) var(--space-3);
}

/* Eyebrow label — the little uppercase mono kicker above headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: var(--space-5);
  height: 1px;
  background: var(--gold);
  flex: none;
}

/* Lead paragraph */
.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--text-muted);
  max-width: 56ch;
}

/* The eyebrow → heading → lede rhythm, defined once for the whole site.
   Every section head uses this stack, so it is spaced here rather than
   re-spaced (differently, by hand) in each section. */
.eyebrow + h2,
.eyebrow + h3 { margin-top: var(--space-4); }
h2 + .lede,
h3 + .lede    { margin-top: var(--space-4); }

.rule { height: 1px; background: var(--line); margin-block: var(--space-4); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  white-space: nowrap;
}
.btn-g { background: var(--gold); color: var(--void); }
.btn-g:hover { background: var(--gold-lift); }
.btn-l { border-color: rgba(242,238,230,0.28); color: var(--ivory); }
.btn-l:hover { border-color: var(--ivory); background: rgba(242,238,230,0.06); }
.btn-o { border-color: var(--gold-dim); color: var(--gold); }
.btn-o:hover { border-color: var(--gold); background: rgba(173,156,119,0.09); }

/* ---- SCROLL REVEAL (JS adds .in) ---- */
.rv {
  opacity: 0;
  transform: translateY(var(--space-4));
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
}
