/* ─── Brand Tokens ─────────────────────────────────────────── */
:root {
  --bg-light:     #F8FBFF;
  --bg-dark:      #0B1929;
  --primary:      #1A477B;
  --accent:       #27B0B5;
  --accent-dark:  #1a8a8f;
  --text-on-light: #1A477B;
  --text-dark:    #F0F6FF;
  --text-body-light: #4A5558;
  --text-body-dark:  rgba(240,246,255,0.72);
  --text-muted:   #7F9BAD;
  --font-display: 'Open Sans Condensed', 'Open Sans', system-ui, sans-serif;
  --font-body:    'Open Sans', system-ui, sans-serif;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ─── Loader ─────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-pct {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 10rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.loader-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.loader-bar {
  width: 180px;
  height: 1px;
  background: rgba(240,246,255,0.12);
  position: relative;
  overflow: hidden;
}
.loader-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Canvas — right 2/3 of viewport ────────────────────────── */
#hero-canvas {
  position: fixed;
  top: 0; right: 0;
  width: 66.67%; height: 100%;
  z-index: 0;
  display: block;
}
#canvas-overlay {
  position: fixed;
  top: 0; right: 0;
  width: 66.67%; height: 100%;
  z-index: 1;
  background: var(--bg-dark);
  opacity: 0;
  pointer-events: none;
}

/* ─── Header ─────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
}
.header-logo {
  height: 30mm;
  width: 30mm;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.header-cta {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  border: 1px solid rgba(240,246,255,0.45);
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.header-cta.visible { opacity: 1; transform: translateY(0); }
.header-cta:hover { border-color: var(--accent); background: rgba(39,176,181,0.12); }
.header-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ─── Header over light-background sections ──────────────────── */
#site-header.over-light .header-logo {
  filter: brightness(0) saturate(100%) invert(16%) sepia(92%) saturate(786%) hue-rotate(189deg) brightness(102%);
  opacity: 1;
}
#site-header.over-light .header-cta {
  color: var(--primary);
  border-color: rgba(26,71,123,0.5);
}
#site-header.over-light .header-cta:hover {
  background: rgba(26,71,123,0.08);
  border-color: var(--primary);
}

/* ─── Scroll container ───────────────────────────────────────── */
#scroll-container { position: relative; z-index: 10; }

/* ─── Hero — text left 1/3, canvas right 2/3 ────────────────── */
#sec-hero { height: 200vh; }

.hero-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding-left: 3vw;
  padding-bottom: 9vh;
  overflow: hidden;
}
.hero-clip-wrap {
  position: absolute;
  inset: 0;
  clip-path: circle(0% at 17% 50%);
  background: transparent;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  text-align: left;
  max-width: 30vw;
}
.hero-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 6.5rem);
  line-height: 0.92;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
  line-height: 1.75;
  color: rgba(240,246,255,0.68);
  max-width: 28vw;
  margin: 1.5rem 0 0;
  font-weight: 400;
  opacity: 0;
  transform: translateY(30px);
}

/* ─── Marquee ────────────────────────────────────────────────── */
#marquee-strip {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  z-index: 20;
  overflow: hidden;
  padding: 1rem 0;
  pointer-events: none;
  border-top: 1px solid rgba(39,176,181,0.15);
  background: rgba(11,25,41,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.5s ease;
}
#marquee-strip.visible { opacity: 1; }
.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}
.marquee-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(39,176,181,0.35);
  padding-right: 3rem;
  flex-shrink: 0;
}

/* ─── Feature sections — text always left 1/3, video right 2/3 ── */
.feature-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}
/* Dark zones: body bg shows on left 1/3, canvas visible on right 2/3 */
.zone--dark  { background: transparent; color: var(--text-dark); }
.zone--accent { background: var(--accent); color: #fff; }

/* Light zones: only paint the left 1/3 white so canvas stays visible */
.feature-section.zone--light {
  background: transparent;
  color: var(--text-on-light);
}
.feature-section.zone--light::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 33.34%;
  height: 100%;
  background: var(--bg-light);
  z-index: -1;
}

/* Text zone — always lives in the left 1/3 */
.text-zone {
  width: 27vw;
  max-width: 380px;
  padding: 6rem 0;
}
/* Left-aligned text — hugs the left edge */
.text-zone--left {
  margin-left: 3vw;
  text-align: left;
}
/* Right-aligned text — hugs the 1/3 boundary */
.text-zone--right {
  margin-left: auto;
  margin-right: calc(66.67vw + 2vw);
  text-align: right;
}

