/* ==========================================================================
   Grow English Academy — estilos
   Estructura: tokens · base · layout · componentes · secciones · animaciones
   ========================================================================== */

/* Layout: una columna centrada con bandas de color a todo el ancho. */
:root {
  /* Color */
  --cream: #f4f1ea;
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #2a2926;
  --text-soft: #3f3c37;
  --muted: #4a4741;
  --line: #d8d4cb;
  --pink: #f3c6da;
  --sage: #cbdbb2;
  --butter: #f7e3a1;
  --lilac: #d9cdf2;
  --peach: #f4b59c;
  --wa-green: #25d366;
  --on-dark: #f4f1ea;
  --on-dark-soft: #d8d4cb;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Espaciado y formas */
  --container: 1200px;
  --gutter-left: max(20px, env(safe-area-inset-left, 0px));
  --gutter-right: max(20px, env(safe-area-inset-right, 0px));
  --section-space: clamp(64px, 9vw, 110px);
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--cream);
  z-index: 60;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 40px);
  margin-inline: auto;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
}

.section {
  padding-block: 0 var(--section-space);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}

.section-title {
  font-size: clamp(34px, 5vw, 52px);
}

.section-lead {
  max-width: 420px;
  color: var(--text-soft);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
}

.split > :first-child {
  flex: 1 1 280px;
}

.split > :last-child {
  flex: 2 1 480px;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Componentes
   -------------------------------------------------------------------------- */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--ink-2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  box-shadow: 0 6px 0 var(--ink);
}

.btn--light {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.btn--light:hover {
  box-shadow: 0 6px 0 var(--peach);
}

.btn--ghost-light {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}

.btn--small {
  min-height: 46px;
  padding: 0 20px;
}

.btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.link-arrow span {
  transition: transform 0.25s var(--ease-out);
}

.link-arrow:hover span {
  transform: translateX(5px);
}

/* Lista con checks */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 2px solid var(--ink);
  font-size: 18px;
}

.checklist svg {
  width: 22px;
  height: 22px;
  flex: none;
}

/* Tarjetas */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 26px;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out);
}

.card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
}

.card h3 {
  padding-right: 56px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 800;
  line-height: 1.05;
}

.card .link-arrow {
  margin-top: auto;
}

.card__deco {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 36px;
  transition: transform 0.5s var(--ease-out);
}

.card:hover .card__deco {
  transform: rotate(14deg) scale(1.12);
}

.tile {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--paper);
}

.tile h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.tile p {
  color: var(--text-soft);
}

.tile--outline {
  background: transparent;
  border: 2px solid var(--ink);
}

.bg-pink { background: var(--pink); }
.bg-sage { background: var(--sage); }
.bg-butter { background: var(--butter); }
.bg-lilac { background: var(--lilac); }
.bg-peach { background: var(--peach); }

/* Panel oscuro */
.panel-dark {
  position: relative;
  padding: clamp(32px, 5vw, 60px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
}

.panel-dark .text-soft {
  color: var(--on-dark-soft);
}

/* Pasos numerados */
.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step--boxed {
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
}

.step__num {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
}

.step p {
  color: var(--text-soft);
}

.panel-dark .step p {
  color: var(--on-dark-soft);
}

/* Preguntas frecuentes */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq details {
  padding: 0 24px;
  border-radius: 20px;
  background: var(--paper);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  transition: transform 0.3s var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 22px;
  color: var(--text-soft);
  animation: fade-down 0.35s var(--ease-out);
}

/* Formularios */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius-md);
  background: var(--cream);
}

.form__title {
  font-size: 20px;
  font-weight: 700;
}

.form__row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: var(--ink);
  outline: none;
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: #b3261e;
}

.form__note {
  color: var(--muted);
  font-size: 13px;
}

.form__status {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--sage);
  font-size: 15px;
  animation: fade-down 0.35s var(--ease-out);
}

.form__status a {
  font-weight: 700;
}

/* Formas decorativas */
.shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

/* El contenido siempre queda por encima de las formas que se mueven. */
.hero > :not(.shape),
.course-hero > :not(.shape),
.contact-band__inner,
.panel-dark > :not(.shape),
.quiz > :not(.shape),
.ig-post > :not(.shape) {
  position: relative;
  z-index: 1;
}

