:root {
  --navy-950: #06172c;
  --navy-900: #071c35;
  --navy-800: #0b2d54;
  --blue-600: #0099d7;
  --blue-500: #20b2ea;
  --yellow-500: #f5c122;
  --green-500: #a7cf38;
  --pink-500: #db3f9e;

  --surface: #ffffff;
  --surface-soft: #f4f8fc;
  --text: #142033;
  --muted: #6b7587;
  --border: #dce5ef;
  --danger: #bb3344;

  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 70px rgba(7, 28, 53, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(32, 178, 234, 0.16), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(245, 193, 34, 0.12), transparent 30%),
    var(--surface-soft);
}

button,
input {
  font: inherit;
}

button,
label,
input[type="checkbox"],
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(470px, 1.08fr);
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 64px clamp(34px, 6vw, 94px);
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      rgba(6, 23, 44, 0.99),
      rgba(11, 45, 84, 0.96)
    );
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(
    90deg,
    var(--yellow-500),
    var(--green-500),
    var(--blue-500),
    var(--pink-500)
  );
}

.hero__decoration {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.hero__decoration--one {
  top: -110px;
  right: -110px;
  width: 340px;
  height: 340px;
  border: 52px solid rgba(32, 178, 234, 0.12);
}

.hero__decoration--two {
  left: -105px;
  bottom: -105px;
  width: 260px;
  height: 260px;
  background: rgba(245, 193, 34, 0.09);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 650px;
}

.hero__logo {
  display: block;
  width: min(150px, 72vw);
  height: auto;
  margin: 0 0 36px;
  object-fit: contain;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.hero__title {
  max-width: 720px;
  margin: 0;
  font-size: 60px;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero__title span {
  display: block;
  color: var(--yellow-500);
}

.hero__description {
  max-width: 600px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.75;
}

.hero__benefits {
  display: grid;
  gap: 13px;
  margin-top: 34px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 190px;
  min-height: 56px;
  margin-top: 30px;
  padding: 14px 22px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  color: var(--navy-950);
  font-weight: 800;
  background: linear-gradient(135deg, var(--yellow-500), #ffd95b);
  box-shadow: 0 15px 32px rgba(245, 193, 34, 0.23);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hero__cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: 4px;
}

.hero__cta-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.1rem;
  background: var(--navy-900);
}

.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.96rem;
}

.benefit__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: var(--navy-950);
  font-weight: 900;
  background: var(--yellow-500);
}

/* QUIZ */
.quiz-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px clamp(22px, 5vw, 74px);
}

.quiz-card {
  position: relative;
  width: min(100%, 690px);
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.quiz-card__back {
  display: none;
}

.quiz-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.quiz-card__eyebrow {
  margin: 0 0 6px;
  color: var(--blue-600);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-card__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.quiz-card__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.quiz-card__timer {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--navy-800);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  background: #e8f7fd;
}

/* PROGRESS */
.progress {
  margin-bottom: 32px;
}

.progress__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.progress__track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #eaf0f6;
}

.progress__bar {
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--green-500),
    var(--blue-500),
    var(--pink-500)
  );
  transition: width 0.35s ease;
}

/* STEPS */
.step {
  display: none;
  animation: step-in 0.28s ease;
}

.step.is-active {
  display: block;
}

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

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

.step__number {
  margin: 0 0 8px;
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.step__question {
  margin: 0 0 23px;
  font-size: clamp(1.3rem, 2.2vw, 1.78rem);
  line-height: 1.32;
  letter-spacing: 0;
}

/* OPTIONS */
.options {
  display: grid;
  gap: 12px;
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 15px 17px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--surface);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.option.is-selected {
  border-color: var(--blue-600);
  background: #eef9fd;
  box-shadow: 0 0 0 3px rgba(32, 178, 234, 0.11);
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.25rem;
  background: #edf4fa;
}

.option__content {
  display: grid;
  gap: 2px;
}

.option__title {
  font-weight: 800;
}

.option__description {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* FIELDS */
.fields {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 13px 15px;
  border: 2px solid var(--border);
  border-radius: 15px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(32, 178, 234, 0.12);
}

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.privacy input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--blue-600);
}

