/* ==========================================================================
   EduKando — Adaptación responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   Portátiles pequeños
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .hero__title {
    font-size: clamp(2.7rem, 4.3vw, 3.7rem);
  }

  .hero__lead {
    max-width: 460px;
  }

  .hero__showcase {
    min-height: clamp(480px, 47vw, 600px);
  }

  .kando {
    width: clamp(165px, 19vw, 230px);
  }

  .world__title {
    font-size: clamp(2.05rem, 3.7vw, 3rem);
  }

  .world__map {
    width: clamp(250px, 31%, 330px);
  }

  .friends__title {
    font-size: clamp(2.05rem, 3.7vw, 3rem);
  }

  .learn__title {
    font-size: clamp(2.05rem, 3.7vw, 3rem);
  }

  .learn__lead {
    max-width: 430px;
  }

  .learn__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
    margin-inline: auto;
  }

  .learn__card,
  .learn__card:nth-child(even) {
    grid-template-columns: 40% 60%;
  }

  .learn__card:nth-child(even) {
    grid-template-columns: 60% 40%;
  }
}

/* --------------------------------------------------------------------------
   Tablet: composición en columna
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .site-header__inner {
    width: min(calc(100% - 40px), 1280px);
  }

  .hero {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: clamp(60px, 9vw, 90px);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: min(calc(100% - 40px), 720px);
  }

  .hero__copy {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
  }

  .hero__title {
    font-size: clamp(2.7rem, 6.7vw, 3.9rem);
    text-wrap: balance;
  }

  .hero__lead {
    max-width: 540px;
    margin-inline: auto;
  }

  .hero__actions,
  .hero__note {
    justify-content: center;
  }

  .hero__showcase {
    width: 100%;
    max-width: 620px;
    min-height: 0;
    margin-top: 16px;
    padding-bottom: clamp(190px, 31vw, 225px);
  }

  .showcase__device {
    width: 90%;
    margin: 26px auto 0;
  }

  .showcase__badge {
    right: 1%;
  }

  .kando {
    left: 1%;
    bottom: 0;
    width: clamp(170px, 29vw, 220px);
  }

  .showcase__ground {
    height: 150px;
    bottom: 0;
  }

  .scene__hills {
    height: clamp(210px, 38vh, 360px);
  }

  .cloud--three {
    display: none;
  }

  .sparkle--one {
    left: 4%;
  }

  /* Descubre el mundo */
  .world__inner {
    width: min(calc(100% - 40px), 720px);
  }

  .world__header {
    max-width: 680px;
  }

  .world__stage {
    margin-top: 32px;
  }

  .world__map {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 470px);
    margin: 22px auto 0;
    rotate: 1.2deg;
    transform-origin: center;
  }

  .world__journey {
    margin-top: 52px;
  }

  .world__journey-title {
    justify-content: center;
  }

  .journey__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    max-width: 560px;
    margin-inline: auto;
  }

  .journey__card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "rail title"
      "rail text";
    column-gap: 16px;
    align-items: start;
    min-height: 0;
    padding: 20px 22px;
    overflow: visible;
  }

  .journey__card::before {
    left: 22px;
  }

  .journey__top {
    grid-area: rail;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .journey__card-title {
    grid-area: title;
    margin-top: 0;
  }

  .journey__text {
    grid-area: text;
    margin-top: 6px;
  }

  .journey__card:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(22px + 24px);
    top: 100%;
    height: 14px;
    border-left: 2px dashed rgba(88, 194, 47, 0.4);
    pointer-events: none;
  }

  /* Conoce a nuestros amigos */
  .friends__header {
    max-width: 680px;
  }

  .friends__feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 22px;
  }

  .friends__kando-visual {
    min-height: 320px;
    padding-top: 40px;
  }

  .friends__kando-copy {
    max-width: 560px;
    margin-inline: auto;
    text-align: center;
  }

  .friends__kando-name {
    font-size: clamp(2.4rem, 6vw, 3rem);
  }

  .friends__chips {
    justify-content: center;
  }

  .friends__roster-title {
    justify-content: center;
  }

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

  .friends__card,
  .friends__card:nth-child(4),
  .friends__card:nth-child(5) {
    grid-column: auto;
  }

  .friends__card:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - (var(--friends-gap) / 2));
  }

  /* Aprender jugando */
  .learn__header {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    text-align: center;
  }

  .learn__heading {
    max-width: 680px;
    margin-inline: auto;
  }

  .learn__lead {
    max-width: 620px;
    margin: 0 auto;
  }

  .learn__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 680px;
    margin-inline: auto;
  }

  /* Navegación móvil */
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    z-index: 25;
    top: calc(100% - 2px);
    right: 0;
    left: auto;
    width: min(100%, 360px);
    display: none;
    padding: 12px;
    background: #fffdf7;
    border: 1px solid rgba(32, 48, 90, 0.07);
    border-radius: 24px;
    box-shadow:
      0 24px 50px -24px rgba(32, 48, 90, 0.45),
      0 0 0 6px rgba(255, 255, 255, 0.3);
  }

  .site-nav.is-open {
    display: block;
    animation: nav-in 0.24s ease both;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 1.02rem;
  }

  .site-nav__link:hover,
  .site-nav__link:focus-visible {
    background: #f2fbe9;
  }

  .site-nav__link::after {
    display: none;
  }

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

  .menu-toggle[aria-expanded="true"] .menu-toggle__box span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
  }

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

