@font-face {
  font-family: 'Michroma';
  src: url('fonts/michroma-latin.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('fonts/hanken-grotesk-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --stage: #0C0716;
  --amethyst: #8E4DFF;
  --lilac: #C4A2FF;
  --brass: #E7B871;
  --silver: #D3CEDD;
  --text: #F4F0FB;
  --muted: #ABA1BE;
  --faint: #8C82A0;
  --line: rgba(244, 240, 251, .16);
  --error: #FFA3A3;
  --display: 'Michroma', 'Arial', sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(70% 55% at 78% 8%, rgba(231, 184, 113, .08), transparent 60%),
    radial-gradient(60% 50% at 20% 100%, rgba(142, 77, 255, .14), transparent 70%),
    var(--stage);
  background-attachment: fixed;
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lilac); }

/* Michroma draws % like "0/o", so the sign borrows the body face */
.pct { font-family: var(--body); font-weight: 600; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* ---------- layout ---------- */

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 48px) 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.copy { max-width: 31rem; }

.brand { display: inline-block; }
.brand img { display: block; width: clamp(150px, 15vw, 196px); height: auto; }

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: clamp(32px, 7vh, 72px) 0 20px;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 19px);
}

footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 48px) 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 32px;
  font-size: 13px;
  color: var(--faint);
}
footer p { margin: 0; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- the display case ---------- */

.vitrine {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 4 / 5;
  max-height: min(78svh, 680px);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(110% 75% at 88% -5%, rgba(231, 184, 113, .26), rgba(231, 184, 113, 0) 58%),
    radial-gradient(90% 55% at 50% 105%, rgba(142, 77, 255, .22), transparent 70%),
    linear-gradient(180deg, #130B20, #0A0612);
}

/* warm light falling from the top right, like a studio spot */
.vitrine::before {
  content: '';
  position: absolute;
  inset: -10% -20% 30% 25%;
  background: linear-gradient(200deg, rgba(255, 214, 150, .22), rgba(255, 214, 150, 0) 60%);
  clip-path: polygon(70% 0, 100% 0, 62% 100%, 18% 100%);
  filter: blur(28px);
  pointer-events: none;
}

.reveal-btn {
  position: absolute;
  z-index: 3;
  top: clamp(16px, 4%, 26px);
  left: clamp(16px, 4%, 26px);
  font: 400 clamp(12px, 1.05vw, 14px)/1 var(--display);
  letter-spacing: .02em;
  color: var(--text);
  padding: 17px 26px;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 251, .4);
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.reveal-btn:hover { background: rgba(196, 162, 255, .14); border-color: var(--lilac); }

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 14%;
  perspective: 1100px;
  perspective-origin: 50% 35%;
}

.float, .rattle { transform-style: preserve-3d; }
.float { animation: float 6s ease-in-out infinite; }
.rattle { animation: rattle 7s ease-in-out 2.5s infinite; }

.box {
  --W: 300px;  /* width */
  --D: 172px;  /* depth */
  --H: 128px;  /* body height */
  --L: 46px;   /* lid height */
  position: relative;
  width: var(--W);
  height: var(--H);
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(-30deg);
  animation: sway 10s ease-in-out infinite alternate;
  cursor: pointer;
}

.face {
  position: absolute;
  border: 2px solid rgba(206, 172, 255, .95);
  border-radius: 5px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 38%),
    linear-gradient(155deg, rgba(186, 140, 255, .40), rgba(116, 56, 232, .17) 50%, rgba(186, 140, 255, .32));
  box-shadow:
    0 0 14px rgba(150, 90, 255, .75),
    inset 0 0 18px rgba(150, 90, 255, .55),
    inset 0 0 2px rgba(255, 255, 255, .8);
}

