:root {
  --canvas: #050814;
  --paper: #0c1224;
  --ink: #f4efe4;
  --mute: #9aa3b5;
  --primary: #d4b056;
  --on-primary: #0a0c14;
  --line: #1c2438;
  --cyan: #5ad0ff;
  --font: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --display: "Cinzel", "Times New Roman", ui-serif, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gold, .gold-text {
  background: linear-gradient(180deg, #f3e2a8 0%, #d4b056 48%, #8f6d22 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gold-plain { color: var(--primary); }
.kicker { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--primary); margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: .04em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 8vw, 3.8rem); line-height: .92; text-transform: uppercase; margin: 12px 0 0; }
h2 { font-size: 1.35rem; margin: 8px 0 0; }
.italic { font-family: var(--display); font-style: italic; font-size: 1.25rem; letter-spacing: 0; text-transform: none; color: rgba(244,239,228,.85); margin: 14px 0 0; }
.lead { max-width: 28rem; color: var(--mute); line-height: 1.55; margin: 18px 0 0; }
.mute { color: var(--mute); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--mute); }
.break { word-break: break-all; }
.tiny { margin: 12px 0 0; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }

.nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(244,239,228,.08); background: rgba(5,8,20,.88); backdrop-filter: blur(12px); }
.nav-inner { max-width: 1100px; margin: 0 auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 12px; }
.brand, .brand-mark { font-family: var(--display); font-size: 18px; letter-spacing: .22em; text-transform: uppercase; }
.brand span, .brand-mark span { margin-left: 8px; font-family: var(--font); font-size: 11px; letter-spacing: .2em; color: var(--mute); }
.nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav nav a { height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; color: var(--mute); font-size: 14px; }
.nav nav a.active, .nav nav a:hover { color: var(--ink); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 40px 16px 80px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { height: 48px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.btn.secondary { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.btn.sm { height: 40px; padding: 0 12px; font-size: 13px; }
input { height: 48px; width: 100%; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); padding: 0 12px; box-shadow: 0 0 0 1px var(--line); margin-top: 12px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.field input { margin-top: 0; }
.stack { display: grid; gap: 14px; margin-top: 24px; }
.card { background: var(--paper); border-radius: 16px; padding: 20px; box-shadow: 0 0 0 1px var(--line); margin-top: 20px; }
.list { list-style: none; margin: 8px 0 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; background: rgba(212,176,86,.16); color: var(--primary); }
.qr { width: 168px; height: 168px; margin: 16px auto; background: #fff; padding: 8px; border-radius: 8px; }
.qr img, .qr canvas { width: 100%; height: 100%; display: block; }
.studio-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .studio-grid { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.stage { position: relative; min-height: 100dvh; overflow: hidden; }
.stage-video, .stage-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-video { opacity: .5; }
.stage-photo { opacity: .35; }
.stage-veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,8,20,.4), rgba(5,8,20,.7) 50%, #050814); }
.stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1px 1px at 20% 30%, rgba(244,239,228,.45), transparent), radial-gradient(1px 1px at 70% 20%, rgba(90,208,255,.35), transparent), radial-gradient(1px 1px at 40% 80%, rgba(244,239,228,.3), transparent); }
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 20px; }
.text-link { height: 44px; display: inline-flex; align-items: center; color: rgba(244,239,228,.8); }
.hero { position: relative; z-index: 2; max-width: 32rem; padding: 48px 20px 80px; }
.door { display: grid; gap: 10px; margin-top: 28px; max-width: 22rem; }
.door input { margin-top: 0; }

.stage-form .auth-card { position: relative; z-index: 2; max-width: 26rem; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 48px 20px; }
.stage-form h1 { text-transform: none; letter-spacing: -.02em; font-size: 2.4rem; }

.invite-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 72px 16px 40px; }
.invite-frame { position: relative; width: min(100%, 26rem); aspect-ratio: 9/16; overflow: hidden; border-radius: 12px; box-shadow: 0 24px 60px -24px rgb(0 0 0 / .7), 0 0 0 1px rgb(212 176 86 / .18); }
.invite-frame video, .invite-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.invite-frame video { z-index: 1; transform-origin: 50% 67%; transition: transform 1.1s cubic-bezier(.22,1,.36,1), filter 1.1s cubic-bezier(.22,1,.36,1), opacity .45s ease; }
.invite-frame video.is-entering { transform: scale(1.58); filter: brightness(1.18) saturate(1.12); }
.invite-still { z-index: 0; }
.invite-sealed, .invite-open { position: absolute; inset: 0; z-index: 2; }
.invite-sealed { display: flex; flex-direction: column; }
.invite-cap { padding: 22px 20px 0; text-align: center; background: linear-gradient(to bottom, rgba(5,8,20,.8), transparent); }
.invite-cap h2 { font-size: 1.4rem; }
.portal-hit { position: absolute; left: 50%; top: 67%; width: 68%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; background: transparent; border-radius: 50%; }
.portal-pulse, .portal-ring, .portal-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.portal-pulse { inset: -10%; border: 1px solid rgba(90,208,255,.45); animation: portal-pulse 2.6s ease-in-out infinite; }
.portal-ring { inset: -3%; border: 2px dashed rgba(212,176,86,.8); animation: ring-spin 28s linear infinite; }
.portal-glow { inset: 0; border: 3px solid rgba(212,176,86,.7); box-shadow: 0 0 0 1px rgb(212 176 86 / .45), 0 0 40px rgb(90 208 255 / .22), 0 0 80px rgb(212 176 86 / .12); }
.tap { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; letter-spacing: .32em; text-transform: uppercase; font-size: 11px; }
.invite-sealed.is-leaving { opacity: 0; transform: scale(1.1); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.invite-open { display: flex; align-items: flex-end; background: linear-gradient(to top, #050814 12%, rgba(5,8,20,.7) 38%, transparent 58%); animation: plate-rise 700ms cubic-bezier(.22,1,.36,1) both; }
.invite-open[hidden], .invite-sealed[hidden] { display: none; }
.gold-plate { width: 100%; margin: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, rgb(12 18 36 / .78), rgb(5 8 20 / .94)); box-shadow: 0 0 0 1px rgb(212 176 86 / .5), inset 0 1px 0 rgb(243 226 168 / .18), 0 18px 40px rgb(0 0 0 / .4); }
.plate-copy h2 { font-size: 1.25rem; line-height: 1.15; }
.city { margin: 6px 0 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.when { margin: 8px 0 0; font-size: 12px; color: var(--mute); }
.plate-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.plate-qr #qr { width: 84px; height: 84px; background: #fff; padding: 4px; border-radius: 6px; }
.plate-qr #qr img, .plate-qr #qr canvas { width: 100%; height: 100%; display: block; }
.code { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .08em; }
.scan { margin: 0; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.foot-note { margin: 16px 16px 0; text-align: center; color: var(--mute); font-size: 13px; }

@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes portal-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}
@keyframes plate-rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .portal-pulse, .portal-ring { animation: none; }
  .invite-frame video { transition: none; }
}
