/* ============================================================
   BASE — reset, typography, buttons, forms
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: var(--lh-head);
  letter-spacing: -0.01em;
  color: var(--maroon);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { color: inherit; }

::selection { background: var(--maroon); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--maroon); color: #fff; padding: 12px 18px;
  border-radius: 0 0 8px 0; z-index: 999; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section-sm { padding-block: var(--section-y-sm); }
.bg-paper { background: var(--paper); }
.bg-cream { background: var(--cream); }
.bg-ink { background: var(--ink-2); color: var(--text-on-dark); }
.bg-teal { background: var(--teal); color: #fff; }
.bg-maroon { background: var(--maroon); color: #fff; }
.center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 18px 28px; border-radius: var(--r-btn);
  font-weight: 600; font-size: 16px; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--teal   { background: var(--teal); color: #fff; box-shadow: 0 8px 22px rgba(0,142,178,0.28); }
.btn--teal:hover { background: var(--teal-deep); }
.btn--maroon { background: var(--maroon); color: #fff; box-shadow: 0 8px 22px rgba(144,17,20,0.26); }
.btn--maroon:hover { background: var(--maroon-deep); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn--ghost-maroon { background: transparent; color: var(--maroon); border-color: rgba(144,17,20,0.4); }
.btn--ghost-maroon:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.btn--cream { background: var(--cream); color: var(--maroon); }
.btn--cream:hover { background: var(--cream-deep); }
.btn--block { width: 100%; }
.btn--lg { padding: 20px 32px; font-size: 17px; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: var(--fs-h4); color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; color: var(--ink); font-size: 15px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(22,22,22,0.5); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,142,178,0.16);
}
.field textarea { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: var(--text-muted); }
.consent input { width: 15px; height: 15px; margin-top: 3px; flex: none; accent-color: var(--maroon); }
.consent a { color: var(--teal); text-decoration: underline; }

@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