/* --------------------------------------------------------------------------
   Móvil
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --gutter: 20px;
  }

  .site-header__inner {
    padding-block: 14px;
  }

  .brand__logo {
    height: 46px;
  }

  .menu-toggle {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .site-nav {
    right: 0;
    left: 0;
    width: auto;
  }

  .hero {
    padding-top: 6px;
  }

  .hero__inner {
    width: calc(100% - 32px);
  }

  .hero__title {
    margin-top: 18px;
    font-size: clamp(2.35rem, 8.8vw, 3.1rem);
    line-height: 1.01;
  }

  .hero__lead {
    max-width: 420px;
    margin-top: 16px;
    font-size: 1rem;
    line-height: 1.6;
  }

  .eyebrow {
    font-size: 0.76rem;
  }

  .hero__actions {
    gap: 12px;
    margin-top: 24px;
  }

  .btn {
    min-height: 54px;
    font-size: 1.2rem;
  }

  .hero__note {
    font-size: 0.8rem;
  }

  .hero__showcase {
    margin-top: 10px;
    padding-bottom: 155px;
  }

  .showcase__device {
    width: 100%;
    margin-top: 30px;
  }

  .device {
    rotate: -1.8deg;
  }

  .showcase__caption {
    margin-top: 11px;
    font-size: 0.7rem;
    padding: 7px 12px;
  }

  .showcase__badge {
    top: 2px;
    right: 0;
    padding: 6px 10px 6px 7px;
  }

  .showcase__badge-text strong {
    font-size: 0.82rem;
  }

  .showcase__badge-text small {
    font-size: 0.56rem;
  }

  .showcase__badge-pin {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .kando {
    left: 0;
    width: clamp(148px, 38vw, 190px);
  }

  .sparkle--one {
    top: 17%;
    left: 0;
    width: 18px;
  }

  .sparkle--two {
    display: none;
  }

  .sparkle--three {
    right: 0;
    bottom: 27%;
    width: 15px;
  }

  .showcase__sun {
    right: -12%;
    width: 78%;
  }

  .scene__sun {
    top: 2%;
    right: -8%;
    width: 190px;
    opacity: 0.72;
  }

  .cloud--one {
    top: 6%;
    left: -8%;
    transform: scale(0.62);
    opacity: 0.4;
  }

  .cloud--two {
    top: 2%;
    right: -4%;
    transform: scale(0.5);
    opacity: 0.45;
  }

  .scene__hills {
    height: 230px;
  }

  /* Descubre el mundo */
  .world__divider {
    height: 64px;
    margin-top: -28px;
  }

  .world__inner {
    width: calc(100% - 32px);
  }

  .world__title {
    font-size: clamp(1.95rem, 7.6vw, 2.45rem);
  }

  .world__lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .world__stage {
    margin-top: 28px;
  }

  .world__badge {
    top: 12px;
    left: 12px;
    gap: 7px;
    padding: 6px 11px;
    font-size: 0.68rem;
  }

  .world__map {
    width: 100%;
    max-width: 430px;
    margin-top: 18px;
    rotate: 0.8deg;
  }

  .world__map-title {
    font-size: 0.82rem;
  }

  .world__map-places {
    font-size: 0.62rem;
  }

  .world__journey {
    margin-top: 44px;
  }

  .world__journey-title {
    font-size: 1.24rem;
  }

  .journey__list {
    gap: 12px;
  }

  .journey__card {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px;
  }

  .journey__card::before {
    left: 18px;
  }

  .journey__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .journey__icon svg {
    width: 24px;
    height: 24px;
  }

  .journey__card-title {
    font-size: 1.1rem;
  }

  .journey__text {
    font-size: 0.94rem;
  }

  .journey__card:not(:last-child)::after {
    left: calc(18px + 22px);
    height: 12px;
  }

  /* Conoce a nuestros amigos */
  .friends__title {
    font-size: clamp(1.95rem, 7.6vw, 2.45rem);
  }

  .friends__lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .friends__feature {
    padding: 18px;
    border-radius: 26px;
  }

  .friends__kando-visual {
    min-height: 280px;
    padding-top: 34px;
  }

  .friends__kando-img {
    width: min(230px, 72%);
  }

  .friends__bubble {
    top: 2%;
    left: 3%;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .friends__kando-name {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }

  .friends__kando-bio {
    font-size: 0.95rem;
  }

  .friends__roster {
    margin-top: 44px;
  }

  .friends__roster-title {
    font-size: 1.24rem;
  }

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

  .friends__card,
  .friends__card:nth-child(4),
  .friends__card:nth-child(5) {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-column: auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    padding: 10px;
    rotate: 0deg;
  }

  .friends__card:nth-child(even) {
    rotate: 0deg;
  }

  .friends__portrait {
    height: 112px;
    aspect-ratio: 1 / 1;
  }

  .friends__info {
    padding: 0 8px 0 0;
  }

  .friends__name {
    font-size: 1.22rem;
  }

  .friends__bio {
    font-size: 0.92rem;
  }

  /* Aprender jugando */
  .learn__title {
    font-size: clamp(1.95rem, 7.6vw, 2.45rem);
  }

  .learn__lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .learn__grid {
    gap: 14px;
  }

  .learn__card,
  .learn__card:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    rotate: 0deg;
  }

  .learn__card:nth-child(even) .learn__visual {
    order: 1;
  }

  .learn__card:nth-child(even) .learn__content {
    order: 2;
  }

  .learn__content {
    padding: 18px;
  }

  .learn__icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .learn__icon svg {
    width: 18px;
    height: 18px;
  }

  .learn__card-title {
    font-size: 1.35rem;
  }

  .learn__text {
    max-width: none;
  }

  /* Footer */
  .site-footer__social {
    gap: 4px;
    padding: 6px;
  }

  .site-footer__list {
    gap: 4px;
  }

  .site-footer__link {
    height: 42px;
    padding: 0 10px;
    gap: 6px;
    font-size: 0.84rem;
  }

  .site-footer__link svg {
    width: 18px;
    height: 18px;
  }

  /* Modales */
  .modal {
    width: calc(100% - 20px);
    max-height: calc(100svh - 20px);
  }

  .modal__panel {
    max-height: calc(100svh - 20px);
    padding: 24px 20px 26px;
    border-radius: 24px;
  }

  .modal__title {
    padding-right: 34px;
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .modal__content--centered .modal__title {
    padding-right: 0;
  }

  .modal__close {
    top: 11px;
    right: 11px;
    width: 40px;
    height: 40px;
  }

  .modal__text {
    font-size: 0.95rem;
  }

  .modal__figure img {
    border-width: 3px;
    border-radius: 14px;
  }
}

