:root {
  --background: hsl(0 0% 100%);
  --foreground: hsl(220 20% 15%);
  --card: hsl(0 0% 100%);
  --primary: hsl(207 90% 40%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(210 30% 96%);
  --muted: hsl(210 20% 96%);
  --muted-foreground: hsl(215 14% 50%);
  --border: hsl(214 30% 91%);
  --ring: hsl(207 90% 40%);
  --success: hsl(145 63% 42%);
  --danger: hsl(0 84% 60%);
  --shadow-sm: 0 10px 20px rgba(12, 49, 94, 0.12);
  --shadow-md: 0 20px 50px rgba(12, 49, 94, 0.2);
}

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

[hidden] {
  display: none !important;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fc 100%);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  border: none;
  background: none;
}

button:focus-visible,
input:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 108, 200, 0.25);
}

.container {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
}

.logo-main {
  color: var(--foreground);
}

.logo-accent {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-lg {
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
}

.btn-nav,
.btn-hero {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-nav:hover,
.btn-hero:hover {
  background: rgba(19, 108, 200, 0.9);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: var(--muted);
  color: var(--foreground);
  padding: 0.75rem 1.1rem;
  font-weight: 700;
}

.btn-ghost:hover {
  background: #e4edf7;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 38rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--muted-foreground);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.hero-media {
  position: relative;
  width: min(100%, 680px);
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(19, 108, 200, 0.2);
  filter: blur(65px);
  top: 40%;
  right: 5%;
  transform: translateY(-50%);
}

.hero-image-shell {
  position: relative;
  border-radius: 1.5rem;
}

.hero-image {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 50px rgba(9, 35, 67, 0.2));
}

.success-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.success-page-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

.success-page-copy {
  flex: 1 1 0;
  min-width: 0;
  max-width: 40rem;
}

.success-page-title {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1rem;
  color: hsl(207 90% 33%);
  text-wrap: balance;
}

.success-page-subtitle {
  max-width: 50ch;
  color: hsl(216 26% 34%);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  font-weight: 600;
  margin: 0 0 2rem;
}

.success-page-media {
  position: relative;
  flex: 0 1 34rem;
  min-width: 0;
  overflow: hidden;
}

.success-page-image-shell {
  position: relative;
  width: min(100%, 34rem);
  margin: 0 auto;
}

.success-page-image {
  width: 100%;
  object-fit: contain;
  border-radius: 1.4rem;
  filter: drop-shadow(0 25px 50px rgba(9, 35, 67, 0.22));
}

.success-page-media .hero-glow {
  right: auto;
  left: 50%;
  width: clamp(220px, 42vw, 340px);
  height: clamp(220px, 42vw, 340px);
  transform: translate(-50%, -50%);
}

.quiz-section {
  background: #f7fbff;
  padding-top: 1.5rem;
}

.quiz-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  border-radius: 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.quiz-progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--muted);
  overflow: hidden;
  margin-top: 0.4rem;
}

.quiz-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2f8cd9, #5cb8ff);
  transition: width 0.25s ease;
}

.quiz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 1rem 0 1rem;
}

.quiz-counter {
  font-weight: 700;
  font-size: 0.92rem;
}

.quiz-helper {
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.quiz-step-host {
  min-height: 430px;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.quiz-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-question-title {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
}

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 0.78rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
  font-size: 0.94rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.quiz-option:hover {
  border-color: rgba(19, 108, 200, 0.5);
  transform: translateY(-1px);
}

.quiz-option.is-selected {
  border-color: var(--primary);
  background: rgba(19, 108, 200, 0.1);
}

.quiz-image-wrap {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  padding: 0.45rem;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-image {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.contact-title {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.35;
  font-weight: 800;
}

.contact-subtitle {
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  color: var(--foreground);
  background: #fff;
}

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

.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(19, 108, 200, 0.2);
  outline: none;
}

.contact-note {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.submit-btn {
  margin-top: 0.2rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:hover {
  background: rgba(19, 108, 200, 0.9);
}

.quiz-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.quiz-actions .btn {
  min-height: 46px;
  padding: 0.78rem 1.35rem;
  line-height: 1;
}

#quizNextBtn {
  min-width: 132px;
}

#quizPrevBtn {
  width: 52px;
  min-width: 52px;
  padding: 0;
  flex: 0 0 52px;
}

.quiz-next-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.quiz-arrow {
  font-size: 1.05rem;
  line-height: 1;
}

.quiz-next-text {
  font-weight: 700;
}

.success-state {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  padding: clamp(1.2rem, 2.6vw, 2rem);
}

.success-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.success-text {
  color: var(--foreground);
  font-size: clamp(1.28rem, 2.15vw, 2.05rem);
  line-height: 1.36;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 130;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  border-radius: 0.7rem;
  color: #fff;
  padding: 0.72rem 0.95rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-8px);
  animation: toast-in 0.25s forwards;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast.hide {
  animation: toast-out 0.25s forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (min-width: 960px) {
  .hero-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 3rem;
  }

  .hero-content {
    text-align: left;
    max-width: 44rem;
  }

  .hero-media {
    width: min(48vw, 640px);
  }

  .quiz-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 39%);
    gap: 1.3rem;
    align-items: center;
  }

  .quiz-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
    align-items: center;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 2.8rem 0;
  }

  .quiz-shell {
    padding: 1rem;
  }

  .quiz-step-host {
    min-height: 360px;
  }

  .quiz-actions {
    flex-direction: row;
    align-items: stretch;
  }

  .quiz-actions .btn {
    padding: 0.75rem 0.9rem;
  }

  #quizPrevBtn {
    width: 48px;
    min-width: 48px;
    flex-basis: 48px;
  }

  #quizNextBtn {
    width: auto;
    flex: 1;
  }

  #toast-container {
    left: 1rem;
    right: 1rem;
    top: 0.8rem;
  }

  .toast {
    width: 100%;
    max-width: none;
  }

  .success-text {
    font-size: clamp(1.08rem, 5.2vw, 1.45rem);
    line-height: 1.4;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .success-page {
    min-height: auto;
  }

  .success-page-layout {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
  }

  .success-page-copy {
    width: 100%;
    max-width: 42rem;
    text-align: center;
  }

  .success-page-subtitle {
    max-width: 42ch;
    margin: 0 auto 1.75rem;
  }

  .success-page-media {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    flex: 0 1 auto;
  }

  .success-page-image-shell {
    width: min(100%, 26rem);
  }

  .success-page-media .hero-glow {
    width: clamp(180px, 54vw, 300px);
    height: clamp(180px, 54vw, 300px);
  }
}
@media (max-width: 900px) {
  .success-section {
    min-height: auto;
  }

  .success-grid {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
  }

  .success-content {
    width: 100%;
    text-align: center;
    flex: 0 1 auto;
  }

  .success-subtitle {
    max-width: 42ch;
    margin: 0 auto 1.75rem;
  }

  .success-media {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
  }

  .phone-shell.success-shell {
    width: min(100%, 26rem);
  }

  .success-media .hero-glow {
    width: clamp(180px, 54vw, 300px);
    height: clamp(180px, 54vw, 300px);
  }
}


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