/* ============================================================
   KC WELLNESS MEDICAL SPA — PEPTIDE QUIZ
   Light luxury aesthetic — cream, gold, warm charcoal
   ============================================================ */

/* --- VARIABLES --------------------------------------------- */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8D48B;
  --gold-dark:   #8B6914;
  --cream:       #FAF6EF;
  --cream-dark:  #F0E8D8;
  --white:       #FFFFFF;
  --black:       #1A1208;
  --charcoal:    #2C2416;
  --pink:        #D4307A;
  --pink-light:  #F06FA8;
  --pink-muted:  #F5C6DC;
  --text-body:   #3D2E1A;
  --text-muted:  #8A7560;

  --font-display: 'Cinzel', serif;
  --font-body:    'Cormorant Garamond', serif;
  --font-ui:      'Raleway', sans-serif;

  --ease:          0.22s ease;
  --card-shadow:   0 8px 48px rgba(58,42,20,0.08);
  --card-border:   1px solid rgba(201,168,76,0.28);
  --card-radius:   4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--cream);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
em { font-style: italic; }

/* --- SCREEN MANAGEMENT ------------------------------------- */
.screen { display: none; }

#screen-hero.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

#screen-quiz.active {
  display: block;
  min-height: 100vh;
  padding-bottom: 80px;
}

#screen-gate.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px;
}

#screen-results.active {
  display: block;
  padding: 60px 24px 80px;
}

/* --- SHARED: DIAMOND DIVIDER ------------------------------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
}

.diamond {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.dline {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* --- SHARED: GOLD BUTTON ----------------------------------- */
.btn-gold {
  display: inline-block;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 2px;
  padding: 16px 40px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--charcoal);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease), box-shadow var(--ease), transform 0.1s;
  box-shadow: 0 4px 24px rgba(201,168,76,0.28);
  text-decoration: none;
  text-align: center;
}

.btn-gold:hover {
  background: linear-gradient(90deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 32px rgba(201,168,76,0.4);
}

.btn-gold:active { transform: translateY(1px); }

.btn-gold:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-block {
  display: block;
  width: 100%;
  padding: 18px;
}

/* --- SHARED: BADGES ---------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 3px;
  padding: 4px 12px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.badge.pink {
  background: var(--pink-muted);
  border: 1px solid rgba(212,48,122,0.25);
  color: var(--pink);
}

/* --- SHARED: FORM FIELDS ----------------------------------- */
.field {
  margin-bottom: 20px;
  position: relative;
}

.field label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.req { color: var(--pink); font-size: 12px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  background: var(--cream);
  border: 1px solid #E0D5C5;
  border-radius: 2px;
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 15px;
  color: var(--charcoal);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field input::placeholder { color: rgba(138,117,96,0.45); }

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.14);
}

.field input.error { border-color: rgba(212,48,122,0.5); }

.field-error {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--pink);
  margin-top: 5px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.field-error.visible {
  opacity: 1;
  transform: translateY(0);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Phone number row: country code + number side by side */
.phone-row {
  display: flex;
  gap: 0;
}

.country-code-select {
  background: var(--cream);
  border: 1px solid #E0D5C5;
  border-right: none;
  border-radius: 2px 0 0 2px;
  padding: 13px 10px;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 14px;
  color: var(--charcoal);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A7560' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.country-code-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.14);
  z-index: 1;
}

.phone-row input[type="tel"] {
  border-radius: 0 2px 2px 0;
  flex: 1;
  min-width: 0;
}

/* --- SHARED: HERO LOAD ANIMATIONS -------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.d1 { animation-delay: 0.2s; }
.d2 { animation-delay: 0.4s; }
.d3 { animation-delay: 0.6s; }
.d5 { animation-delay: 0.85s; }
.d6 { animation-delay: 1.05s; }
.d7 { animation-delay: 1.25s; }
.d8 { animation-delay: 1.45s; }


/* ============================================================
   HERO
   ============================================================ */
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(201,168,76,0.11) 0%, transparent 68%);
  pointer-events: none;
}

/* Subtle warm grain texture */
.hero-texture {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  width: 100%;
}

.logo {
  width: 230px;
  max-width: 72vw;
  margin-bottom: 8px;
}

.hero-label {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 10px;
}

.hero-discover {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 3.5vw, 28px);
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-top: 14px;
}

/* Shimmer headline — charcoal-to-gold on light background */
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 6.5vw, 66px);
  line-height: 1.1;
  letter-spacing: clamp(2px, 0.7vw, 7px);
  text-transform: uppercase;
  margin-top: 6px;

  background: linear-gradient(
    90deg,
    var(--charcoal)   0%,
    var(--gold-dark)  20%,
    var(--gold)       38%,
    var(--gold-light) 50%,
    var(--gold)       62%,
    var(--gold-dark)  80%,
    var(--charcoal)   100%
  );
  background-size: 260% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.8s ease 0.75s forwards, shimmer 6s linear 2s infinite;
}

@keyframes shimmer {
  0%   { background-position: 220% center; }
  100% { background-position: -220% center; }
}

.hero-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-top: 20px;
}

.hero-inner .btn-gold { margin-top: 32px; }

.hero-micro {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 14px;
  opacity: 0.7;
}

.scroll-cue {
  margin-top: 40px;
  color: var(--gold);
  opacity: 0.55;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}