.shape--star {
  clip-path: polygon(
    50% 0%, 61% 30%, 93% 21%, 72% 50%, 93% 79%,
    61% 70%, 50% 100%, 39% 70%, 7% 79%, 28% 50%,
    7% 21%, 39% 30%
  );
}

.shape--circle {
  border-radius: 50%;
}

.shape--zigzag {
  clip-path: polygon(
    0 100%, 0 35%, 10% 0, 20% 35%, 30% 0, 40% 35%, 50% 0,
    60% 35%, 70% 0, 80% 35%, 90% 0, 100% 35%, 100% 100%
  );
}

svg.squiggle {
  height: auto;
  aspect-ratio: 96 / 32;
  overflow: visible;
}

.squiggle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

/* Barra flotante tipo "píldora", translúcida, que acompaña el fondo crema. */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  padding-top: 3px;
  pointer-events: none;
}

/* La barra ocupa todo el ancho, con 3px de aire a cada lado. */
.site-header > .container {
  max-width: none;
  padding-left: max(3px, env(safe-area-inset-left, 0px));
  padding-right: max(3px, env(safe-area-inset-right, 0px));
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-block: 8px;
  padding-left: max(14px, calc((100% - 1200px) / 2));
  padding-right: max(14px, calc((100% - 1200px) / 2));
  border: 1px solid rgba(20, 20, 20, 0.06);
  border-radius: 16px;
  background: rgba(244, 241, 234, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  pointer-events: auto;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.site-header.is-scrolled .site-header__inner,
.site-header:has(.nav.is-open) .site-header__inner {
  border-color: rgba(20, 20, 20, 0.08);
  background: rgba(250, 248, 243, 0.88);
  box-shadow: 0 10px 28px -14px rgba(40, 38, 33, 0.28);
}

.logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out);
}

.logo:hover {
  transform: rotate(-12deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-left: 12px;
}

.nav__list {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.nav__list a {
  position: relative;
  text-decoration: none;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav__list a:hover::after,
.nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px !important;
  height: 2px !important;
  margin: 4px auto !important;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg) !important;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg) !important;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px 22px 22px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 16px;
    background: rgba(250, 248, 243, 0.97);
    box-shadow: 0 18px 40px -18px rgba(40, 38, 33, 0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease-out), visibility 0.25s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 19px;
  }

  .nav__list a::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 90px) clamp(72px, 10vw, 120px);
  text-align: center;
}

.hero__title {
  max-width: 820px;
  margin: 18px auto 0;
  font-size: clamp(46px, 9vw, 92px);
  font-weight: 900;
  line-height: 0.98;
}

.hero__title .word {
  display: inline-block;
  animation: rise 0.8s var(--ease-out) both;
}

.hero__title .word:nth-child(2) { animation-delay: 0.1s; }
.hero__title .word:nth-child(3) { animation-delay: 0.2s; }
.hero__title .word:nth-child(4) { animation-delay: 0.3s; }

.hero__lead {
  max-width: 560px;
  margin: 24px auto 0;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 20px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.hero .shape--star.s1 {
  top: -36px;
  left: -44px;
  width: clamp(90px, 13vw, 150px);
  aspect-ratio: 1;
  background: var(--sage);
}

.hero .shape--zigzag.s2 {
  top: 0;
  right: 4%;
  width: clamp(110px, 18vw, 220px);
  height: clamp(34px, 5vw, 64px);
  background: var(--pink);
}

.hero .shape--circle.s3 {
  top: 55%;
  right: -40px;
  width: clamp(70px, 11vw, 140px);
  aspect-ratio: 1;
  background: var(--butter);
}

.hero .shape--circle.s4 {
  top: 66%;
  left: -50px;
  width: clamp(76px, 12vw, 150px);
  aspect-ratio: 1;
  background: var(--peach);
}

.hero .s5 {
  top: 18px;
  left: 24%;
  width: clamp(70px, 9vw, 110px);
}

/* Encabezado de página de curso */
.course-hero {
  position: relative;
  padding: clamp(36px, 6vw, 72px);
  border-radius: 36px;
  overflow: hidden;
}

.course-hero__title {
  position: relative;
  max-width: 860px;
  margin-top: 16px;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 900;
  line-height: 0.98;
}

.course-hero__lead {
  position: relative;
  max-width: 580px;
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 19px);
}

