:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-alt: #f3f3f1;
  --mint: #eaf6ef;
  --mint-strong: #d6eee1;
  --text: #11181c;
  --muted: #55606a;
  --border: rgba(17, 24, 28, .08);
  --accent: #0f4d44;
  --accent-hover: #0a3832;
  --accent-soft: #e2f4ea;
  --on-accent: #ffffff;
  --pill: #ececea;
  --notice: #f3faf6;
  --notice-border: #cfe8da;
  --shadow-sm: 0 1px 2px rgba(17, 24, 28, .04), 0 4px 14px rgba(17, 24, 28, .04);
  --shadow-md: 0 2px 4px rgba(17, 24, 28, .04), 0 12px 32px rgba(17, 24, 28, .07);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  --bg: #121614;
  --surface: #1a1f1d;
  --surface-alt: #161a18;
  --mint: #17211c;
  --mint-strong: #203029;
  --text: #eef2f0;
  --muted: #a5b0aa;
  --border: rgba(255, 255, 255, .09);
  --accent: #6fd1a6;
  --accent-hover: #93e0be;
  --accent-soft: #1f3128;
  --on-accent: #0d1a14;
  --pill: #232927;
  --notice: #19251f;
  --notice-border: #2c4538;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .35);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--on-accent);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  z-index: 100;
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
/* Floating pill header: zero-height sticky wrapper so the hero image sits behind it */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 0;
}
.site-header > .container { max-width: 1280px; padding: 0 1rem; }
.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 16px;
  min-height: 72px;
  padding: 0 1rem 0 1.5rem;
  background: var(--pill);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.site-nav { justify-self: start; }
.header-actions { justify-self: end; }
.btn-header { padding: .8rem 1.6rem; box-shadow: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #3fbf8b, var(--accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 122, 82, .25);
}
.brand-mark svg { width: 18px; height: 18px; }

.nav-list {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: block;
  padding: .55rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .97rem;
  font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-list a { color: var(--accent); }
:root[data-theme="dark"] .nav-list a { color: var(--text); }
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--accent); background: rgba(15, 77, 68, .09); }
:root[data-theme="dark"] .nav-list a:hover,
:root[data-theme="dark"] .nav-list a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .08); }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { background: var(--mint); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.js .theme-toggle { display: inline-flex; }
.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100vh, 860px);
  padding: 11rem 0 6rem;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(24, 34, 30, .55) 0%, rgba(24, 34, 30, .15) 60%, rgba(24, 34, 30, 0) 100%),
    #3b4a45 url("../images/hero.svg") center / cover no-repeat;
}
.hero-inner { position: relative; }
.hero-badge {
  position: absolute;
  right: 1.5rem;
  top: -2.5rem;
  width: 150px;
  height: 150px;
  color: rgba(255, 255, 255, .85);
  animation: badge-spin 40s linear infinite;
}
.hero-badge text { text-transform: uppercase; }
.hero-badge g { transform-origin: 100px 100px; }
@keyframes badge-spin { to { transform: rotate(360deg); } }
.eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: .4rem .95rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}
h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 0 0 1.5rem;
}
.lead {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.5;
  color: var(--text);
  opacity: .78;
  max-width: 40rem;
  margin: 0 0 1.5rem;
}
.hero h1 { color: #fff; }
.hero p { max-width: 40rem; color: rgba(255, 255, 255, .88); }
.hero .lead { color: #fff; opacity: 1; }
.hero .btn { background: #fff; border-color: #fff; color: #0f4d44; box-shadow: none; }
.hero .btn:hover { background: #e9f4ee; border-color: #e9f4ee; color: #0a3832; }
.hero .btn-secondary { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.5rem; }

.btn {
  display: inline-block;
  padding: .9rem 1.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(15, 122, 82, .22);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 122, 82, .28);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--surface); color: var(--text); border-color: var(--accent); box-shadow: var(--shadow-md); }

/* Sections */
section { padding: 7rem 0; }

main > section:nth-of-type(odd) { background: var(--surface); }
main > section:nth-of-type(even) { background: var(--surface-alt); }
main > section:nth-of-type(4) { background: var(--mint); }
main > section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 800;
  margin: 0 0 1.1rem;
}
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.015em; font-weight: 700; margin: 0 0 .6rem; }
.section-intro { font-size: 1.15rem; color: var(--muted); max-width: 40rem; margin: 0 0 3.25rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card p { margin: 0; color: var(--muted); font-size: 1.02rem; }

main > section:nth-of-type(odd) .card { background: var(--bg); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 2rem 5.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.steps li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.75rem;
  top: 1.9rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}
.steps p { margin: 0; color: var(--muted); font-size: 1.02rem; }

.notice {
  background: var(--surface);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.75rem;
  margin: 2rem 0 0;
  box-shadow: var(--shadow-sm);
}
.notice p { margin: 0; }
.notice p + p { margin-top: .75rem; }
.quote-block {
  margin: 0 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
  line-height: 1.6;
  letter-spacing: -.01em;
}
.quote-block p { margin: 0; }

.link-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.link-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--text); }
.link-card strong { display: block; color: var(--text); font-size: 1.4rem; letter-spacing: -.02em; margin-bottom: .5rem; }
.link-card strong::after { content: " \2192"; color: var(--accent); }
.link-card span { color: var(--muted); font-size: 1.02rem; }

