/* ══════════════════════════════════════
   RESET & VARIABLES
══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #C9A84C;
  --gold-light: #E8C96D;
  --dark: #0F0E0C;
  --dark-2: #1A1915;
  --cream: #F5F0E8;
  --cream-2: #EDE8DC;
  --muted: #8A8575;
}

/* ══════════════════════════════════════
   BASE
══════════════════════════════════════ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--dark);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ══════════════════════════════════════
   SCREENS
══════════════════════════════════════ */
.screen {
  display: none;
  position: relative;
  z-index: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   INTRO SCREEN
══════════════════════════════════════ */
#screen-intro {
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.12) 0%, transparent 70%);
}

.intro-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease forwards;
}

.intro-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 8px;
  animation: fadeInUp 0.6s 0.1s ease both;
}

.intro-title em {
  font-style: italic;
  color: var(--gold);
}

.intro-subtitle {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--muted);
  max-width: 500px;
  margin: 24px auto 52px;
  line-height: 1.7;
  font-weight: 300;
  animation: fadeInUp 0.6s 0.2s ease both;
}

.intro-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 52px;
  animation: fadeInUp 0.6s 0.25s ease both;
}

.intro-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 560px;
  width: 100%;
  margin-bottom: 52px;
  animation: fadeInUp 0.6s 0.3s ease both;
}

.intro-card {
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  transition: border-color 0.2s ease;
}

.intro-card:hover {
  border-color: rgba(201,168,76,0.3);
}

.intro-card-icon {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--gold);
}

.intro-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 4px;
}

.intro-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.intro-source {
  margin-top: 48px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  animation: fadeInUp 0.6s 0.4s ease both;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 16px 40px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 32px rgba(201,168,76,0.25);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(201,168,76,0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-back {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-back:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--cream);
}

.btn-back:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-next {
  background: var(--gold);
  color: var(--dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  opacity: 0.4;
  pointer-events: none;
}

.btn-next.enabled {
  opacity: 1;
  pointer-events: auto;
}

.btn-next.enabled:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-next:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-restart {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 14px 32px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-restart:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-restart:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ══════════════════════════════════════
   QUIZ SCREEN
══════════════════════════════════════ */
#screen-quiz {
  padding: 40px 24px 80px;
}

.quiz-header {
  width: 100%;
  max-width: 680px;
  margin-bottom: 48px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.progress-count {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--gold);
}

.progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-card {
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  max-width: 680px;
  width: 100%;
  animation: cardIn 0.4s ease forwards;
}

.question-number {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 16px;
}

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--cream);
  margin-bottom: 32px;
}

.options-grid {
  display: grid;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  color: var(--cream-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  width: 100%;
}

.option-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  transform: translateX(4px);
}

.option-btn.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
}

.option-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.option-letter {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0;
}

.option-btn.selected .option-letter,
.option-btn:hover .option-letter {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  max-width: 680px;
  width: 100%;
}

/* ══════════════════════════════════════
   RESULT SCREEN
══════════════════════════════════════ */
#screen-result {
  padding: 60px 24px 80px;
  text-align: center;
}

.result-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 12px;
  animation: fadeInUp 0.5s ease both;
}

.result-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 40px;
  animation: fadeInUp 0.5s 0.1s ease both;
}

.result-card {
  max-width: 680px;
  width: 100%;
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 52px);
  text-align: left;
  animation: fadeInUp 0.5s 0.2s ease both;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--profile-color, var(--gold)), transparent);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--gold);
}

.profile-title-group h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 4px;
}

.profile-subtitle {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.result-section {
  margin-bottom: 28px;
}

.result-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 14px;
}

.result-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--cream-2);
  font-weight: 300;
}

.biases-list {
  display: grid;
  gap: 12px;
}

.bias-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 18px;
}

.bias-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 4px;
}

.bias-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.tips-list {
  display: grid;
  gap: 12px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tip-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  margin-top: 2px;
}

.tip-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream-2);
  font-weight: 300;
}

.score-bar-section {
  margin-bottom: 28px;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-label {
  font-size: 12px;
  color: var(--muted);
  width: 140px;
  flex-shrink: 0;
}

.score-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-val {
  font-size: 12px;
  color: var(--muted);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
  animation: fadeInUp 0.5s 0.4s ease both;
}

.result-source {
  margin-top: 48px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  animation: fadeInUp 0.5s 0.5s ease both;
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════
   ACCESSIBILITY — REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 480px) {
  .intro-cards {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .score-label {
    width: 100px;
    font-size: 11px;
  }
}