/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink: #ff0071;
  --orange: #ff6400;
  --dark: #161616;
  --white: #ffffff;
  --grey: #484848;
  --bg: #fafbff;
  --lite-grey: #f5f6fb;
  --card-shadow: 0px 4px 24px rgba(0, 0, 0, 0.08);
  --card-radius: 32px;
  --btn-radius: 99px;
  --font: "Manrope", sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* ========== Container ========== */
.quiz-container {
  width: 100%;
  max-width: 393px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ========== Header ========== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.header__logo img {
  width: 107.75px;
  height: 39.54px;
}

/* Language Switcher */
.lang-switch {
  position: relative;
}

.lang-switch__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(22, 22, 22, 0.15);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  transition: border-color 0.3s, background 0.3s;
}

.lang-switch__btn:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.theme-orange .lang-switch__btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.lang-switch__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: stroke 0.3s;
}

.lang-switch__btn:hover svg path {
  stroke: var(--pink);
}

.theme-orange .lang-switch__btn:hover svg path {
  stroke: var(--orange);
}

.lang-switch__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid rgba(22, 22, 22, 0.08);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 200;
}

.lang-switch__dropdown.active {
  display: block;
}

.lang-switch__dropdown a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.2s;
}

.lang-switch__dropdown a:hover {
  background: var(--lite-grey);
}

.lang-switch__dropdown a.current {
  color: var(--pink);
  font-weight: 700;
}

.theme-orange .lang-switch__dropdown a.current {
  color: var(--orange);
}

/* ========== Steps ========== */
.step {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.35s ease;
}

.step.active {
  display: flex;
}

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

/* ========== Welcome Hero ========== */
.welcome-hero {
  text-align: center;
  padding: 24px 20px 0;
  position: relative;
}

.welcome-hero__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 44px;
  letter-spacing: -1.44px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.welcome-hero__subtitle {
  font-size: 13.84px;
  font-weight: 300;
  line-height: 19.77px;
  letter-spacing: -0.28px;
  color: var(--dark);
  max-width: 280px;
  margin: 0 auto 20px;
}

.welcome-hero__images {
  position: relative;
  width: 304.67px;
  height: 217.48px;
  margin: 0 auto;
  overflow: hidden;
}

.welcome-hero__img {
  position: absolute;
  object-fit: cover;
}

.welcome-hero__img--1 {
  width: 196.77px;
  height: 443.91px;
  left: -21.29px;
  top: 0;
  z-index: 2;
  border-radius: 80px 80px 16px 16px;
}

.welcome-hero__img--2 {
  width: 150.57px;
  height: 163.73px;
  left: 65.39px;
  top: 53.74px;
  z-index: 3;
  border-radius: 60px 60px 12px 12px;
}

.welcome-hero__img--3 {
  width: 189.71px;
  height: 210.25px;
  left: 114.96px;
  top: 7.1px;
  z-index: 1;
  border-radius: 80px 80px 16px 16px;
  transform: scaleX(-1);
}

/* ========== Text Utilities ========== */
.text-pink {
  color: var(--pink);
}
.text-orange {
  color: var(--orange);
}
.text-bold {
  font-weight: 700;
}

/* ========== Card ========== */
.card {
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin: 0 16px;
  overflow: hidden;
  position: relative;
  z-index: 4;
}

.card__body {
  padding: 21px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: none;
}

.card__body::-webkit-scrollbar {
  display: none;
}

/* ========== Step Header ========== */
.step-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.2px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.4px;
  flex-shrink: 0;
  margin-top: 8px;
}

.step-number--pink {
  background: var(--pink);
}
.step-number--orange {
  background: var(--orange);
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.96px;
  text-transform: uppercase;
}

/* ========== Options ========== */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  width: 100%;
  height: 70px;
  border: 2px solid var(--dark);
  border-radius: var(--btn-radius);
  background: var(--white);
  font-family: var(--font);
  font-size: 20px;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
}

.option-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.option-btn:active {
  transform: scale(0.98);
}

.option-btn.selected {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
}

/* Orange theme buttons */
.step[data-step="age-child"] .option-btn:hover,
.step[data-step="format-child"] .option-btn:hover,
.step[data-step="direction-individual"] .option-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.step[data-step="age-child"] .option-btn.selected,
.step[data-step="format-child"] .option-btn.selected,
.step[data-step="direction-individual"] .option-btn.selected {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.option-btn__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--grey);
  letter-spacing: -0.24px;
  margin-top: 2px;
  text-align: left;
}

