/* Brand colors are set in src/_data/site.json and injected as --dark-base, --deep-teal, --primary-accent,
   --warm-neutral, --cool-neutral, --secondary-accent, --white (names match the SEC logo contrast guide). */
:root {
  --ink: var(--deep-teal);
  --muted: #4f5d62;
  --sand-light: color-mix(in srgb, var(--warm-neutral) 32%, #ffffff);
  --gray-light: color-mix(in srgb, var(--cool-neutral) 22%, #ffffff);
  --border: color-mix(in srgb, var(--cool-neutral) 60%, #ffffff);
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 50, 55, 0.08);
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--deep-teal); }
a:hover { color: var(--primary-accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; color: var(--deep-teal); letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--primary-accent); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8em 1.4em;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  text-align: center;
}
.btn-sm { padding: 0.55em 1em; font-size: 0.9rem; }
.btn-primary { background: var(--primary-accent); color: var(--white); }
.btn-primary:hover { background: var(--dark-base); color: var(--white); }
.btn-outline { border-color: var(--primary-accent); color: var(--deep-teal); background: transparent; }
.btn-outline:hover { background: var(--primary-accent); color: var(--white); }
.btn-outline-light { border-color: rgba(255,255,255,0.7); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--deep-teal); }
.btn-light { background: var(--white); color: var(--deep-teal); }
.btn-light:hover { background: var(--warm-neutral); color: var(--deep-teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--dark-base); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
/* Logo clear space = padlock height, about 20% of the mark's height. */
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; padding: 8px 0; }
.brand:hover { color: var(--white); }
.brand-mark { height: 40px; width: auto; flex-shrink: 0; }
.brand-name { font-weight: 600; font-size: 1.05rem; }
.brand-name-short { display: none; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: var(--white); }
.site-nav ul a[aria-current="page"] { color: var(--white); border-bottom-color: var(--warm-neutral); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform 0.2s, opacity 0.2s; }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--dark-base); flex-direction: column; align-items: stretch;
    padding: 8px 20px 20px; gap: 12px; border-top: 1px solid rgba(255,255,255,0.12);
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .site-nav ul a[aria-current="page"] { border-bottom-color: rgba(255,255,255,0.1); color: var(--warm-neutral); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 420px) {
  .brand-name-full { display: none; }
  .brand-name-short { display: inline; }
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 85% 0%, color-mix(in srgb, var(--primary-accent) 55%, transparent), transparent 60%),
    linear-gradient(160deg, var(--dark-base) 0%, color-mix(in srgb, var(--dark-base) 80%, #000) 100%);
  color: var(--white);
  padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 10vw, 128px);
}
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.hero-watermark {
  position: absolute; right: -14%; top: 50%; transform: translateY(-50%);
  height: 125%; width: auto; opacity: 0.12; pointer-events: none;
}
@media (max-width: 860px) { .hero-watermark { display: none; } }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lead { color: rgba(255,255,255,0.88); max-width: 62ch; margin-bottom: 2em; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--secondary-accent); margin-bottom: 0.9em; }
.eyebrow-light { color: var(--warm-neutral); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.55; }
.body-lg { font-size: 1.075rem; }

.page-hero { background: var(--sand-light); padding: clamp(48px, 7vw, 88px) 0; border-bottom: 1px solid var(--border); }
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { max-width: 65ch; color: var(--muted); margin: 0; }

/* Stats */
.stats-section { background: var(--white); margin-top: -56px; padding-bottom: 24px; position: relative; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-tile {
  margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 20px; display: flex; flex-direction: column; gap: 8px;
}
.stat-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--secondary-accent); }
.stat-number { font-size: 2.6rem; font-weight: 800; color: var(--deep-teal); line-height: 1; letter-spacing: -0.03em; }
.stat-text { margin: 0; font-size: 0.9rem; color: var(--ink); flex: 1; }
.stat-source { font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--gray-light); padding-top: 8px; }
.stats-meta { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 18px 0 0; }
@media (max-width: 960px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-sand { background: var(--sand-light); }
.section-dark { background: var(--dark-base); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .lead { color: rgba(255,255,255,0.88); }
.section-title { margin-bottom: 0.4em; }
.section-intro { color: var(--muted); font-size: 1.075rem; max-width: 65ch; margin-bottom: 2em; }
.subsection-title { margin-top: 48px; }

.card-grid { display: grid; gap: 20px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .card-grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.step-card { border-top: 4px solid var(--primary-accent); }
.step-number { display: block; font-weight: 800; color: var(--secondary-accent); font-size: 0.9rem; letter-spacing: 0.08em; margin-bottom: 8px; }
.tag, .badge {
  display: inline-block; background: var(--secondary-accent); color: var(--white); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 999px; vertical-align: middle;
}

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.callout { background: var(--white); border-left: 4px solid var(--secondary-accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 28px; box-shadow: var(--shadow); }
.section-sand .callout { background: var(--white); }
.callout p { margin-bottom: 0.8em; }

/* Lists */
.check-list { list-style: none; padding: 0; margin: 0 0 1.5em; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--primary-accent); border-bottom: 2.5px solid var(--primary-accent); transform: rotate(-45deg);
}
.check-list-lg li { font-size: 1.075rem; margin-bottom: 14px; }
.check-list-light li::before { border-color: var(--warm-neutral); }
.check-list-light li { font-size: 1.1rem; font-weight: 600; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 500; font-size: 0.95rem; }
.section-sand .pill-list li { background: var(--white); }

/* Credentials */
.credentials-section { background: var(--gray-light); }
.credentials-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.credential { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); }
.credential strong { display: block; color: var(--deep-teal); font-size: 0.98rem; }
.credential span { font-size: 0.85rem; color: var(--muted); }
.credential-partner { background: var(--dark-base); border-color: var(--dark-base); }
.credential-partner a { text-decoration: none; display: block; }
.credential-partner strong { color: var(--white); }
.credential-partner span { color: var(--warm-neutral); }
@media (max-width: 960px) { .credentials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .credentials-grid { grid-template-columns: 1fr; } }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column;
}
.price-card .btn { margin-top: auto; }
.price-card-featured { border: 2px solid var(--primary-accent); box-shadow: var(--shadow); }
.price-card .badge { position: absolute; top: -12px; left: 28px; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--deep-teal); margin-bottom: 0.3em; letter-spacing: -0.02em; }
.price-summary { color: var(--muted); }
.fine-print { font-size: 0.875rem; color: var(--muted); margin-top: 20px; }

