/* ==========================================================================
   ZEN W/ JEN — BASE
   Modern reset + base element styling, driven entirely by tokens.css.
   ========================================================================== */

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

* { margin: 0; }

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

body {
  font-family: var(--text-font-family);
  font-size: var(--text-m);
  line-height: var(--text-line-height);
  letter-spacing: var(--text-letter-spacing);
  color: var(--text);
  background-color: var(--body-bg-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Headings — Fraunces display serif */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font-family);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-letter-spacing);
  color: var(--heading-color);
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); }
h6 { font-size: var(--h6); }

p { max-width: var(--content-narrow); }
p, ul, ol { text-wrap: pretty; }

a {
  color: var(--secondary-dark);
  text-decoration-color: color-mix(in oklab, var(--secondary) 45%, transparent);
  text-underline-offset: 0.18em;
  transition: color var(--transition);
}
a:hover { color: var(--accent-dark); }

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

ul, ol { padding-inline-start: 1.25em; }
li { margin-block: 0.25em; }

strong, b { font-weight: 600; }

blockquote {
  font-family: var(--heading-font-family);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.35;
  color: var(--heading-color);
  padding-inline-start: var(--space-m);
  border-inline-start: 3px solid var(--accent);
}

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

hr {
  border: 0;
  border-top: var(--border);
  margin-block: var(--space-l);
}

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

::selection {
  background: var(--tertiary);
  color: var(--heading-color);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Helper text styles available to previews
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--text-font-family);
  font-size: var(--eyebrow-size);
  font-weight: 600;
  letter-spacing: var(--eyebrow-letter-spacing);
  text-transform: uppercase;
  color: var(--accent-dark);
}

.script {
  font-family: var(--script-font-family);
  font-weight: 600;
  line-height: 1;
  color: var(--secondary-dark);
}
