/* =============================================================
   Base — reset, root, typography defaults
   ============================================================= */

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

html {
  font-size: 100%; /* respect user preference */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--text-on-cream);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-standard);
}

ul, ol {
  list-style: none;
}

/* ---- Headings: defaults only; sections override as needed ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  font-weight: 400;
}

p {
  font-family: var(--font-body);
  line-height: 1.55;
}

p em {
  font-style: italic;
  color: var(--gold-deep);
  font-weight: 500;
}

/* On dark surfaces, italic emphasis turns lighter gold instead of dark gold */
.on-dark p em,
.on-dark h1 em,
.on-dark h2 em,
.on-dark h3 em {
  color: var(--gold);
}

/* ---- Focus states ---- */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 0; /* never round */
}

/* ---- Selection ---- */

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ---- Container ---- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter-mobile);
  padding-right: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--gutter-desktop);
    padding-right: var(--gutter-desktop);
  }
}

/* ---- Eyebrow / section marker ---- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  font-weight: 400;
  letter-spacing: var(--tracking-mono-loose);
  text-transform: uppercase;
  color: var(--gold);
}

.on-cream .eyebrow {
  color: var(--gold-deep);
}

.eyebrow .line {
  display: inline-block;
  width: 42px;
  height: 1px;
  background: currentColor;
}

/* ---- Surface modifiers (use to swap palettes contextually) ---- */

.on-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}

.on-cream {
  background: var(--paper);
  color: var(--text-on-cream);
}
