:root {
  --navy: #184068;
  --navy-deep: #0a1b30;
  --red: #e23a3a;
  --gold: #f2c230;
  --blue: #5b8fd4;
  --bg: #0a1626;
  --ink: #f4f6f8;
  --muted: #9fb0c4;
  --font: "Operator Mono", ui-monospace, "SF Mono", Menlo, Monaco, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.5;
}

/* fixed 3D canvas */
#scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 1; display: block;
}

/* dark veil shown until model is ready */
.loading-veil {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10,22,38,.25), rgba(6,14,26,.65));
}

/* scroll distance driver — 600vh of scroll */
.scroller { height: 760vh; position: relative; z-index: 0; }

/* ===== SPLASH ===== */
.splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #122844, var(--navy-deep) 70%);
  transition: opacity .7s ease, visibility .7s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; animation: pop .6s ease both; }
.splash-logo {
  width: clamp(220px, 60vw, 380px); height: auto; display: block; margin: 0 auto 8px;
  animation: float 1.8s ease-in-out infinite;
}
.splash-sub { color: var(--muted); margin: 10px 0 26px; font-size: .95rem; }
.splash-bar {
  width: 240px; max-width: 70vw; height: 6px; margin: 0 auto;
  background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden;
}
.splash-bar i {
  display: block; height: 100%; width: 6%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue));
  border-radius: 99px; transition: width .3s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ===== FIXED UI ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 48px);
  opacity: 0; transition: opacity .6s ease;
}
.topbar.show { opacity: 1; }
.brand img { height: 30px; width: auto; display: block; }
.top-nav { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  color: #0a1626; background: var(--gold); text-decoration: none;
  padding: 9px 16px; border-radius: 99px; font-weight: 700; font-size: .9rem;
  transition: transform .15s ease;
}
.nav-cta:hover { transform: translateY(-2px); }
.site-link {
  color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600;
  padding: 9px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px;
  background: rgba(10,22,38,.45); backdrop-filter: blur(6px);
  transition: border-color .2s ease, transform .15s ease;
}
.site-link:hover { border-color: var(--gold); transform: translateY(-2px); }
@media (max-width: 480px) { .site-link { padding: 8px 11px; font-size: .82rem; } }

/* crawlable-but-hidden SEO content + noscript */
.seo-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.noscript-note {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--bg); color: var(--ink); text-align: center; padding: 2rem;
}
.noscript-note a { color: var(--gold); }

/* scroll progress rail */
.progress-rail {
  position: fixed; left: 0; right: 0; bottom: 0; height: 4px; z-index: 30;
  background: rgba(255,255,255,.06);
}
.progress-rail i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue));
}

/* ===== caption (the real content is on the screens) ===== */
.caption {
  position: fixed; left: 0; right: 0; bottom: 26px; z-index: 25;
  text-align: center; color: var(--gold); font-size: .9rem; letter-spacing: 1px;
  text-transform: uppercase; pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.scroll-cue {
  position: fixed; left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 25;
  color: var(--muted); font-size: .82rem; pointer-events: none;
  animation: float 1.8s ease-in-out infinite;
  transition: opacity .4s ease;
}
.scroll-cue.hide { opacity: 0; }
.floating-cta {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 26;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 700; font-size: .9rem;
  color: #052e16; background: #25D366; padding: 11px 20px; border-radius: 99px;
  box-shadow: 0 10px 32px rgba(37,211,102,.35);
  opacity: 0; transition: opacity .4s ease;
}
.floating-cta.show { opacity: 1; }
.floating-cta:hover { transform: translateX(-50%) translateY(-2px); }

/* model credit */
.credit {
  position: fixed; right: 12px; bottom: 12px; z-index: 30;
  font-size: .68rem; color: rgba(255,255,255,.4);
}
.credit a { color: rgba(255,255,255,.6); }

@media (max-width: 560px) {
  .credit { left: 12px; right: auto; }
}
