:root {
  --background: hsl(220 20% 6%);
  --foreground: hsl(45 10% 95%);
  --card: hsl(220 18% 10%);
  --primary: hsl(43 96% 56%);
  --primary-soft: hsl(43 96% 56% / 0.1);
  --primary-ring: hsl(43 96% 56% / 0.48);
  --secondary: hsl(220 15% 16%);
  --secondary-foreground: hsl(45 10% 90%);
  --muted: hsl(220 14% 14%);
  --muted-foreground: hsl(220 10% 55%);
  --border: hsl(220 14% 18%);
  --radius: 0.75rem;
  --shadow: 0 20px 60px hsl(220 30% 2% / 0.5);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  background:
    radial-gradient(circle at 50% 8%, hsl(43 96% 56% / 0.045), transparent 24rem),
    var(--background);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.screen {
  display: none;
  min-height: 100vh;
}

.screen.is-active { display: flex; }

.landing,
.success {
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.landing-content,
.success-content {
  width: min(100%, 580px);
  text-align: center;
  animation: rise 0.6s cubic-bezier(.22,.8,.36,1) both;
}

.brand-badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h1 span,
.success h2 span {
  color: var(--primary);
  background: linear-gradient(110deg, hsl(43 100% 70%), var(--primary), hsl(36 94% 48%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-copy {
  max-width: 480px;
  margin: 0 auto 8px;
  color: var(--muted-foreground);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.7;
}

.time-note {
  margin-bottom: 30px;
  color: var(--muted-foreground);
  font-size: 0.83rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 0 26px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.primary-button {
  color: hsl(220 20% 6%);
  background: var(--primary);
  box-shadow: 0 0 30px hsl(43 96% 56% / 0.18);
}

.secondary-button {
  color: var(--foreground);
  border: 1px solid var(--border);
  background: var(--secondary);
}

.primary-button svg,
.back-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:not(:disabled):hover,
.secondary-button:hover { transform: translateY(-2px); filter: brightness(1.1); }

.primary-button:focus-visible,
.secondary-button:focus-visible,
.back-button:focus-visible,
input:focus-visible,
.goal-option input:focus-visible + span,
.answer-list input:focus-visible + span {
  outline: 3px solid var(--primary-ring);
  outline-offset: 3px;
}

.primary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.start-button { margin: 0 auto; }

.trust-list {
  display: grid;
  gap: 9px;
  justify-content: center;
  margin-top: 34px;
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.trust-list p {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
}

.trust-list svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz {
  flex-direction: column;
  padding: 0 16px;
}

.quiz-header {
  position: sticky;
  z-index: 5;
  top: 0;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 16px 0 10px;
  background: linear-gradient(to bottom, var(--background) 70%, transparent);
  backdrop-filter: blur(8px);
}

.header-line {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}

.header-line > span {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-line small {
  color: var(--muted-foreground);
  font-size: 0.68rem;
}

.back-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--secondary-foreground);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.back-button.is-visible { opacity: 1; pointer-events: auto; }

.progress-track {
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: var(--secondary);
}

.progress-track span {
  display: block;
  width: 14.285%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .4s ease;
}

.quiz-stage {
  display: grid;
  flex: 1;
  width: min(100%, 600px);
  margin: 0 auto;
  place-items: center;
  padding: 24px 0 34px;
}

#leadForm { width: 100%; }

.question-panel { display: none; }

.question-panel.is-current {
  display: block;
  animation: slide-in .3s ease both;
}

.card {
  width: 100%;
  padding: clamp(24px, 5vw, 32px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, hsl(220 18% 11%), var(--card));
  box-shadow: var(--shadow);
}

.card h2 {
  margin-bottom: 24px;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.card input[type="text"],
.card input[type="tel"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 16px;
  outline: 0;
  color: var(--foreground);
  background: var(--secondary);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.card input::placeholder { color: var(--muted-foreground); }

.card input[type="text"]:focus,
.card input[type="tel"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.continue-button { width: 100%; margin-top: 24px; }

.question-hint {
  margin: -18px 0 24px;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.goal-option input,
.answer-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goal-option > span {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.goal-option img,
.goal-option i {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.goal-option img {
  object-fit: cover;
  transition: transform .3s ease;
}

.goal-option i {
  background: linear-gradient(to top, rgb(0 0 0 / .84), rgb(0 0 0 / .25) 62%, transparent);
}

.goal-option b {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 12px;
  color: var(--foreground);
  font-size: clamp(0.7rem, 2.7vw, 0.85rem);
  line-height: 1.32;
}

.goal-option em {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: none;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--background);
  background: var(--primary);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
}

.goal-option:hover > span { border-color: hsl(43 96% 56% / .5); }
.goal-option:hover img { transform: scale(1.05); }

.goal-option input:checked + span {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.goal-option input:checked + span em { display: grid; }

.answer-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.answer-list label { cursor: pointer; }

.answer-list span {
  display: flex;
  min-height: 52px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 16px;
  color: var(--secondary-foreground);
  background: var(--secondary);
  font-size: clamp(.84rem, 2.6vw, 1rem);
  font-weight: 500;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}

.answer-list label:hover span {
  border-color: hsl(43 96% 56% / .5);
  transform: translateY(-1px);
}

.answer-list input:checked + span {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.confidentiality {
  margin: auto auto 22px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 2.1rem;
  font-weight: 800;
}

.success h2 {
  margin-bottom: 18px;
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.3;
}

.success p {
  margin-bottom: 8px;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.consent-option {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 22px;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: .73rem;
  line-height: 1.55;
}

.consent-option input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid hsl(0 84% 60% / .4);
  border-radius: 8px;
  color: hsl(0 88% 77%);
  background: hsl(0 84% 60% / .08);
  font-size: .76rem;
  line-height: 1.5;
}

.feedback.is-visible { display: block; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

@keyframes slide-in {
  from { opacity: 0; transform: translateX(55px); }
  to { opacity: 1; transform: translateX(0); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .landing { align-items: flex-start; padding-top: 12vh; }
  .landing-content { width: 100%; }
  .quiz { padding: 0 12px; }
  .quiz-stage { align-items: start; padding-top: 18px; }
  .card { padding: 22px 18px; border-radius: 14px; }
  .goals-card { padding-inline: 14px; }
  .goal-grid { gap: 9px; }
  .goal-option b { padding: 9px; font-size: .69rem; }
  .confidentiality { max-width: 330px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
