@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --indigo: #0e1428;
  --indigo-light: #171f3d;
  --indigo-card: #141b36;
  --gold: #d9a24e;
  --gold-soft: rgba(217, 162, 78, 0.15);
  --off-white: #f4f1ea;
  --off-white-dim: rgba(244, 241, 234, 0.65);
  --off-white-faint: rgba(244, 241, 234, 0.35);
  --border: rgba(217, 162, 78, 0.2);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 50% -10%, var(--indigo-light) 0%, var(--indigo) 55%);
  color: var(--off-white);
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.serif {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.app-shell {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  padding: 8px 0 28px;
}

.brand .eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  font-weight: 500;
}

.brand h1 {
  font-size: 1.4rem;
  margin-top: 6px;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fade-in 0.4s ease;
}

.screen[hidden] {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--indigo-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

/* Intro */
.intro-card {
  text-align: center;
}

.intro-card h2 {
  font-size: 1.8rem;
  line-height: 1.25;
}

.intro-card p {
  color: var(--off-white-dim);
  font-size: 0.95rem;
}

.meta-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0 28px;
  font-size: 0.8rem;
  color: var(--off-white-faint);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #c98f3a);
  color: var(--indigo);
  box-shadow: 0 8px 24px rgba(217, 162, 78, 0.25);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(217, 162, 78, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--off-white-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--off-white);
}

/* Progress bar */
.progress-wrap {
  margin-bottom: 28px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--off-white-faint);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(244, 241, 234, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f0c17d);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Quiz */
.question-card {
  text-align: center;
}

.question-number {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.question-text {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  line-height: 1.45;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 32px;
  min-height: 3.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(244, 241, 234, 0.03);
  color: var(--off-white);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.answer-btn:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.answer-btn:active {
  transform: scale(0.99);
}

.answer-btn .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}

.quiz-nav {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.quiz-nav button {
  background: none;
  border: none;
  color: var(--off-white-faint);
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
}

.quiz-nav button:hover {
  color: var(--gold);
}

/* Email capture */
.email-card {
  text-align: center;
}

.email-card h2 {
  font-size: 1.5rem;
}

.email-card p {
  color: var(--off-white-dim);
  font-size: 0.9rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(244, 241, 234, 0.05);
  color: var(--off-white);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: var(--off-white-faint);
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
}

.form-error {
  color: #e08a8a;
  font-size: 0.8rem;
  margin: -6px 0 14px;
  min-height: 1em;
}

.privacy-note {
  font-size: 0.72rem;
  color: var(--off-white-faint);
  margin-top: 16px;
}

/* Loading */
.loading-card {
  text-align: center;
  padding: 48px 24px;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-card p {
  color: var(--off-white-dim);
  font-size: 0.9rem;
}

/* Report */
.report-card {
  text-align: left;
}

.report-eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
}

.report-card h2 {
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 24px;
}

.report-body {
  font-size: 0.98rem;
  color: var(--off-white);
}

.report-body h3 {
  font-family: "Playfair Display", serif;
  color: var(--gold);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 32px;
  margin-bottom: 10px;
}

.report-body p {
  margin-bottom: 16px;
  color: rgba(244, 241, 234, 0.9);
}

.report-body p:last-of-type {
  color: var(--off-white-faint);
  font-size: 0.82rem;
  font-style: italic;
  margin-top: 24px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.unlock-block {
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--gold-soft);
}

.unlock-block p {
  color: var(--off-white-dim);
  font-size: 0.85rem;
}

.retake-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--off-white-faint);
  font-size: 0.8rem;
  text-decoration: none;
}

.retake-link:hover {
  color: var(--gold);
}

.error-card {
  text-align: center;
}

.error-card h2 {
  font-size: 1.4rem;
}

.error-card p {
  color: var(--off-white-dim);
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .app-shell {
    padding-top: 56px;
  }

  .card {
    padding: 44px 48px;
  }
}
