/* ── Lenis required base ─────────────────────────────────────────────── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-stopped { overflow: hidden; }

:root {
  --ease: cubic-bezier(.22,1,.36,1);

  /* Light zone — the bulk of the page: warm, inviting, high-contrast */
  --bg: #FBF6EE;
  --bg-alt: #F2E9D6;
  --ink: #16303F;
  --body-text: #55616B;
  --muted: #8B96A1;
  --border: #E3DAC7;
  --card-bg: #FFFFFF;

  --coral: #E8623F;
  --coral-dark: #CB4E2E;
  --teal: #1E8A76;
  --teal-tint: #DCEEE9;
  --sand: #E9B85B;

  /* Dark zone — hero, final CTA, footer, nav: the bookends */
  --dark-bg: #0A0F14;
  --dark-bg-2: #10171E;
  --dark-ink: #F4F0E6;
  --dark-body: rgba(244,240,230,0.7);
  --dark-border: rgba(244,240,230,0.14);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--coral); color: #fff; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--coral); color: #fff;
  padding: 10px 16px; z-index: 1000; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ── Shared container (matches nav so sections align) ───────────────── */

.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* ── Nav (stays dark across the whole scroll — the one persistent thread) */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 15, 20, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--dark-border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 20px 28px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.05rem;
  color: var(--dark-ink); text-decoration: none; margin-right: auto; letter-spacing: -.01em;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: rgba(244,240,230,0.65); text-decoration: none; font-size: .88rem;
  font-weight: 500; letter-spacing: .01em; transition: color .2s;
}
.nav-links a:hover { color: var(--dark-ink); }

.btn-ghost {
  border: 1px solid rgba(244,240,230,0.28); color: var(--dark-ink);
  background: transparent; padding: 9px 20px; border-radius: 980px;
  font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--dark-ink); background: rgba(244,240,230,0.08); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 8px; margin-left: auto;
}
.nav-toggle span { width: 20px; height: 1.5px; background: var(--dark-ink); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 0 28px 20px;
  background: rgba(10, 15, 20, 0.98);
}
.mobile-nav a {
  color: var(--dark-ink); text-decoration: none; font-weight: 600; padding: 12px 0;
  border-bottom: 1px solid var(--dark-border);
}
.mobile-nav.is-open { display: flex; }

@media (max-width: 760px) {
  .nav-links, .nav-inner > .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* ── Hero (dark bookend #1) ──────────────────────────────────────────── */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 140px 0 100px; overflow: hidden; background: var(--dark-bg);
}

.webgl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-fallback {
  position: absolute; inset: 0; display: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%233FD6B8' stroke-opacity='0.18' stroke-width='1'%3E%3Ccircle cx='200' cy='200' r='60'/%3E%3Ccircle cx='200' cy='200' r='120'/%3E%3Ccircle cx='200' cy='200' r='180'/%3E%3Ccircle cx='200' cy='200' r='240'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 520px;
  background-repeat: repeat;
  background-position: 0 0;
  animation: driftBg 60s linear infinite;
}
@keyframes driftBg { from { background-position: 0 0; } to { background-position: -520px -520px; } }

.hero-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 480px at 50% 30%, rgba(233,184,91,0.10), transparent 65%),
    linear-gradient(180deg, rgba(10,15,20,0.3) 0%, rgba(10,15,20,0.55) 55%, var(--dark-bg) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2; max-width: 820px; width: 100%;
  margin: 0 auto; padding: 0 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

.slug {
  display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 26px;
}

.hero-title {
  font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.06; margin: 0 0 28px; color: var(--dark-ink);
}
.hero-title span { display: block; }

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--dark-body);
  max-width: 540px; margin: 0 0 40px; line-height: 1.55;
}

.btn-solid {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--coral); color: #fff; border: none; border-radius: 980px;
  padding: 17px 34px; font-size: 1rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: transform .15s, background .2s;
}
.btn-solid:hover { background: var(--coral-dark); }
.btn-solid:active { transform: scale(.98); }
.btn-large { padding: 19px 40px; font-size: 1.05rem; }

.hero-note { font-size: .82rem; color: rgba(244,240,230,0.45); margin: 20px 0 0; }
.hero-note .underline-link { color: rgba(244,240,230,0.6); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 36px; z-index: 2; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(244,240,230,0.5);
}
.scroll-cue-line { width: 1px; height: 40px; background: rgba(244,240,230,0.2); position: relative; overflow: hidden; }
.scroll-cue-line i { position: absolute; top: -40px; left: 0; width: 100%; height: 40px; background: var(--teal); animation: scrollCue 2.2s ease-in-out infinite; }
@keyframes scrollCue { 0% { top: -40px; } 60% { top: 40px; } 100% { top: 40px; } }

@media (max-width: 640px) {
  .hero { padding: 120px 0 90px; }
  .scroll-cue { display: none; }
}

/* ── Reveal utilities (driven by GSAP, class toggled as fallback) ──────── */

