/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ─── Base typography ─── */
body {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-frame);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: var(--s-4); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); }

p {
  max-width: 68ch;
}

/* ─── Layout primitives ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.section {
  padding-block: var(--s-16);
}

.section--alt {
  background: var(--cream-light);
}

.section__header {
  text-align: center;
  margin-bottom: var(--s-12);
}

.section__header p {
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ─── Grid ─── */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Card ─── */
.card {
  background: var(--cream);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--s-8);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-6);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--rust);
  color: var(--cream);
  border-color: var(--rust);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--saddle);
  border-color: var(--saddle);
}

.btn--outline {
  background: transparent;
  color: var(--rust);
  border-color: var(--rust);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--rust);
  color: var(--cream);
}

.btn--outline-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 250, 245, 0.5);
}

.btn--outline-light:hover,
.btn--outline-light:focus-visible {
  background: rgba(250, 250, 245, 0.15);
  border-color: var(--cream);
}

.btn--lg {
  font-size: 1.125rem;
  padding: var(--s-4) var(--s-8);
}

/* ─── Visually hidden (accessibility) ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Focus visible ─── */
:focus-visible {
  outline: 3px solid var(--wheat-gold);
  outline-offset: 2px;
}