.course-hero .hero__actions {
  position: relative;
  justify-content: flex-start;
  margin-top: 30px;
}

.course-hero .shape--circle {
  right: -50px;
  bottom: -50px;
  width: 180px;
  aspect-ratio: 1;
}

.course-hero .shape--star {
  right: -30px;
  bottom: -30px;
  width: 180px;
  aspect-ratio: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: 8px;
  font-weight: 600;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Secciones de la home
   -------------------------------------------------------------------------- */

.audiences {
  display: grid;
  gap: 14px;
  margin-top: 40px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.audiences__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.audiences__head h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1.05;
}

.audience {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--paper);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.audience:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -16px rgba(40, 38, 33, 0.35);
}

.audience__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.audience__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audience__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.audience__body strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.audience__body span {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.4;
}

.audience__arrow {
  flex: none;
  align-self: center;
  font-size: 20px;
  transition: transform 0.3s var(--ease-out);
}

.audience:hover .audience__arrow {
  transform: translateX(4px);
}

@media (max-width: 1000px) {
  .audiences {
    grid-template-columns: minmax(0, 1fr);
  }

  .audiences__head {
    margin-bottom: 2px;
  }
}

.level-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 56px;
}

.level-teaser__text {
  position: relative;
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.level-teaser__text h2 {
  font-size: clamp(34px, 5vw, 52px);
}

.level-teaser .eyebrow {
  color: var(--butter);
}

.mock-question {
  position: relative;
  flex: 1 1 340px;
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
}

.mock-question__q {
  margin: 8px 0 14px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.mock-question__opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-question__opts span {
  padding: 12px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.mock-question__opts .is-right {
  border-color: var(--ink);
  background: var(--sage);
  font-weight: 600;
  animation: pick 3.2s ease-in-out infinite;
}

.panel-dark .shape--star {
  right: -30px;
  bottom: -40px;
  width: 200px;
  aspect-ratio: 1;
  background: var(--peach);
}

.ig-grid .ig-post {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  padding: 26px;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out);
}

.ig-post:hover {
  transform: translateY(-6px) rotate(0.8deg);
}

.ig-post strong {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.08;
}

.ig-post small {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.ig-post .shape {
  width: 80px;
  aspect-ratio: 1;
}

.contact-band {
  position: relative;
  padding-block: clamp(64px, 9vw, 100px);
  background: var(--sage);
  overflow: hidden;
}

.contact-band__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 56px;
}

.contact-band__text {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.contact-band__text h2 {
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 900;
}

.contact-band .form {
  flex: 1 1 420px;
  min-width: 0;
}

.contact-band .shape--star {
  top: -24px;
  right: -24px;
  width: 160px;
  aspect-ratio: 1;
  background: var(--pink);
}

.contact-band .squiggle-wrap {
  top: 12px;
  left: 4%;
  width: 130px;
}

.levels {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  margin-block: 28px;
}

.levels div {
  padding: 18px;
  border-radius: 18px;
  color: var(--ink);
}

.levels strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
}

.exam-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.badge {
  align-self: flex-start;
  margin-bottom: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--line);
  font-size: 13px;
  font-weight: 700;
}

.tile--dashed {
  background: transparent;
  border: 2px dashed var(--muted);
}

.on-dark-check svg {
  stroke: var(--sage);
}

.on-dark-check li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.on-dark-check svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Test de nivel
   -------------------------------------------------------------------------- */

.quiz {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
  padding-block: clamp(24px, 5vw, 48px) var(--section-space);
}

.quiz h1 {
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 900;
}

.quiz__intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quiz__choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 22px 24px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.quiz__choice:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--ink);
}

.quiz__choice strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}

.quiz__meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.quiz__bar {
  height: 10px;
  margin-top: 12px;
  border-radius: 99px;
  background: #e3dfd6;
  overflow: hidden;
}

