@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;1,6..12,400&display=swap');

:root {
  --bg-dark: #6D28D9;
  --text-on-dark: #FAFAF9;
  --bg-light: #FAFAF9;
  --text-on-light: #78716C;
  --bg-accent: #FDE68A;
  --text-on-accent: #6D28D9;
  --bg-soft: #F5F3FF;
  --text-on-soft: #6D28D9;
  --font-head: 'Instrument Serif', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --radius: 4px;
  --shadow: 0 4px 24px rgba(109, 40, 217, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin-top: 0; font-weight: 400; }
a { color: currentColor; }
ul { padding-left: 1.25rem; }

.surface-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.surface-light { background: var(--bg-light); color: var(--text-on-light); }
.surface-accent { background: var(--bg-accent); color: var(--text-on-accent); }
.surface-soft { background: var(--bg-soft); color: var(--text-on-soft); }

.surface-dark a, .surface-light a, .surface-accent a, .surface-soft a {
  color: currentColor;
  text-decoration: underline;
}

.surface-dark *:not([class*="surface-"]):not(.btn):not(.brand-mark),
.surface-light *:not([class*="surface-"]):not(.btn):not(.brand-mark),
.surface-accent *:not([class*="surface-"]):not(.btn):not(.brand-mark),
.surface-soft *:not([class*="surface-"]):not(.btn):not(.brand-mark) {
  color: inherit;
}

.surface-dark .surface-light,
.surface-light .surface-light,
.surface-accent .surface-light,
.surface-soft .surface-light {
  background: var(--bg-light);
  color: var(--text-on-light);
}

.surface-dark .surface-dark,
.surface-light .surface-dark,
.surface-accent .surface-dark,
.surface-soft .surface-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.surface-dark .surface-accent,
.surface-light .surface-accent,
.surface-accent .surface-accent,
.surface-soft .surface-accent {
  background: var(--bg-accent);
  color: var(--text-on-accent);
}

.surface-dark .surface-soft,
.surface-light .surface-soft,
.surface-accent .surface-soft,
.surface-soft .surface-soft {
  background: var(--bg-soft);
  color: var(--text-on-soft);
}

.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }
.section-pad { padding: 4.5rem 0; }
.label-caps {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.waypoint-label {
  display: inline-block;
  border: 1px solid currentColor;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--bg-light);
  color: var(--text-on-light);
  border-bottom: 1px solid rgba(120, 113, 108, 0.15);
  box-shadow: var(--shadow);
}
.site-header.is-scrolled .brand-mark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.15rem;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--bg-accent);
  color: var(--text-on-accent);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-body);
  border-radius: 2px;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { opacity: 0.75; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  border-radius: var(--radius);
  font: inherit;
}

body:not(.has-hero) .site-header {
  position: sticky;
  background: var(--bg-light);
  color: var(--text-on-light);
  border-bottom: 1px solid rgba(120, 113, 108, 0.15);
}
body:not(.has-hero) .site-header .brand-mark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.5rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.2s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary {
  background: var(--bg-accent);
  color: var(--text-on-accent);
}
.btn-primary.surface-accent {
  background: var(--bg-accent);
  color: var(--text-on-accent);
}
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

