/* Who Wants to Be a Metro RVT? — Millionaire-inspired kiosk UI
   Brand: forest #007838 / #063D1F, gold #F3C240, charcoal #585A5F, cream #F8F6F1 */
:root {
  --green: #007838;
  --green-deep: #063D1F;
  --green-ink: #021208;
  --green-mid: #0a4a24;
  --gold: #F3C240;
  --gold-bright: #ffe082;
  --gold-dim: #c9971c;
  --charcoal: #585A5F;
  --cream: #F8F6F1;
  --wrong: #9c2b2e;
  --wrong-deep: #6e1618;
  --safe-t: max(16px, env(safe-area-inset-top));
  --safe-b: max(16px, env(safe-area-inset-bottom));
  --safe-l: max(16px, env(safe-area-inset-left));
  --safe-r: max(16px, env(safe-area-inset-right));
  --font-display: "Cinzel", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-ui: "Outfit", "Segoe UI", Calibri, Arial, sans-serif;
  --lozenge: polygon(36px 0%, calc(100% - 36px) 0%, 100% 50%, calc(100% - 36px) 100%, 36px 100%, 0% 50%);
  --fs-title-lead: clamp(28px, 4.2vh, 52px);
  --fs-title-main: clamp(44px, 7.2vh, 92px);
  --fs-question: clamp(34px, 4.4vh, 62px);
  --fs-answer: clamp(32px, 3.8vh, 56px);
  --fs-letter: clamp(34px, 4vh, 60px);
  --fs-lede: clamp(22px, 2.6vh, 34px);
  --fs-feedback: clamp(28px, 3.2vh, 44px);
  --fs-chrome: clamp(16px, 1.7vh, 22px);
  --answer-min-h: clamp(112px, 12.4vh, 176px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--green-ink);
  color: var(--cream);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button, input, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; }

.app {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

/* ---- Dramatic stage background ---- */
.stage-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #021208;
  overflow: hidden;
  pointer-events: none;
}
.spot {
  position: absolute;
  inset: -10% -20% auto;
  height: 80%;
  background: radial-gradient(ellipse at 50% 20%, rgba(0,120,56,.55) 0%, rgba(6,61,31,.4) 38%, rgba(2,18,8,0) 70%);
  animation: breathe 8s ease-in-out infinite;
}
.spot-b {
  inset: 40% -30% -20%;
  height: auto;
  background: radial-gradient(ellipse at 50% 80%, rgba(243,194,64,.12) 0%, rgba(2,18,8,0) 60%);
  animation-duration: 11s;
  animation-direction: reverse;
}
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 120px 20px rgba(0,0,0,.55);
}
.rays {
  position: absolute;
  inset: -20%;
  background:
    repeating-conic-gradient(from 0deg at 50% 18%, rgba(243,194,64,.045) 0 6deg, transparent 6deg 18deg);
  opacity: .55;
  animation: slowspin 80s linear infinite;
  mask-image: radial-gradient(ellipse at 50% 18%, #000 0, transparent 62%);
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .85; }
}
@keyframes slowspin { to { transform: rotate(360deg); } }

.confetti-canvas {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

/* ---- Screens ---- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  padding:
    calc(var(--safe-t) + 8px)
    calc(var(--safe-r) + 20px)
    calc(var(--safe-b) + 16px)
    calc(var(--safe-l) + 20px);
}
.screen.is-active { display: flex; }

/* ---- Title logo treatment ---- */
.show-logo {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: min(280px, 48vw);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.45));
  margin-bottom: 6px;
}
.show-logo-compact .logo-mark { width: min(96px, 16vw); }
.logo-eyebrow {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(16px, 1.8vh, 24px);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.show-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .95;
}
.title-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-title-lead);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 24px rgba(243,194,64,.2);
}
.title-main {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-title-main);
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff3c4 0%, #F3C240 42%, #c9971c 78%, #ffe9a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(243,194,64,.35));
  padding-bottom: .08em;
}

