@font-face { font-display: swap; }

:root {
  --gold: #D4A64A;
  --cream: #F2EEE6;
  --charcoal: #1a1a1a;
  --panel-text: #f2eee6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0b0b0c;
  font-family: "Archivo Black", "Arial Black", Arial, sans-serif;
  color: var(--cream);
}

#stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#scene {
  position: relative;
  width: min(430px, 92vw, calc(94vh * 941 / 1672));
  aspect-ratio: 941 / 1672;
  container-type: inline-size;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  border-radius: 14px;
}
.scene-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/scene-intro-v.webp");
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  overflow: hidden;
  z-index: 0;
  transition: background-image 0.2s ease;
}
#scene.state-quiz .scene-bg { background-image: url("assets/scene-quiz-v.webp"); }
#scene.state-reveal .scene-bg { background-image: url("assets/scene-reveal-v.webp?v=2"); }

/* ---------- ambient accents (intro only; hidden during quiz/reveal) ---------- */
.accent { position: absolute; pointer-events: none; opacity: 0.95; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); }
#scene:not(.state-intro) .accent { display: none; }
.accent-over   { left: 15%; top: 7%; }
.accent-ghost  { left: 78%; top: 9%; }
.accent-juggle { left: 12%; top: 86%; }
.accent-gamble { left: 80%; top: 80%; }

.bubble, .zzz, .ring, .sparkle {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-weight: 800;
  color: var(--cream);
  background: rgba(20,20,20,0.75);
  border: 2px solid var(--gold);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: clamp(11px, 1.6cqw, 16px);
}
.zzz { background: transparent; border: none; color: var(--cream); font-size: clamp(12px, 1.8cqw, 18px); }
.ring { background: #c0392b; border-color: #c0392b; }
.sparkle { background: transparent; border: none; color: var(--gold); font-size: clamp(16px, 2.4cqw, 24px); }

.accent-over .bubble { animation: pulseFade 2.6s ease-in-out infinite; }
.accent-ghost .zzz { animation: floatUp 3.4s ease-in-out infinite; }
.accent-juggle .ring { animation: shake 1.8s ease-in-out infinite; }
.accent-gamble .sparkle { animation: twinkle 2.2s ease-in-out infinite; }

@keyframes pulseFade {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(6px); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-14px); }
}
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(20deg); }
}

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.screen.active { display: flex; }

/* ---------- intro ---------- */
.intro-card {
  text-align: center;
  background: rgba(10,10,10,0.72);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: clamp(12px, 4cqw, 40px) clamp(14px, 5cqw, 56px);
  max-width: 88%;
}
.eyebrow {
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: clamp(10px, 1.4cqw, 14px);
  margin: 0 0 6px;
}
.intro-card h1 {
  margin: 0 0 8px;
  font-size: clamp(19px, 4.2cqw, 42px);
  line-height: 1.1;
  text-transform: uppercase;
}
.subhead {
  color: var(--cream);
  font-family: "Courier New", monospace;
  font-size: clamp(9px, 1.3cqw, 13px);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  opacity: 0.85;
}
.tagline {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(12px, 1.8cqw, 17px);
  margin: 0 0 12px;
  color: var(--cream);
}

.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 1.8cqw, 16px);
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: #1a1206;
}
.btn-secondary {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); }

/* ---------- quiz panel (baked into scene-quiz-v.webp; these are text/button
   overlays positioned to match that art's blank zones) ---------- */
.panel-tag {
  position: absolute;
  left: 18%;
  width: 60%;
  top: 30.4%;
  text-align: center;
  font-size: clamp(10px, 2.6cqw, 14px);
  letter-spacing: 0.06em;
  color: #e9e3d6;
  font-family: Arial, sans-serif;
  font-weight: 700;
}
.panel-track {
  position: absolute;
  left: 14%;
  width: 66%;
  top: 35%;
  height: 2.1%;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  overflow: hidden;
}
.panel-fill {
  height: 100%;
  width: 14.28%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.panel-question {
  position: absolute;
  left: 10%;
  width: 80%;
  top: 39%;
  height: 18.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 3.6cqw, 17px);
  line-height: 1.35;
  color: var(--panel-text);
}
.panel-answers {
  position: absolute;
  left: 3%;
  width: 94%;
  top: 68%;
  height: 26.5%;
  display: flex;
  justify-content: space-between;
}
.answer-btn {
  position: relative;
  width: 23%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: block;
}
.answer-btn span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 93%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2%;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(8px, 2.2cqw, 11px);
  line-height: 1.2;
  color: var(--panel-text);
  text-align: center;
}
.answer-btn:hover span { color: var(--gold); }
.answer-btn:active { transform: translateY(2px); }

/* ---------- reveal ---------- */
.reveal-card {
  --accent: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1px, 0.5cqw, 4px);
  width: 96%;
  height: 97%;
  padding: 2% 6% 2%;
  text-align: center;
  overflow: auto;
}
.reveal-card[data-persona="over"]   { --accent: #7FB2D4; }
.reveal-card[data-persona="ghost"]  { --accent: #E3E7EA; }
.reveal-card[data-persona="juggle"] { --accent: #FF6B3D; }
.reveal-card[data-persona="gamble"] { --accent: #E8C068; }

.reveal-art {
  width: min(305px, 86%);
  height: auto;
  flex: none;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,0.75));
  margin-bottom: -1%;
}
.reveal-card[data-persona="over"] .reveal-art {
  width: min(229px, 64.5%);
}
.reveal-title {
  line-height: 1;
  margin: 2px 0 0;
}
.reveal-title-the {
  display: block;
  font-family: "Archivo Black", Arial, sans-serif;
  font-size: clamp(11px, 2cqw, 14px);
  letter-spacing: 0.3em;
  color: var(--cream);
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}
.reveal-title-name {
  display: block;
  font-family: "Archivo Black", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(21px, 4.4cqw, 32px);
  letter-spacing: 0.01em;
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 24px rgba(0,0,0,0.7);
}
.reveal-quote {
  background: var(--cream);
  color: #1a1a1a;
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(12px, 2.4cqw, 16px);
  line-height: 1.25;
  padding: 6px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  margin: 2px 0;
}
.reveal-roast {
  font-family: Arial, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(11px, 1.5cqw, 14px);
  margin: 0;
  color: var(--cream);
  text-shadow: 0 2px 6px rgba(0,0,0,0.95);
}
.reveal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 70%;
  color: var(--accent);
  font-size: 13px;
  margin: 3px 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}
.reveal-divider span {
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.8;
}
.reveal-connection {
  font-family: Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(10px, 1.4cqw, 13px);
  line-height: 1.4;
  margin: 0 0 4px;
  color: var(--cream);
  text-shadow: 0 1px 5px rgba(0,0,0,0.95);
}
.reveal-brand {
  font-family: "Archivo Black", Arial, sans-serif;
  font-size: clamp(10px, 1.6cqw, 13px);
  letter-spacing: 0.08em;
  color: var(--cream);
  opacity: 0.9;
  margin: 0 0 2px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}
.reveal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.reveal-card .btn-primary { background: var(--accent); color: #1a1206; }
.reveal-card .btn-secondary { background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }

@media (max-width: 560px) {
  .reveal-card { flex-direction: column; text-align: center; }
  .reveal-actions { justify-content: center; }
}