/* Process */
.process { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: none; }
@media (max-width: 860px) { .process { grid-template-columns: 1fr; } }
.process-num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--dark-base); color: var(--white); font-weight: 700; margin-bottom: 14px;
}
.process-step p { color: var(--muted); }

/* Governance flow */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.flow-step { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.flow-step p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.flow-step-core { background: var(--dark-base); border-color: var(--dark-base); }
.flow-step-core h3 { color: var(--white); }
.flow-step-core p { color: rgba(255,255,255,0.85); }
.flow-step:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -28px; top: 50%; transform: translateY(-50%);
  color: var(--primary-accent); font-size: 1.5rem; font-weight: 700;
}
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 32px; }
  .flow-step:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -30px; transform: translateX(-50%); }
}
.traits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.traits li { background: var(--white); border-top: 3px solid var(--secondary-accent); border-radius: 8px; padding: 16px; }
.traits strong { display: block; color: var(--deep-teal); }
.traits span { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 900px) { .traits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .traits { grid-template-columns: 1fr; } }

.partner-line { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--deep-teal); margin: 4px 0 20px; }
.partner-line img { height: 40px; width: auto; flex-shrink: 0; }

/* 404 */
.not-found { text-align: center; padding: clamp(72px, 12vw, 140px) 0; }
.not-found-mark { height: 80px; width: auto; margin: 0 auto 28px; }
.not-found p { color: var(--muted); font-size: 1.075rem; margin-bottom: 1.6em; }

/* About */
.founder { display: grid; grid-template-columns: 160px 1fr; gap: 40px; align-items: start; }
.founder-badge {
  width: 160px; height: 160px; border-radius: 50%; background: var(--dark-base); color: var(--warm-neutral);
  display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; letter-spacing: 0.02em;
}
.founder-name { font-weight: 700; font-size: 1.15rem; }
.founder-name span { font-weight: 500; color: var(--muted); }
.founder .pill-list { margin-top: 8px; }
@media (max-width: 700px) {
  .founder { grid-template-columns: 1fr; gap: 24px; }
  .founder-badge { width: 96px; height: 96px; font-size: 1.8rem; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact-email { color: var(--muted); }
.contact-form {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.925rem; color: var(--deep-teal); }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--white); width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-accent) 25%, transparent); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { align-self: flex-start; }
.contact-form .fine-print { margin: 0; }

/* Sources */
.source-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.source-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.source-number { font-size: 2rem; font-weight: 800; color: var(--deep-teal); margin-bottom: 8px; line-height: 1; }
.source-number span { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--secondary-accent); margin-left: 8px; vertical-align: middle; }
.source-item blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--warm-neutral); font-size: 1.05rem; }
.source-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin: 0; font-size: 0.9rem; }
.source-meta div { display: flex; flex-direction: column; }
.source-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.source-meta dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .source-meta { grid-template-columns: 1fr; } }
.source-notes { margin-top: 32px; color: var(--muted); }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--primary-accent), var(--dark-base)); color: var(--white); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-bottom: 0.3em; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.9); max-width: 60ch; }

/* Footer */
.site-footer { background: var(--dark-base); color: rgba(255,255,255,0.85); padding: 48px 0 24px; border-top: 4px solid var(--secondary-accent); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-mark { display: block; height: 48px; width: auto; margin: 0 0 14px; }
.footer-brand strong { color: var(--white); font-size: 1.15rem; }
.footer-brand p { margin: 6px 0 0; color: var(--warm-neutral); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 32px; padding-top: 18px; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
