:root {
  --green: #1f4d2b;
  --green-dark: #163a20;
  --green-soft: #e4ece0;
  --ivory: #fffcf2;
  --ivory-deep: #f6f1e1;
  --ink: #1d2a20;
  --muted: #56645a;
  --radius: 14px;
  --header-h: 112px;
  --wave-h: clamp(44px, 7.5vw, 100px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--green);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

/* ---------- Sticky header + centred tabs ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--green);
  padding: 14px 16px 0;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.brand {
  display: inline-block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ivory);
  text-decoration: none;
  margin-bottom: 10px;
}

.tabs {
  position: relative;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
/* Auto margins centre the tabs when they fit, yet still scroll fully when they overflow */
.tab:first-child { margin-left: auto; }
.tab:last-child { margin-right: auto; }

.tab {
  flex: 0 0 auto;
  padding: 10px 16px 12px;
  color: rgba(255, 252, 242, 0.75);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ivory); }
.tab.active {
  color: var(--ivory);
  border-bottom-color: var(--ivory);
}
.tab:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: -2px;
  border-radius: 6px;
}

/* ---------- Sections ---------- */
.container {
  max-width: 1040px;
  margin: 0 auto;
}
.container.narrow {
  max-width: 640px;
  text-align: center;
}

.section {
  padding: 88px 16px;
}
.section.alt { background: var(--ivory-deep); }

/* Dark green section */
.section.dark {
  background: var(--green);
  color: rgba(255, 252, 242, 0.88);
}
.section.dark h2 { color: var(--ivory); }

/* Soft wave edges: the section's own colour spills over its neighbours as a wave */
.wavy {
  position: relative;
  z-index: 1;
}
.wavy::before,
.wavy::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--wave-h);
  background: inherit;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 36C140 76 300 80 460 52S760 2 960 14 1300 76 1440 30V80H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 36C140 76 300 80 460 52S760 2 960 14 1300 76 1440 30V80H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
/* Overlap by 1px so no hairline gap shows between the wave and the section */
.wavy::before { bottom: calc(100% - 1px); }
.wavy::after {
  top: calc(100% - 1px);
  transform: scale(-1, -1); /* flipped, so the bottom wave isn't a mirror of the top */
}
.wavy + .section { padding-top: calc(88px + var(--wave-h) / 2); }
.section h2 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  text-align: center;
}

/* Hero */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 16px;
  background:
    radial-gradient(ellipse at top, var(--green-soft), transparent 65%),
    var(--ivory);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.8em;
}
.hero h1 {
  font-size: clamp(2.6rem, 10vw, 5rem);
}
.lead {
  max-width: 34ch;
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2em;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--green);
  color: var(--ivory);
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--green-soft); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.card {
  background: var(--ivory);
  border: 1px solid rgba(31, 77, 43, 0.12);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.card-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); margin: 0; }

/* Email capture */
.signup {
  display: flex;
  gap: 10px;
  margin: 28px auto 0;
  max-width: 480px;
}
.signup input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid rgba(31, 77, 43, 0.3);
  border-radius: 999px;
}
.signup input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.form-status {
  min-height: 1.6em;
  margin-top: 14px;
  font-weight: 500;
}
.form-status.success { color: var(--green); }
.form-status.error { color: #a1321f; }

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

/* Footer */
.site-footer {
  background: var(--green);
  color: rgba(255, 252, 242, 0.8);
  text-align: center;
  padding: 24px 16px;
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  :root { --header-h: 100px; }
  .brand { font-size: 1.15rem; margin-bottom: 6px; }
  .tabs { gap: 0; }
  .tab { padding: 8px 9px 10px; font-size: 0.875rem; }
  .section { padding: 64px 16px; }
  .signup { flex-direction: column; }
  .signup .btn { width: 100%; }
}

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