/* ============================================================
   Quantum Aura — front-door experience styling
   Warm cinematic dark, matches the indie lab theme.
   ============================================================ */

/* ── Classroom background video (behind everything, dimmed) ── */
html { background: #0B0D14; }
body { background: transparent !important; }
.bg-cosmos { background: transparent !important; }
.bg-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -3;
  opacity: 0.38;
  pointer-events: none;
}
.bg-video-veil {
  position: fixed; inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11,13,20,0.78), rgba(10,11,16,0.9));
}
@media (prefers-reduced-motion: reduce) { .bg-video { display: none; } }

#auraPage { display: none; }
#auraPage.active { display: block; }

.aura-wrap {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  padding: 40px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
/* dim the classroom video behind the aura so the orb pops */
.aura-wrap::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 38%, rgba(6,8,14,0.5), rgba(6,8,14,0.92));
}

.aura-back {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light, #2A2B34);
  background: rgba(26,27,36,0.6);
  color: var(--text-secondary, #A8A5A0);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.23,1,0.32,1), color 140ms ease;
}
.aura-back:active { transform: scale(0.94); }
@media (hover: hover) { .aura-back:hover { color: var(--coral, #E87979); } }

.aura-eyebrow {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold, #D4A574);
  margin-top: 12px;
}

.aura-twin-banner {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(232,121,121,0.15), rgba(139,107,174,0.15));
  border: 1px solid rgba(212,165,116,0.35);
  color: var(--text-primary, #E6E2DC);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 360px;
}

/* ── Orb ─────────────────────────────────────────────────── */
.aura-stage {
  height: 240px;
  display: grid;
  place-items: center;
  margin: 24px 0 8px;
}
.aura-orb {
  position: relative;
  width: 168px; height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  will-change: transform, filter;
}
.aura-orb-glyph { font-size: 84px; line-height: 1; }

/* superposition: two ghost states crossfading = genuinely "both at once" */
.aura-orb.superposed {
  background: radial-gradient(circle at 50% 40%, rgba(212,165,116,0.25), rgba(139,107,174,0.18) 60%, rgba(0,0,0,0) 72%);
  box-shadow: 0 0 60px rgba(212,165,116,0.25), 0 0 90px rgba(139,107,174,0.2);
  animation: aura-float 3.4s ease-in-out infinite;
}
.aura-orb.superposed .aura-orb-glyph { display: none; }
.aura-orb.superposed::before,
.aura-orb.superposed::after {
  position: absolute;
  font-size: 84px; line-height: 1;
  animation: aura-flicker 1.15s ease-in-out infinite;
}
.aura-orb.superposed::before { content: '⬆'; color: var(--gold, #D4A574); }
.aura-orb.superposed::after  { content: '⬇'; color: var(--purple, #8B6BAE); animation-delay: -0.575s; }

.aura-orb.collapsing { animation: aura-collapse 620ms cubic-bezier(0.23,1,0.32,1) forwards; }

.aura-orb.up {
  color: var(--gold, #D4A574);
  background: radial-gradient(circle at 50% 40%, rgba(212,165,116,0.4), rgba(0,0,0,0) 70%);
  box-shadow: 0 0 70px rgba(212,165,116,0.5);
  animation: aura-pop 420ms cubic-bezier(0.23,1,0.32,1);
}
.aura-orb.down {
  color: var(--purple, #A991C9);
  background: radial-gradient(circle at 50% 40%, rgba(139,107,174,0.45), rgba(0,0,0,0) 70%);
  box-shadow: 0 0 70px rgba(139,107,174,0.5);
  animation: aura-pop 420ms cubic-bezier(0.23,1,0.32,1);
}

@keyframes aura-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes aura-flicker { 0%,100% { opacity: 0.9; } 50% { opacity: 0.08; } }
@keyframes aura-collapse {
  0%   { transform: rotateY(0) scale(1); filter: blur(0); }
  55%  { transform: rotateY(540deg) scale(0.55); filter: blur(3px); }
  100% { transform: rotateY(1080deg) scale(0.2); filter: blur(6px); opacity: 0.2; }
}
@keyframes aura-pop { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ── Odds + copy ─────────────────────────────────────────── */
.aura-odds {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 800;
  font-size: 1.7rem;
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.aura-odds-up { color: var(--gold, #D4A574); }
.aura-odds-down { color: var(--purple, #A991C9); }
.aura-odds-sep { color: var(--text-tertiary, #6B6966); font-weight: 400; }
.aura-sub {
  color: var(--text-secondary, #A8A5A0);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.55;
  margin: 4px 0 22px;
}

.aura-measure-btn {
  padding: 16px 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--coral, #E87979), var(--gold, #D4A574));
  color: #17130f;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(232,121,121,0.3);
  transition: transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease;
}
.aura-measure-btn:active { transform: scale(0.96); }
@media (hover: hover) { .aura-measure-btn:hover { box-shadow: 0 14px 40px rgba(232,121,121,0.45); } }
.aura-hint { color: var(--text-tertiary, #6B6966); font-size: 0.85rem; margin-top: 14px; }

.aura-streak {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 700; color: #ffb26b;
  background: rgba(255,120,60,0.12); border: 1px solid rgba(255,150,80,0.3);
  padding: 5px 14px; border-radius: 999px; margin: 4px 0 0;
}
.aura-streak-nudge { font-size: 0.9rem; color: #ffb26b; font-weight: 600; margin-top: 14px; }

/* ── Result card ─────────────────────────────────────────── */
.aura-card {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 720 / 1152;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  margin: 8px 0 20px;
}
.aura-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; }
.aura-actions button {
  padding: 14px 20px;
  border-radius: 14px;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 150ms cubic-bezier(0.23,1,0.32,1);
}
.aura-actions button:active { transform: scale(0.97); }
.aura-share-btn {
  border: none;
  background: linear-gradient(135deg, var(--gold, #D4A574), var(--coral, #E87979));
  color: #17130f;
  box-shadow: 0 8px 24px rgba(212,165,116,0.3);
}
.aura-friend-btn {
  border: 1px solid rgba(139,107,174,0.5);
  background: rgba(139,107,174,0.12);
  color: var(--purple-soft, #A991C9);
}
.aura-again-btn {
  border: 1px solid var(--border-light, #2A2B34);
  background: transparent;
  color: var(--text-secondary, #A8A5A0);
}
.aura-why-btn {
  border: 1px solid rgba(53,224,255,0.4);
  background: rgba(53,224,255,0.08);
  color: #7fe6ff;
}
.aura-honest {
  color: var(--text-tertiary, #6B6966);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 320px;
  margin-top: 16px;
}

/* gacha rarity */
.aura-rarity {
  font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 1.15rem;
  padding: 7px 20px; border-radius: 999px; border: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.5px;
  margin: 0 0 12px; color: #9aa6c8;
}
.aura-rarity.locked { animation: aura-rar-pop 0.45s cubic-bezier(0.23,1,0.32,1); }
@keyframes aura-rar-pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.18); } 100% { transform: scale(1); opacity: 1; } }
.aura-pull-btn {
  border: none !important;
  background: linear-gradient(135deg, var(--coral, #E87979), var(--gold, #D4A574)) !important;
  color: #17130f !important; font-weight: 800 !important; font-size: 1.05rem !important;
  box-shadow: 0 8px 24px rgba(232,121,121,0.3);
}
.aura-dex { font-size: 0.85rem; color: var(--text-secondary, #A8A5A0); margin-top: 12px; }
.aura-shake { animation: aura-shake-k 0.5s ease; }
@keyframes aura-shake-k {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-6px,3px) rotate(-1deg); }
  40% { transform: translate(6px,-3px) rotate(1deg); }
  60% { transform: translate(-4px,2px); }
  80% { transform: translate(4px,-2px); }
}
@media (prefers-reduced-motion: reduce) { .aura-rarity.locked, .aura-shake { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  .aura-orb.superposed, .aura-orb.superposed::before, .aura-orb.superposed::after,
  .aura-orb.up, .aura-orb.down { animation: none; }
  .aura-orb.collapsing { animation: none; }
  .aura-hero-orb { animation: none; }
}

/* ── Home front-door hero ────────────────────────────────── */
.aura-hero {
  width: 100%; max-width: 1000px; margin: 0 auto 28px;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 22px; text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(212,165,116,0.35);
  background: linear-gradient(135deg, rgba(232,121,121,0.12), rgba(139,107,174,0.12));
  box-shadow: 0 0 40px rgba(212,165,116,0.1);
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23,1,0.32,1), box-shadow 160ms ease;
}
.aura-hero:active { transform: scale(0.99); }
@media (hover: hover) { .aura-hero:hover { box-shadow: 0 0 60px rgba(212,165,116,0.22); transform: translateY(-2px); } }
.aura-hero-orb {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; color: #17130f;
  background: linear-gradient(135deg, var(--gold, #D4A574), var(--coral, #E87979));
  box-shadow: 0 0 24px rgba(212,165,116,0.5);
  animation: aura-float 3.4s ease-in-out infinite;
}
.aura-hero-text { flex: 1; }
.aura-hero-label { font-family: var(--font-mono, monospace); font-size: 0.7rem; letter-spacing: 1.5px; color: var(--gold, #D4A574); margin-bottom: 4px; }
.aura-hero-title { font-weight: 800; font-size: 1.15rem; color: var(--text-primary, #E6E2DC); line-height: 1.3; }
.aura-hero-sub { font-size: 0.85rem; color: var(--text-secondary, #A8A5A0); margin-top: 3px; }
.aura-hero-arrow { flex-shrink: 0; font-size: 1.4rem; color: var(--coral, #E87979); }
@media (max-width: 480px) { .aura-hero { padding: 16px; } .aura-hero-title { font-size: 1rem; } .aura-hero-arrow { display: none; } }

/* ── New front-door flow: hero + two hook cards + lab toggle ── */
.qx-flow { padding-top: 8px; }
.qx-hero { text-align: center; padding: 24px 8px 4px; }
.qx-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, monospace); font-size: 0.72rem; letter-spacing: 2px;
  color: #ff6b78; text-transform: uppercase; margin-bottom: 16px;
}
.qx-breach-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff2d3c; box-shadow: 0 0 10px #ff2d3c; animation: fx-rec 1.1s steps(1, end) infinite; }
.qx-hero-title {
  font-family: var(--font-display, sans-serif); font-weight: 800;
  font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1.2;
  color: var(--text-primary, #E6E2DC);
  text-shadow: 0 0 30px rgba(53,224,255,0.22);
}
.qx-hero-sub { color: var(--text-secondary, #A8A5A0); font-size: 1.05rem; margin-top: 12px; }

.qx-hooks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  max-width: 720px; margin: 26px auto 8px; width: 100%;
}
.qx-hook {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 28px 18px; border-radius: 22px; cursor: pointer;
  border: 1px solid rgba(212,165,116,0.3);
  background: linear-gradient(160deg, rgba(232,121,121,0.12), rgba(139,107,174,0.1));
  transition: transform 160ms cubic-bezier(0.23,1,0.32,1), box-shadow 160ms ease;
}
.qx-hook:active { transform: scale(0.98); }
@media (hover: hover) { .qx-hook:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0,0,0,0.4); } }
.qx-hook-orb { font-size: 2.4rem; filter: drop-shadow(0 0 16px rgba(212,165,116,0.5)); animation: aura-float 3.4s ease-in-out infinite; }
.qx-hook-title { font-weight: 800; font-size: 1.15rem; color: var(--text-primary, #E6E2DC); }
.qx-hook-sub { font-size: 0.82rem; color: var(--text-secondary, #A8A5A0); line-height: 1.4; }
.qx-hook-chat { border-color: rgba(139,107,174,0.4); background: linear-gradient(160deg, rgba(139,107,174,0.14), rgba(53,224,255,0.08)); }
.qx-hook-chat .qx-hook-orb { filter: drop-shadow(0 0 16px rgba(139,107,174,0.6)); }

.lab-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 1000px; margin: 22px auto 0;
  padding: 16px 20px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--border-light, #2A2B34); background: rgba(26,27,36,0.5);
  color: var(--text-secondary, #A8A5A0); font-size: 0.98rem; font-weight: 600;
  transition: transform 140ms cubic-bezier(0.23,1,0.32,1), background 140ms ease;
}
.lab-toggle:active { transform: scale(0.99); }
@media (hover: hover) { .lab-toggle:hover { background: rgba(26,27,36,0.8); } }
.lab-toggle-meta { font-family: var(--font-mono, monospace); font-size: 0.8rem; color: var(--text-tertiary, #6B6966); display: flex; gap: 8px; align-items: center; }
.lab-section { max-width: 1000px; margin: 12px auto 0; }
.lab-section[hidden] { display: none; }

@media (max-width: 560px) { .qx-hooks { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .qx-breach-dot, .qx-hook-orb { animation: none; } }
