:root {
  --brand-blue: #087fc1;
  --brand-green: #007e5a;
  --ink: #202124;
  --muted: #8c96a5;
  --line: #cad1da;
  --page: #f0f2f5;
  --card-shadow: 0 3px 8px rgba(18, 27, 36, 0.16);
}

* { box-sizing: border-box; }

html { height: 100%; background: var(--page); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  min-width: 320px;
  height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, .choice-option { touch-action: manipulation; }

.landing-shell {
  display: flex;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  justify-content: center;
  background: #fff;
}

.form-experience {
  position: relative;
  display: flex;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 480px;
  flex-direction: column;
  overflow: hidden;
  background: var(--page);
}

.hero-background {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  left: 0;
  height: 315px;
  background-color: #d7d9dc;
  background-image: linear-gradient(rgba(245, 246, 247, 0.26), rgba(245, 246, 247, 0.26)), url("assets/espana-estudiar-fondo.jpg");
  background-position: center;
  background-size: cover;
}

.page-wash {
  position: absolute;
  z-index: -1;
  top: 288px;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--page);
}

.form-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 24px 0;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #0b202b;
  background: transparent;
  font-size: 39px;
  font-weight: 200;
  line-height: 1;
}

.back-button { font-size: 43px; }
.back-button:disabled { visibility: hidden; }
.close-button { font-size: 36px; }
.icon-button:focus-visible, .primary-button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #155d91; outline-offset: 3px; }

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