.contact-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.contact-list li { padding: .5rem 0; font-size: 1.15rem; }
.contact-list .label { display: inline-block; min-width: 6.5rem; color: var(--muted); }

/* Policy pages */
.doc {
  padding: 10rem 0 7rem;
  background:
    radial-gradient(800px 300px at 90% -5%, var(--mint-strong), transparent 70%),
    linear-gradient(180deg, var(--mint) 0, var(--bg) 380px);
}
.doc-wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: .75rem; }
.doc .updated { color: var(--muted); font-size: .98rem; margin: 0 0 2.75rem; }
.doc section { padding: 0; margin-top: 3rem; border: 0; background: none; }
.doc h2 { font-size: 1.6rem; letter-spacing: -.02em; margin-bottom: .75rem; }
.doc p, .doc li { max-width: 46rem; color: var(--text); }
.doc p { opacity: .86; }
.doc ul { padding-left: 1.4rem; }
.doc li { margin-bottom: .55rem; opacity: .86; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.toc h2 { font-size: 1.05rem; letter-spacing: 0; margin: 0 0 .75rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2.5rem; font-size: .98rem; }
.toc li { margin-bottom: .3rem; break-inside: avoid; opacity: 1; }

/* Footer */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 4.5rem 0 2.5rem;
  font-size: .98rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
.site-footer h2 { font-size: 1.05rem; letter-spacing: -.01em; font-weight: 700; margin-bottom: .85rem; }
.site-footer p { margin: 0 0 .45rem; color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }

/* Subtle reveal (only active when JS adds .js to <html>) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .toc ol { columns: 1; }
  section { padding: 5.5rem 0; }
}

@media (max-width: 680px) {
  body { font-size: 1rem; }
  .hero { padding: 5rem 0 4.5rem; }
  section { padding: 4.5rem 0; }
  .section-intro { margin-bottom: 2.25rem; }
  .card, .link-card { padding: 1.75rem; }
  .steps li { padding: 1.75rem 1.5rem 1.75rem 4.75rem; }
  .steps li::before { left: 1.25rem; top: 1.7rem; }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }

  .hero { min-height: 0; padding: 9rem 0 4.5rem; background-position: 70% center; }
  .hero-badge { display: none; }
  .doc { padding-top: 8rem; }
}

/* Collapsed header: tablet and below */
@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; gap: .5rem; padding: 0 .75rem 0 1.25rem; border-radius: 32px; }
  .brand { order: 1; }
  .header-actions { order: 2; }
  /* Without JS the nav simply wraps below the brand */
  .site-nav { order: 3; grid-column: 1 / -1; justify-self: stretch; }
  .btn-header { display: none; }
  .hero-badge { width: 120px; height: 120px; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: .75rem .75rem 1rem;
  }
  .js .site-nav.open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; }
  .js .nav-list a { padding: .85rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .link-card, .steps li, .btn, .icon-btn { transition: none; }
  .hero-badge { animation: none; }
  .card:hover, .link-card:hover, .steps li:hover, .btn:hover, .icon-btn:hover { transform: none; }
}