/* --------------------------------------------------------------------------
   Móvil compacto
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
  .brand__logo {
    height: 43px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .hero__title {
    font-size: clamp(2.16rem, 9.2vw, 2.55rem);
  }

  .hero__lead {
    font-size: 0.96rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn {
    width: 100%;
    min-height: 54px;
  }

  .hero__note {
    justify-content: center;
    font-size: 0.77rem;
  }

  .showcase__badge-text small {
    display: none;
  }

  .showcase__badge {
    border-radius: 14px 14px 14px 5px;
  }

  .showcase__caption {
    font-size: 0.67rem;
  }

  /* Descubre el mundo */
  .world__title {
    font-size: clamp(1.85rem, 8.4vw, 2.1rem);
  }

  .world__lead {
    font-size: 0.94rem;
  }

  .world__badge {
    padding: 5px 9px;
    font-size: 0.64rem;
  }

  .world__map {
    rotate: 0deg;
  }

  .world__map-places {
    font-size: 0.6rem;
  }

  .journey__card {
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    padding: 16px;
  }

  .journey__card::before {
    left: 16px;
    width: 36px;
  }

  .journey__icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .journey__icon svg {
    width: 22px;
    height: 22px;
  }

  .journey__number {
    font-size: 0.72rem;
  }

  .journey__card-title {
    font-size: 1.04rem;
  }

  .journey__text {
    font-size: 0.92rem;
  }

  .journey__card:not(:last-child)::after {
    left: calc(16px + 20px);
  }

  /* Conoce a nuestros amigos */
  .friends__title {
    font-size: clamp(1.85rem, 8.4vw, 2.1rem);
  }

  .friends__lead {
    font-size: 0.94rem;
  }

  .friends__feature {
    padding: 16px;
  }

  .friends__kando-visual {
    min-height: 240px;
    padding-top: 30px;
  }

  .friends__kando-img {
    width: 200px;
  }

  .friends__bubble {
    top: 0;
    left: 1%;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .friends__kando-name {
    font-size: 2.3rem;
  }

  .friends__chips li {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .friends__card,
  .friends__card:nth-child(4),
  .friends__card:nth-child(5) {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
  }

  .friends__portrait {
    height: 96px;
  }

  .friends__species {
    font-size: 0.62rem;
  }

  .friends__name {
    font-size: 1.14rem;
  }

  .friends__bio {
    font-size: 0.9rem;
  }

  /* Aprender jugando */
  .learn__title {
    font-size: clamp(1.85rem, 8.4vw, 2.1rem);
  }

  .learn__lead {
    font-size: 0.94rem;
  }

  .learn__content {
    padding: 16px;
  }

  .learn__verb {
    padding: 4px 9px;
    font-size: 0.64rem;
  }

  .learn__card-title {
    font-size: 1.25rem;
  }

  .learn__text {
    font-size: 0.92rem;
  }

  .learn__meta {
    gap: 8px;
    margin-bottom: 8px;
  }

  .learn__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .learn__icon svg {
    width: 18px;
    height: 18px;
  }

  .learn__icon--count {
    font-size: 0.68rem;
  }

  .learn__icon--look {
    grid-template-columns: repeat(2, 7px);
    gap: 3px;
  }

  .learn__icon--look span {
    width: 7px;
    height: 7px;
  }

  .learn__icon--name {
    font-size: 0.84rem;
  }

  /* Footer */
  .site-footer__social {
    gap: 3px;
    padding: 5px;
  }

  .site-footer__list {
    gap: 3px;
  }

  .site-footer__link {
    height: 40px;
    padding: 0 8px;
    gap: 5px;
    font-size: 0.78rem;
  }

  .site-footer__link svg {
    width: 17px;
    height: 17px;
  }

  .modal__chips li {
    font-size: 0.72rem;
    padding: 6px 10px;
  }
}

/* --------------------------------------------------------------------------
   Pantallas bajas (portátil apaisado)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) and (max-height: 500px) {
  .hero__showcase {
    padding-bottom: 150px;
  }

  .hero__title {
    font-size: 2.6rem;
  }

  .kando {
    width: 150px;
  }
}

/* --------------------------------------------------------------------------
   Preferencias de movimiento reducido
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
