:root {
  --bg: #f5f2ec;
  --surface: #fbf9f5;
  --text: #16231f;
  --text-muted: #4a5a55;
  --accent: #1f5c4d;
  --accent-contrast: #f5f2ec;
  --border: #e2ddd3;

  --topbar-height: 64px;
  --radius: 12px;
}

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

/* Author display rules (e.g. .btn) would otherwise override the hidden attribute. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--text);
}

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

section:focus {
  outline: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--topbar-height);
}

.wordmark {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.topbar nav {
  margin-left: auto;
}

.nav-links {
  display: none;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--accent-contrast);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Hero */

.hero {
  padding: 96px 0 80px;
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

.lead {
  max-width: 60ch;
  margin: 24px 0 36px;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Sections */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--topbar-height);
}

.section h2 {
  margin-bottom: 36px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.card ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text-muted);
}

.card li + li {
  margin-top: 6px;
}

.steps,
.reasons {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps {
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step h3,
.reason h3 {
  margin-bottom: 6px;
  font-size: 1.125rem;
}

.step p,
.reason p {
  color: var(--text-muted);
}

.reason {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

/* Contact */

.contact {
  padding: 96px 0;
}

.contact h2 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.contact-email {
  margin-bottom: 24px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Footer */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 20px;
}

.legal address {
  font-style: normal;
}

/* Privacy and support pages */

.page {
  padding: 72px 0 96px;
}

.prose {
  max-width: 70ch;
}

.prose h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
}

.prose .meta {
  margin-bottom: 40px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.prose section + section {
  margin-top: 36px;
}

.prose h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 12px;
}

.prose ul {
  margin-bottom: 0;
  padding-left: 1.1em;
}

.prose li + li {
  margin-top: 6px;
}

/* Tablet and up */

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .nav-links {
    display: flex;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .reasons {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 128px 0 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
