* { box-sizing: border-box; }

html,
body {
  margin: 0;
  background: var(--room-deep);
  color: var(--sand-50);
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  line-height: var(--leading-body);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p { margin: 0; }

a { color: inherit; }

::selection {
  background: rgb(var(--ember-red-rgb) / 0.5);
  color: var(--sand-50);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgb(var(--sky-top-rgb)),
    rgb(var(--sky-bottom-rgb))
  );
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainIn 2.1s ease 0.35s both;
}

@keyframes grainIn {
  from { opacity: 0; }
  to { opacity: 0.028; }
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: var(--room-veil);
  pointer-events: none;
  animation: veilLift 2.3s var(--ease-still) 0.25s both;
}

@keyframes veilLift {
  from { opacity: 1; }
  to { opacity: 0; }
}

.ember {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.ember.behind-copy { z-index: 0; }

.ember-fire {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 180px;
  margin: -108px 0 0 -70px;
}

.wrap { position: relative; z-index: 1; }

.inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  padding-inline: 1.6rem;
}

.track {
  height: var(--track-height, 190svh);
  position: relative;
}

.track-hero { --track-height: 190svh; }
.track-s { --track-height: 140svh; }
.track-reveal { --track-height: 300svh; }

.track-reveal .inner {
  transform: translateY(var(--name-rise-y, 0));
  will-change: transform;
}

.pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: center;
}

.line {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 6vw, 3.3rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 21ch;
  text-wrap: balance;
  color: var(--sand-50);
  margin: 0 auto;
  text-align: center;
}

.line em { font-style: italic; }

.who-list {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 6vw, 3.3rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--sand-50);
  margin: 0 auto;
  text-align: center;
  font-style: normal;
}

.who-chip { white-space: nowrap; display: block; }
.who-lead,
.who-lead + .who-chip { display: inline-block; }

.whisper {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 2.4vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--copper-300);
  margin: 2rem 0 0;
  opacity: 0;
  text-align: center;
}

.w {
  --ink-base: var(--sand-50);
  --ink-bottom: var(--ink-base);
  --ink-core: var(--ink-base);
  --ink-rise: 10%;
  --ink-fade: 34%;
  opacity: 0.13;
  color: var(--ink-base);
  text-shadow: none;
  background-image: linear-gradient(
    to top,
    var(--ink-bottom) 0%,
    var(--ink-core) var(--ink-rise),
    var(--ink-base) var(--ink-fade),
    var(--ink-base) 100%
  );
  background-repeat: no-repeat;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .w {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.track-hero .w {
  transition:
    opacity 0.55s ease,
    color 0.6s ease,
    text-shadow 0.85s ease;
}

.track-hero .w.warm {
  --ink-base: var(--copper-300);
  --ink-bottom: var(--fire-amber);
  --ink-core: var(--copper-300);
  opacity: 0.34;
  color: var(--copper-300);
}

.track-hero .w.hot {
  --ink-base: var(--gold-300);
  --ink-bottom: var(--fire-amber);
  --ink-core: rgb(var(--ember-hot-rgb));
  --ink-rise: 62%;
  --ink-fade: 88%;
  opacity: 1;
  color: var(--gold-300);
  text-shadow: 0 0 8px rgb(var(--ember-amber-rgb) / 0.28);
  transition-duration: 0.09s, 0.11s, 0.12s;
}

.track-hero .w.on {
  --ink-base: var(--sand-50);
  --ink-bottom: var(--sand-50);
  --ink-core: var(--sand-50);
  opacity: 1;
  color: inherit;
  text-shadow: none;
}

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(76vw, 420px);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgb(var(--ember-hot-rgb) / 0.15),
    rgb(var(--ember-flame-rgb) / 0.09) 36%,
    rgb(var(--ember-red-rgb) / 0.045) 58%,
    transparent 74%
  );
  filter: blur(2px);
}

.bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    120% 90% at 50% 55%,
    rgb(var(--ember-amber-rgb) / 0.10),
    rgb(var(--ember-red-rgb) / 0.05) 45%,
    transparent 75%
  );
}

.door-markwrap {
  --glow: 0;
  position: relative;
  display: inline-block;
  margin-bottom: 2.6rem;
}

.door-markwrap::after {
  content: '';
  position: absolute;
  inset: -42%;
  border-radius: 50%;
  opacity: var(--glow, 0);
  transform: scale(calc(0.78 + var(--glow) * 0.24));
  transform-origin: 50% 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgb(var(--ember-hot-rgb) / 0.30),
    rgb(var(--ember-amber-rgb) / 0.15) 42%,
    transparent 72%
  );
}

body.still .door-markwrap { --glow: 0.46; }

.vow-link {
  display: block;
  width: fit-content;
  margin: 1.9rem auto 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--copper-300);
  text-decoration: none;
  border-bottom: 1px solid rgb(var(--ember-copper-rgb) / 0.35);
  padding-bottom: 2px;
  opacity: 0;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.vow-link:hover {
  color: var(--gold-300);
  border-color: var(--gold-300);
}