.lede {
  margin: 0;
  font-size: var(--fs-lede);
  font-weight: 600;
  line-height: 1.35;
  color: var(--cream);
  text-align: center;
  max-width: 28ch;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.fine-print {
  margin: 0;
  font-size: clamp(16px, 1.6vh, 22px);
  font-weight: 600;
  line-height: 1.4;
  color: rgba(248,246,241,.72);
  text-align: center;
  max-width: 36ch;
}

/* ---- Attract ---- */
.attract-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
  padding: 12px 8px;
}

/* ---- Chrome / Reset / title strip ---- */
.chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  flex: 0 0 auto;
  z-index: 3;
}
.chrome-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-chrome);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
  flex: 1;
  opacity: .9;
}
.chrome-title em {
  font-style: normal;
  color: var(--gold);
}
.chrome-btn {
  appearance: none;
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(243,194,64,.55);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: var(--fs-chrome);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .85;
}
.chrome-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chrome-spacer { width: 88px; }
@media (max-width: 700px) {
  .chrome-spacer { width: 64px; }
}

/* ---- Lozenge buttons (classic Millionaire elongated hex) ---- */
.lozenge {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--answer-min-h);
  padding: 18px 56px 18px 28px;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}
.lozenge::before,
.lozenge::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--lozenge);
  pointer-events: none;
}
.lozenge::before {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 40%, var(--gold-dim));
  z-index: -2;
  box-shadow: 0 0 24px rgba(243,194,64,.35);
}
.lozenge::after {
  inset: 3px;
  background: linear-gradient(180deg, #0e4c28 0%, #072818 55%, #04180e 100%);
  z-index: -1;
}
.lozenge-label {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: clamp(28px, 3.2vh, 44px);
  letter-spacing: .02em;
}
.lozenge-cta { max-width: 920px; margin: 0 auto; }
.lozenge-cta:active { transform: scale(.99); }
.lozenge-ghost::after {
  background: linear-gradient(180deg, #16321f, #0a1a12);
}

/* Answer lozenges */
.answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.6vh, 22px);
  width: 100%;
  flex: 1 1 auto;
  align-content: end;
  padding-bottom: 1vh;
}
.answer {
  min-height: var(--answer-min-h);
  padding: 16px 40px 16px 22px;
  gap: 12px;
}
.answer-letter {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-letter);
  color: var(--gold);
  letter-spacing: .02em;
  min-width: 1.4ch;
  padding-right: 14px;
  border-right: 2px solid rgba(243,194,64,.55);
  line-height: 1;
}
.answer-text {
  position: relative;
  z-index: 1;
  flex: 1;
  font-weight: 800;
  font-size: var(--fs-answer);
  color: var(--cream);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.answer:focus-visible { outline: none; }
.answer:focus-visible::before {
  box-shadow: 0 0 0 3px var(--cream);
}

/* Selected: gold fill, dark type */
.answer.is-selected:not(.is-correct):not(.is-wrong)::after {
  background: linear-gradient(180deg, #ffe082 0%, #F3C240 48%, #d7a428 100%);
}
.answer.is-selected:not(.is-correct):not(.is-wrong) {
  animation: goldPulse 0.7s ease-in-out 2;
}
.answer.is-selected:not(.is-correct):not(.is-wrong) .answer-letter,
.answer.is-selected:not(.is-correct):not(.is-wrong) .answer-text {
  color: var(--green-deep);
  text-shadow: none;
}
.answer.is-selected:not(.is-correct):not(.is-wrong) .answer-letter {
  border-color: rgba(6,61,31,.45);
}

/* Correct: forest green, gold outline stays */
.answer.is-correct::after {
  background: linear-gradient(180deg, #1cb85a 0%, #007838 48%, #055a2a 100%);
}
.answer.is-correct {
  animation: correctFlash 0.65s ease;
  filter: drop-shadow(0 0 22px rgba(0,180,70,.55));
}
.answer.is-correct .answer-letter,
.answer.is-correct .answer-text {
  color: #fffef6;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* Wrong: deep red, then correct revealed in green */
.answer.is-wrong::after {
  background: linear-gradient(180deg, #c14a45 0%, #8f2a2c 55%, #5c1416 100%);
}
.answer.is-wrong .answer-letter,
.answer.is-wrong .answer-text { color: #fff5f3; }
.answer.is-wrong {
  filter: drop-shadow(0 0 16px rgba(180,40,40,.4));
}

.answers.is-locked .answer:not(.is-selected):not(.is-correct) {
  opacity: .5;
}
.answers.is-locked .answer { cursor: default; }

@keyframes goldPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(243,194,64,.4)); }
  50% { filter: drop-shadow(0 0 28px rgba(243,194,64,.95)) drop-shadow(0 0 8px #fff3c4); }
}
@keyframes correctFlash {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  35% { transform: scale(1.035); filter: drop-shadow(0 0 36px rgba(80,255,150,.8)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 22px rgba(0,180,70,.55)); }
}

/* ---- Quiz layout ---- */
.quiz-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  grid-template-areas: "main ladder";
  gap: 22px;
  align-items: stretch;
}
.quiz-main {
  grid-area: main;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 28px);
  padding-right: 4px;
}
.question {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: var(--fs-question);
  line-height: 1.18;
  color: var(--cream);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
  padding: 8px 8px 4px;
  flex: 0 0 auto;
}

/* Ladder — small, unobtrusive 10-rung money-tree */
.ladder {
  grid-area: ladder;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  flex-direction: column-reverse;
  justify-content: stretch;
  gap: 6px;
  width: 56px;
  align-self: stretch;
}
.ladder li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  color: rgba(248,246,241,.45);
  border: 1px solid rgba(243,194,64,.22);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  background: rgba(6,61,31,.4);
}
.ladder li.is-done { color: var(--cream); border-color: rgba(243,194,64,.45); }
.ladder li.is-current {
  color: var(--green-deep);
  background: linear-gradient(180deg, #ffe082, #F3C240);
  border-color: var(--gold);
  font-size: 15px;
}
.ladder li.is-correct { color: #d9ffe6; background: rgba(0,120,56,.55); border-color: #1cb85a; }
.ladder li.is-wrong { color: #ffd0d0; background: rgba(140,30,30,.45); border-color: #c14a45; }

.reveal-slot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.reveal-slot[hidden] {
  display: none !important;
}
.feedback {
  margin: 0;
  font-weight: 800;
  font-size: var(--fs-feedback);
  text-align: center;
  letter-spacing: .02em;
}
.feedback.is-correct { color: #7dffb0; }
.feedback.is-wrong { color: #ffb3b0; }
.explanation {
  margin: 0;
  font-size: clamp(18px, 2vh, 28px);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: rgba(248,246,241,.88);
  max-width: 46ch;
}
.lozenge-next { max-width: 640px; min-height: 84px; }

/* ---- Signup / results panels ---- */
.panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 20px;
}
.screen-signup .panel {
  justify-content: space-evenly;
}
.signup-form {
  width: min(820px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
  font-size: clamp(20px, 2.2vh, 28px);
  color: var(--gold);
}
.field input {
  appearance: none;
  width: 100%;
  min-height: 76px;
  padding: 12px 22px;
  border: 2px solid var(--gold);
  background: rgba(2,18,8,.65);
  color: var(--cream);
  font-weight: 700;
  font-size: clamp(26px, 3vh, 36px);
  border-radius: 8px;
  clip-path: none;
}
.field input:focus {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: clamp(18px, 2vh, 24px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--cream);
}
.consent input {
  width: 28px;
  height: 28px;
  margin-top: 4px;
  flex: 0 0 auto;
  accent-color: var(--gold);
}
.form-error {
  margin: 0;
  color: #ffb3b0;
  font-weight: 700;
  font-size: clamp(18px, 2vh, 24px);
  text-align: center;
}
.results-panel {
  justify-content: flex-start;
  overflow: hidden;
  gap: 12px;
}
.results-panel .review-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}
.results-panel .cta-card,
.results-panel .btn-row {
  flex: 0 0 auto;
}
.email-status { max-width: 36ch; color: var(--gold-bright); }
.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-list li {
  background: rgba(6,61,31,.55);
  border: 1px solid rgba(243,194,64,.35);
  padding: 10px 16px;
  font-size: clamp(18px, 2vh, 24px);
  font-weight: 700;
  line-height: 1.3;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}
.review-list li .badge {
  display: inline-block;
  margin-right: 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .85em;
}
.review-list li.is-correct .badge { color: #7dffb0; }
.review-list li.is-wrong .badge { color: #ffb3b0; }
.review-prompt { font-weight: 800; margin-bottom: 4px; }
.review-meta { font-weight: 600; color: rgba(248,246,241,.8); font-size: .92em; }
.cta-card {
  width: min(920px, 100%);
  text-align: center;
  border: 1px solid rgba(243,194,64,.4);
  background: rgba(6,61,31,.5);
  padding: 18px 22px;
  font-size: clamp(20px, 2.2vh, 28px);
  font-weight: 600;
  line-height: 1.35;
}
.cta-mark { width: min(200px, 46vw); margin: 0 auto 10px; }
.cta-contact { margin: 8px 0 0; color: var(--gold); font-weight: 800; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: min(920px, 100%);
  justify-content: center;
}
.btn-row .lozenge { flex: 1 1 280px; min-height: 88px; }

/* ---- Modal ---- */
.modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(2,18,8,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(680px, 100%);
  background: linear-gradient(180deg, #0a3a20, #04180e);
  border: 2px solid var(--gold);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 0 40px rgba(243,194,64,.25);
}
.modal-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vh, 44px);
  font-weight: 800;
  color: var(--gold);
}
.modal-card p {
  margin: 0;
  font-size: clamp(20px, 2.4vh, 28px);
  font-weight: 600;
  line-height: 1.35;
}

/* ---- Landscape / desktop: 2x2 answers, ladder on the right still ---- */
@media (orientation: landscape) and (min-width: 900px), (min-aspect-ratio: 4/3) {
  :root {
    --fs-title-lead: clamp(22px, 4.6vh, 40px);
    --fs-title-main: clamp(36px, 8vh, 72px);
    --fs-question: clamp(28px, 4.6vh, 44px);
    --fs-answer: clamp(22px, 3.4vh, 34px);
    --fs-letter: clamp(24px, 3.8vh, 36px);
    --fs-lede: clamp(16px, 2.6vh, 24px);
    --fs-feedback: clamp(20px, 3.2vh, 32px);
    --answer-min-h: clamp(72px, 16vh, 120px);
  }
  .answers {
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
  }
  .quiz-shell {
    grid-template-columns: minmax(0, 1fr) 56px;
    grid-template-areas: "main ladder";
  }
  .reveal-slot { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .answers { align-content: center; }
  .lozenge-next { min-height: 64px; }
  .attract-inner { padding: 4px 8vw; }
  .logo-mark { width: min(200px, 22vw); }
}

/* Extra-tall kiosk (1080x1920): stack four, very large type */
@media (orientation: portrait) and (min-height: 1500px) {
  :root {
    --fs-title-lead: 48px;
    --fs-title-main: 88px;
    --fs-question: 56px;
    --fs-answer: 48px;
    --fs-letter: 52px;
    --fs-lede: 30px;
    --fs-feedback: 40px;
    --fs-chrome: 20px;
    --answer-min-h: 150px;
  }
  .question { padding-top: 20px; }
  .answers { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .spot, .rays, .answer.is-selected, .answer.is-correct { animation: none; }
}
