:root {
  --green: #50b968;
  --mint: #dcffdf;
  --orange: #ff5b3b;
  --yellow: #f5c62a;
  --blue: #7d9df2;
  --navy: #273777;
  --purple-card: #b9aedf;
  --purple-button: #8663ef;
  --green-card: #d8ffdc;
  --green-button: #45b65e;
  --black: #050505;
  --white: #fff;
  --page-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 58px;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: #151515;
  background: #fff;
}

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

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

.container,
.nav-container {
  width: min(var(--page-width), calc(100% - 64px));
  margin-inline: auto;
}

.navbar {
  position: relative;
  z-index: 20;
  min-height: 42px;
  color: #fff;
  background: #050505;
}

.nav-container {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.nav-brand {
  flex: 0 0 auto;
}

.nav-brand img {
  width: 147px;
  height: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: opacity .2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  opacity: .72;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: #fff;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(590px, 54vw, 770px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background-image: url("assets/hero-patio.webp");
  background-size: cover;
  background-position: center 48%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(0 22 7 / 55%) 0%, rgb(2 50 16 / 45%) 55%, rgb(0 23 7 / 62%) 100%),
    rgb(33 136 62 / 22%);
  mix-blend-mode: multiply;
}

.hero__content {
  width: min(980px, calc(100% - 46px));
  margin-top: -10px;
  text-align: center;
  text-shadow: 0 2px 12px rgb(0 0 0 / 55%);
}

.hero__logo {
  width: clamp(330px, 32vw, 500px);
  height: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 3px 8px rgb(0 0 0 / 28%));
}

.hero h1 {
  margin: 0 0 9px;
  font-size: clamp(29px, 3vw, 44px);
  line-height: 1.08;
  font-weight: 800;
}

.hero p {
  max-width: 960px;
  margin: 0 auto;
  font-size: clamp(13px, 1.18vw, 17px);
  line-height: 1.45;
  font-weight: 500;
}

.visit {
  color: var(--orange);
  background: var(--mint);
  padding: 72px 0 70px;
}

.visit__grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(570px, 1.15fr);
  align-items: start;
  gap: 72px;
}

.section-copy {
  padding-top: 16px;
}

.section-copy h2,
.sae h2,
.levels h2 {
  margin: 0;
  color: var(--orange);
  font-size: clamp(22px, 2.15vw, 31px);
  line-height: 1.2;
  font-weight: 800;
}

.section-copy p {
  max-width: 480px;
  margin: 21px 0 0;
  font-size: 14px;
  line-height: 1.42;
}

.visit-form {
  display: grid;
  gap: 12px;
}

.form-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-group legend {
  width: calc(100% - 160px);
  margin: 0 0 8px 160px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.form-row label,
.select-field label {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

.form-row input,
.select-field select {
  width: 100%;
  height: 35px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  outline: none;
  color: #333;
  background: #f4f4f4;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-row input {
  padding: 5px 10px;
}

.select-field select {
  padding: 4px 28px 4px 8px;
  cursor: pointer;
}

.form-row input:focus,
.select-field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(80 185 104 / 16%);
}

.student-options {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.select-field {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.select-field--course {
  grid-template-columns: 180px minmax(115px, 1fr);
}

.student-group--extra {
  padding-top: 4px;
  border-top: 1px solid rgb(255 91 59 / 20%);
}

.form-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  padding-left: 160px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.form-actions button {
  min-width: 105px;
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  border-radius: 6px;
  color: var(--orange);
  background: var(--yellow);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.form-actions button:hover,
.form-actions button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(.96);
}

.form-message {
  max-width: 220px;
  margin: 0;
  color: #357d48;
  font-size: 12px;
  text-align: right;
}

.sae {
  background: var(--mint);
}

.sae__heading {
  padding-bottom: 30px;
}

.sae__band {
  position: relative;
  padding: 24px 0 64px;
  background: linear-gradient(to bottom, var(--blue) 0 56%, #fff 56% 100%);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 38px;
}

.step-card {
  position: relative;
  min-height: 370px;
  padding: 42px 29px 30px;
  border-radius: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--navy);
  background: #fff;
  text-align: center;
  box-shadow: 0 22px 32px rgb(0 0 0 / 12%);
}

.step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 46px;
  right: -20px;
  width: 1px;
  height: calc(100% - 92px);
  background: rgb(39 55 119 / 42%);
}

.step-card img {
  width: 92px;
  height: 92px;
  margin: 0 0 30px;
  border-radius: 50%;
  object-fit: contain;
}

.step-card p {
  margin: 0;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.42;
}

.levels {
  padding: 36px 0 72px;
}

.levels h2 {
  margin-bottom: 56px;
}

.levels__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 430px));
  justify-content: center;
  gap: 32px;
}

.level-card {
  min-height: 520px;
  padding: 32px 35px 28px;
  display: flex;
  flex-direction: column;
}

.level-card--purple {
  background: var(--purple-card);
}

.level-card--green {
  background: var(--green-card);
}

.level-card > img {
  width: 100%;
  height: 176px;
  object-fit: cover;
}