.reveal, .reveal-line { opacity: 0; }
.reveal.is-visible, .reveal-line.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-line { opacity: 1 !important; transform: none !important; }
}

/* ── Chapters (light zone) ───────────────────────────────────────────── */

.chapter { padding: 100px 28px; background: var(--bg); }
.chapter-alt { background: var(--bg-alt); }
.chapter-inner { max-width: 1100px; margin: 0 auto; }
.chapter-inner.narrow { max-width: 760px; }

.chapter-label {
  display: block; text-align: left; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin-bottom: 22px;
}

.chapter-title {
  font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.14; color: var(--ink);
  margin: 0 0 44px; max-width: 720px;
}
.chapter-title--left { margin-left: 0; }

.chapter-body {
  font-size: 1.08rem; color: var(--body-text); max-width: 620px; line-height: 1.7;
}
.chapter-body--tight { font-size: 1rem; margin-bottom: 26px; }
.underline-link { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ── Steps timeline ──────────────────────────────────────────────────── */

.steps { position: relative; max-width: 720px; display: flex; flex-direction: column; gap: 52px; }
.steps-line { position: absolute; left: 27px; top: 6px; bottom: 6px; width: 2px; height: calc(100% - 12px); }
.steps-line line { stroke: var(--border); stroke-width: 2; }
.steps-line.is-drawn line { stroke: var(--teal); }

.step { position: relative; display: flex; gap: 26px; }
.step-num {
  font-family: 'Fraunces', serif; font-size: .95rem; font-weight: 500;
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); border: 1px solid var(--border); color: var(--coral); z-index: 1;
}
.step h3 { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 500; color: var(--ink); margin: 6px 0 8px; }
.step p { color: var(--body-text); margin: 0; max-width: 460px; line-height: 1.6; }

/* ── Image placeholder system ───────────────────────────────────────── */

.img-ph {
  position: relative; border-radius: 10px; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(22,48,63,0.04) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, var(--teal-tint), var(--bg-alt));
  border: 1px dashed rgba(22,48,63,0.2);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4/3; color: var(--muted);
}
.img-ph span { font-size: .8rem; font-weight: 600; letter-spacing: .02em; text-align: center; padding: 0 24px; }
.img-ph--banner { aspect-ratio: 21/8; margin-top: 40px; border-radius: 14px; }

@media (max-width: 640px) { .img-ph--banner { aspect-ratio: 4/3; } }

/* ── Military tiles ──────────────────────────────────────────────────── */

.tile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 36px 0 32px;
}
.tile {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 20px;
}
.tile-label {
  font-family: 'Fraunces', serif; font-size: 1.1rem; color: var(--ink); margin: 0 0 8px;
}
.tile p { margin: 0; font-size: .88rem; color: var(--body-text); line-height: 1.5; }

@media (max-width: 900px) { .tile-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } }

/* ── Programs — expandable resource list ────────────────────────────── */

.programs-accordion { display: flex; flex-direction: column; gap: 20px; }
.programs-accordion .accordion-item {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.programs-accordion .accordion-item:hover { box-shadow: 0 10px 28px rgba(22,48,63,0.08); }
.programs-accordion .accordion-item.is-open {
  border-color: var(--coral);
  box-shadow: 0 16px 40px rgba(22,48,63,0.12);
}

.program-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 32px 34px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: inherit;
}
.program-trigger-left { display: flex; align-items: center; gap: 24px; }
.program-trigger-text h3 {
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.35rem; color: var(--ink); margin: 0;
}
.index-no {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: .95rem; color: var(--coral);
  background: var(--teal-tint); border: 1px solid var(--border);
  transition: background .25s, border-color .25s;
}
.accordion-item.is-open .index-no { background: var(--coral); color: #fff; border-color: var(--coral); }
.index-stat {
  display: inline-block; font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--teal);
  background: var(--teal-tint); padding: 4px 12px; border-radius: 980px;
  margin-bottom: 10px;
}

.program-detail { padding: 0 34px 34px 94px; }
.program-detail p {
  margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
  color: var(--body-text); font-size: .98rem; line-height: 1.65; max-width: 560px;
}
.program-detail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.program-detail-list li { font-size: .94rem; color: var(--body-text); line-height: 1.6; }
.program-detail-list strong { color: var(--ink); }

@media (max-width: 600px) {
  .program-trigger { padding: 22px 20px; gap: 16px; }
  .program-trigger-left { gap: 16px; }
  .index-no { width: 38px; height: 38px; font-size: .82rem; }
  .program-detail { padding: 0 20px 26px 20px; }
}

/* ── Calculators ─────────────────────────────────────────────────────── */

.calc-tabs {
  display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.calc-tab {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: .92rem; font-weight: 600; color: var(--muted);
  padding: 12px 4px; margin-right: 24px; position: relative;
}
.calc-tab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--coral); transform: scaleX(0); transition: transform .2s var(--ease);
}
.calc-tab.is-active { color: var(--ink); }
.calc-tab.is-active::after { transform: scaleX(1); }