.form-steps {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.form-step {
  display: none;
  width: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 34px;
}

.form-step.is-active { display: flex; }
.welcome-step, .success-step, .disqualified-step { flex-direction: column; justify-content: center; padding-top: 48px; }
.question-step { align-items: flex-start; padding-top: 72px; }
.contact-step { align-items: flex-start; padding-top: 72px; }

.card {
  width: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.brand-badge {
  display: flex;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  margin-bottom: -30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e2e4e8;
  border-radius: 50%;
  background: #fff;
  color: #687483;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  z-index: 1;
}

.brand-mark {
  display: block;
  width: 92px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-wordmark {
  display: block;
  color: #65717c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1;
  text-indent: .2em;
}

.welcome-card { padding: 51px 24px 28px; text-align: center; }
.company-name { margin: 0 0 23px; color: #65717c; font-size: 19px; }
.welcome-card h1 { margin: 0 0 23px; font-size: 24px; line-height: 1.45; }
.welcome-card p, .success-card p { margin: 0 0 17px; font-size: 18px; line-height: 1.67; }
.welcome-card .welcome-callout { margin: 27px 0 0; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .single-question-card > label { display: block; margin-bottom: 13px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.question-hint { display: block; margin-top: 10px; color: #65717c; font-size: 14px; font-weight: 400; line-height: 1.45; }
.question-card { padding: 26px 21px 20px; }
.choice-option {
  position: relative;
  display: flex;
  min-height: 77px;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 13px 54px 13px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 22px;
  line-height: 1.18;
}
.choice-option input { position: absolute; opacity: 0; }
.choice-option i { position: absolute; right: 11px; width: 27px; height: 27px; border: 2px solid #111; border-radius: 50%; }
.choice-option input:checked + span + i { border: 8px solid var(--brand-blue); }
.choice-option:focus-within { outline: 3px solid #155d91; outline-offset: 2px; }

.single-question-card { padding: 23px 22px 27px; }
.single-question-card > label { font-size: 17px; font-weight: 400; }
.single-question-card label span { display: block; }
.combined-question-card { padding: 23px 22px 24px; }
.question-group + .question-group { margin-top: 25px; padding-top: 23px; border-top: 1px solid #edf0f3; }
.question-group > label { display: block; margin-bottom: 8px; font-size: 17px; font-weight: 400; line-height: 1.4; }
.question-group label span { display: block; }
textarea, .input-group input {
  width: 100%;
  padding: 8px 2px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 18px;
  line-height: 1.4;
  resize: vertical;
}
textarea::placeholder, .input-group input::placeholder { color: #8a95a6; opacity: 1; }
.is-invalid { border-color: #c42626 !important; }

.contact-card { padding: 27px 21px 32px; }
.contact-card h2 { margin: 0 0 17px; font-size: 22px; font-weight: 400; }
.contact-card h2 span { color: #293c47; font-size: 18px; vertical-align: 2px; }
.contact-card > p { margin: 0 0 18px; font-size: 17px; line-height: 1.42; }
.input-group { margin-top: 27px; }
.input-group label { display: block; margin-bottom: 8px; color: #8c96a5; font-size: 16px; }
.input-group input { font-size: 20px; }

.contact-card .privacy-note { margin: 28px 0 0; color: #8a95a6; font-size: 14px; line-height: 1.4; }
.privacy-note a { color: #0071bc; font-weight: 700; text-decoration: none; }
.privacy-note a:hover { text-decoration: underline; }

.success-card { padding: 49px 22px 17px; }
.success-card .company-name { margin-bottom: 16px; text-align: center; }
.success-card h2 { margin: 0 0 15px; font-size: 21px; text-align: center; }
.success-card p { font-size: 16px; line-height: 1.35; }
.success-card .success-note { margin: 15px 0 0; padding-top: 17px; border-top: 1px solid #d6dce1; color: #8a95a6; font-size: 14px; }
.success-note span { color: #77838d; }
.google-ads-conversion-slot { display: none; }

.disqualified-card { padding: 49px 22px 26px; }
.disqualified-card .company-name { margin-bottom: 16px; text-align: center; }
.disqualified-card h2 { margin: 0 0 15px; font-size: 21px; text-align: center; }
.disqualified-card p { margin: 0 0 16px; font-size: 16px; line-height: 1.4; }
.disqualified-card .disqualified-note { margin-bottom: 0; padding-top: 17px; border-top: 1px solid #d6dce1; color: #65717c; }
.website-button {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 10px 16px;
  border-radius: 5px;
  color: #fff;
  background: var(--brand-blue);
  font-size: 17px;
  text-align: center;
  text-decoration: none;
}
.website-button:hover { background: #076da7; }
.whatsapp-button { margin: 4px 0 0; background: #1fa855; }
.whatsapp-button:hover { background: #178a45; }

.form-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  flex: 0 0 auto;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(240, 242, 245, 0), var(--page) 25%);
}
.form-status { min-height: 21px; margin: 0 2px 4px; color: #b32020; font-size: 14px; line-height: 1.35; text-align: center; }
.form-status:empty { display: none; }
.progress-track { height: 5px; margin: 0 0 11px; overflow: hidden; border-radius: 999px; background: #e7ebef; }
.progress-track span { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--brand-green); transition: width .25s ease; }
.primary-button { width: 100%; min-height: 53px; border: 0; border-radius: 5px; color: #fff; background: var(--brand-blue); font-size: 18px; }
.primary-button:disabled { cursor: wait; opacity: .65; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; }
.primary-button .whatsapp-icon { display: none; width: 22px; height: 22px; flex: 0 0 auto; }
.primary-button.is-whatsapp { background: #1fa855; }
.primary-button.is-whatsapp:hover { background: #178a45; }
.primary-button.is-whatsapp .whatsapp-icon { display: block; }
.honeypot { position: fixed; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.form-experience.is-finished .form-footer { display: none; }
.form-experience.is-success .form-header { visibility: hidden; }

@media (min-width: 481px) {
  body { background: #e8eef1; }

  .landing-shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 12px;
    background: #e8eef1;
  }

  .landing-shell::before {
    position: absolute;
    z-index: -1;
    inset: -24px;
    content: "";
    background:
      linear-gradient(90deg, rgba(239, 245, 247, .92), rgba(239, 245, 247, .56) 45%, rgba(234, 241, 245, .88)),
      linear-gradient(180deg, rgba(246, 249, 250, .36), rgba(216, 228, 234, .62)),
      url("assets/espana-estudiar-fondo.jpg") center / cover no-repeat;
    filter: blur(11px);
    transform: scale(1.04);
  }

  .form-experience {
    min-height: calc(100vh - 24px);
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: 10px;
    box-shadow: 0 22px 58px rgba(25, 46, 59, .28), 0 3px 10px rgba(25, 46, 59, .12);
  }
}

@media (max-height: 800px) {
  .welcome-step { justify-content: flex-start; }
}

@media (max-height: 700px) {
  .form-header { min-height: 56px; }
  .welcome-step { justify-content: flex-start; padding-top: 14px; }
  .success-step { padding-top: 14px; }
  .question-step { padding-top: 26px; }
  .contact-step { padding-top: 16px; }
  .welcome-card p { line-height: 1.45; }
}