.beat-door {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 14svh 0 12svh;
}

.door-mark {
  width: 84px;
  height: auto;
  display: block;
}

.motto {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  color: var(--sand-50);
  margin-bottom: 2.8rem;
}

.door-cta {
  --absorb: 1;
  --heat-core-x: 77.25%;
  --heat-core-y: 174%;
  --heat-opacity: 0.51;
  --heat-radius: 80%;
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: min(268px, calc(100vw - 3rem));
  min-height: 56px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.18rem;
  letter-spacing: 0.05em;
  color: var(--copper-300);
  text-decoration: none;
  padding: 0.92rem 1.45rem;
  border: 1px solid rgb(var(--ember-mote-rgb) / 0.7);
  border-radius: 999px;
  overflow: hidden;
  text-shadow: none;
  isolation: isolate;
  background:
    linear-gradient(
      100deg,
      rgb(var(--ember-red-rgb) / 0.065),
      rgb(var(--ember-amber-rgb) / 0.03) 54%,
      rgb(var(--ember-red-rgb) / 0.05)
    );
  box-shadow:
    inset 0 0 24px rgb(var(--ember-amber-rgb) / 0.035),
    0 0 28px rgb(var(--ember-red-rgb) / 0.045);
}

.door-cta::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--heat-opacity);
  -webkit-clip-path: circle(var(--heat-radius) at 50% 50%);
  clip-path: circle(var(--heat-radius) at 50% 50%);
  background:
    radial-gradient(
      ellipse var(--heat-core-x) var(--heat-core-y) at 50% 50%,
      rgb(var(--ember-hot-rgb) / 0.38),
      rgb(var(--ember-amber-rgb) / 0.21) 34%,
      rgb(var(--ember-red-rgb) / 0.14) 68%,
      rgb(var(--ember-red-rgb) / 0.08) 100%
    ),
    linear-gradient(
      100deg,
      rgb(var(--ember-red-rgb) / 0.16),
      rgb(var(--ember-amber-rgb) / 0.095) 54%,
      rgb(var(--ember-red-rgb) / 0.13)
    );
  box-shadow:
    inset 0 0 24px rgb(var(--ember-red-rgb) / 0.16),
    inset 0 0 18px rgb(var(--ember-amber-rgb) / 0.08);
  filter: saturate(1.08);
}

.cta-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  opacity: 1;
}

.cta-copy {
  color: currentColor;
}

.cta-arrow {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 18px;
  flex: 0 0 38px;
  transition: transform 0.3s var(--ease-still);
}

.cta-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cta-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
}

.door-cta.await { text-shadow: none; }
.door-cta:hover { filter: brightness(1.12); }
.door-cta:hover::before,
.door-cta:focus-visible::before {
  filter: saturate(1.12) brightness(1.08);
}

.door-cta:hover .cta-arrow path,
.door-cta:focus-visible .cta-arrow path {
  stroke: var(--gold-300);
}

.door-cta:hover .cta-arrow { transform: translateX(5px); }

.door-links {
  margin-top: 7svh;
  display: flex;
  gap: 1.7rem;
  justify-content: center;
}

.door-links a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--fg-on-void-quiet);
  text-decoration: none;
  transition: color 0.3s ease;
}

.door-links a:hover { color: var(--copper-300); }

.door-cta:focus-visible,
.vow-link:focus-visible,
.door-links a:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 4px;
  border-radius: 2px;
}

.reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .veil {
    animation: none;
    opacity: 0;
  }
  .grain { animation: none; }
  .ember { display: none; }
  .cta-arrow { transition: none; }
  .door-cta:hover .cta-arrow { transform: none; }
}

body.still .whisper,
body.still .vow-link { opacity: 1 !important; }

body.still .door-cta {
  --absorb: 1;
  --heat-core-x: 77.25%;
  --heat-core-y: 174%;
  --heat-opacity: 0.51;
  --heat-radius: 80%;
  color: var(--gold-300);
}

body.still .cta-arrow path { stroke-dashoffset: 0; }

body.still .track,
body.still .track-s,
body.still .track-reveal,
body.still .beat-door {
  height: auto;
  min-height: 100svh;
}

body.still .spark,
body.still .bloom,
body.still .ember { display: none; }

@media (forced-colors: active) {
  .w {
    color: CanvasText !important;
    background: none;
    -webkit-text-fill-color: CanvasText;
  }

  .door-cta {
    border: 2px solid ButtonText;
    background: Canvas;
    color: ButtonText !important;
  }

  .door-cta::before { display: none; }

  .cta-copy {
    color: ButtonText;
    background: none;
  }

  .cta-arrow path { stroke: ButtonText; }
}

@media (min-width: 720px) {
  .inner {
    padding-inline: clamp(1.6rem, 5vw, 3rem);
  }
}