.calc-panel { display: none; }
.calc-panel.is-active { display: block; }

.calc-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden;
}

.calc-inputs { padding: 40px; display: flex; flex-direction: column; gap: 28px; }
.calc-field-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.calc-field label { font-size: .92rem; font-weight: 700; color: var(--ink); }
.calc-value { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--coral); }

.calc-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 980px; background: var(--border); outline: none;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--coral); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(22,48,63,0.25); cursor: pointer;
}
.calc-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff;
  background: var(--coral); box-shadow: 0 2px 8px rgba(22,48,63,0.25); cursor: pointer;
}

.calc-select {
  width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); font-family: inherit; font-size: .95rem;
  font-weight: 600; cursor: pointer;
}

.calc-results {
  background: var(--bg-alt); padding: 40px; display: flex; flex-direction: column;
}
.calc-results-label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.calc-results-figure { font-family: 'Fraunces', serif; font-size: clamp(2.2rem, 4vw, 2.8rem); font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.calc-results-note { font-size: .82rem; color: var(--muted); margin: 0 0 24px; }
.calc-results-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border); font-size: .92rem; color: var(--body-text);
}
.calc-results-row strong { color: var(--ink); font-size: 1rem; }
.calc-results .btn-solid { margin-top: 24px; }
.calc-rule { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.calc-note { font-size: .85rem; color: var(--body-text); line-height: 1.6; margin: 0; }
.calc-note strong { color: var(--ink); }

.calc-disclaimer { font-size: .8rem; color: var(--muted); margin: 28px 0 0; max-width: 640px; }

@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs, .calc-results { padding: 30px 24px; }
}

/* ── Feature split (kept as the one text+image section) ─────────────── */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 16px; }
.checklist li { position: relative; padding-left: 28px; color: var(--body-text); font-size: 1rem; line-height: 1.55; }
.checklist li::before { content: '\2192'; position: absolute; left: 0; color: var(--coral); font-weight: 700; }

/* ── Accordion (FAQ) ─────────────────────────────────────────────────── */

.accordion { display: flex; flex-direction: column; }
.accordion > .accordion-item { border-bottom: 1px solid var(--border); }
.accordion > .accordion-item:first-child { border-top: 1px solid var(--border); }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 24px 4px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 1.02rem; font-weight: 600; color: var(--ink); text-align: left;
}
.accordion-plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.accordion-plus::before, .accordion-plus::after {
  content: ''; position: absolute; background: var(--muted);
  transition: transform .25s var(--ease);
}
.accordion-plus::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.accordion-plus::after { left: 50%; top: 0; height: 100%; width: 1.5px; transform: translateX(-50%); }
.accordion-item.is-open .accordion-plus::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.accordion-item.is-open .accordion-plus::before { background: var(--coral); }

.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.accordion-item.is-open .accordion-panel { max-height: 480px; }
.accordion > .accordion-item .accordion-panel p { margin: 0; padding: 0 4px 24px; color: var(--body-text); font-size: .96rem; line-height: 1.6; max-width: 600px; }

/* ── Final CTA band (dark bookend #2) ────────────────────────────────── */

.cta-band {
  padding: 150px 28px; text-align: center; background: var(--dark-bg);
  background-image: radial-gradient(600px 400px at 50% 0%, rgba(63,214,184,0.08), transparent 70%);
}
.cta-title {
  font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.1; color: var(--dark-ink); margin: 0 0 40px;
}

/* ── Footer (dark bookend #3) ────────────────────────────────────────── */

.site-footer { padding: 68px 28px 40px; background: var(--dark-bg-2); }
.footer-top {
  max-width: 1100px; margin: 0 auto 36px; display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px;
  border-bottom: 1px solid var(--dark-border);
}
.footer-tagline { font-size: .92rem; color: var(--dark-body); margin: 14px 0 14px; max-width: 260px; }
.footer-eho { font-size: .8rem; color: rgba(244,240,230,0.4); margin: 0; }
.footer-col h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: rgba(244,240,230,0.4); margin: 0 0 14px; }
.footer-col { display: flex; flex-direction: column; }
.footer-col a { color: rgba(244,240,230,0.65); text-decoration: none; font-size: .92rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--dark-ink); }
.footer-disclaimer { max-width: 1100px; margin: 0 auto; font-size: .78rem; line-height: 1.65; color: rgba(244,240,230,0.4); }
.footer-disclaimer a { text-decoration: underline; }
.footer-disclaimer strong { color: rgba(244,240,230,0.6); }
.footer-copy { max-width: 1100px; margin: 18px auto 0; font-size: .78rem; color: rgba(244,240,230,0.3); }

@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ── Mobile sticky CTA ───────────────────────────────────────────────── */

.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10,15,20,0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--dark-border);
}
.mobile-cta .btn-solid { width: 100%; }

@media (max-width: 640px) {
  .mobile-cta { display: block; }
  body { padding-bottom: 76px; }
}
