/* ==========================================================
   DESIGN TOKENS
   ========================================================== */
:root{
  --ivory: #FBF6EC;
  --cream: #F3ECDC;
  --card: #FFFFFF;
  --text-dark: #24312A;
  --text-secondary: #6E7869;
  --accent-green: #7C8F6E;
  --accent-green-deep: #4E6350;
  --accent-cta: #C8763E;
  --accent-cta-hover: #B4682F;
  --line: rgba(36,49,42,0.12);
  --shadow-soft: 0 14px 40px rgba(36,49,42,0.10);
  --shadow-card: 0 4px 18px rgba(36,49,42,0.07);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--text-dark);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ font-family: var(--serif); margin:0; }
button{ font-family: inherit; }
.wrap{ max-width: 720px; margin: 0 auto; padding: 0 20px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html{ scroll-behavior: auto; }
}

/* ==========================================================
   TOP INFO BAR
   ========================================================== */
.top-bar{
  background: var(--accent-green-deep);
  color: #F4F1E6;
}
.top-bar-inner{
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 20px;
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}
.dot-sep{ opacity: 0.6; }

/* ==========================================================
   MASTHEAD
   ========================================================== */
.masthead{
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
}
.masthead-inner{
  padding: 18px 20px;
  text-align:center;
}
.brand-name{
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}
.brand-tag{
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .25s ease, opacity .25s ease;
  padding: 17px 30px;
}
.btn-cta{
  background: var(--accent-cta);
  color: #FFF8EF;
  box-shadow: 0 10px 28px rgba(200,118,62,0.32);
}
.btn-cta:hover{ background: var(--accent-cta-hover); transform: translateY(-2px); }
.btn-cta:active{ transform: translateY(0) scale(0.99); }
.btn-full{ width: 100%; }

.btn-next{
  background: var(--accent-cta);
  color: #FFF8EF;
  flex: 1;
}
.btn-next:disabled{
  background: #DCD3BF;
  color: #9C9484;
  cursor: not-allowed;
  box-shadow:none;
}
.btn-next:not(:disabled):hover{ background: var(--accent-cta-hover); }

.btn-back{
  background: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--line);
  padding: 16px 22px;
}
.btn-back:hover{ background: var(--cream); }

/* ==========================================================
   HERO
   ========================================================== */
.hero{ padding: 54px 0 60px; }
.hero-inner{ text-align:center; }
.pill-label{
  display:inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-green-deep);
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-title{
  font-size: clamp(30px, 5.4vw, 44px);
  line-height: 1.18;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.hero-sub{
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 auto 30px;
}
.hero-microcopy{
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ==========================================================
   QUIZ SCREEN
   ========================================================== */
.quiz-screen{ padding: 40px 0 70px; }
.quiz-wrap{ max-width: 620px; }

.progress-header{
  display:flex;
  justify-content:space-between;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}
#progressPctLabel{ color: var(--accent-cta); }

.progress-track{
  height: 7px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
}
.progress-fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cta));
  border-radius: 999px;
  transition: width .6s var(--ease);
}

.quiz-card{
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  padding: 30px 24px;
  position: relative;
  min-height: 360px;
}
@media (min-width: 560px){
  .quiz-card{ padding: 40px 40px; }
}

.q-panel{
  display:none;
  animation: qIn .45s var(--ease);
}
.q-panel.active{ display:block; }
@keyframes qIn{
  from{ opacity:0; transform: translateY(12px); }
  to{ opacity:1; transform: translateY(0); }
}

