/* ================= loader ================= */
.loader {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; gap: 28px;
  background: #f4f1fb; color: #0b0820; transition: opacity 1s var(--ease), visibility 1s;
}
.loader__top, .loader__bottom { position: absolute; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .14em; }
.loader__top { top: 36px; }
.loader__bottom { bottom: 36px; }
.loader__pct { font-size: 11px; min-width: 3ch; text-align: center; }
.loader__eye { width: 150px; height: 90px; }
.loader__eye path, .loader__eye circle { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.2s var(--ease); }
.loader__eye .l3 { fill: currentColor; fill-opacity: 0; transition: stroke-dashoffset 1.2s var(--ease), fill-opacity .6s; }
.loader.done .loader__eye .l3 { fill-opacity: 1; }
.loader__enter {
  position: absolute; bottom: 88px; left: 50%; transform: translate(-50%, 10px); opacity: 0;
  padding: 14px 26px; border: 1px solid #0b0820; font-size: 11px; letter-spacing: .16em;
  transition: opacity .6s, transform .6s var(--ease-out), background .3s, color .3s;
}
.loader.done .loader__enter { opacity: 1; transform: translate(-50%, 0); }
.loader__enter:hover { background: #0b0820; color: #f4f1fb; }
body.is-open .loader { opacity: 0; visibility: hidden; pointer-events: none; }

/* eyelids: close then open over the scene when entering */
.lid { position: fixed; left: -10%; right: -10%; height: 55%; z-index: 79; background: #05030f; pointer-events: none; transition: transform 1.1s var(--ease); }
.lid--top { top: 0; border-radius: 0 0 50% 50% / 0 0 30% 30%; transform: translateY(-105%); }
.lid--bottom { bottom: 0; border-radius: 50% 50% 0 0 / 30% 30% 0 0; transform: translateY(105%); }
body.is-blinking .lid--top, body.is-blinking .lid--bottom { transform: translateY(0); transition-duration: .45s; }

/* ================= scene layers ================= */
.plates { position: fixed; inset: -4%; z-index: 0; }
.plate {
  position: absolute; inset: 0; background: var(--img) center / cover no-repeat; opacity: 0;
  transform: scale(1.12) translate3d(var(--px, 0), var(--py, 0), 0);
  transition: opacity 1.6s var(--ease), transform 2.4s var(--ease-out); will-change: transform, opacity;
}
.plate.on { opacity: 1; transform: scale(1.02) translate3d(var(--px, 0), var(--py, 0), 0); }
.gl { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; display: block; }

/* ================= HUD ================= */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 24px 32px; opacity: 0; transform: translateY(-12px); transition: opacity 1s .6s, transform 1s .6s var(--ease-out);
}
body.is-open .hud-top, body.is-open .hud-bottom, body.is-open .stack { opacity: 1; transform: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #9d7bff, #4c2fd6); color: #fff; box-shadow: 0 0 30px rgba(139, 108, 255, .5); }
.brand__mark svg { width: 26px; height: 26px; }
.brand__word { font-weight: 700; letter-spacing: .06em; font-size: 15px; }
.hud-top__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dots { position: absolute; left: 50%; top: 38px; transform: translateX(-50%); display: flex; gap: 14px; }
.dots button { position: relative; width: 14px; height: 14px; display: grid; place-items: center; }
.dots button::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-2); transition: all .4s var(--ease-out); }
.dots button.on::before { width: 7px; height: 7px; background: #fff; box-shadow: 0 0 12px var(--accent-2); }

.menu-btn { display: inline-flex; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: .12em; padding-left: 8px; }
.menu-btn i { display: block; height: 1px; background: currentColor; transition: transform .4s var(--ease-out); transform-origin: left; }
.menu-btn:hover i { transform: scaleX(.5); }

/* ================= phases ================= */
.phases { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.phase {
  position: absolute; left: clamp(20px, 7vw, 120px); top: 50%; width: min(460px, calc(100vw - 40px));
  transform: translateY(-40%); pointer-events: none;
}
.phase > * { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.phase.on { pointer-events: auto; }
.phase.on > * { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.phase.on > :nth-child(2) { transition-delay: .12s; }
.phase.on > :nth-child(3) { transition-delay: .24s; }
.phase.on > :nth-child(4) { transition-delay: .36s; }
.phase__title {
  margin: 18px 0 18px; font-weight: 500; font-size: clamp(34px, 4.6vw, 64px); line-height: .98; letter-spacing: -.01em; text-transform: uppercase;
  text-shadow: 0 4px 40px rgba(10, 4, 40, .8);
}
.phase__body { color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 400px; margin-bottom: 22px; text-shadow: 0 2px 20px rgba(0, 0, 0, .8); }
.more { display: inline-flex; align-items: center; gap: 16px; font-size: 13px; }
.more__icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(10px); transition: border-color .3s, transform .5s var(--ease-out); }
.more__icon svg { width: 30px; height: 30px; }
.more span:last-child { position: relative; padding-left: 14px; }
.more span:last-child::before { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--ink); }
.more:hover .more__icon { border-color: var(--accent-2); transform: rotate(-8deg) scale(1.05); }

.launch { margin: 0 0 26px; padding: 18px 20px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(12px); width: fit-content; }
.launch__label, .launch__date { font-size: 11px; letter-spacing: .12em; color: var(--ink-2); }
.launch__clock { display: flex; align-items: baseline; gap: 4px; margin: 8px 0; font-size: clamp(30px, 3.4vw, 44px); }
.launch__clock i { font-style: normal; font-size: 13px; color: var(--ink-3); margin-right: 10px; }
.launch.live .launch__clock { color: var(--jade); }

/* ================= right stack / bottom ================= */
.stack {
  position: fixed; right: clamp(20px, 5vw, 80px); top: 60%; z-index: 20; width: 300px;
  font-size: 13px; line-height: 1.6; color: var(--ink); opacity: 0; transition: opacity 1s 1s;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .9);
}
.stack a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.stack a:hover { border-color: currentColor; }
.c-jade { color: var(--jade); } .c-amber { color: var(--amber); } .c-violet { color: var(--violet); } .c-crimson { color: var(--crimson); }

.hud-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 28px 32px; opacity: 0; transform: translateY(12px); transition: opacity 1s .8s, transform 1s .8s var(--ease-out); pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }
.caption { max-width: 240px; font-size: 13px; line-height: 1.35; }
.scroll-hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 10px; letter-spacing: .18em; color: var(--ink-2); animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.enter { display: flex; align-items: center; gap: 12px; }
.enter__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; transition: transform .5s var(--ease-out); box-shadow: 0 0 24px rgba(139, 108, 255, .6); }
.enter__icon svg { width: 14px; height: 14px; }
.enter:hover .enter__icon { transform: rotate(45deg) scale(1.1); }
.enter__text { display: flex; flex-direction: column; }
.enter__text b { font-weight: 500; font-size: 14px; }
.enter__text small { font-size: 11px; color: var(--ink-2); }

