/* ========================================================
   Shared skeleton — nav, newsletter, buttons, typography.
   Each section folder overrides the palette variables in
   its own styles.css, so sections look genuinely different
   while sharing this structure.
   ======================================================== */

:root {
  --bg: #ffffff;
  --surface: #f6f5f2;
  --ink: #1b1f24;
  --muted: #5d666f;
  --border: #e2ded6;
  --accent: #1b1f24;
  --accent-ink: #ffffff;
  --radius: 10px;
  --max-width: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 16px; }

/* ---------- Top bar (section pages) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar-home {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-links {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}
.topbar-links a {
  color: var(--muted);
  text-decoration: none;
}
.topbar-links a:hover { color: var(--ink); }
.topbar-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }

@media (max-width: 540px) {
  .topbar-inner { flex-wrap: wrap; gap: 6px 14px; padding: 10px 18px; }
  .topbar-home { font-size: 0.82rem; }
  .topbar-links { gap: 14px; font-size: 0.8rem; }
}

/* ---------- Section hero ---------- */
.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 22px;
  background-size: cover;
  background-position: center;
  color: #fff;
  isolation: isolate;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay, linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.6)));
  z-index: -1;
}
.page-hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.page-hero .standfirst {
  max-width: 34ch;
  margin: 0 auto;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
}

/* ---------- Content ---------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.lede { font-size: 1.15rem; color: var(--ink); }
.muted { color: var(--muted); }

.note {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: var(--accent-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 52px 0;
  text-align: center;
}
.newsletter h2 { margin-bottom: 8px; }
.newsletter p { color: var(--muted); max-width: 46ch; margin: 0 auto 22px; }
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}
.newsletter-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-message {
  margin: 14px auto 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 44ch;
  min-height: 1.2em;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* Honeypot field: invisible to people, filled in by bots. Not display:none,
   because some bots skip hidden inputs. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  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 {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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