/* =========================
   ROOT VARIABLES
========================= */
:root {
  --primary: #7a5cff;
  --primary-soft: #f1edff;
  --secondary: #ff7aa2;
  --accent: #ffd6e5;
  --dark: #2b2b3c;
  --text: #444;
  --muted: #777;
  --bg: #faf9ff;
  --card-bg: #ffffff;
  --border: #e6e6f0;
  --success: #5ccfa6;
  
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 12px 40px rgba(122, 92, 255, 0.12);
  
  /* Animation speeds */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
}

/* =========================
   GLOBAL RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* =========================
   TYPOGRAPHY
========================= */
h1, h2, h3 {
  color: var(--dark);
  line-height: 1.3;
}

h1 {
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.6rem;
}

/* =========================
   HERO SECTION
========================= */
.hero {
  padding: 80px 20px 70px;
  text-align: center;
  background: 
    radial-gradient(circle at top right, rgba(122, 92, 255, 0.1), transparent 60%),
    radial-gradient(circle at bottom left, rgba(255, 122, 162, 0.1), transparent 60%),
    linear-gradient(135deg, #ffffff, #f7f4ff);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 122, 162, 0.05), transparent);
  top: -150px;
  right: -150px;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(122, 92, 255, 0.05), transparent);
  bottom: -100px;
  left: -100px;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.hero p {
  max-width: 900px;
  margin: 0 auto 1rem;
}

.microcopy {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-medium);
}

.microcopy.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   BUTTONS
========================= */
.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.primary-btn::after,
.secondary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.primary-btn:hover::after,
.secondary-btn:hover::after {
  left: 100%;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--shadow-card);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 50px rgba(122, 92, 255, 0.3);
}

.secondary-btn {
  background: var(--primary-soft);
  color: var(--primary);
}

.secondary-btn:hover {
  background: #e7e1ff;
  transform: translateY(-1px) scale(1.01);
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 70px 20px;
  position: relative;
}

section > h2 {
  text-align: center;
}

/* Decorative curve for sections */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-soft), transparent);
}

/* =========================
   ASSESSMENT CONTAINER
========================= */
.assessment-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.step-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 30px;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(50px);
  pointer-events: none;
  transition: all var(--transition-medium);
}

.step-card.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.step-card.exiting {
  opacity: 0;
  transform: translateX(-50px);
}

/* =========================
   FORM ELEMENTS
========================= */
label {
  display: block;
  font-weight: 500;
  margin-top: 18px;
}

select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 6px;
  transition: all var(--transition-fast);
  background: var(--card-bg);
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.1);
}

/* =========================
   SLIDER STYLES
========================= */
.slider-container {
  position: relative;
  margin: 15px 0 25px;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, 
    #ffd6e5 0%, 
    #ffb8d2 20%, 
    #ff8ab5 40%, 
    #ff5c9d 60%, 
    #ff2e85 80%, 
    #ff006f 100%
  );
  border-radius: 10px;
  outline: none;
  transition: all var(--transition-fast);
  position: relative;
}

input[type="range"]:hover {
  box-shadow: 0 0 0 3px rgba(255, 122, 162, 0.2);
}

/* Slider thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(122, 92, 255, 0.3);
  transition: all var(--transition-fast);
  transform: scale(1);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 15px rgba(122, 92, 255, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(122, 92, 255, 0.3);
  transition: all var(--transition-fast);
}

/* Slider tooltip */
.slider-tooltip {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--dark);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  opacity: 0;
  transition: all var(--transition-fast);
  pointer-events: none;
  white-space: nowrap;
}

.slider-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
}

input[type="range"]:active + .slider-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.slider-value {
  position: absolute;
  right: 0;
  top: -25px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  min-width: 24px;
  text-align: center;
  transition: all var(--transition-fast);
}

/* =========================
   RESULTS
========================= */
.phase-badge {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--dark);
  font-weight: 600;
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

#confidence {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease 0.3s forwards;
}

/* =========================
   CHART CONTAINER
========================= */
.chart-container {
  position: relative;
  height: 300px;
  opacity: 0;
  transform: scale(0.8);
  animation: chartAppear 1s ease 0.5s forwards;
}

@keyframes chartAppear {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
   PROGRESS BAR
========================= */
#progress-container {
  margin-top: 40px;
  padding: 0 10px;
}

#progress-bar {
  width: 100%;
  height: 10px;
  background: #ece9ff;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

#progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Progress steps indicators */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  position: relative;
}

.progress-step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ece9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all var(--transition-medium);
  position: relative;
  z-index: 1;
}

.progress-step.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  transform: scale(1.2);
  box-shadow: 0 4px 15px rgba(122, 92, 255, 0.3);
}

.progress-step.completed {
  background: var(--success);
  color: white;
}

/* =========================
   FEATURES / BENEFITS / ETC
========================= */
#features p,
#benefits p,
#audience p {
  max-width: 850px;
  margin: 0 auto 1rem;
}

#use-cases ul {
  max-width: 850px;
  margin: 0 auto;
}

/* =========================
   FAQ SECTION
========================= */
#faq {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 22px 25px;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: var(--primary-soft);
}

.faq-icon {
  transition: transform var(--transition-medium);
  font-size: 1.2rem;
  color: var(--primary);
}

.faq-question.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium) ease;
  padding: 0 25px;
}

.faq-answer.active {
  max-height: 500px;
  padding-bottom: 22px;
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-medium);
}

.faq-answer.active p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* =========================
   FOOTER
========================= */
footer {
  background: linear-gradient(135deg, #f2efff, #faf9ff);
  text-align: center;
  padding: 35px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

footer a {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: all var(--transition-fast);
}

footer a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition-medium);
}

footer a:hover::after {
  width: 100%;
}

/* =========================
   CONFETTI CANVAS
========================= */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* =========================
   ANIMATION KEYFRAMES
========================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(122, 92, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(122, 92, 255, 0.6);
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  h1 {
    font-size: 2.1rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  .step-card {
    padding: 25px;
  }
  
  .hero {
    padding: 60px 20px 50px;
  }
  
  section {
    padding: 50px 20px;
  }
}

/* =========================
   CHART CONTAINER RESET
========================= */
.chart-container {
  position: relative;
  height: 300px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.chart-container.visible {
  opacity: 1;
  transform: scale(1);
}

/* =========================
   SLIDER PULSE EFFECT
========================= */
input[type="range"].pulse::-webkit-slider-thumb {
  animation: thumbPulse 0.3s ease;
}

@keyframes thumbPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* =========================
   SMOOTH TRANSITIONS
========================= */
.step-card {
  transition: all var(--transition-medium);
}

#progress-fill {
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================
   BUTTON DISABLED STATE
========================= */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button:disabled:hover {
  transform: none !important;
  box-shadow: var(--shadow-card) !important;
}