/* ==========================================================================
   Base: reset + element defaults + a couple of helpers
   ========================================================================== */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

ol[role="list"],
ul[role="list"] {
  list-style: none;
  padding: 0;
}

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

:focus-visible {
  outline: 2px solid var(--pine-mid);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

/* Quiet italic asides (intro line, footer tagline) */
.hand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 24;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--pine-mid);
}

/* Fade-up once in view (main.js adds .is-in) */
.reveal {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out);
}

.reveal.is-in,
.no-js .reveal {
  opacity: 1;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
