:root {
  --brand-red: #c8202e;
  --brand-red-dark: #9c1622;
  --brand-maroon: #2b0507;
  --brand-maroon-800: #1a0304;
  --brand-gold: #d4a520;
  --brand-gold-light: #e8c25a;
  --text-dark: #16202e;
  --text-muted: #5b6779;
  --surface: #ffffff;
  --surface-alt: #f5f6f8;
  --border: #e6e8ec;
  --max-width: 1120px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text-dark);
  background: var(--surface);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.brand-name {
  margin-left: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--brand-red) 0%, var(--brand-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--brand-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand-maroon);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dark);
}

.btn-ghost:hover {
  border-color: var(--brand-maroon);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

/* Hero */

.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(200, 32, 46, 0.18), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(212, 165, 32, 0.14), transparent 45%),
    var(--brand-maroon);
  color: #fff;
  padding: 100px 0 90px;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-gold);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.hero-lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 36px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.hero .btn-ghost:hover {
  border-color: #fff;
}

/* Sections */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* How it works */

.layer-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.layer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: left;
  background: var(--surface);
}

.layer-index {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-red);
  margin-bottom: 10px;
}

.layer-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.layer-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--brand-maroon);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA band */

.cta-band {
  background: var(--brand-maroon-800);
  color: #fff;
  padding: 72px 0;
}

.cta-band-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Footer */

.site-footer {
  background: var(--brand-maroon);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0;
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  height: 56px;
  margin: 0 auto 16px;
}

.footer-tagline {
  margin: 0 0 20px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

/* Social links. Keep in sync with the sameAs array in the Organization JSON-LD
   on the homepage and with its Tailwind-styled equivalent in /index.html. */
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Full 44px touch target — these are standalone links, not inline in a sentence. */
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-copyright {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  /* Room for the padded inline links below without lines colliding */
  line-height: 2.2;
}

.footer-copyright a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  /* Pad the inline legal links out to a usable touch area; they sit inside a
     sentence, so full 44px would break the line flow. */
  display: inline-block;
  padding: 8px 4px;
}

.footer-copyright a:hover {
  color: #fff;
}

/* Legal pages */

.legal-hero {
  background: var(--brand-maroon);
  color: #fff;
  padding: 64px 0 48px;
}

.legal-hero .eyebrow {
  margin-bottom: 14px;
}

.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.legal-updated {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.legal-content {
  padding: 64px 0 96px;
}

.legal-body {
  max-width: 760px;
  margin: 0 auto;
}

.legal-body h2 {
  font-size: 1.35rem;
  color: var(--brand-maroon);
  margin: 40px 0 14px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  font-size: 1.05rem;
  color: var(--brand-maroon);
  margin: 24px 0 10px;
}

.legal-body p {
  margin: 0 0 16px;
  color: var(--text-dark);
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-dark);
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body a {
  color: var(--brand-red);
  text-decoration: underline;
}

.legal-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.legal-note p:last-child {
  margin-bottom: 0;
}

/* Responsive */

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .layer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 24px 16px;
    gap: 4px;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
  }

  .site-nav.open {
    transform: translateY(0);
  }

  /* Full-width 44px rows so menu entries are comfortable touch targets */
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .btn-primary {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 560px) {
  .feature-grid,
  .layer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 72px 0 64px;
  }

  .section {
    padding: 64px 0;
  }
}