/* body */
.side.front, .side.back { left: 0; top: 0; width: var(--W); height: var(--H); }
.side.front { transform: translateZ(calc(var(--D) / 2)); transform-style: preserve-3d; }
.side.back { transform: rotateY(180deg) translateZ(calc(var(--D) / 2)); }
.side.left, .side.right { top: 0; left: calc((var(--W) - var(--D)) / 2); width: var(--D); height: var(--H); }
.side.left { transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.side.right { transform: rotateY(90deg) translateZ(calc(var(--W) / 2)); }
.bottom {
  left: 0;
  top: calc((var(--H) - var(--D)) / 2);
  width: var(--W);
  height: var(--D);
  transform: rotateX(-90deg) translateZ(calc(var(--H) / 2));
  background: radial-gradient(closest-side, rgba(214, 170, 255, .55), rgba(104, 46, 226, .16));
}

/* silver lock with the crown mask, sitting just proud of the front panel */
.lock {
  position: absolute;
  left: 50%;
  top: calc(var(--H) * -.16);
  width: calc(var(--H) * .36);
  height: calc(var(--H) * .36);
  margin-left: calc(var(--H) * -.18);
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(145deg, #F6F4FA, #A29EAE 42%, #E6E3EC 58%, #7D798A);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .5);
  transform: translateZ(3px);
  transition: box-shadow .35s;
}
.lock img { width: 78%; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }

/* lid, hinged along its back edge */
.lid {
  position: absolute;
  left: 0;
  top: calc(var(--L) * -1);
  width: var(--W);
  height: var(--L);
  transform-style: preserve-3d;
  transform-origin: 50% 100% calc(var(--D) / -2);
  transition: transform 1.1s cubic-bezier(.3, 1.35, .55, 1);
}
.lid-front, .lid-back { left: 0; top: 0; width: var(--W); height: var(--L); }
.lid-front { transform: translateZ(calc(var(--D) / 2)); }
.lid-back { transform: rotateY(180deg) translateZ(calc(var(--D) / 2)); }
.lid-left, .lid-right { top: 0; left: calc((var(--W) - var(--D)) / 2); width: var(--D); height: var(--L); }
.lid-left { transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.lid-right { transform: rotateY(90deg) translateZ(calc(var(--W) / 2)); }
.lid-top {
  left: 0;
  top: calc((var(--L) - var(--D)) / 2);
  width: var(--W);
  height: var(--D);
  transform: rotateX(90deg) translateZ(calc(var(--L) / 2));
  display: grid;
  place-items: center;
}
.lid-top img { width: 46%; height: auto; opacity: .55; }

/* light inside the box */
.core {
  position: absolute;
  left: 10%;
  top: 0;
  width: 80%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 228, 176, .55), rgba(196, 140, 255, .25) 55%, transparent);
  transform: rotateY(30deg) rotateX(18deg);
  animation: glow 3.2s ease-in-out infinite;
}

.beam {
  position: absolute;
  left: 15%;
  bottom: 40%;
  width: 70%;
  height: 300%;
  background: linear-gradient(to top, rgba(255, 228, 176, .55), rgba(196, 140, 255, .22) 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  transform-origin: 50% 100%;
  transform: rotateY(30deg) rotateX(18deg) scaleY(0);
  opacity: 0;
  transition: transform .9s ease-out .3s, opacity .9s ease-out .3s;
}

/* what's inside */
.prize {
  --PW: calc(var(--W) * .46);
  --PH: calc(var(--H) * 1.02);
  position: absolute;
  left: calc((var(--W) - var(--PW)) / 2);
  top: calc((var(--H) - var(--PH)) / 2);
  width: var(--PW);
  height: var(--PH);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(231, 184, 113, .75);
  background: linear-gradient(165deg, #2B1749, #140A24);
  box-shadow: 0 0 26px rgba(231, 184, 113, .45), inset 0 0 18px rgba(142, 77, 255, .35);
  opacity: 0;
  transform: translateY(35%) rotateY(30deg) rotateX(18deg) scale(.7);
  transition: transform 1.1s cubic-bezier(.2, .9, .25, 1.12) .35s, opacity .35s ease .35s;
}
.prize img { width: 58%; height: auto; }
.prize strong { font: 400 calc(var(--W) * .075)/1.2 var(--display); color: var(--brass); }
.prize > span { font-size: calc(var(--W) * .04); line-height: 1.3; color: var(--text); }

.floor {
  position: absolute;
  left: 50%;
  top: 76%;
  width: 380px;
  max-width: 85%;
  height: 70px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 90, 255, .55), rgba(150, 90, 255, 0));
  filter: blur(10px);
  animation: floor 6s ease-in-out infinite;
}

.sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

/* opening sequence */
.is-unlocking .rattle { animation: shake .55s ease-in-out; }
.is-unlocking .lock { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 0 22px 6px rgba(231, 184, 113, .85); }
.is-open .rattle { animation: none; }
.is-open .lid { transform: rotateX(112deg); }
.is-open .beam { opacity: 1; transform: rotateY(30deg) rotateX(18deg) scaleY(1); }
.is-open .core { animation: none; opacity: 1; }
.is-open .prize { opacity: 1; transform: translateY(-112%) rotateY(30deg) rotateX(18deg) scale(1); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes floor {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes sway {
  from { transform: rotateX(-18deg) rotateY(-36deg); }
  to { transform: rotateX(-18deg) rotateY(-24deg); }
}
@keyframes rattle {
  0%, 84%, 100% { transform: rotateZ(0); }
  86% { transform: rotateZ(-2.5deg); }
  88% { transform: rotateZ(2.5deg); }
  90% { transform: rotateZ(-2deg); }
  92% { transform: rotateZ(1.5deg); }
  94% { transform: rotateZ(0); }
}
@keyframes shake {
  0%, 100% { transform: rotateZ(0); }
  20% { transform: rotateZ(-4deg) translateY(-3px); }
  40% { transform: rotateZ(4deg); }
  60% { transform: rotateZ(-3deg) translateY(-2px); }
  80% { transform: rotateZ(2deg); }
}
@keyframes glow {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ---------- waitlist dialog ---------- */

.waitlist {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 32px 28px 24px;
  border: 1px solid rgba(196, 162, 255, .35);
  border-radius: 22px;
  color: var(--text);
  background: linear-gradient(180deg, #1A1029, #0F0919);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(142, 77, 255, .22);
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 162, 255, .35) transparent;
}
.waitlist::backdrop { background: rgba(6, 3, 12, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.waitlist[open] { animation: pop .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.close:hover { background: rgba(255, 255, 255, .12); }

.wl-mark { display: block; width: 84px; height: auto; margin: 0 auto 14px; }
.waitlist h2 {
  font: 400 clamp(18px, 4.6vw, 21px)/1.35 var(--display);
  text-align: center;
  margin: 0 0 8px;
  text-wrap: balance;
}
.waitlist h2:focus { outline: none; }
.wl-sub { text-align: center; color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.wl-sub strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label:not(.check) { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; color: var(--faint); }

.waitlist input[type=email], .waitlist input[type=tel] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 13px 14px;
  border: 1px solid rgba(244, 240, 251, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.waitlist input::placeholder { color: #6F6584; }
.waitlist input[type=email]:focus-visible, .waitlist input[type=tel]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: transparent;
}
.waitlist input[aria-invalid=true] { border-color: var(--error); }

.hint { margin: 0; font-size: 13px; color: var(--faint); }
.err { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--error); }

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.5;
  color: #D8D0E6;
  cursor: pointer;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(244, 240, 251, .5);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.check input:checked { background: var(--amethyst); border-color: var(--amethyst); }
.check input:checked::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.check input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.check input[aria-invalid=true] { border-color: var(--error); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn-primary {
  width: 100%;
  margin-top: 6px;
  padding: 17px 20px;
  font: 400 14px/1.2 var(--display);
  letter-spacing: .02em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: linear-gradient(180deg, #A06AFF, #7934F0);
  box-shadow: 0 10px 30px rgba(142, 77, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
  cursor: pointer;
  transition: filter .2s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary[aria-busy=true] { opacity: .7; cursor: progress; }

.form-err { margin-top: 12px; text-align: center; }
.fine { margin: 14px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

/* ---------- small screens ---------- */

@media (max-width: 899px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    justify-items: center;
    text-align: center;
    padding-top: 22px;
  }
  .copy { display: contents; }
  .brand { order: 0; margin-bottom: 20px; }
  .brand img { width: 150px; }
  .vitrine { order: 1; max-width: 460px; }
  h1 { order: 2; margin: 32px 0 14px; }
  .lede { order: 3; margin-inline: auto; }
  footer { justify-content: center; text-align: center; }
  footer .links { justify-content: center; }
}

@media (max-width: 480px) {
  .box { --W: 214px; --D: 124px; --H: 92px; --L: 32px; }
  .floor { width: 270px; }
  .reveal-btn { padding: 14px 20px; }
  .prize > span { font-size: 10px; }
  .waitlist { padding: 26px 20px 20px; }
  .wl-mark { width: 64px; margin-bottom: 10px; }
  .wl-sub { margin-bottom: 18px; }
  .field { margin-bottom: 14px; }
}

@media (min-width: 481px) and (max-width: 1100px) {
  .box { --W: 260px; --D: 150px; --H: 112px; --L: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .float, .rattle, .box, .core, .floor { animation: none !important; }
  .lid, .prize, .beam, .lock { transition: none !important; }
  .waitlist[open] { animation: none; }
}