.q-icon{
  font-size: 30px;
  margin-bottom: 10px;
}
.q-kicker{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.q-title{
  font-size: clamp(19px, 3vw, 23px);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 22px;
}

.answers{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.answer-btn{
  width:100%;
  display:flex;
  align-items:center;
  gap: 14px;
  text-align:left;
  background: var(--ivory);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  cursor:pointer;
  min-height: 56px;
  transition: background .22s ease, border-color .22s ease, transform .15s ease;
}
.answer-btn:hover{ background: var(--cream); border-color: var(--accent-green); }
.answer-btn:focus-visible{ outline: 2.5px solid var(--accent-green-deep); outline-offset:2px; }
.answer-letter{
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all .22s ease;
}
.answer-btn.selected{
  background: #FBEDE0;
  border-color: var(--accent-cta);
}
.answer-btn.selected .answer-letter{
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #fff;
}

.microcopy{
  text-align:center;
  font-size: 13.5px;
  color: var(--accent-green-deep);
  font-weight: 600;
  min-height: 18px;
  margin: 14px 0 0;
}

.quiz-nav{
  display:flex;
  gap: 12px;
  margin-top: 22px;
}

/* ==========================================================
   ANALYSIS SCREEN
   ========================================================== */
.analysis-screen{ padding: 90px 0; }
.analysis-inner{ text-align:center; max-width: 420px; }
.spinner-ring{
  width: 62px; height: 62px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  border-top-color: var(--accent-cta);
  animation: spin 1s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.analysis-title{
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.analysis-sub{
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 26px;
}
.analysis-progress-track{
  height: 6px;
  background: var(--cream);
  border-radius: 999px;
  overflow:hidden;
}
.analysis-progress-fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cta));
  transition: width .2s linear;
}
.analysis-pct{
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================
   RESULT SCREEN
   ========================================================== */
.result-screen{ padding: 30px 0 70px; }
.result-inner{ text-align:center; max-width: 620px; animation: qIn .5s var(--ease); }

.result-badge-circle{
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent-cta);
  display:flex; align-items:center; justify-content:center;
  margin: 0 auto 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-green-deep);
  line-height: 1.3;
}
.result-title{
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 600;
  margin-bottom: 14px;
}
.result-subtitle{
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--accent-cta);
  margin-bottom: 14px;
}
.result-copy{
  color: var(--text-secondary);
  font-size: 16.5px;
  max-width: 54ch;
  margin: 0 auto;
  text-align: left;
}

.product-intro{
  margin-top: 44px;
  text-align:left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 560px){
  .product-intro{ padding: 40px; }
}
.product-intro-title{
  font-size: clamp(21px, 3.4vw, 25px);
  font-weight: 600;
  margin-bottom: 14px;
  text-align:center;
}
.product-intro-copy{
  color: var(--text-secondary);
  font-size: 16px;
  text-align:center;
  max-width: 56ch;
  margin: 0 auto 30px;
}
.feature-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 32px;
}
@media (min-width: 560px){
  .feature-grid{ grid-template-columns: 1fr 1fr; }
}
.feature-card{
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}
.feature-icon{ font-size: 24px; margin-bottom: 8px; }
.feature-card h4{
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
  font-family: var(--sans);
}
.feature-card p{
  font-size: 13.5px;
  color: var(--text-secondary);
  margin:0;
}
.result-microcopy{
  text-align:center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer{
  background: var(--accent-green-deep);
  color: rgba(244,241,230,0.85);
  padding: 46px 0 30px;
}
.footer-inner{ text-align:center; }
.footer-brand-name{ color: #F4F1E6; }
.footer-brand-tag{ color: rgba(244,241,230,0.6); }
.footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap: 10px 20px;
  margin: 22px 0;
  font-size: 13.5px;
}
.footer-links a{
  color: rgba(244,241,230,0.8);
  text-decoration:none;
}
.footer-links a:hover{ color: #fff; }
.placeholder-tag{
  font-size: 11px;
  opacity: 0.65;
  font-weight: 400;
}
.footer-note{
  font-size: 11.5px;
  font-style: italic;
  color: rgba(244,241,230,0.55);
  max-width: 560px;
  margin: 0 auto 16px;
}
.footer-disclosure{
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(244,241,230,0.65);
  max-width: 620px;
  margin: 0 auto 18px;
}
.footer-copyright{
  font-size: 12px;
  color: rgba(244,241,230,0.5);
}

/* ==========================================================
   RESPONSIVE — mobile tuning
   ========================================================== */
@media (max-width: 430px){
  body{ font-size: 16px; }
  .quiz-card{ padding: 24px 18px; min-height: 320px; }
  .answer-btn{ padding: 14px 14px; font-size: 15.5px; }
  .btn{ padding: 15px 22px; font-size: 15px; }
  .quiz-nav{ flex-direction: column-reverse; }
  .btn-back{ width: 100%; }
}
