@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Russo+One&family=Sen:wght@400;500;600;700;800&display=swap");

:root {
  --primary:       #c48c4c;
  --primary-dark:  #a8703a;
  --primary-light: #d1b684;
  --accent:        #c48c4c;
  --accent-light:  #d1b684;
  --bg-main:       #efe4d2;
  --bg-card:       #ffffff;
  --text-dark:     #1a1208;
  --text-mid:      #4a3c28;
  --text-light:    #7a6a54;
  --border:        #ddd0bb;
  --shadow:        0 8px 32px rgba(196,140,76,0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  width: 100%;
  height: auto;
  font-family: "Jost", sans-serif;
  background: var(--bg-main);
}

/* MAIN WRAPPER */
main {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-main);
  padding: 30px 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* HEADER / LOGO */
.quiz-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.quiz-header .logo-img {
  height: 64px;
  width: auto;
}

/* PROGRESS BAR */
.progress-wrap {
  width: 100%;
  max-width: 700px;
  margin-bottom: 22px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 6px;
  font-weight: 600;
}
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-light), var(--primary));
  border-radius: 99px;
  width: 0%;
  transition: width 0.5s ease;
}

/* CARD */
.quiz-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 820px;
  padding: 36px 40px 32px;
  text-align: center;
}

/* STEP BADGE */
.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #faf4ec;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

/* QUESTION */
.question {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 20px;
}

/* STEP IMAGE */
.stepImg {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 22px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(196,140,76,0.12);
  border: 1px solid var(--border);
}
.stepImg img { width: 100%; display: block; }

/* INTRO / TRANSITION TEXT */
.intro-text {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 22px;
  text-align: left;
}
.intro-text p { margin-bottom: 10px; }
.intro-text strong { color: var(--primary); }

/* OPTIONS */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: left;
}

.option { position: relative; cursor: pointer; }

.option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer; z-index: 10; margin: 0;
}

.option-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fdfaf6;
  transition: all 0.22s ease;
  cursor: pointer;
}

.option-letter {
  width: 34px; height: 34px; flex-shrink: 0;
  background: #f5ece0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: var(--primary);
  transition: all 0.22s ease;
}

.option-text {
  font-size: 15px;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.4;
}

.option input[type="radio"]:checked + .option-inner {
  border-color: var(--primary);
  background: #faf0e3;
}

.option input[type="radio"]:checked + .option-inner .option-letter {
  background: var(--primary);
  color: #fff;
}

.option-inner:hover {
  border-color: var(--primary-light);
  background: #fdf6ee;
}

/* SCALE */
.scale-options {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.scale-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scale-option input[type="radio"] {
  position: absolute; opacity: 0;
  width: 100%; height: 100%; cursor: pointer; z-index: 10;
}
.scale-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: #fdfaf6;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: var(--text-mid);
  transition: all 0.22s ease;
  cursor: pointer;
}
.scale-label {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  max-width: 64px;
  line-height: 1.3;
}
.scale-option input[type="radio"]:checked + .scale-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(196,140,76,0.4);
}

/* NEXT / PREV BUTTONS */
.nextPrev {
  width: 100%;
  max-width: 820px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 20px;
}
.btn-prev {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--primary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.btn-prev:hover { background: #faf0e3; border-color: var(--primary); }

.btn-next {
  padding: 0 32px;
  height: 52px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 0;
  color: #fff;
  font-size: 16px;
  font-family: "Russo One", sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(196,140,76,0.35);
  transition: all 0.2s;
}
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196,140,76,0.45); }
.btn-next i { font-size: 14px; }

/* INTRO CARD */
.intro-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 100%; max-width: 820px;
  padding: 36px 40px 32px;
  text-align: center;
}
.intro-card h1 {
  font-size: 28px; font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px; line-height: 1.35;
}
.intro-card .subtitle {
  font-size: 17px; color: var(--text-mid);
  margin-bottom: 28px; line-height: 1.6;
}
.intro-divider {
  width: 60px; height: 4px;
  background: var(--primary);
  border-radius: 99px;
  margin: 0 auto 28px;
}

/* TRANSITION CARD */
.transition-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 100%; max-width: 820px;
  padding: 48px 40px;
  text-align: center;
}
.transition-card .t-icon {
  font-size: 48px; color: var(--primary);
  margin-bottom: 18px;
}
.transition-card h2 {
  font-size: 24px; font-weight: 700;
  color: var(--text-dark); margin-bottom: 14px;
}
.transition-card p {
  font-size: 16px; color: var(--text-mid);
  line-height: 1.75; max-width: 540px;
  margin: 0 auto 20px;
}

