/* Look Twice — base reset + typography */

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-cream-edge);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

button { font: inherit; cursor: pointer; }

input, textarea, select { font: inherit; color: inherit; }

/* Headings — Epilogue 800 by default, italic emphasis uses 900 */
h1, h2, h3, h4 {
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  color: var(--c-black);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 0.98; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

em {
  font-style: italic;
  font-weight: var(--fw-black);
}

/* Prevent line break inside an inline element */
.nowrap { white-space: nowrap; }

/* Visually hidden (a11y) */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px; left: var(--s-4);
  background: var(--c-ink);
  color: var(--c-cream);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-1);
  text-decoration: none;
  font-weight: var(--fw-bold);
  z-index: 100;
}
.skip-link:focus {
  top: var(--s-4);
}

/* Focus rings — visible everywhere */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-1);
}