.quiz__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 0.5s var(--ease-out);
}

.quiz__question {
  margin-top: 26px;
  animation: slide-in 0.4s var(--ease-out);
}

.quiz__prompt {
  color: var(--muted);
  font-size: 15px;
}

.quiz__text {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.2;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.quiz__option {
  min-height: 58px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  font-size: 18px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}

.quiz__option:hover {
  transform: translateX(4px);
  background: #fbfaf6;
}

.quiz__option.is-picked {
  background: var(--sage);
  transform: scale(0.98);
}

.quiz__option--skip {
  min-height: 50px;
  border: 2px dashed var(--muted);
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}

.quiz__result {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slide-in 0.5s var(--ease-out);
}

.quiz__badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.quiz__badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  animation: pop 0.7s var(--ease-out) 0.15s both;
}

.quiz__level-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.quiz__tip {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--sage);
}

.quiz .shape--star {
  top: 8px;
  right: -110px;
  width: 76px;
  aspect-ratio: 1;
  background: var(--sage);
}

/* --------------------------------------------------------------------------
   Footer y globo de WhatsApp
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px));
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: 15px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.wa-float {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-float__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--wa-green);
  box-shadow: 0 8px 22px rgba(20, 20, 20, 0.22);
  animation: pop 0.6s var(--ease-out) 0.8s both;
  transition: transform 0.25s var(--ease-out);
}

.wa-float__btn:hover {
  transform: scale(1.08);
}

.wa-float__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wa-green);
  animation: ring 2.4s ease-out 2s infinite;
  z-index: -1;
}

.wa-float__btn svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
}

.wa-float__bubble {
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.14);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}

.wa-float.show-bubble .wa-float__bubble {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Animaciones
   -------------------------------------------------------------------------- */

.float-slow {
  animation: float 7s ease-in-out infinite;
}

.float-alt {
  animation: float 9s ease-in-out -3s infinite;
}

.spin-slow {
  animation: spin 26s linear infinite;
}

