*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #04140F; }
body {
  background: #04140F;
  color: var(--c-ivory, #F5F9FC);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.record { overflow: hidden; scrollbar-width: none; }
html.record::-webkit-scrollbar { display: none; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, rgba(4, 20, 15, 0) 55%, rgba(4, 20, 15, 0.55) 100%);
}
.scrim {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(4, 20, 15, 0.82) 0%, rgba(4, 20, 15, 0.55) 30%, rgba(4, 20, 15, 0) 52%);
}
.scrim.scrim--c { background: radial-gradient(60% 55% at 50% 52%, rgba(4, 20, 15, 0.7) 0%, rgba(4, 20, 15, 0.35) 60%, rgba(4, 20, 15, 0) 100%); }
.scroll { height: 760vh; position: relative; z-index: -1; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 48px);
}
.bar__logo img { display: block; height: 34px; width: auto; }
.bar__nav { display: flex; align-items: center; gap: 22px; }
.bar__link {
  color: var(--c-ivory); text-decoration: none; font-size: 13px; letter-spacing: 0.04em;
  opacity: 0.8; transition: opacity 0.2s;
}
.bar__link:hover { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px; border-radius: 999px;
  background: var(--c-ivory); color: var(--c-emerald-deep);
  font: 500 14px/1 var(--f-body); letter-spacing: 0.02em; text-decoration: none;
  border: 1px solid var(--c-ivory);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { background: var(--c-ivory-dark); box-shadow: 0 0 30px rgba(141, 191, 230, 0.35); }
.btn--small { padding: 10px 18px; font-size: 13px; }
.btn--ghost { background: transparent; color: var(--c-ivory); border-color: rgba(211, 232, 246, 0.45); }
.btn--ghost:hover { background: rgba(211, 232, 246, 0.1); color: var(--c-ivory); }

/* overlay chapters */
.overlay { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.ch {
  position: absolute; opacity: 0; visibility: hidden;
  transform: translateY(var(--ty, 0px));
  will-change: opacity, transform;
}
.ch.is-on { visibility: visible; }
.ch a, .ch .btn { pointer-events: auto; }

.eyebrow {
  margin: 0 0 14px; font: 500 11px/1.4 var(--f-body); letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--c-gold);
}
.h-md, .h-lg, .h-xl, .h-italic { font-family: var(--f-heading); font-weight: 500; margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
.h-md { font-size: clamp(34px, 4vw, 54px); }
.h-lg { font-size: clamp(40px, 5.2vw, 76px); }
.h-xl { font-size: clamp(46px, 7vw, 108px); }
.h-italic { font-style: italic; font-size: clamp(26px, 3vw, 40px); color: var(--c-ivory-dark); }
.h-lg em, .h-xl em { font-style: italic; color: var(--c-ivory-dark); }
.plus { color: var(--c-gold); font-style: italic; }
.body {
  margin: 18px 0 0; max-width: 34ch;
  font: 400 15px/1.65 var(--f-body); color: rgba(211, 232, 246, 0.86);
}

.ch--intro { left: clamp(16px, 5vw, 64px); bottom: clamp(28px, 7vh, 64px); }
.hint { margin: 0; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245, 249, 252, 0.55); }
.hint::after {
  content: ""; display: block; width: 1px; height: 46px; margin-top: 14px;
  background: linear-gradient(var(--c-gold), transparent);
}
.ch--meaning { left: clamp(16px, 5vw, 64px); bottom: clamp(28px, 8vh, 72px); }
.ch--step { left: 0; right: 0; bottom: 14vh; text-align: center; }

.ch--svc { left: clamp(16px, 6vw, 88px); top: 50%; width: min(32vw, 440px); transform: translateY(calc(-50% + var(--ty, 0px))); }
.ch--svc .h-lg { font-size: clamp(38px, 4.3vw, 64px); }
.svc__count { margin-left: 12px; color: rgba(245, 249, 252, 0.6); letter-spacing: 0.2em; }
.svc__swap { will-change: opacity, transform; }
.svc__bar { margin-top: 28px; width: 160px; height: 1px; background: rgba(211, 232, 246, 0.2); }
.svc__bar span { display: block; height: 100%; width: 0; background: var(--c-gold); }

.ch--grid { left: clamp(16px, 6vw, 88px); top: 50%; width: min(36vw, 480px); transform: translateY(calc(-50% + var(--ty, 0px))); }
.chips { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 10px; }
.chip {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-radius: 999px; width: max-content; max-width: 100%;
  font: 500 14px/1.2 var(--f-body); color: var(--c-ivory);
  background: rgba(8, 42, 32, 0.62);
  border: 1px solid rgba(141, 191, 230, 0.55);
  box-shadow: 0 0 0 1px rgba(141, 191, 230, 0.08), 0 0 28px rgba(141, 191, 230, 0.28), inset 0 0 18px rgba(141, 191, 230, 0.10);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0;
}
.chip__n { font: 500 10px/1 var(--f-body); letter-spacing: 0.18em; color: var(--c-gold); }

.ch--cta { left: 0; right: 0; top: 50%; transform: translateY(calc(-50% + var(--ty, 0px))); text-align: center; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.ch--cta .body { max-width: 40ch; }
.cta__row { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }

.loader { position: fixed; left: 50%; top: 50%; z-index: 30; width: 140px; height: 1px; margin-left: -70px; background: rgba(211, 232, 246, 0.15); overflow: hidden; transition: opacity 0.6s; }
.loader__line { display: block; width: 40%; height: 100%; background: var(--c-gold); animation: load 1.2s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
body.ready .loader { opacity: 0; }

.fallback { display: none; }
body.no-webgl #gl, body.no-webgl .overlay, body.no-webgl .scroll, body.no-webgl .loader { display: none; }
body.no-webgl {
  background: radial-gradient(90% 70% at 50% 40%, var(--c-emerald) 0%, var(--c-emerald-deep) 70%, #04140F 100%);
  min-height: 100vh;
}
body.no-webgl .fallback {
  display: flex; flex-direction: column; justify-content: center; min-height: 100vh;
  padding: 120px clamp(16px, 8vw, 120px) 60px; max-width: 900px;
}
body.no-webgl .cta__row { justify-content: flex-start; }

@media (max-width: 760px) {
  .scrim:not(.scrim--c) { background: linear-gradient(0deg, rgba(4, 20, 15, 0.9) 0%, rgba(4, 20, 15, 0.6) 30%, rgba(4, 20, 15, 0) 50%); }
  .bar { padding: 16px; }
  .bar__logo img { height: 28px; }
  .bar__link { display: none; }
  .ch--svc, .ch--grid { left: 16px; right: 16px; width: auto; top: auto; bottom: 7vh; transform: translateY(var(--ty, 0px)); }
  .ch--svc .body, .ch--grid .body { font-size: 14px; }
  .ch--grid .body { display: none; }
  .chips { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .chip { width: auto; padding: 10px 12px; font-size: 12px; border-radius: 14px; gap: 8px; }
  .h-lg { font-size: 38px; }
  .ch--meaning, .ch--intro { bottom: 9vh; }
}

@media (prefers-reduced-motion: reduce) {
  .loader__line { animation: none; }
}
.chip { transform: translateY(var(--ty, 0px)); }