/* ================= menu ================= */
.menu {
  position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; justify-content: center;
  padding: 120px clamp(20px, 8vw, 140px) 40px; background: rgba(12, 6, 36, .55); backdrop-filter: blur(24px) saturate(1.3);
  clip-path: circle(0% at calc(100% - 60px) 40px); transition: clip-path .9s var(--ease);
}
body.menu-open .menu { clip-path: circle(150% at calc(100% - 60px) 40px); }
.menu__inner { display: flex; flex-direction: column; gap: 4px; }
.menu__link { display: flex; align-items: baseline; gap: 18px; font-size: clamp(34px, 6.5vw, 84px); font-weight: 500; line-height: 1.02; text-transform: uppercase; color: var(--ink-2); transition: color .3s, transform .5s var(--ease-out); }
.menu__link i { font-style: normal; font-size: 12px; color: var(--accent-2); }
.menu__link:hover { color: #fff; transform: translateX(14px); }
.menu__foot { position: absolute; left: clamp(20px, 8vw, 140px); right: clamp(20px, 8vw, 140px); bottom: 36px; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .12em; color: var(--ink-2); }
body.menu-open .menu-btn i:first-of-type { transform: scaleX(.5); }

/* hero CA chip */
.ca-pill--hero { margin-bottom: 22px; width: fit-content; max-width: 100%; }
.ca-pill--hero .addr { overflow: hidden; text-overflow: ellipsis; }
/* legibility scrim behind the phase text */
.phases::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7,5,26,.55) 0%, rgba(7,5,26,.2) 38%, transparent 60%); }

/* ================= responsive ================= */
@media (max-width: 1100px) {
  .ca-pill b { display: none; }
  .stack { display: none; }
}
@media (max-width: 760px) {
  .hud-top { padding: 14px 14px; gap: 8px; }
  .brand__word, .sound span:first-child, .ca-pill--nav, .lg-only, .dots { display: none; }
  .brand__mark { width: 36px; height: 36px; border-radius: 10px; }
  .hud-top__right { gap: 8px; }
  .hud-top__right .btn { height: 36px; }
  .hud-top__right .btn--icon { width: 36px; }
  .hud-top__right .btn--solid { padding: 0 12px; }
  .menu-btn { padding-left: 2px; }
  .phases::before { background: linear-gradient(0deg, rgba(7,5,26,.92) 0%, rgba(7,5,26,.6) 42%, transparent 64%); }
  .phase { top: auto; bottom: 92px; transform: none; }
  .phase__title { font-size: 34px; margin: 12px 0; }
  .phase__body { font-size: 14px; margin-bottom: 16px; }
  .ca-pill--hero { margin-bottom: 16px; }
  .more__icon { width: 46px; height: 46px; }
  .launch { margin-bottom: 16px; padding: 14px 16px; }
  .hud-bottom { padding: 14px; }
  .caption, .scroll-hint { display: none; }
  .loader__enter { bottom: 76px; }
  body.menu-open .hud-bottom { opacity: 0; pointer-events: none; }
  .menu { padding: 100px 24px 110px; }
  .menu__foot { flex-direction: column; gap: 10px; bottom: 28px; left: 24px; right: 24px; }
}
@media (max-width: 360px) {
  .hud-top__right .btn--solid svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .plate, .phase > * { transition-duration: .01s !important; }
}

/* the hero chip always names itself */
.ca-pill--hero b { display: inline !important; }