/* Sólo los elementos fuera de la pantalla inicial esperan para aparecer. */
.reveal.is-pending {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-shown {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

@keyframes rise {
  from { transform: translateY(22px); }
  to { transform: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes ring {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes pick {
  0%, 60%, 100% { transform: none; }
  70% { transform: scale(1.03); }
}

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

  .reveal.is-pending {
    opacity: 1;
    transform: none;
  }
}

/* Utilidades */
.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.on-dark-check {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Evita que las formas decorativas generen scroll horizontal. */
main {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Ajustes de legibilidad en celular: las formas quedan en las esquinas.
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .panel-dark .shape--star,
  .course-hero .shape--star,
  .course-hero .shape--circle {
    right: -56px;
    bottom: -56px;
    width: 120px;
  }

  .contact-band .shape--star {
    top: -48px;
    right: -48px;
    width: 110px;
  }

  .ig-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ig-grid .ig-post {
    padding: 16px;
    border-radius: 18px;
  }

  .ig-post .shape {
    width: 56px;
  }
}

/* --------------------------------------------------------------------------
   Animaciones al desplegar
   -------------------------------------------------------------------------- */

/* Preguntas frecuentes: el alto lo anima app.js */
.faq details {
  overflow: hidden;
  transition: background 0.25s, box-shadow 0.25s;
}

.faq details[open] {
  box-shadow: 0 0 0 2px var(--ink);
}

/* Menú móvil: los links entran escalonados */
@media (max-width: 860px) {
  .nav__list li,
  .nav > .btn {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s, transform 0.35s var(--ease-out);
  }

  .nav.is-open .nav__list li,
  .nav.is-open > .btn {
    opacity: 1;
    transform: none;
  }

  .nav.is-open .nav__list li:nth-child(2) { transition-delay: 0.05s; }
  .nav.is-open .nav__list li:nth-child(3) { transition-delay: 0.1s; }
  .nav.is-open > .btn { transition-delay: 0.15s; }
}

/* Test: las opciones aparecen una tras otra */
.quiz__option {
  animation: option-in 0.4s var(--ease-out) both;
}

.quiz__option:nth-child(2) { animation-delay: 0.05s; }
.quiz__option:nth-child(3) { animation-delay: 0.1s; }
.quiz__option:nth-child(4) { animation-delay: 0.15s; }

.quiz__result > * {
  animation: option-in 0.5s var(--ease-out) both;
}

.quiz__result > :nth-child(3) { animation-delay: 0.1s; }
.quiz__result > :nth-child(4) { animation-delay: 0.18s; }
.quiz__result > :nth-child(5) { animation-delay: 0.26s; }
.quiz__result > :nth-child(n + 6) { animation-delay: 0.34s; }

@keyframes option-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Detalles del logo: hojitas y líneas sueltas en verde
   -------------------------------------------------------------------------- */

:root {
  --leaf-dark: #7f9152;
  --leaf-light: #e9efcf;
  --leaf-mid: #b4c58a;
}

.logo {
  position: relative;
  overflow: hidden;
}

.logo span {
  position: relative;
}

.logo__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.logo span {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.leaf-sprig,
.flow-line {
  height: auto;
  aspect-ratio: 1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.leaf-sprig {
  stroke: var(--leaf-mid);
  stroke-width: 1.3;
  opacity: 0.55;
}

.flow-line {
  stroke: var(--leaf-mid);
  stroke-width: 1.6;
  opacity: 0.8;
}

.flow-line--on-green {
  stroke: var(--leaf-light);
  stroke-width: 2.4;
  opacity: 1;
}

.hero .s6 {
  bottom: 18px;
  left: 8%;
  width: clamp(70px, 9vw, 110px);
}

.hero .s7 {
  top: 70px;
  right: 2%;
  width: clamp(120px, 16vw, 200px);
}

.contact-band .f1 {
  top: -30px;
  left: 38%;
  width: clamp(260px, 40vw, 520px);
}

.contact-band .f2 {
  right: 6%;
  bottom: 20px;
  width: 100px;
}

.course-hero .course-sprig {
  top: 26px;
  right: 30px;
  width: clamp(64px, 9vw, 104px);
}

.quiz .quiz-sprig {
  top: auto;
  right: -40px;
  bottom: 40px;
  width: 90px;
}

.sway {
  transform-origin: 10% 90%;
  animation: sway 6s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
}

@media (max-width: 640px) {
  .hero .s6 {
    left: 2%;
    bottom: 4px;
  }

  .hero .s7 {
    opacity: 0.5;
  }

  .contact-band .f2 {
    display: none;
  }

  .course-hero .course-sprig {
    top: 14px;
    right: 14px;
    width: 56px;
  }
}

/* Navegación del test */
.quiz__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.quiz__nav-btn {
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--ease-out);
}

.quiz__nav-btn:hover:not(:disabled) {
  background: var(--paper);
  transform: translateY(-2px);
}

.quiz__nav-btn:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

#quiz-next {
  margin-left: auto;
  background: var(--ink);
  color: var(--cream);
}

/* Marca de color de cada bloque (sin numeración) */
.step__mark {
  display: block;
  width: 44px;
  height: 6px;
  border-radius: 99px;
}

/* Utilidades */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bg-paper { background: var(--paper); }

.section-title--spaced {
  margin-bottom: 32px;
}

.panel-lead {
  margin-top: 10px;
}

.card__deco--wide { width: 70px; }
.card__deco--star { width: 38px; }
.card__deco--slim { width: 24px; }

.ig-post__star {
  top: -12px;
  left: -12px;
  background: var(--sage);
}

.ig-post__dot {
  right: -28px;
  bottom: -28px;
  background: var(--butter);
}

.quiz__lead {
  color: var(--text-soft);
}

.quiz__desc {
  font-size: 18px;
}

.quiz__score {
  color: var(--muted);
}

.shape.bg-pink { background: var(--pink); }
.shape.bg-sage { background: var(--sage); }
.shape.bg-butter { background: var(--butter); }
.shape.bg-lilac { background: var(--lilac); }
.shape.bg-peach { background: var(--peach); }

.not-found__actions {
  justify-content: flex-start;
}

.quiz h1 + .quiz__lead {
  margin-top: 16px;
}
