/* ============================================================
   LA TRIVIA QUIZ — STYLES
   Palette: LA sunset — dusk purple, sunset orange, palm green, gold
   ============================================================ */

:root {
  --dusk: #2b1e4e;
  --dusk-deep: #1a1233;
  --sunset: #ff7a45;
  --sunset-hot: #ff4d6d;
  --gold: #ffc94d;
  --palm: #1e7a5a;
  --sand: #fff7ec;
  --ink: #241c3a;
  --card: #ffffff;
  --correct: #1e7a5a;
  --wrong: #c73a52;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(26, 18, 51, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--dusk-deep) 0%, var(--dusk) 35%, #6b3a7d 70%, var(--sunset) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Skyline silhouette pinned to the bottom of the viewport */
.skyline {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}
.skyline svg { width: 100%; height: 100%; display: block; }

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 24px 16px 160px;
}

/* ---------- Header ---------- */
.brand {
  text-align: center;
  color: var(--sand);
  margin-bottom: 20px;
}
.brand .palms { font-size: 1.6rem; letter-spacing: 8px; }
.brand h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  margin: 6px 0 4px;
}
.brand .agent-line { font-size: 0.95rem; opacity: 0.9; }
.brand .agent-line strong { color: var(--gold); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  animation: rise 0.35s ease-out;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ---------- Lead form ---------- */
.lead-intro { font-size: 1.05rem; line-height: 1.55; margin-bottom: 18px; }
.lead-intro .highlights {
  list-style: none;
  margin: 14px 0 0;
}
.lead-intro .highlights li { padding: 4px 0; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem;
  border: 2px solid #d8d2e8;
  border-radius: 10px;
  background: var(--sand);
}
.field input:focus {
  outline: 3px solid var(--sunset);
  outline-offset: 1px;
  border-color: var(--sunset);
}
.field .error-msg {
  color: var(--wrong);
  font-size: 0.85rem;
  margin-top: 5px;
  min-height: 1.1em;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #5a5470;
  margin-bottom: 18px;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  width: 100%;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-hot), var(--sunset));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 77, 109, 0.45); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.secondary {
  background: #efeaf7;
  color: var(--dusk);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Quiz HUD ---------- */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 0.9rem;
}
.hud .score { color: var(--palm); }
.hud .streak { color: var(--sunset-hot); }
.hud .qcount { color: #6b6485; }

.progress-track {
  width: 100%;
  height: 10px;
  background: #e9e3f4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--sunset));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.category-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dusk);
  background: var(--gold);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.difficulty {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.78rem;
  color: #6b6485;
  font-weight: 700;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 20px;
}

.choices { display: grid; gap: 10px; }
.choice {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--sand);
  border: 2px solid #e4dccb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  color: var(--ink);
}
.choice:hover:not(:disabled) { border-color: var(--sunset); background: #fff1e3; }
.choice:focus-visible { outline: 3px solid var(--sunset); outline-offset: 2px; }
.choice.correct { background: #e2f5ec; border-color: var(--correct); color: var(--correct); font-weight: 800; }
.choice.wrong { background: #fde8ec; border-color: var(--wrong); color: var(--wrong); }
.choice:disabled { cursor: default; }
.choice .key-hint {
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 24px;
  text-align: center;
  margin-right: 10px;
  border-radius: 6px;
  background: #efe7d6;
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Feedback ---------- */
.feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.feedback.good { background: #e2f5ec; border-left: 5px solid var(--correct); }
.feedback.bad  { background: #fde8ec; border-left: 5px solid var(--wrong); }
.feedback .verdict { font-weight: 800; display: block; margin-bottom: 4px; }
.feedback .points-earned { font-weight: 800; color: var(--palm); }

.next-wrap { margin-top: 16px; }

/* ---------- End screen ---------- */
.end-screen { text-align: center; }
.end-screen .final-emoji { font-size: 3rem; }
.end-screen h2 { font-size: 1.5rem; margin: 10px 0 6px; }
.end-screen .final-score {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--sunset-hot);
  margin: 8px 0;
}
.end-screen .rank-msg { font-size: 1rem; line-height: 1.55; color: #4a4462; margin-bottom: 8px; }
.end-screen .stats-line { font-size: 0.9rem; color: #6b6485; margin-bottom: 20px; }

.share-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0;
}
.share-btn {
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.share-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.share-btn.x { background: #111; }
.share-btn.fb { background: #1877f2; }
.share-btn.li { background: #0a66c2; }
.share-btn.copy { background: var(--palm); }

.cta-box {
  margin-top: 22px;
  padding: 22px 20px;
  background: linear-gradient(135deg, #fff7ec, #ffeeda);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
}
.cta-box img.headshot {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin-bottom: 10px;
}
.cta-box h3 { font-size: 1.15rem; margin-bottom: 8px; }
.cta-box p { font-size: 0.95rem; line-height: 1.55; color: #4a4462; margin-bottom: 14px; }
.cta-box .agent-contact { font-size: 0.85rem; color: #6b6485; margin-top: 12px; line-height: 1.6; }
.cta-box .agent-contact a { color: var(--palm); font-weight: 700; }

footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 247, 236, 0.85);
  font-size: 0.8rem;
  text-align: center;
  padding: 10px 16px 130px;
  line-height: 1.6;
}
footer a { color: var(--gold); }

/* ---------- Screen-reader-only utility ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .card { padding: 22px 16px; }
  .question-text { font-size: 1.08rem; }
  .skyline { height: 80px; }
}
