:root {
  --intro-progress: 0;
  --name-reveal: 0;
  --slogan-reveal: 0;
  --areas-reveal: 0;
  --statement-reveal: 0;
  --next-reveal: 0;
  --surface: #02040a;
  --ink: #f6f8fc;
  --muted: #aab4c7;
  --line: rgba(196, 216, 255, 0.2);
  --focus: #cde3ff;
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  color-scheme: dark;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface);
}

body {
  min-height: 100svh;
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  color: #04070d;
  background: #f5f8ff;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.experience-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(28, 54, 92, 0.18), transparent 30%),
    linear-gradient(180deg, #010207 0%, #02050c 56%, #010207 100%);
}

#experience-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-frame {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 3, 8, 0.45), transparent 12%, transparent 88%, rgba(1, 3, 8, 0.45)),
    linear-gradient(180deg, rgba(1, 3, 8, 0.38), transparent 20%, transparent 74%, rgba(1, 3, 8, 0.72));
  box-shadow: inset 0 0 9rem rgba(0, 0, 0, 0.74);
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 1rem max(1.25rem, env(safe-area-inset-left));
}

.monogram {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(217, 231, 255, 0.22);
  border-radius: 50%;
  color: rgba(240, 246, 255, 0.82);
  background: rgba(4, 9, 18, 0.28);
  box-shadow: inset 0 0 1.3rem rgba(100, 156, 230, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.text-button,
.replay-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(230, 238, 250, 0.72);
  background: rgba(4, 8, 16, 0.28);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-button kbd {
  padding: 0.18rem 0.4rem;
  border: 1px solid rgba(211, 226, 250, 0.18);
  border-radius: 0.25rem;
  color: rgba(211, 226, 250, 0.52);
  background: rgba(255, 255, 255, 0.025);
  font: 600 0.62rem/1 system-ui, sans-serif;
}

.text-button:hover,
.replay-button:hover {
  color: #ffffff;
  border-color: rgba(220, 235, 255, 0.24);
  background: rgba(18, 31, 51, 0.52);
}

.text-button:active,
.replay-button:active {
  transform: scale(0.97);
}

.identity {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(92vw, 90rem);
  padding: 0 1rem;
  text-align: center;
  transform: translate(-50%, -48%);
  pointer-events: none;
}

.identity-kicker {
  margin: 0 0 clamp(0.65rem, 1.8vw, 1.15rem);
  color: rgba(185, 207, 239, calc(var(--name-reveal) * 0.62));
  font-size: clamp(0.62rem, 0.8vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: var(--name-reveal);
  transform: translateY(calc((1 - var(--name-reveal)) * 0.75rem));
}

.identity h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.24em;
  margin: 0;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #e9f1ff 52%, #a9bdd9 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: blur(calc((1 - var(--name-reveal)) * 0.55rem));
  font-size: clamp(3.05rem, 12.3vw, 10.5rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.072em;
  opacity: var(--name-reveal);
  text-shadow: 0 0 2.8rem rgba(111, 171, 255, calc(var(--name-reveal) * 0.2));
  transform: scale(calc(0.94 + var(--name-reveal) * 0.06));
  clip-path: inset(0 calc((1 - var(--name-reveal)) * 50%) 0 calc((1 - var(--name-reveal)) * 50%));
}

.slogan {
  margin: clamp(1.35rem, 2.8vw, 2rem) auto 0;
  color: rgba(238, 244, 253, calc(var(--slogan-reveal) * 0.92));
  font-size: clamp(1rem, 1.7vw, 1.42rem);
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.4;
  opacity: var(--slogan-reveal);
  transform: translateY(calc((1 - var(--slogan-reveal)) * 0.9rem));
  filter: blur(calc((1 - var(--slogan-reveal)) * 0.3rem));
}

.areas {
  max-width: 68rem;
  margin: clamp(1rem, 2.2vw, 1.55rem) auto 0;
  color: rgba(171, 190, 217, calc(var(--areas-reveal) * 0.78));
  font-size: clamp(0.58rem, 0.82vw, 0.77rem);
  font-weight: 600;
  letter-spacing: clamp(0.12em, 0.34vw, 0.28em);
  line-height: 1.9;
  opacity: var(--areas-reveal);
  transform: translateY(calc((1 - var(--areas-reveal)) * 0.75rem));
}

.areas b {
  padding: 0 0.36em;
  color: rgba(225, 235, 250, 0.4);
  font-weight: 400;
}

.closing {
  position: absolute;
  z-index: 5;
  right: 1rem;
  bottom: max(5.2rem, calc(env(safe-area-inset-bottom) + 4.4rem));
  left: 1rem;
  text-align: center;
  pointer-events: none;
}

.statement,
.next-part {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.statement {
  color: rgba(231, 240, 253, calc(var(--statement-reveal) * 0.76));
  font-size: clamp(0.66rem, 1vw, 0.82rem);
  opacity: var(--statement-reveal);
  transform: translateY(calc((1 - var(--statement-reveal)) * 0.7rem));
}

.next-part {
  color: rgba(181, 203, 233, calc(var(--next-reveal) * 0.68));
  font-size: clamp(0.63rem, 0.88vw, 0.74rem);
  opacity: var(--next-reveal);
  transform: translateY(calc((1 - var(--next-reveal)) * 0.7rem));
}

.next-part span {
  padding: 0 0.35em;
  color: rgba(224, 235, 250, 0.38);
}

.experience-footer {
  position: absolute;
  z-index: 10;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: max(1.25rem, env(safe-area-inset-left));
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
}

.progress-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  overflow: hidden;
  background: rgba(185, 208, 240, 0.12);
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(124, 173, 235, 0.45), rgba(239, 247, 255, 0.92));
  box-shadow: 0 0 0.8rem rgba(116, 175, 255, 0.55);
  transform: scaleX(var(--intro-progress));
  transform-origin: left center;
}

.weather-credit {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0.6rem;
  max-width: 8.5rem;
  color: rgba(190, 207, 230, 0.42);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-decoration: none;
  transition: color 180ms ease;
}

.weather-credit:hover,
.weather-credit:focus-visible {
  color: rgba(238, 245, 255, 0.86);
}

.replay-button {
  color: rgba(230, 239, 252, 0.82);
  border-color: rgba(210, 228, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.webgl-fallback-message {
  position: absolute;
  z-index: 8;
  right: 1.25rem;
  bottom: 5.4rem;
  left: 1.25rem;
  max-width: 34rem;
  margin: auto;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(203, 220, 245, 0.15);
  border-radius: 0.45rem;
  color: rgba(218, 230, 248, 0.76);
  background: rgba(4, 8, 16, 0.74);
  text-align: center;
  backdrop-filter: blur(0.8rem);
}

.webgl-fallback-message p {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
}

.webgl-fallback-message span {
  color: rgba(183, 199, 222, 0.68);
  font-size: 0.7rem;
}

.webgl-fallback #experience-canvas {
  display: none;
}

.webgl-fallback .identity {
  transform: translate(-50%, -50%);
}

.noscript-panel {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  background: radial-gradient(circle at center, #0b1423 0%, #02040a 52%, #010207 100%);
  text-align: center;
}

.noscript-panel p {
  margin: 0;
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.07em;
}

.noscript-panel h2 {
  margin: 1.4rem 0 1rem;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 400;
}

.noscript-panel span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  line-height: 1.8;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .weather-credit {
    bottom: 0.45rem;
    max-width: 5.8rem;
    font-size: 0.43rem;
    line-height: 1.25;
  }

  .topbar {
    min-height: 4.75rem;
  }

  .text-button kbd {
    display: none;
  }

  .identity {
    width: 100%;
    padding: 0 1.15rem;
  }

  .identity h1 {
    gap: 0.18em;
    font-size: clamp(2.8rem, 13.2vw, 5.8rem);
  }

  .identity-kicker {
    letter-spacing: 0.26em;
  }

  .slogan {
    max-width: 23rem;
    font-size: clamp(0.94rem, 4vw, 1.1rem);
  }

  .areas {
    max-width: 25rem;
    font-size: 0.58rem;
    letter-spacing: 0.13em;
    line-height: 2;
  }
}

@media (max-width: 390px) {
  .identity h1 {
    font-size: 12.6vw;
  }

  .monogram {
    width: 2.55rem;
    height: 2.55rem;
  }

  .text-button {
    padding-right: 0.55rem;
    padding-left: 0.55rem;
  }
}

@media (max-height: 640px) and (orientation: landscape) {
  .experience-shell {
    min-height: 100svh;
  }

  .topbar {
    min-height: 3.75rem;
    padding-top: 0.6rem;
  }

  .identity {
    transform: translate(-50%, -52%);
  }

  .identity h1 {
    font-size: min(13vw, 6.5rem);
  }

  .slogan {
    margin-top: 0.85rem;
  }

  .areas {
    margin-top: 0.55rem;
  }

  .closing {
    bottom: 3.85rem;
  }

  .experience-footer {
    bottom: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

#world-canvas,
#experience-canvas {
  transition: opacity 1.65s cubic-bezier(0.22, 0.61, 0.36, 1), filter 1.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#world-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  filter: saturate(0.72) brightness(0.68);
}

#experience-canvas {
  z-index: 1;
  opacity: 1;
}

body.world-visible #world-canvas {
  opacity: 1;
  filter: saturate(0.94) brightness(0.9);
}

body.world-visible #experience-canvas {
  opacity: 0;
  filter: blur(0.4rem);
}

body.world-visible .ambient-frame {
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(2, 5, 10, 0.28) 0%, rgba(2, 5, 10, 0.1) 34%, transparent 60%),
    linear-gradient(90deg, rgba(1, 3, 8, 0.52), transparent 14%, transparent 86%, rgba(1, 3, 8, 0.52)),
    linear-gradient(180deg, rgba(1, 3, 8, 0.36), transparent 20%, transparent 70%, rgba(1, 3, 8, 0.66));
  box-shadow: inset 0 0 8rem rgba(0, 0, 0, 0.48);
}

