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

html, body { margin: 0; padding: 0; }
html { background: #030c09; }
body {
  background: #030c09;
  color: var(--c-ivory);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

/* soft vignette that keeps overlay text legible over the 3D scene */
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 12, 9, .78) 0%, rgba(3, 12, 9, .35) 30%, rgba(3, 12, 9, 0) 52%),
    linear-gradient(0deg, rgba(3, 12, 9, .55) 0%, rgba(3, 12, 9, 0) 28%),
    linear-gradient(180deg, rgba(3, 12, 9, .6) 0%, rgba(3, 12, 9, 0) 16%);
}

.scroller { height: 760vh; position: relative; z-index: 0; }

/* top bar */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
}
.bar__logo img { display: block; height: 38px; 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: .08em;
  text-transform: uppercase;
  opacity: .82;
}
.bar__link:hover, .bar__link:focus-visible { opacity: 1; }

.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--c-emerald-deep);
  background: var(--c-ivory);
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--c-ivory);
  transition: background .25s, color .25s;
}
.btn:hover, .btn:focus-visible { background: var(--c-ivory-dark); border-color: var(--c-ivory-dark); }
.btn--small { padding: 10px 18px; font-size: 12.5px; }
.btn--ghost { background: transparent; color: var(--c-ivory); border-color: rgba(245, 249, 252, .45); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(245, 249, 252, .08); color: var(--c-ivory); border-color: var(--c-ivory); }

/* chapters */
.story { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.ch {
  position: absolute;
  left: clamp(16px, 6vw, 96px);
  bottom: clamp(48px, 11vh, 120px);
  width: min(460px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}
.ch.is-on { visibility: visible; pointer-events: auto; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-gold);
}
h1, h2 {
  margin: 0 0 18px;
  font-family: var(--f-heading);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
h1 { font-size: clamp(44px, 5.6vw, 78px); }
h2 { font-size: clamp(38px, 4.6vw, 64px); }
h1 em, h2 em { font-style: italic; color: var(--c-ivory-dark); }
.body {
  margin: 0;
  max-width: 380px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(245, 249, 252, .82);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
}
.nowrap { white-space: nowrap; }

.cue {
  margin: 34px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(245, 249, 252, .6);
}
.cue span { display: block; width: 46px; height: 1px; background: var(--c-gold); }

/* the Clean / Clear / Cleara words */
.ch--words { width: min(520px, calc(100vw - 32px)); }
.word {
  margin: 0;
  font-family: var(--f-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(46px, 5.4vw, 76px);
  line-height: 1.02;
  color: var(--c-ivory);
  opacity: 0;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
.word--cleara {
  position: absolute;
  left: 0;
  top: 30px;
  font-style: normal;
  color: var(--c-ivory-dark);
}
.ch--words .body { margin-top: 20px; }

/* promises list */
.promises { list-style: none; margin: 8px 0 0; padding: 0; }
.promises li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid rgba(141, 191, 230, .22);
  font-size: 15px;
  color: rgba(245, 249, 252, .5);
  transition: color .4s;
}
.promises li:last-child { border-bottom: 1px solid rgba(141, 191, 230, .22); }
.promises li span {
  width: 26px;
  font-family: var(--f-heading);
  font-style: italic;
  font-size: 18px;
  color: var(--c-gold);
}
.promises li.is-active { color: var(--c-ivory); }

/* CTA */
.ch--cta {
  left: 50%;
  bottom: clamp(36px, 8vh, 90px);
  width: min(640px, calc(100vw - 32px));
  text-align: center;
}
.ch--cta h2 { font-size: clamp(44px, 5.4vw, 80px); }
.ch--cta .body { margin: 0 auto; max-width: 470px; }
.ch--cta .eyebrow { color: #C9A45C; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 0; }

.progress {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  top: 50%;
  width: 1px;
  height: 120px;
  margin-top: -60px;
  background: rgba(245, 249, 252, .14);
  z-index: 6;
}
.progress span { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--c-gold); }

/* record mode */
html.record, html.record body { overflow: hidden; scrollbar-width: none; }
html.record::-webkit-scrollbar { display: none; }
html.record .progress { display: none; }

/* no WebGL fallback */
html.no-webgl body { background: radial-gradient(120% 90% at 70% 30%, #0D3B2E 0%, #082A20 55%, #030c09 100%); }
html.no-webgl #gl, html.no-webgl .scroller, html.no-webgl .progress, html.no-webgl .veil, html.no-webgl .cue { display: none; }
html.no-webgl .story { position: static; padding: 120px clamp(16px, 6vw, 96px) 80px; display: grid; gap: 72px; pointer-events: auto; }
html.no-webgl .ch { position: static; opacity: 1; visibility: visible; transform: none; width: auto; max-width: 620px; }
html.no-webgl .word { opacity: 1; }
html.no-webgl .word--cleara { position: static; }
html.no-webgl .ch--cta { text-align: left; }
html.no-webgl .actions { justify-content: flex-start; }

@media (max-width: 640px) {
  .bar { padding: 14px 16px; }
  .bar__logo img { height: 30px; }
  .bar__link { display: none; }
  .veil {
    background:
      linear-gradient(0deg, rgba(3, 12, 9, .9) 0%, rgba(3, 12, 9, .55) 34%, rgba(3, 12, 9, 0) 56%),
      linear-gradient(180deg, rgba(3, 12, 9, .6) 0%, rgba(3, 12, 9, 0) 14%);
  }
  .ch { bottom: 40px; }
  .body { font-size: 14px; }
  .promises li { padding: 8px 0; font-size: 14px; }
  .ch--cta { top: auto; bottom: 48px; left: 16px; text-align: left; }
  .ch--cta .body { margin: 0; }
  .actions { justify-content: flex-start; }
  .progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .promises li { transition: none; }
}
