:root {
  --page-bg: #F3DED3;
  --cream: #FFF6F0;
  --blush: #F6C9CE;
  --berry: #A8324A;
  --berry-dark: #5E1F2C;
  --sage: #9CAF88;
  --gold: #C9A66B;
  --ink: #3A2A2A;

  --font-display: 'Fraunces', serif;
  --font-body: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 44px 20px 32px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 920px;
  animation: fade-in 0.5s ease;
}
.screen.active { display: block; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--berry);
  margin: 0 0 10px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0 0 14px;
  color: var(--ink);
}

/* ---------- HOME ---------- */
#home {
  display: none;
}
#home.active { display: block; }

.home-wrap {
  width: 100%;
}

.home-title {
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 60px;
}
.home-title span { color: var(--berry); font-style: italic; font-weight: 600; }

.home-content {
  display: flex;
  align-items: center;
  gap: 48px;
}

.home-text { flex: 1 1 420px; }

.hook {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--berry);
  margin: 0 0 14px;
}

.tagline {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #6b5a5a;
  max-width: 50ch;
  margin-bottom: 16px;
}

.hero-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--berry-dark);
  max-width: 42ch;
  margin-bottom: 28px;
}

.home-art { flex: 1 1 260px; display: flex; justify-content: center; }
.hero-swatch { width: 100%; max-width: 300px; }

.hero-photo {
  width: 100%;
  max-width: 320px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 20px 44px rgba(94, 31, 44, 0.18);
}

.hero-svg-fallback {
  display: none;
  width: 100%;
  justify-content: center;
}

.btn-primary {
  border: none;
  background: var(--berry);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { background: var(--berry-dark); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- QUIZ ---------- */
.quiz-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 48px;
  box-shadow: 0 12px 40px rgba(94, 31, 44, 0.08);
  max-width: 640px;
  margin: 0 auto;
}

.card-nav {
  margin-bottom: 20px;
}

.back-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #eadbd4;
  background: var(--cream);
  color: var(--berry);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.back-arrow:hover { background: var(--blush); border-color: var(--berry); }
.back-arrow:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.swatch-track {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.swatch {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--blush);
  overflow: hidden;
  position: relative;
}
.swatch.done { background: var(--berry); }
.swatch.current { background: linear-gradient(90deg, var(--berry) 50%, var(--blush) 50%); }

.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-step h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option {
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid #eadbd4;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.option:hover { border-color: var(--berry); background: var(--blush); }
.option.selected { border-color: var(--berry); background: var(--berry); color: var(--cream); }
.option:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- RESULT ---------- */
.result-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 48px;
  box-shadow: 0 12px 40px rgba(94, 31, 44, 0.08);
  max-width: 720px;
  margin: 0 auto;
}

#resultName {
  font-size: 1.8rem;
  font-weight: 600;
}

.result-body {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.balm-icon { width: 110px; flex-shrink: 0; }

.result-details { flex: 1 1 280px; }

.price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--berry);
  margin: 0 0 18px;
}

.result-details h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a7373;
  margin-bottom: 10px;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 24px;
}
.pill-list li {
  background: var(--blush);
  color: var(--berry-dark);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.benefit-list li {
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
  font-size: 0.95rem;
}
.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .quiz-card, .result-card { padding: 32px 24px; }
  .options { grid-template-columns: 1fr; }
  .home-content { flex-direction: column; text-align: center; }
  .tagline, .hero-line { max-width: 100%; }
  .result-body { flex-direction: column; align-items: center; text-align: center; }
  .benefit-list li { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .btn-primary, .option { animation: none !important; transition: none !important; }
}
