/* ============================================================
   MUSE — a study in light, motion and type
   ============================================================ */
:root {
  --hue: 265;                       /* cycled by JS */
  --ink: #f4f2ff;
  --ink-dim: rgba(244, 242, 255, .62);
  --c1: hsl(var(--hue) 95% 68%);
  --c2: hsl(calc(var(--hue) + 55) 95% 62%);
  --c3: hsl(calc(var(--hue) - 45) 90% 60%);
  --bg: #07060d;
  --mx: 50%;                        /* cursor position, % */
  --my: 50%;
  --rx: 0deg;                       /* parallax tilt */
  --ry: 0deg;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
}

::selection { background: var(--c2); color: #0a0916; }

/* ---------- intro curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 60;
  background: #05040a;
  display: grid; place-items: center;
  animation: curtain-up 1s cubic-bezier(.76, 0, .24, 1) .45s forwards;
}
.curtain span {
  font-family: "Unbounded", sans-serif; font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.6rem); letter-spacing: .55em; text-indent: .55em;
  color: var(--ink-dim);
  animation: curtain-pulse .45s ease both;
}
@keyframes curtain-up { to { transform: translateY(-101%); visibility: hidden; } }
@keyframes curtain-pulse { from { opacity: 0; letter-spacing: .9em; } to { opacity: 1; } }

/* ---------- ambient layers ---------- */
#stars { position: fixed; inset: 0; z-index: 0; }

.aurora { position: fixed; inset: -20%; z-index: 0; filter: blur(70px) saturate(130%); opacity: .8; }
.blob {
  position: absolute; border-radius: 50%;
  mix-blend-mode: screen;
  transition: background 1.2s ease;
}
.blob-a {
  width: 55vmax; height: 55vmax; left: -8%; top: -12%;
  background: radial-gradient(circle at 35% 35%, var(--c1), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-b {
  width: 48vmax; height: 48vmax; right: -6%; top: 22%;
  background: radial-gradient(circle at 60% 40%, var(--c2), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.blob-c {
  width: 40vmax; height: 40vmax; left: 30%; bottom: -18%;
  background: radial-gradient(circle at 50% 50%, var(--c3), transparent 65%);
  animation: drift-a 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 6vh) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-8vw, -7vh) scale(.92); }
}

.grid {
  position: fixed; inset: 0; z-index: 1;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, #000 30%, transparent 75%);
}

.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift .9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); } 100% { transform: translate(0, 0); }
}

.cursor-glow {
  position: fixed; z-index: 2; pointer-events: none;
  width: 560px; height: 560px; left: 0; top: 0;
  transform: translate(calc(var(--mx) - 280px), calc(var(--my) - 280px));
  background: radial-gradient(circle, hsla(var(--hue), 95%, 70%, .14), transparent 60%);
  transition: background 1.2s ease;
}

/* vignette */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, rgba(0,0,0,.55));
}

/* ---------- chrome (header / footer) ---------- */
.chrome {
  position: fixed; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 4vw, 48px);
  font-size: .72rem; letter-spacing: .28em; color: var(--ink-dim);
}
.chrome-top { top: 0; animation: fade-in 1s ease 1.2s both; }
.chrome-bottom { bottom: 0; padding-top: 0; padding-bottom: 18px; }
.brand { font-family: "Unbounded", sans-serif; font-weight: 700; color: var(--ink); font-size: .85rem; }
.brand sup { font-size: .5em; color: var(--c2); }
.chrome-meta { display: flex; align-items: center; gap: .6em; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: #3dff9a;
  box-shadow: 0 0 12px #3dff9a;
  animation: blink 2.2s ease infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.marquee { overflow: hidden; width: 100%; opacity: .5;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; width: max-content; white-space: nowrap;
  font-family: "Unbounded", sans-serif; font-size: .68rem; font-weight: 500; letter-spacing: .3em;
  animation: marquee 30s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 10;
  height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 20px;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s cubic-bezier(.2, .8, .3, 1);
}

.kicker {
  font-size: clamp(.62rem, 1.4vw, .78rem);
  letter-spacing: .5em; text-indent: .5em;
  color: var(--ink-dim); font-weight: 500;
  margin-bottom: clamp(10px, 2.5vh, 26px);
}

/* the word */
.word {
  font-family: "Unbounded", sans-serif;
  font-weight: 900;
  font-size: clamp(4.5rem, 21vw, 19rem);
  line-height: .95;
  letter-spacing: .01em;
  display: flex;
  user-select: none;
}
.letter {
  display: inline-block;
  background: linear-gradient(115deg, var(--ink) 10%, var(--c1) 38%, var(--c2) 55%, var(--c3) 75%, var(--ink) 95%);
  background-size: 280% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px hsla(var(--hue), 95%, 65%, .35));
  animation:
    letter-in 1.1s cubic-bezier(.19, 1, .22, 1) calc(.55s + var(--i) * .09s) both,
    sheen 7s ease-in-out calc(var(--i) * .35s) infinite,
    floaty 6s ease-in-out calc(var(--i) * .45s) infinite;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), filter .3s ease;
}
.letter:hover {
  transform: translateY(-14px) rotate(-3deg) scale(1.06);
  filter: drop-shadow(0 0 44px hsla(var(--hue), 95%, 70%, .75));
  animation-play-state: paused;
}
.letter.pop { animation: pop .55s cubic-bezier(.34, 1.8, .64, 1), sheen 7s ease-in-out infinite; }
@keyframes letter-in {
  from { opacity: 0; transform: translateY(70px) rotate(6deg) scale(.85); filter: blur(14px); }
  to   { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: blur(0) drop-shadow(0 0 26px hsla(var(--hue), 95%, 65%, .35)); }
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@keyframes pop {
  0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(3deg); } 100% { transform: scale(1); }
}

/* floor reflection */
.reflection {
  font-family: "Unbounded", sans-serif; font-weight: 900;
  font-size: clamp(4.5rem, 21vw, 19rem); line-height: .95;
  display: flex; height: .52em; overflow: hidden;
  transform: scaleY(-1) translateY(-.08em);
  opacity: .16; filter: blur(3px);
  mask-image: linear-gradient(to top, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%);
  pointer-events: none;
}
.reflection span {
  background: linear-gradient(var(--c2), transparent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.tagline {
  margin-top: clamp(16px, 3.5vh, 34px);
  font-size: clamp(.95rem, 2vw, 1.2rem);
  font-weight: 300; line-height: 1.65; color: var(--ink-dim);
}
.tagline em { font-style: normal; color: var(--ink); opacity: .85; }

.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: clamp(18px, 4vh, 36px); }
.chip {
  font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.chip:hover { transform: translateY(-3px); border-color: var(--c1); background: rgba(255,255,255,.1); }

/* staged reveals */
.reveal { opacity: 0; animation: rise .9s cubic-bezier(.19, 1, .22, 1) var(--d, 1s) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .chrome-meta { display: none; }
  .reflection { display: none; }
  .word { font-size: 24vw; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .curtain { display: none; }
  .reveal { opacity: 1; }
}
