/* ==========================================================================
   base.css — reset, typography defaults, shared elements.
   No section-specific rules belong in here.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

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

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

:is(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--nasturtium);
  outline-offset: 3px;
}

/* --- Headings -------------------------------------------------------------
   Cortese is a light, high-contrast face. It needs tight leading and a
   little negative tracking at large sizes, and it must never be bolded.
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  /* Cortese ships a long-s "st" ligature that turns Astra into Aſtra.
     Discretionary and standard ligatures stay off across all display type. */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "clig" 0, "hlig" 0;
}

h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* --- Shared utilities ----------------------------------------------------- */

.measure  { max-width: var(--measure); }
.lede {
  font-family: var(--display);
  font-size: var(--t-md);
  line-height: 1.3;
  letter-spacing: 0;
}

.quiet { color: var(--stone); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* --- Buttons and inputs --------------------------------------------------- */

.button {
  display: inline-block;
  font: inherit;
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 0;
  padding: 0.95rem 2.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease;
}
.button:hover { background: var(--field); }

.field { display: block; margin-bottom: 1.25rem; }
.field > span {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  color: var(--stone);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: var(--t-body);
  color: var(--ink);
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(23, 24, 15, 0.3);
  border-radius: 0;
  padding: 0.55rem 0;
  transition: border-color 0.25s ease;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field :is(input, textarea, select):focus {
  border-bottom-color: var(--ink);
  outline-offset: 6px;
}

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