/* ============================================================
   BASE — reset, defaults, focus, motion
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* the fixed header shouldn't cover anchored headings */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  background: var(--obsidian);
  color: var(--ink-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;   /* nothing scrolls sideways, ever */
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { background: none; border: 0; cursor: pointer; }

/* ---- Focus: a warm gold ring, always visible on keyboard ---- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
/* On ivory the plain gold ring is a little weak — deepen it. */
.lit-day :focus-visible,
.lit-dawn :focus-visible { outline-color: var(--gold-burnished); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--gold);
  color: var(--obsidian);
  padding: 0.8rem 1.6rem;
  border-radius: 0 0 var(--curve-soft) var(--curve-soft);
  font-family: var(--font-house);
  font-size: var(--t-xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---- Screen-reader only ---- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Selection ---- */
::selection { background: var(--gold); color: var(--obsidian); }

/* ---- Scrollbar (dark by default, subtle) ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--obsidian); }
::-webkit-scrollbar-thumb {
  background: var(--gold-burnished);
  border-radius: 10px;
  border: 3px solid var(--obsidian);
}

/* ============================================================
   REDUCED MOTION
   ------------------------------------------------------------
   Honoured properly: the spiral hero does not draw, reveals
   appear immediately, nothing drifts or parallaxes. The site
   still works and still looks composed — it simply arrives
   already settled.
   ============================================================ */
@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* The same, but driven by the in-page toggle rather than the OS. */
body.motion-off .reveal { opacity: 1 !important; transform: none !important; }
body.motion-off *, body.motion-off *::before, body.motion-off *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

/* ---- Print: give her something clean to hand over ---- */
@media print {
  .site-header, .site-footer, .hero-spiral, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
}