body.world-visible .identity h1 {
  text-shadow:
    0 0 2.8rem rgba(5, 12, 20, 0.92),
    0 0 0.9rem rgba(2, 6, 12, 0.8),
    0 0 3.4rem rgba(111, 171, 255, calc(var(--name-reveal) * 0.12));
}

body.world-visible .slogan,
body.world-visible .areas,
body.world-visible .identity-kicker {
  text-shadow: 0 0 1.1rem rgba(1, 4, 9, 0.95), 0 0 0.24rem rgba(1, 4, 9, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  #world-canvas,
  #experience-canvas {
    transition: none;
  }
}

body.reduced-experience #world-canvas,
body.reduced-experience #experience-canvas {
  transition: none;
}

body.world-visible #world-canvas {
  filter: saturate(1.08) contrast(1.04) brightness(1.04);
}

body.world-visible .ambient-frame {
  background:
    radial-gradient(ellipse at 50% 49%, rgba(1, 4, 9, 0.38) 0%, rgba(1, 4, 9, 0.20) 26%, rgba(1, 4, 9, 0.06) 50%, transparent 68%),
    linear-gradient(90deg, rgba(1, 3, 8, 0.55), transparent 15%, transparent 85%, rgba(1, 3, 8, 0.55)),
    linear-gradient(180deg, rgba(1, 3, 8, 0.28), transparent 19%, transparent 69%, rgba(1, 3, 8, 0.7));
  box-shadow: inset 0 0 8rem rgba(0, 0, 0, 0.46);
}

body.world-visible .identity h1 {
  color: #f3f7fc;
  background: none;
  -webkit-text-fill-color: #f3f7fc;
  -webkit-text-stroke: 0.015em rgba(255, 255, 255, 0.12);
  text-shadow:
    0 0.16rem 0.22rem rgba(0, 0, 0, 0.9),
    0 0 1.1rem rgba(0, 0, 0, 0.72),
    0 0 2.7rem rgba(111, 171, 255, 0.14);
}

body.world-visible .slogan {
  color: rgba(245, 248, 252, calc(var(--slogan-reveal) * 0.96));
}

body.world-visible .areas {
  color: rgba(190, 211, 236, calc(var(--areas-reveal) * 0.86));
}

body.world-visible .identity-kicker {
  color: rgba(190, 211, 236, calc(var(--name-reveal) * 0.86));
}
