/* ============================================================
   JH Digital — Base
   Reset, typography rules, body defaults, motion killswitch.
   Loads after tokens.css.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;          /* clears the sticky nav for anchor jumps */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;                      /* desktop default — touch overrides below */
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
img { -webkit-user-drag: none; user-drag: none; }

a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

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

button {
  border: none;
  background: none;
  cursor: none;
}

ul, ol { list-style: none; }

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

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 32px 0;
}

/* ---------- Typography defaults ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

p { color: var(--ink-soft); }

p + p { margin-top: 1em; }

strong { font-weight: 600; color: var(--ink); }

em { font-style: italic; }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* ---------- Italic accent words inside headings ---------- */
.gradient-word {
  background: linear-gradient(120deg, var(--gold-deep) 0%, var(--gold) 50%, var(--gold-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---------- Reusable type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

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

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}

.text-mute  { color: var(--ink-mute); }
.text-soft  { color: var(--ink-soft); }
.text-ink   { color: var(--ink); }
.text-gold  { color: var(--gold); }

/* ---------- Containers ---------- */
.container { max-width: var(--max-content); margin: 0 auto; padding: 0 var(--space-section-x); }
.container--text { max-width: var(--max-text); }

/* ---------- Section primitive ---------- */
.section { padding: var(--space-section-y) var(--space-section-x); }
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }
.section--gray  { background: var(--gray); }
.section--ink   { background: var(--ink); color: var(--bone); }
.section--ink p { color: rgba(244, 238, 221, 0.78); }

/* ---------- Focus visibility (WCAG AA) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Reduced-motion killswitch ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  body { cursor: auto; }
  body::after { animation: none !important; }   /* film grain stays static */
}

/* ---------- Touch / narrow viewports ---------- */
@media (max-width: 1024px), (hover: none) {
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; cursor: auto; }
  body::after { display: none; }
  .nav, .scroll-progress, .cursor-dot, .cursor-ring, .footer__giant { display: none !important; }
}