/* ─── Typography scale ───────────────────────────────────────── */
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: block;
  opacity: 0;
  transform: translateY(16px);
}
.zone--light .section-label { color: var(--accent-dark); }
.zone--accent .section-label { color: rgba(255,255,255,0.7); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4.5rem);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
  opacity: 0;
}
.zone--light .section-title { color: var(--primary); }
.zone--dark  .section-title { color: var(--text-dark); }
.zone--accent .section-title { color: #fff; }

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.8;
  font-weight: 400;
  opacity: 0;
  max-width: 480px;
}
.zone--light .section-body { color: var(--text-body-light); }
.zone--dark  .section-body { color: var(--text-body-dark); }
.zone--accent .section-body { color: rgba(255,255,255,0.82); }

/* ─── Intro ──────────────────────────────────────────────────── */
#sec-intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10vh 0 10vh 3vw;
  text-align: left;
  background: transparent;
  position: relative;
}
#sec-intro::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 33.34%; height: 100%;
  background: var(--bg-light);
  z-index: -1;
}
.intro-inner { max-width: 27vw; text-align: left; }
.intro-label {
  font-size: 0.975rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 2rem;
  display: block;
  opacity: 0;
  transform: translateY(16px);
}
.intro-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(40px);
}
.intro-body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.8;
  color: var(--text-body-light);
  max-width: 100%;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
}

/* ─── Stats section ──────────────────────────────────────────── */
#sec-stats {
  min-height: 100vh;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
#sec-stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 33.34%; height: 100%;
  background: var(--primary);
  z-index: -1;
}
.stats-left {
  width: 27vw;
  max-width: 360px;
  margin-left: 3vw;
  padding: 6rem 0 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stats-right {
  width: 27vw;
  max-width: 360px;
  margin-left: 3vw;
  padding: 2rem 0 6rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-top: 1px solid rgba(240,246,255,0.15);
}
.stat-item { opacity: 0; transform: scale(0.88); }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 4.5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-dark);
}
.stat-unit { font-size: 0.5em; opacity: 0.55; vertical-align: super; }
.stat-desc {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 0.9vw, 0.88rem);
  color: rgba(240,246,255,0.55);
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ─── Stats left text ────────────────────────────────────────── */
.stats-left .section-label { color: var(--accent); }
.stats-left .section-title { color: var(--text-dark); }
.stats-left .section-body  { color: rgba(240,246,255,0.7); }

/* ─── CTA ─────────────────────────────────────────────────────── */
#sec-cta {
  min-height: 100vh;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 10vh 0 10vh 3vw;
  position: relative;
}
#sec-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 33.34%; height: 100%;
  background: var(--bg-light);
  z-index: -1;
}
.cta-inner { max-width: 27vw; text-align: left; }
.cta-label {
  font-size: 0.975rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 1.5rem;
  display: block;
  opacity: 0;
  transform: translateY(16px);
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 5rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(40px);
}
.cta-button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  padding: 1.1rem 3.2rem;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(20px);
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 24px rgba(26,71,123,0.35), 0 1px 4px rgba(26,71,123,0.2);
}
.cta-button:hover {
  background: #143660;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,71,123,0.45), 0 2px 8px rgba(26,71,123,0.25);
}
.cta-button:active { transform: translateY(0); }
.cta-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ─── Scroll spacer ──────────────────────────────────────────── */
.scroll-spacer { height: 150vh; }

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #site-header { padding: 1.2rem 1.5rem; }

  /* Canvas goes full-width on mobile */
  #hero-canvas, #canvas-overlay {
    width: 100%; right: 0;
  }

  .feature-section.zone--light::before { width: 100%; }

  .text-zone {
    width: 85%;
    max-width: none;
    margin-left: 7.5% !important;
    margin-right: 7.5% !important;
    text-align: left !important;
    padding: 5rem 0;
  }
  #sec-stats { grid-template-columns: 1fr; }
  .stats-right { border-left: none; border-top: 1px solid rgba(240,246,255,0.12); padding: 3rem 2rem 6rem; }
  .hero-inner { padding-left: 5vw; }
  .hero-content { max-width: 85vw; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 5rem); }
  .hero-subtitle { max-width: 80vw; }
  .marquee-text { font-size: 1.4rem; }
  .header-logo { height: 20mm; width: 20mm; }
}