/* ============================================================
   QUIZ
   ============================================================ */
.quiz-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  padding: 20px 24px 10px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}

.progress-track {
  max-width: 700px;
  margin: 0 auto;
  height: 3px;
  background: var(--cream-dark);
  border-radius: 2px;
  overflow: hidden;
}

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

.progress-label {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.quiz-card {
  max-width: 700px;
  margin: 28px auto 0;
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 40px 48px 48px;
}

.back-link {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  display: block;
  transition: color var(--ease);
}

.back-link:hover { color: var(--gold-dark); }
.back-link[style*="hidden"] { pointer-events: none; }

/* Question rendered by JS */
.q-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--charcoal);
  letter-spacing: 0.5px;
  line-height: 1.45;
  margin-bottom: 28px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-opt {
  position: relative;
  display: flex;
  align-items: center;
  padding: 15px 48px 15px 18px;
  background: var(--white);
  border: 1px solid #E8DFD0;
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

/* Left accent bar */
.answer-opt::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 4px 0 0 4px;
  background: #E8DFD0;
  transition: background 0.2s ease;
}

/* Right circle indicator */
.answer-opt::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1.5px solid #D8CEBE;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.answer-opt:hover {
  border-color: rgba(201,168,76,0.6);
  background: rgba(201,168,76,0.04);
}

.answer-opt:hover::before { background: var(--gold); }
.answer-opt:hover::after  { border-color: var(--gold); }

.answer-opt.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.answer-opt.selected::before { background: var(--gold); }

.answer-opt.selected::after {
  background: var(--gold);
  border-color: var(--gold);
  /* Gold check via unicode */
  content: '✓';
  font-family: sans-serif;
  font-size: 11px;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-text {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.4;
}

.quiz-nav {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

.quiz-nav .btn-gold { min-width: 160px; }

/* Slide animations for quiz questions */
@keyframes qSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes qSlideInBack {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ============================================================
   GATE (Lead Capture)
   ============================================================ */
.gate-card {
  max-width: 580px;
  width: 100%;
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 56px 48px;
  text-align: center;
  animation: screenIn 0.5s ease;
}

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

.gate-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2.8vw, 26px);
  letter-spacing: 3px;
  color: var(--charcoal);
  line-height: 1.35;
  margin-bottom: 12px;
}

.gate-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

#quiz-lead-form .field { text-align: left; }

.privacy-note {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.65;
}

.gate-error {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--pink);
  margin-top: 12px;
  text-align: center;
}


/* ============================================================
   RESULTS
   ============================================================ */
.results-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* Result card — injected by JS */
.result-card {
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  animation: resultIn 0.65s ease;
}

@keyframes resultIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.result-top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.result-body { padding: 48px; }

.result-match-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 3px;
  padding: 4px 12px;
  background: var(--pink-muted);
  border: 1px solid rgba(212,48,122,0.25);
  color: var(--pink);
  text-transform: uppercase;
  border-radius: 2px;
  margin-bottom: 14px;
}

.result-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 4vw, 36px);
  color: var(--gold-dark);
  letter-spacing: 3px;
  line-height: 1.2;
}

.result-subtitle {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 5px;
  margin-bottom: 14px;
}

.result-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 20px;
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: 20px;
}

.result-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.38), transparent);
  margin: 20px 0;
}

.result-desc {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.78;
  margin-bottom: 28px;
}

.result-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.result-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.5;
}

.result-benefits li::before {
  content: '◆';
  color: var(--gold);
  font-size: 8px;
  margin-top: 4px;
  flex-shrink: 0;
}

.ideal-for-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ideal-label {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ideal-tag {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 4px 12px;
  background: var(--cream);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold-dark);
  border-radius: 20px;
  text-transform: uppercase;
}

/* Secondary note */
.secondary-wrap {
  text-align: center;
  margin: 36px 0;
}

.secondary-note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 12px auto 0;
}

/* Results CTA */
.results-cta-block {
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 48px;
  text-align: center;
}

.cta-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(16px, 2.4vw, 24px);
  letter-spacing: 4px;
  color: var(--charcoal);
  margin-bottom: 14px;
}

.cta-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 500px;
  margin: 0 auto 28px;
}

.cta-details {
  margin-top: 20px;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  line-height: 2.1;
}

.cta-details a {
  color: var(--gold-dark);
  transition: color var(--ease);
}

.cta-details a:hover { color: var(--gold); }


/* ============================================================
   RESPONSIVE — 768px+
   ============================================================ */
@media (min-width: 768px) {
  .logo { width: 270px; }
}

@media (min-width: 1200px) {
  .logo { width: 300px; }

  .quiz-card {
    padding: 48px 60px 56px;
  }
}

/* ============================================================
   RESPONSIVE — small mobile
   ============================================================ */
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }

  .quiz-card {
    padding: 28px 20px 36px;
    margin: 20px 16px 0;
    border-radius: 2px;
  }

  .gate-card {
    padding: 40px 24px;
  }

  .result-body { padding: 32px 24px; }
  .results-cta-block { padding: 32px 24px; }

  .quiz-nav { justify-content: stretch; }
  .quiz-nav .btn-gold { width: 100%; min-width: unset; }

  #screen-hero.active { padding: 60px 20px; }
  #screen-gate.active { padding: 40px 16px; }
}
