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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--line-height);
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: var(--h1-size); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

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

/* Header */
.site-header .wrap {
  display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px;
}
.wordmark {
  font-family: var(--font-heading); font-weight: 600; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.wordmark svg { width: 20px; height: 20px; }
.pill {
  font-size: 0.8rem; line-height: 1; padding: 6px 10px; border-radius: var(--radius-pill);
  background: var(--tint); color: var(--ink); white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-cta { margin-left: auto; white-space: nowrap; }
@media (max-width: 479px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pill { font-size: 0.75rem; padding: 4px 8px; }
}

/* Buttons and inputs */
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  padding: 14px 22px; border-radius: var(--radius-pill); border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--accent-ink); }
.btn[disabled] { opacity: 0.7; cursor: wait; }
.btn-small { padding: 9px 14px; font-size: 0.9rem; }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--tint); color: var(--ink); border-color: var(--accent); }

.signup { max-width: 520px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup input[type="email"] {
  flex: 1 1 200px; min-width: 0; font: inherit; color: var(--ink); background: #fff;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius);
}
.signup input[type="email"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint); }
.signup .btn { flex: 0 0 auto; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.microcopy { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.form-error { color: #9B2C2C; font-size: 0.95rem; margin: 8px 0 0; min-height: 0; }
.form-error:empty { display: none; }
.turnstile-slot:empty { display: none; }
.turnstile-slot { margin-top: 8px; }

/* Hero */
.hero { padding: 12px 0 40px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.hero h1 { margin-bottom: 0.4em; }
.hero-sub { margin-bottom: 16px; }
.motif { width: 100%; max-width: 280px; height: auto; justify-self: center; }
@media (min-width: 820px) {
  .hero { padding: 48px 0 72px; }
  .hero .wrap { grid-template-columns: 1.5fr 1fr; gap: 48px; }
  .motif { max-width: 340px; }
}

/* Sections */
section { padding: 48px 0; }
.band { background: var(--tint); }
.narrow { max-width: 720px; }
.familiar-list, .steps { padding: 0; margin: 0 0 1.25em; list-style: none; }
.familiar-list li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.steps { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 18px 64px; position: relative; box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-heading);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin: 0; }
.pending { color: var(--muted); font-size: 0.9rem; }

.faq dt { font-weight: 700; margin-top: 1.1em; }
.faq dd { margin: 0.2em 0 0; }

.final { text-align: left; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.95rem; color: var(--muted); }
.site-footer p { margin: 0 0 0.4em; }
.site-footer a { color: var(--ink); }

/* Simple pages */
.page { padding: 32px 0 56px; }
.page h2 { font-size: 1.3rem; margin-top: 1.4em; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin: 24px 0;
}

/* Switched-off sections (rendered only when their flag is on) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 16px; }
.chips legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-block; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; cursor: pointer;
}
.chip input:checked + span { border-color: var(--accent); background: var(--tint); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius);
}
