/* Base: reset, typography, layout primitives, accessibility */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-heading);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); line-height: 1.25; }
p { text-wrap: pretty; }

a { color: var(--color-link); text-underline-offset: 0.2em; }
a:hover { color: var(--color-link-hover); }

/* Accessible focus */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--color-accent-on-dark); }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 1000;
  background: var(--color-cta-bg); color: var(--color-cta-text);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); color: var(--color-cta-text); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Layout */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }
.section { padding-block: var(--section-pad); }
.section--warm { background: var(--color-bg-warm); }
.section--band { background: var(--color-bg-band); }
.section--sage { background: var(--color-bg-sage); }
.section--soft { background: var(--color-bg-accent-soft); }
.section--dark { background: var(--color-bg-dark); color: var(--color-on-dark-muted); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-on-dark); }

.section-head { margin-bottom: var(--space-7); max-width: 680px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 + p { margin-top: var(--space-4); }

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-eyebrow);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow { color: var(--color-accent-on-dark); }

.lede { font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.7; }
.section--dark .lede { color: var(--color-on-dark-muted); }

/* Script accent: one short phrase per section */
.script {
  font-family: var(--font-script);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.12em;
  letter-spacing: 0;
}
.section--dark .script { color: var(--color-accent-on-dark); }
h1 .script, h2 .script { display: inline; }

.stack > * + * { margin-top: var(--space-4); }
.center { text-align: center; }

/* Scroll reveal: hidden state only exists when JS is running */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@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; transition-delay: 0ms !important; animation-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