/* LEAD CARD */
.lead-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 100%; max-width: 820px;
  padding: 40px;
  text-align: center;
  display: none;
}
.lead-card h2 {
  font-size: 26px; font-weight: 800;
  color: var(--text-dark); margin-bottom: 8px;
}
.lead-card .lead-sub {
  font-size: 16px; color: var(--text-mid);
  margin-bottom: 24px; line-height: 1.6;
}
.lead-form-fields {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 460px; margin: 0 auto 22px;
}
.lead-input-wrap { position: relative; }
.lead-input-wrap i {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--primary-light); font-size: 16px;
}
.lead-input {
  width: 100%; padding: 14px 16px 14px 44px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 15px; font-family: "Jost";
  color: var(--text-dark);
  background: #fdfaf6;
  outline: none;
  transition: border-color 0.2s;
}
.lead-input:focus { border-color: var(--primary); }
.lead-input::placeholder { color: #bbb; }

.btn-lead {
  width: 100%; max-width: 460px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 0; border-radius: 12px;
  color: white; font-size: 17px;
  font-family: "Russo One";
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(196,140,76,0.35);
  transition: all 0.2s;
}
.btn-lead:hover { transform: translateY(-2px); }

.privacy-note {
  font-size: 12px; color: #bbb;
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.processing-hint {
  font-size: 13px; color: var(--primary);
  margin-bottom: 22px;
  background: #faf0e3; border-radius: 8px;
  padding: 8px 16px; display: inline-block;
  border: 1px solid var(--border);
}

/* LOADING */
.loadingresult {
  display: none;
  position: fixed; inset: 0;
  background: rgba(58,40,18,0.88);
  z-index: 9999;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
}
.loadingresult.active { display: flex; }
.loadingresult img { width: 90px; }
.loadingresult p {
  color: #efe4d2; font-size: 16px;
  text-align: center; max-width: 320px; line-height: 1.6;
}

/* RESULT PAGE */
.result-page {
  display: none;
  min-height: 100vh;
  background: var(--bg-main);
  padding: 40px 20px;
}
.result-page.active { display: block !important; }

.result-inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.result-logo {
  height: 60px; width: auto;
  margin: 0 auto 32px;
  display: block;
}

.result-icon-wrap {
  width: 80px; height: 80px;
  background: #faf0e3;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--primary);
  margin: 0 auto 20px;
}

.result-tag {
  display: inline-block;
  background: #faf0e3;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 13px; font-weight: 600;
  padding: 4px 16px; border-radius: 99px;
  margin-bottom: 16px; letter-spacing: 0.4px;
}

.result-title {
  font-size: 30px; font-weight: 800;
  color: var(--text-dark); line-height: 1.3;
  margin-bottom: 10px;
}

.result-subtitle {
  font-size: 17px; color: var(--text-mid);
  font-style: italic; margin-bottom: 28px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  text-align: left;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.result-card p {
  font-size: 16px; color: var(--text-dark);
  line-height: 1.85; margin-bottom: 14px;
}
.result-card p:last-child { margin-bottom: 0; }
.result-card strong { color: var(--primary-dark); }

.result-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 99px;
  color: white;
  font-family: "Russo One"; font-size: 17px;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(196,140,76,0.4);
  transition: all 0.2s;
  border: 0; cursor: pointer;
  margin-bottom: 16px;
}
.result-cta:hover { transform: translateY(-3px); color: white; }

.result-brand {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-light); font-size: 13px;
}

/* ERROR */
#error {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 10000000; min-width: 280px;
}

/* ANIMATIONS */
.animate {
  animation: slideLeft 0.55s forwards cubic-bezier(0.77, 0, 0.175, 1);
  opacity: 0;
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}
.animateReverse {
  animation: slideLeftReverse 0.55s forwards cubic-bezier(0.77, 0, 0.175, 1);
}
@keyframes slideLeftReverse {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(36px); }
}
.delay-100 { animation-delay: 80ms; }
.delay-200 { animation-delay: 160ms; }
.delay-300 { animation-delay: 240ms; }

/* RESPONSIVE */
@media (max-width: 768px) {
  main { padding: 20px 16px; }
  .quiz-card, .intro-card, .transition-card, .lead-card { padding: 24px 20px; }
  .question { font-size: 20px; }
  .options { grid-template-columns: 1fr; }
  .nextPrev { justify-content: center; }
  .result-title { font-size: 24px; }
  .scale-btn { width: 48px; height: 48px; font-size: 17px; }
  .quiz-header .logo-img { height: 48px; }
}
@media (max-width: 480px) {
  .intro-card h1 { font-size: 22px; }
  .result-cta { font-size: 15px; padding: 14px 24px; }
  .scale-options { gap: 8px; }
}