.option-btn:hover .option-btn__sub,
.option-btn.selected .option-btn__sub {
  color: inherit;
  opacity: 0.7;
}

/* Options with subtitle: left-aligned, taller */
.option-btn:has(.option-btn__sub) {
  height: 75px;
  align-items: flex-start;
  padding: 16px 36px;
}

/* ========== Hint ========== */
.hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--grey);
  text-align: center;
  letter-spacing: -0.24px;
  line-height: 1.67;
  margin-top: 24px;
}

/* ========== Direction Subtitle ========== */
.direction-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--grey);
  line-height: 1.5;
  letter-spacing: -0.26px;
  margin-bottom: 16px;
}

/* ========== Contact Form ========== */
.contact-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--grey);
  line-height: 1.5;
  letter-spacing: -0.26px;
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-input {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 28px;
  padding: 0 24px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--dark);
  background: var(--lite-grey);
  outline: none;
}

.form-input::placeholder {
  color: #999;
}

.form-input:focus {
  box-shadow: 0 0 0 1.5px var(--pink);
  color: var(--pink);
}

.form-input--textarea {
  height: 120px;
  padding: 16px 24px;
  border-radius: 24px;
  resize: none;
  line-height: 1.5;
}

/* intl-tel-input overrides */
.intl-tel-input {
  width: 100%;
  display: block;
}

.intl-tel-input input {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 99px;
  padding: 0 24px 0 114px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--dark);
  background: var(--lite-grey);
  outline: none;
}

.intl-tel-input input::placeholder {
  color: #999;
}

.intl-tel-input input:focus {
  box-shadow: 0 0 0 1.5px var(--pink);
  color: var(--pink);
}

.intl-tel-input .flag-container {
  padding: 0;
  border-radius: 99px 0 0 99px;
  overflow: hidden;
}

.intl-tel-input .selected-flag,
.iti__selected-flag {
  border-top-left-radius: 99px;
  border-bottom-left-radius: 99px;
  padding: 0 8px 0 24px;
  background: transparent !important;
  height: 100%;
}

.intl-tel-input .country-list,
.iti__country-list {
  scrollbar-width: none;
}

.intl-tel-input .country-list::-webkit-scrollbar,
.iti__country-list::-webkit-scrollbar {
  display: none;
}

.intl-tel-input .selected-flag:hover,
.intl-tel-input .selected-flag:focus,
.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag,
.iti__selected-flag:hover {
  background: transparent;
}

.intl-tel-input .selected-dial-code {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  padding-left: 8px;
}

.intl-tel-input .iti-arrow {
  border-top-color: var(--dark);
}

.intl-tel-input .iti-arrow.up {
  border-bottom-color: var(--dark);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  display: none;
}

.form-check__box {
  width: 20px;
  height: 20px;
  border: 1.5px solid #c0c0c0;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
  margin-top: 1px;
}

.form-check input:checked + .form-check__box {
  background: var(--pink);
  border-color: var(--pink);
}

.form-check input:checked + .form-check__box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-check__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: -0.28px;
}

.form-check__text--small {
  font-size: 12px;
  font-weight: 400;
  color: var(--grey);
  line-height: 1.5;
  letter-spacing: -0.24px;
}

.form-check--highlight .form-check__box {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 0, 113, 0.2);
}

.theme-orange .form-check--highlight .form-check__box {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 100, 0, 0.2);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.4s ease;
}

.submit-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--btn-radius);
  background: var(--pink);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.36px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.submit-btn:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn--orange {
  background: var(--orange);
}

/* ========== Thanks ========== */
.thanks-body {
  text-align: left;
}

.thanks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 32px;
}

.thanks-icon {
  width: 79px;
  height: 79px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.thanks-icon--orange {
  background: var(--orange);
}

.thanks-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.12px;
  text-transform: uppercase;
}

.thanks-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--grey);
  line-height: 1.5;
  letter-spacing: -0.26px;
  margin-bottom: 32px;
}

.thanks-steps__title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.28px;
  margin-bottom: 12px;
}

.thanks-step {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  margin-bottom: 12px;
}

.thanks-step__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.thanks-step__num--orange {
  background: var(--orange);
}

.thanks-step__text {
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  line-height: 20px;
  letter-spacing: -0.28px;
}

.thanks-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.thanks-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 73px;
  border: 2px solid var(--dark);
  border-radius: var(--btn-radius);
  background: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: -0.32px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.thanks-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.thanks-btn:active {
  transform: scale(0.98);
}

/* ========== Orange Theme (child flow) ========== */
.theme-orange .form-input:focus {
  box-shadow: 0 0 0 1.5px var(--orange);
  color: var(--orange);
}

