@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg-dark: #0E7490;
  --text-on-dark: #FFFAF0;
  --bg-light: #FFFAF0;
  --text-on-light: #374151;
  --bg-accent: #C2410C;
  --text-on-accent: #FFFAF0;
  --bg-grid: #F0FDFA;
  --text-on-grid: #0E7490;
  --font-head: 'Libre Baskerville', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --radius: 4px;
  --shadow: 0 4px 24px rgba(14, 116, 144, 0.12);
}

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

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

/* Inherit text colour only within the same surface — not into nested surface blocks */
.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-grid *:not([class*="surface-"]):not(.btn):not(.brand-mark) {
  color: inherit;
}

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

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

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

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

.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;
}
.sheet-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: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(55, 65, 81, 0.12);
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.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: 700;
  font-size: 1.05rem;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  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;
}

/* 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 A */
.hero-editorial {
  min-height: 90vh;
  display: flex;
  align-items: stretch;
}
.hero-editorial .hero-grid {
  display: grid;
  grid-template-columns: 60% 1px 40%;
  width: 100%;
  min-height: 90vh;
}
.hero-editorial .hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1rem, 4vw, 4rem);
}
.hero-editorial .hero-divider {
  background: rgba(55, 65, 81, 0.2);
  width: 1px;
}
.hero-editorial .hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem 2rem 1.5rem;
}
.hero-editorial .hero-portrait {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  border: 1px solid rgba(55, 65, 81, 0.15);
}
.hero-editorial h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  max-width: 18ch;
  margin-bottom: 1rem;
}
.hero-editorial .hero-sub {
  font-size: 1.125rem;
  max-width: 42ch;
  opacity: 0.92;
}
.hero-caption {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.75;
  font-style: italic;
}
.trust-strip {
  margin-top: 2rem;
  font-size: 0.82rem;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

/* 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;
  font-weight: 700;
  display: block;
}
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.pillar-card {
  border: 1px solid rgba(14, 116, 144, 0.25);
  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; }

/* Blueprint sheet cards */
.sheet-card {
  border: 1px solid rgba(14, 116, 144, 0.3);
  padding: 1.5rem;
  position: relative;
  color: var(--text-on-light);
  background-color: var(--bg-light);
  background-image:
    linear-gradient(rgba(14, 116, 144, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, 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(55, 65, 81, 0.12);
  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 column layouts */
.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 */
.faq-list { max-width: 780px; }
.faq-item { margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid rgba(55,65,81,0.12); }
.surface-accent .faq-item,
.surface-dark .faq-item {
  border-bottom-color: rgba(255, 250, 240, 0.25);
}
.surface-accent .faq-item {
  border-bottom-color: rgba(255, 250, 240, 0.3);
}
.faq-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* Forms */
.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(55, 65, 81, 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; }

/* Footer */
.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(255, 250, 240, 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 */
#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(255,250,240,0.25);
}
#cookie-custom-panel label { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

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

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

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

/* Reveal animation */
.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-editorial .hero-grid {
    grid-template-columns: 1fr;
    min-height: 70vh;
  }
  .hero-editorial .hero-divider { display: none; }
  .hero-editorial .hero-right { padding: 0 1rem 2rem; }
  .hero-editorial .hero-portrait { aspect-ratio: 16/10; max-height: 320px; }
  .hero-editorial { min-height: 70vh; }
  .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;
    border-bottom: 1px solid rgba(55,65,81,0.12);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.75rem; }
  .site-header { position: relative; }
}
