/* Site styles. Values come from tokens.css (the design system). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--text-body-md);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 6px; }
::selection { background: var(--bsa-green); color: var(--bsa-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.band-ink { background: var(--surface-inverse); color: var(--text-inverse); }

.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Type helpers */
.eyebrow {
  font-family: var(--font-mono); font-weight: var(--weight-mono);
  font-size: 12px; letter-spacing: var(--tracking-label-tight); text-transform: uppercase;
  color: var(--text-muted);
}
.band-ink .eyebrow { color: var(--bsa-green); }
.display { font-size: clamp(52px, 8vw, 88px); letter-spacing: var(--tracking-display); line-height: var(--leading-display); }
.h2 { font-size: clamp(36px, 5vw, 48px); line-height: 1.05; }
.lede { font-size: 19px; color: var(--text-muted); max-width: 520px; }
.band-ink .lede, .band-ink p { color: var(--text-inverse-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font-family: var(--font-sans); font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  background: var(--action-primary); color: var(--text-inverse);
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.btn:hover { background: var(--action-primary-hover); }
.btn:active { transform: scale(0.97); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 17px; }
.btn-accent { background: var(--action-accent); color: var(--text-on-accent); }
.btn-accent:hover { background: var(--action-accent-hover); }
.btn-secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
.btn-secondary:hover { background: var(--surface-sunken); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 243, 238, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container { height: 72px; display: flex; align-items: center; gap: 32px; }
.logo-link { display: flex; flex: none; border-radius: 8px; }
.logo-link img { height: 72px; width: auto; max-width: none; margin-left: -24px; }
.nav { display: flex; gap: 28px; flex: 1; }
.nav a { font-weight: 600; font-size: 15px; color: var(--text-subtle); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-strong); }
.menu-toggle { display: none; }

@media (max-width: 719px) {
  .site-header .container { gap: 12px; }
  .logo-link img { height: 60px; margin-left: -20px; }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border-default);
    background: var(--surface-card); color: var(--text-strong); font-size: 20px; cursor: pointer;
  }
  .menu-toggle .icon-close { display: none; }
  .menu-open .menu-toggle .icon-open { display: none; }
  .menu-open .menu-toggle .icon-close { display: block; }
  .menu-open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--surface-page); border-bottom: 1px solid var(--border-default);
    padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow-md);
  }
  .menu-open .nav a { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
  .menu-open .nav a:last-child { border-bottom: 0; }
}

/* Email signup */
.signup { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 520px; }
.signup form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.field {
  flex: 1 1 220px; display: flex; align-items: center; height: 44px; padding: 0 14px;
  background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast);
}
.field:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-focus); }
.field.has-error { border-color: var(--status-critical); }
.field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--text-body); box-shadow: none;
}
.signup .btn { height: 44px; }
.signup-error { font-size: 14px; color: var(--text-critical); }
.signup-done { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.signup-done .icon { color: var(--bsa-green-700); font-size: 20px; }
.signup-note {
  font-family: var(--font-mono); font-weight: var(--weight-mono); font-size: 11px;
  letter-spacing: var(--tracking-label-tight); text-transform: uppercase; color: var(--text-muted);
}
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* Home hero */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 56px; align-items: center; padding-top: var(--space-24); padding-bottom: 88px;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 460px; width: 100%; justify-self: end; }
.tile {
  aspect-ratio: 1; border-radius: var(--radius-tile); background: var(--surface-inverse);
  padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
}
.tile-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--tracking-label-tight); text-transform: uppercase; color: var(--text-inverse-muted); }
.tile-title { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; line-height: 1.15; color: var(--text-inverse); }
.tile-accent { background: var(--surface-accent); justify-content: space-between; }
.tile-accent .icon { align-self: flex-end; font-size: 44px; color: var(--bsa-ink); }
.tile-accent .tile-title { color: var(--bsa-ink); }

@media (max-width: 719px) {
  .hero { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
  .tiles { justify-self: stretch; max-width: none; gap: 12px; }
  .tile { padding: 18px; }
  .tile-title { font-size: 17px; }
  .tile-accent .icon { font-size: 32px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
}

/* Why better */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 56px; }
.why-head { display: flex; flex-direction: column; gap: 12px; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.point { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--border-strong); }
.point h3 { font-size: 20px; letter-spacing: -0.02em; }
.point p { font-size: 15px; color: var(--text-muted); }

/* Green CTA band */
.cta-band {
  background: var(--surface-accent); color: var(--bsa-ink); border-radius: 32px; padding: 56px 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px; align-items: center;
}
.cta-band p { font-size: 17px; }
.cta-band .signup-note { color: var(--bsa-ink); }
@media (max-width: 719px) { .cta-band { padding: 36px 24px; border-radius: 24px; } }

/* About */
.about-hero { display: flex; flex-direction: column; gap: 24px; padding-top: var(--space-24); padding-bottom: 72px; }
.about-hero .lede { font-size: 20px; max-width: 640px; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: var(--space-24); }
.card {
  background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card h3 { font-size: 22px; }
.card p { font-size: 15px; color: var(--text-muted); }
.card-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-subtle); }
.card-ink { background: var(--surface-inverse); border-color: var(--surface-inverse); color: var(--text-inverse); }
.card-ink p { color: var(--text-inverse-muted); }
.card-ink .card-num { color: var(--bsa-green); }
.mark-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 56px; align-items: center; }
.mark-section img { width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.mark-copy { display: flex; flex-direction: column; gap: 20px; }
.mark-copy h2 { font-size: clamp(34px, 4.5vw, 44px); line-height: 1.05; }
.mark-copy p { font-size: 17px; max-width: 460px; }
.closing { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.closing h2 { font-size: clamp(30px, 4vw, 40px); }
@media (max-width: 719px) {
  .about-hero { padding-top: 56px; padding-bottom: 48px; }
  .principles { padding-bottom: 64px; }
}

/* Footer */
.site-footer { background: var(--surface-inverse); color: var(--text-inverse); }
.footer-main { padding-top: 64px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 32px 48px; }
.footer-brand { flex: 2 1 300px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand img { height: 64px; width: auto; max-width: none; align-self: flex-start; margin-left: -12px; }
.footer-brand p { color: var(--text-inverse-muted); max-width: 300px; font-size: 15px; }
.footer-col { flex: 1 1 140px; display: flex; flex-direction: column; gap: 10px; }
.footer-col .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--tracking-label-tight); text-transform: uppercase; color: var(--bsa-slate-400); }
.footer-col a { color: var(--text-inverse); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--bsa-green); }
.footer-base {
  padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--border-inverse);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--bsa-slate-400);
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Small helpers (kept out of HTML so the security policy can block inline styles) */
.section-flush-top { padding-top: 0; }
.cta-copy { display: flex; flex-direction: column; gap: 12px; }
.cta-band .signup-done .icon { color: var(--bsa-ink); }
.about-title { max-width: 900px; }
.signup-legal { font-size: 13px; color: var(--text-subtle); }
.signup-legal a, .prose a { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--bsa-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.signup-legal a:hover, .prose a:hover { text-decoration-color: var(--text-strong); }
.cta-band .signup-legal { color: var(--bsa-ink); }
.cta-band .signup-legal a { text-decoration-color: var(--bsa-ink); }

/* Privacy policy */
.prose { max-width: 720px; padding-top: 72px; padding-bottom: var(--space-24); display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: var(--tracking-display); line-height: 1; margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin-top: 24px; }
.prose p, .prose li { font-size: 17px; color: var(--text-muted); }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--text-strong); }
