@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,700;9..144,800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg-dark: #0F172A;
  --text-on-dark: #FFFBEB;
  --bg-light: #FFFBEB;
  --text-on-light: #475569;
  --bg-accent: #D97706;
  --text-on-accent: #0F172A;
  --bg-deep: #0F172A;
  --text-on-deep: #FBBF24;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --radius: 6px;
}

*, *::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;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 700;
}

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

a { color: currentColor; text-decoration: underline; }
a:hover { opacity: 0.85; }

.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-deep { background: var(--bg-deep); color: var(--text-on-deep); }

.surface-dark *, .surface-light *, .surface-accent *, .surface-deep * { color: inherit; }
.surface-dark a, .surface-light a, .surface-accent a, .surface-deep a { color: currentColor; }

.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }

/* Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: transparent;
}

.site-header.is-scrolled {
  position: fixed;
  background: rgba(255, 251, 235, 0.97);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo svg { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-radius: var(--radius);
  color: inherit;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-color: var(--bg-dark);
}

.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}

.btn-outline:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 1;
}

.btn-accent {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: var(--text-on-dark);
  border: none;
}

/* Hero Pattern A */
.hero-editorial {
  min-height: 90vh;
  padding-top: 5rem;
  display: flex;
  align-items: stretch;
}

.hero-editorial .hero-grid {
  display: grid;
  grid-template-columns: 3fr 1px 2fr;
  gap: 0 2.5rem;
  align-items: center;
  width: 100%;
}

.hero-divider {
  width: 1px;
  background: rgba(71, 85, 105, 0.35);
  align-self: stretch;
  min-height: 400px;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-serial {
  font-family: var(--font-head);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

.hero-editorial h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-sub {
  font-size: 1.125rem;
  max-width: 42ch;
  margin-bottom: 1.75rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }

.hero-trust {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.hero-photo-wrap { position: relative; }

.hero-photo-wrap img {
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
}

.photo-caption {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-style: italic;
}

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

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 1rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(71, 85, 105, 0.15);
}

.card img {
  border-radius: var(--radius);
  margin-bottom: 1rem;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
}

.chapter-card .chapter-num {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.disclaimer-box {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--bg-accent);
  font-size: 0.95rem;
  margin: 2rem 0;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 7rem 0 3rem;
}

.page-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 0.75rem; }

/* Programs */
.program-item {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.2);
}

.program-item h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }

.program-meta { font-size: 0.9rem; margin-bottom: 0.75rem; }

/* FAQ */
.faq-item { margin-bottom: 1.75rem; }
.faq-item h2 { font-size: 1.2rem; margin: 0 0 0.5rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg-light);
  color: var(--text-on-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(71, 85, 105, 0.65); }

.form-group textarea { min-height: 140px; resize: vertical; }

.form-check { display: flex; gap: 0.6rem; align-items: flex-start; }
.form-check input { width: auto; margin-top: 0.25rem; }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 251, 235, 0.15);
  font-size: 0.85rem;
}

.site-footer.surface-light .footer-bottom { border-color: rgba(71, 85, 105, 0.2); }

.footer-disclaimer { font-size: 0.82rem; margin-top: 1rem; line-height: 1.55; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}

.cookie-banner[hidden] { display: none; }

.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-actions button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  border: 2px solid currentColor;
  background: transparent;
  color: inherit;
}

.cookie-actions .btn-accept-all {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-color: var(--bg-dark);
}

/* Legal prose */
.legal-prose h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.legal-prose h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal-prose p, .legal-prose li { margin-bottom: 0.75rem; }
.legal-prose ul { padding-left: 1.25rem; }

/* Reveal */
.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; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-editorial .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-divider { display: none; }
  .hero-editorial { min-height: 70vh; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    padding: 1rem;
  }
  .main-nav.is-open ul { flex-direction: column; }
  .site-header .container { position: relative; flex-wrap: wrap; }
}
