:root {
  --dark: #0a2559;
  /* Shades below derive from the four editable colors (accent, dark, paper, ink),
     so changing a color in edit mode re-themes the whole page. */
  --dark-2: color-mix(in srgb, var(--dark) 82%, white);
  --dark-deep: color-mix(in srgb, var(--dark) 55%, black);
  --accent: #ff7a45;
  --accent-2: color-mix(in srgb, var(--accent) 78%, white);
  --paper: #f4f1ea;
  --ink: #0f1d38;
  --muted: #56627a;
  --white: #ffffff;
  --radius: 18px;
  --bg-image: url("/assets/img/bg.svg");
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--topbar-h); }

body {
  margin: 0;
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
}

/* The static backdrop: fixed to the viewport so every panel scrolls over it.
   A fixed pseudo-layer (not background-attachment: fixed) so iOS behaves. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--dark) var(--bg-image) center / cover no-repeat;
}

/* Photo backdrops get a dark scrim so text stays legible over any image. */
.backdrop.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dark) 55%, transparent), color-mix(in srgb, var(--dark) 35%, transparent));
}

a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--dark); padding: .6em 1em; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--dark) 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { font-weight: 800; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.topbar ul { display: flex; gap: clamp(14px, 2.4vw, 32px); list-style: none; margin: 0; padding: 0; }
.topbar nav a {
  text-decoration: none; font-size: .95rem; font-weight: 600; opacity: .85;
  padding: .4em 0; border-bottom: 2px solid transparent;
}
.topbar nav a:hover { opacity: 1; border-color: var(--accent); }

/* ---------- Hero (transparent: shows the backdrop) ---------- */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(var(--topbar-h) + 24px) clamp(16px, 4vw, 48px) 96px;
  position: relative;
}
.hero-inner { max-width: 960px; width: 100%; }
.eyebrow {
  display: inline-block; margin-bottom: 1.4em;
  font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-2);
  padding-left: 44px; position: relative;
}
.eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 32px; height: 2px; background: var(--accent); }
.hero h1 { font-size: clamp(2.8rem, 9vw, 7rem); font-weight: 900; margin-bottom: .35em; text-wrap: balance; }
.hero h1 .name, .hero h1 .for { display: block; }
.hero h1 .for { font-weight: 300; font-size: .62em; opacity: .95; }
.hero h1 .for em { font-style: normal; font-weight: 900; color: var(--accent); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.4rem); max-width: 40ch; opacity: .9; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  width: 26px; height: 44px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--white); border-radius: 2px; animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; translate: 0 0; } 30% { opacity: 1; } 100% { opacity: 0; translate: 0 16px; } }

/* ---------- Panels (scroll over the fixed backdrop) ---------- */
.panel {
  position: relative;
  padding: clamp(72px, 12vw, 160px) clamp(16px, 4vw, 48px);
  border-radius: 28px 28px 0 0;
  margin-top: -28px; /* each panel tucks under the previous one's rounded lip */
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .25);
}
.wrap { max-width: 1120px; margin: 0 auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.panel h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; }

.panel-light { background: var(--paper); color: var(--ink); }
.panel-light h2 { color: var(--dark); }
.panel-light .muted { color: var(--muted); }
.panel-dark { background: var(--dark); color: var(--white); }
.panel-glass {
  background: color-mix(in srgb, var(--dark) 52%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

/* About */
.two-col { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: 1.4fr 1fr; align-items: center; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.stats li {
  background: var(--white); border-radius: var(--radius); padding: 22px 26px;
  box-shadow: 0 8px 28px rgba(15, 29, 56, .08); border-left: 6px solid var(--accent);
}
.stats strong { display: block; font-size: 2.4rem; line-height: 1; color: var(--dark); font-weight: 900; }
.stats span { color: var(--muted); font-size: .95rem; }

/* Priorities: cards stick and stack as you scroll */
.stack { list-style: none; margin: 40px 0 0; padding: 0; }
.card {
  position: sticky; top: calc(var(--topbar-h) + 24px + var(--i) * 22px);
  margin-bottom: 40px; padding: clamp(28px, 4vw, 52px);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.card .num { display: block; font-size: .9rem; font-weight: 800; letter-spacing: .2em; color: var(--accent); margin-bottom: 1.2em; }
.card h3 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
.card p { max-width: 52ch; opacity: .88; margin: 0; }

/* Vision */
blockquote {
  margin: 0 0 1.2em; padding-left: 28px; border-left: 6px solid var(--accent);
  font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.35; font-weight: 600; text-wrap: balance;
}
.panel-dark p { opacity: .85; }

/* Footer */
.footer { background: var(--dark-deep); padding: 28px clamp(16px, 4vw, 48px); text-align: center; font-size: .9rem; opacity: .9; }
.footer p { margin: 0; }

/* ---------- Scroll reveal (JS adds .is-visible; content stays visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .topbar ul li:not(:last-child) { display: none; } /* keep the one CTA link on phones */
  .card { top: calc(var(--topbar-h) + 12px + var(--i) * 16px); }
}

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