/* Hero Pattern C — Asymmetric Magazine */
.hero-magazine {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 3.5rem 1fr minmax(300px, 44%);
  align-items: stretch;
  padding-top: 4.5rem;
}
.hero-magazine .hero-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(120, 113, 108, 0.2);
  padding: 2rem 0;
}
.hero-magazine .hero-spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.hero-magazine .hero-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.25rem, 3vw, 3rem);
  margin-top: 2.5rem;
}
.hero-magazine .hero-photo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem 2rem 0;
}
.hero-magazine .hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(120, 113, 108, 0.15);
}
.hero-magazine h1 {
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  max-width: 20ch;
  margin-bottom: 1rem;
}
.hero-magazine .hero-sub {
  font-size: 1.125rem;
  max-width: 44ch;
  opacity: 0.92;
}
.hero-magazine .hero-caption {
  font-size: 0.8rem;
  margin-top: 0.65rem;
  opacity: 0.75;
  font-style: italic;
}
.hero-magazine .trust-strip {
  margin-top: 2rem;
  font-size: 0.82rem;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

/* Waypoint timeline badges */
.waypoint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.waypoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(109, 40, 217, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(245, 243, 255, 0.6);
}
.waypoint-badge .badge-num {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--bg-dark);
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2.25rem;
  display: block;
}
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* Cards */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.pillar-card {
  border: 1px solid rgba(109, 40, 217, 0.22);
  padding: 1.75rem;
}
.pillar-card.surface-light {
  background: var(--bg-light);
  color: var(--text-on-light);
}
.pillar-card h3 { font-size: 1.15rem; margin-bottom: 0.65rem; }

.path-card {
  border: 1px solid rgba(109, 40, 217, 0.28);
  padding: 1.5rem;
  position: relative;
  color: var(--text-on-light);
  background-color: var(--bg-light);
  background-image:
    linear-gradient(rgba(109, 40, 217, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.program-grid { display: grid; gap: 2rem; }
.program-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
  border-bottom: 1px solid rgba(120, 113, 108, 0.15);
  padding-bottom: 2rem;
}
.program-item:has(> img) {
  grid-template-columns: min(280px, 38%) 1fr;
}
.program-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.program-meta {
  font-size: 0.88rem;
  opacity: 0.85;
  margin: 0.5rem 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.img-block img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.faq-list { max-width: 780px; }
.faq-item { margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid rgba(120,113,108,0.12); }
.surface-accent .faq-item,
.surface-dark .faq-item {
  border-bottom-color: rgba(250, 250, 249, 0.25);
}
.faq-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.form-grid { display: grid; gap: 1rem; max-width: 560px; }
.form-grid label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(120, 113, 108, 0.35);
  border-radius: var(--radius);
  font: inherit;
  background: var(--bg-light);
  color: var(--text-on-light);
}
.form-grid textarea { min-height: 140px; resize: vertical; }
.form-grid input::placeholder, .form-grid textarea::placeholder { opacity: 0.55; }
.checkbox-row { display: flex; gap: 0.65rem; align-items: flex-start; }
.checkbox-row input { width: auto; margin-top: 0.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.site-footer {
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-disclaimer {
  border-top: 1px solid rgba(250, 250, 249, 0.25);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  opacity: 0.9;
  line-height: 1.55;
}
.footer-bottom {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  opacity: 0.75;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#cookie-custom-panel {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(250,250,249,0.25);
}
#cookie-custom-panel label { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

.page-hero { padding: 3.5rem 0 2.5rem; }
.page-hero h1 { font-size: clamp(1.85rem, 3.5vw, 2.75rem); }

.legal-prose h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.legal-prose p, .legal-prose li { margin-bottom: 0.85rem; }

.error-block { text-align: center; padding: 6rem 1rem; }
.error-block h1 { font-size: 2rem; margin-bottom: 1rem; }

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .hero-magazine {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5rem;
  }
  .hero-magazine .hero-spine {
    border-right: none;
    border-bottom: 1px solid rgba(120, 113, 108, 0.15);
    padding: 1rem;
  }
  .hero-magazine .hero-spine-text {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: 0.14em;
  }
  .hero-magazine .hero-center { margin-top: 0; padding: 2rem 1rem; }
  .hero-magazine .hero-photo { padding: 0 1rem 2rem; }
  .two-col, .footer-grid { grid-template-columns: 1fr; }
  .program-item:has(> img) { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    background: var(--bg-light);
    color: var(--text-on-light);
    border-bottom: 1px solid rgba(120,113,108,0.12);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.75rem; }
  body.has-hero .site-header.is-scrolled .main-nav,
  body.has-hero .site-header .main-nav.is-open {
    background: var(--bg-light);
    color: var(--text-on-light);
  }
}