.level-card__body {
  flex: 1;
  padding-top: 23px;
  display: flex;
  flex-direction: column;
}

.level-card h3 {
  margin: 0;
  color: #fff;
  font-size: 23px;
  line-height: 1;
}

.level-card--green h3 {
  color: var(--green-button);
}

.level-card__subtitle {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.15;
}

.level-card__text {
  margin: 30px 0 26px;
  font-size: 14px;
  line-height: 1.25;
}

.level-card__button {
  align-self: flex-end;
  margin-top: auto;
  padding: 8px 18px;
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  line-height: 1;
  font-weight: 800;
}

.level-card--purple .level-card__button {
  background: var(--purple-button);
}

.level-card--green .level-card__button {
  background: var(--green-button);
}

.footer {
  min-height: 245px;
  padding: 35px 0 38px;
  color: #fff;
  background: #030303;
}

.footer__grid {
  display: grid;
  grid-template-columns: 245px 315px minmax(290px, 1fr) 190px;
  align-items: center;
  gap: 42px;
}

.footer__brand img {
  width: 225px;
  height: auto;
}

.footer-block {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  font-style: normal;
}

.footer-block strong {
  font-size: 13px;
}

.footer-block a {
  color: inherit;
  text-decoration: none;
}

.footer-block__spacer {
  margin-top: 20px;
}

.footer__seal {
  justify-self: end;
}

.footer__seal img {
  width: 165px;
  height: auto;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .container,
  .nav-container {
    width: min(var(--page-width), calc(100% - 42px));
  }

  .visit__grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .section-copy {
    padding-top: 0;
  }

  .section-copy p {
    max-width: 650px;
  }

  .visit-form {
    max-width: 760px;
    margin-left: auto;
  }

  .steps {
    gap: 22px;
  }

  .step-card {
    min-height: 350px;
    padding-inline: 22px;
  }

  .step-card:not(:last-child)::after {
    right: -12px;
  }

  .footer__grid {
    grid-template-columns: 230px 1fr 1fr;
  }

  .footer__seal {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 52px;
  }

  .navbar,
  .nav-container {
    min-height: 52px;
  }

  .nav-brand img {
    width: 142px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: rgb(5 5 5 / 97%);
    transition: max-height .25s ease;
  }

  .nav-menu.is-open {
    max-height: 260px;
  }

  .nav-menu a {
    padding: 14px 21px;
    border-top: 1px solid rgb(255 255 255 / 12%);
    font-size: 13px;
  }

  .hero {
    min-height: 680px;
    background-position: 52% center;
  }

  .hero__logo {
    width: min(430px, 72vw);
  }

  .hero p {
    max-width: 720px;
  }

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

  .step-card:not(:last-child)::after {
    display: none;
  }

  .sae__band {
    background: linear-gradient(to bottom, var(--blue) 0 30%, #fff 30% 100%);
  }

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

  .footer__grid {
    grid-template-columns: 230px 1fr;
    align-items: start;
  }

  .footer__seal {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .container,
  .nav-container {
    width: min(100% - 30px, var(--page-width));
  }

  .hero {
    min-height: 620px;
    padding: 45px 0 55px;
    background-position: 57% center;
  }

  .hero__content {
    width: min(100% - 30px, 520px);
    margin-top: 0;
  }

  .hero__logo {
    width: min(315px, 86vw);
    margin-bottom: 28px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.55;
  }

  .visit {
    padding: 48px 0 54px;
  }

  .visit__grid {
    gap: 34px;
  }

  .visit-form {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .form-group legend {
    width: 100%;
    margin-left: 0;
    margin-bottom: 10px;
    font-size: 15px;
  }

  .form-row,
  .select-field,
  .select-field--course {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .form-row label,
  .select-field label {
    text-align: left;
  }

  .student-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-row input,
  .select-field select {
    height: 42px;
  }

  .form-footer {
    grid-template-columns: 1fr;
    align-items: start;
    padding-left: 0;
  }

  .form-actions {
    width: 100%;
    justify-content: space-between;
  }

  .form-message {
    text-align: left;
  }

  .sae__heading {
    padding-bottom: 24px;
  }

  .steps,
  .levels__grid {
    grid-template-columns: 1fr;
  }

  .sae__band {
    padding: 22px 0 38px;
    background: var(--blue);
  }

  .step-card {
    min-height: 0;
    padding: 34px 24px 36px;
    border-radius: 38px;
  }

  .step-card p {
    font-size: 17px;
  }

  .levels {
    padding-top: 45px;
  }

  .levels h2 {
    margin-bottom: 30px;
  }

  .level-card {
    min-height: 520px;
    padding: 28px 28px 25px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__brand img {
    width: 225px;
  }

  .footer__seal {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 390px) {
  .hero {
    min-height: 650px;
  }

  .hero__logo {
    width: min(292px, 88vw);
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero p {
    font-size: 13px;
  }
}


/* Campo trampa anti-spam: debe permanecer fuera de la vista. */
.form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-actions button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.form-message.is-success {
  color: #24723a;
}

.form-message.is-error {
  color: #b33226;
}