.privacy a {
  color: var(--navy-800);
  font-weight: 700;
}

/* FEEDBACK */
.form-error {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 13px;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
  background: #fff0f2;
}

.form-error.is-visible {
  display: block;
}

/* ACTIONS */
.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 29px;
}

.button {
  min-height: 55px;
  padding: 13px 22px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.button:focus-visible {
  outline: 3px solid rgba(32, 178, 234, 0.38);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(245, 193, 34, 0.3);
  }

  .option:hover {
    border-color: var(--blue-500);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(7, 28, 53, 0.08);
  }

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

.button--secondary {
  color: var(--navy-800);
  background: #edf3f8;
}

.button--primary {
  flex: 1;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  box-shadow: 0 12px 25px rgba(7, 28, 53, 0.18);
}

.button--whatsapp {
  flex: 1;
  color: #ffffff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 12px 25px rgba(18, 140, 126, 0.18);
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.form-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
  text-align: center;
}

/* TABLET */
@media (max-width: 1024px) {
  .landing {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 46px 24px 68px;
  }

  .hero__content {
    max-width: 800px;
    margin: 0 auto;
  }

  .hero__logo {
    width: 130px;
    margin-bottom: 26px;
  }

  .hero__title {
    font-size: clamp(2.6rem, 8vw, 4.8rem);
  }

  .quiz-section {
    position: relative;
    z-index: 2;
    margin-top: -34px;
    padding: 0 18px 40px;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    min-height: 0;
    background: var(--surface-soft);
  }

  .landing {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .hero {
    position: absolute;
    inset: 0;
    width: 100vw;
    min-height: 0;
    height: 100%;
    padding:
      max(16px, env(safe-area-inset-top))
      18px
      max(16px, env(safe-area-inset-bottom));
    transition:
      opacity 0.28s ease,
      transform 0.34s ease;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 327px);
    min-width: 0;
    max-width: 327px;
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  .hero__logo {
    width: clamp(82px, 14dvh, 108px);
    margin-bottom: clamp(9px, 2dvh, 17px);
  }

  .hero__badge {
    align-self: flex-start;
    margin-bottom: clamp(10px, 2dvh, 16px);
    padding: 7px 11px;
    font-size: clamp(0.68rem, 1.8dvh, 0.75rem);
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(1.42rem, 3.8dvh, 1.72rem);
    line-height: 1.08;
    overflow-wrap: break-word;
  }

  .hero__description {
    margin-top: clamp(11px, 2.1dvh, 17px);
    font-size: clamp(0.82rem, 2dvh, 0.94rem);
    line-height: 1.45;
  }

  .hero__benefits {
    gap: clamp(7px, 1.3dvh, 10px);
    margin-top: clamp(14px, 2.5dvh, 22px);
  }

  .benefit {
    align-items: center;
    gap: 9px;
    font-size: clamp(0.74rem, 1.85dvh, 0.84rem);
    line-height: 1.3;
  }

  .benefit span:last-child {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .benefit__icon {
    width: clamp(22px, 3.7dvh, 25px);
    height: clamp(22px, 3.7dvh, 25px);
    font-size: 0.78rem;
  }

  .hero__cta {
    align-self: stretch;
    min-height: clamp(49px, 7.6dvh, 55px);
    margin-top: clamp(16px, 3dvh, 25px);
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .quiz-section {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    padding:
      max(7px, env(safe-area-inset-top))
      7px
      max(7px, env(safe-area-inset-bottom));
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition:
      opacity 0.25s ease,
      transform 0.34s ease;
  }

  body.quiz-open .hero {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20%);
  }

  body.quiz-open .quiz-section {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .quiz-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 13px 13px 12px;
    border-radius: 20px;
    overflow: hidden;
  }

  .quiz-card__back {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    cursor: pointer;
    color: var(--navy-900);
    font-size: 1.15rem;
    font-weight: 800;
    background: #f3f7fa;
  }

  .quiz-card__header {
    display: flex;
    align-items: center;
    min-height: 39px;
    margin: 0 0 7px;
    padding-left: 43px;
  }

  .quiz-card__eyebrow,
  .quiz-card__subtitle {
    display: none;
  }

  .quiz-card__title {
    font-size: clamp(1.05rem, 3.1dvh, 1.3rem);
    line-height: 1.15;
  }

  .quiz-card__timer {
    margin-left: auto;
    padding: 7px 9px;
    font-size: 0.7rem;
  }

  .progress {
    margin-bottom: clamp(8px, 1.7dvh, 13px);
  }

  .progress__labels {
    margin-bottom: 5px;
    font-size: 0.69rem;
  }

  .progress__track {
    height: 7px;
  }

  #englishTest {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  .step.is-active {
    display: block;
    flex: 0 0 auto;
  }

  .step__number {
    margin-bottom: 4px;
    font-size: 0.67rem;
  }

  .step__question {
    margin-bottom: clamp(7px, 1.6dvh, 12px);
    font-size: clamp(1rem, 3dvh, 1.23rem);
    line-height: 1.2;
  }

  .options {
    gap: clamp(9px, 1.6dvh, 12px);
  }

  .option {
    align-items: center;
    min-height: clamp(76px, 11.5dvh, 96px);
    padding: clamp(11px, 1.8dvh, 14px);
    border-radius: 14px;
  }

  .option__icon {
    width: clamp(35px, 6dvh, 42px);
    height: clamp(35px, 6dvh, 42px);
    border-radius: 11px;
    font-size: clamp(1rem, 3dvh, 1.2rem);
  }

  .option__title {
    font-size: clamp(0.76rem, 2dvh, 0.9rem);
    line-height: 1.25;
  }

  .option__description {
    font-size: clamp(0.66rem, 1.65dvh, 0.75rem);
    line-height: 1.3;
  }

  .fields {
    gap: clamp(10px, 2dvh, 16px);
  }

  .field {
    gap: 5px;
  }

  .field label {
    font-size: 0.78rem;
  }

  .field input {
    min-height: clamp(47px, 7.5dvh, 53px);
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .privacy {
    margin-top: clamp(10px, 2dvh, 16px);
    font-size: clamp(0.66rem, 1.65dvh, 0.76rem);
    line-height: 1.4;
  }

  .form-error {
    margin-top: 7px;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .actions {
    position: static;
    flex: 0 0 auto;
    flex-direction: row;
    margin: auto 0 0;
    padding: clamp(10px, 1.8dvh, 14px) 0 0;
    border: 0;
    background: transparent;
  }

  .button {
    width: auto;
    min-height: clamp(46px, 7dvh, 52px);
    padding: 10px 15px;
    border-radius: 13px;
    font-size: 0.85rem;
  }

  .button--secondary {
    flex: 0 0 31%;
  }

  .form-note {
    display: none;
  }
}

@media (max-width: 600px) and (max-height: 680px) {
  .hero__logo {
    width: 78px;
  }

  .hero__title {
    font-size: clamp(1.36rem, 3.8dvh, 1.62rem);
  }

  .option__description {
    display: none;
  }

  .quiz-card {
    padding-top: 10px;
  }

  .quiz-card__header {
    min-height: 35px;
    margin-bottom: 5px;
  }

  .quiz-card__back {
    top: 9px;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/*
  Respaldo visual nativo:
  permite ver la respuesta marcada aunque JavaScript tarde en cargar.
*/
.option:has(input[type="radio"]:checked) {
  border-color: var(--blue-600);
  background: #eef9fd;
  box-shadow: 0 0 0 3px rgba(32, 178, 234, 0.11);
}

.option:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(32, 178, 234, 0.12);
}