.theme-orange .intl-tel-input input:focus {
  box-shadow: 0 0 0 1.5px var(--orange);
  color: var(--orange);
}

.theme-orange .form-check input:checked + .form-check__box {
  background: var(--orange);
  border-color: var(--orange);
}

.theme-orange .option-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.theme-orange .option-btn.selected {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.theme-orange .thanks-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ========== Progress Bar ========== */
.progress-bar {
  padding: 20px 24px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg);
  z-index: 20;
}

.progress-bar__back {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.2px solid #52575b;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.progress-bar__back:hover {
  background: var(--lite-grey);
}

.progress-bar__back:active {
  transform: scale(0.95);
}

.progress-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
}

.progress-bar__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar__text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: -0.28px;
  line-height: 11.49px;
  width: 100%;
}

.progress-bar__track {
  display: flex;
  gap: 3px;
}

.progress-bar__segment {
  flex: 1;
  height: 4px;
  border-radius: 36px;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.progress-bar__segment--active {
  background: var(--pink);
}

.progress-bar__segment--active-orange {
  background: var(--orange);
}

/* Welcome card doesn't stretch */
.step--welcome .card {
  flex: none;
}

/* ========== Mobile Adjustments ========== */
@media (max-height: 700px) {
  .welcome-hero__images {
    height: 180px;
  }
  .welcome-hero__title {
    font-size: 30px;
  }
}

@media (max-height: 600px) {
  .welcome-hero__images {
    height: 150px;
  }
  .option-btn {
    height: 56px;
    font-size: 17px;
  }
  .option-btn:has(.option-btn__sub) {
    height: 64px;
  }
}

/* ========== Desktop ========== */
@media (min-width: 1024px) {
  .quiz-container {
    max-width: 1200px;
    border-radius: 48px;
    padding-bottom: 0;
  }

  /* Welcome: two-column layout */
  .step--welcome {
    flex-direction: row;
    align-items: stretch;
  }

  .welcome-hero {
    flex: 1;
    min-width: 0;
    padding: 40px 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .welcome-hero__title {
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -1.92px;
  }

  .welcome-hero__subtitle {
    font-size: 16px;
    line-height: 24px;
    max-width: 360px;
  }

  .welcome-hero__images {
    width: 304.67px;
    height: 217.48px;
    transform: scale(1.3);
    transform-origin: top center;
  }

  .step--welcome .card {
    width: 420px;
    flex-shrink: 0;
    margin: 20px 20px 20px 0;
    border-radius: 36px;
    align-self: center;
  }

  /* All cards: same body padding on desktop */
  .card__body {
    padding: 32px 28px;
  }

  /* Steps: centered card matching welcome width */
  .step:not(.step--welcome) .card {
    width: 420px;
    margin: 0 auto;
    border-radius: 36px;
  }

  .card {
    margin: 0 40px;
  }

  .header {
    padding: 24px 40px;
  }

  .intl-tel-input .country-list,
  .iti__country-list {
    width: 364px !important;
  }

  /* Step header */
  .step-header {
    margin-bottom: 24px;
  }

  .step-number {
    margin-top: 10px;
  }

  .step-title {
    font-size: 28px;
    line-height: 44px;
  }

  /* Options */
  .option-btn {
    height: 72px;
    font-size: 20px;
  }

  .option-btn:has(.option-btn__sub) {
    height: 80px;
  }

  /* Contact form */
  .contact-form {
    gap: 20px;
  }

  .form-input {
    height: 60px;
  }

  .intl-tel-input input {
    height: 60px;
  }

  .submit-btn {
    height: 60px;
    font-size: 20px;
  }

  /* Thanks */
  .step[data-step="thanks"] .card {
    width: 460px;
    margin: 0 auto;
  }

  .thanks-header {
    margin-bottom: 40px;
  }

  .thanks-title {
    font-size: 36px;
  }

  .thanks-icon {
    width: 96px;
    height: 96px;
  }

  .thanks-icon img {
    width: 52px;
    height: 52px;
  }

  .thanks-actions {
    min-width: 360px;
    margin: 0 auto;
    padding: 24px 0;
  }

  .thanks-btn {
    width: 100%;
  }
}

/* ========== Wide Desktop ========== */
@media (min-width: 1400px) {
  .welcome-hero__title {
    font-size: 56px;
    line-height: 64px;
  }

  .step--welcome .card {
    width: 480px;
    margin: 40px 40px 40px 0;
  }

  .step--welcome .card__body {
    padding: 40px 36px;
  }
}
