/* ==========================================================================
   GUERRA TOONS — responsive.css
   Media queries mobile-first (de menor a mayor)
   ========================================================================== */

/* Small phones (320px+) */
@media only screen and (min-width: 20em) {
  #hero .main-title { font-size: 2.75em; }
}

/* Phones (480px+) */
@media only screen and (min-width: 30em) {
  /* Hero */
  #hero .main-title { font-size: 3em; }

  /* Scroll video */
  #scroll-video .keyframe .main-title { font-size: 2.75em; }

  /* Portafolio */
  #portafolio .main-title { font-size: 3.75em; }

}

/* Large phones / small tablets (640px+) */
@media only screen and (min-width: 40em) {
  /* Header */
  .header__inwrap { padding: 1em 2.5em; }
  .header__logo img { width: 8.5em; }

  /* Hero */
  #hero .inwrap { padding-top: 8em; padding-bottom: 2.5em; }
  #hero .main-title { font-size: 3.5em; letter-spacing: -0.02em; }
  #hero .lead { font-size: 1.25em; }
  #hero .subject .actor.base,
  #hero .subject .actor.slice { width: 60%; max-width: 34em; }

  /* Scroll video */
  #scroll-video .keyframes { bottom: 6em; }
  #scroll-video .keyframe .main-title { font-size: 3.25em; }
  #scroll-video .keyframe p { font-size: 1.0625em; }

  /* Portafolio */
  #portafolio .main-title { font-size: 4.5em; }

  /* Historias */
  #historias .intro .main-title { font-size: min(3.5em, 7vh); }
  #historias .intro p { font-size: 1.125em; }

  /* Servicios */
  #servicios .head .main-title { font-size: 4em; }
  #servicios .row .name { font-size: 1.625em; }
  #servicios .detail p:not(.eyebrow) { font-size: 1.0625em; }

  /* Footer */
  #main-footer .left .main-title { font-size: 3em; }
  #main-footer .meta {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Tablets (768px+) */
@media only screen and (min-width: 48em) {
  /* Scroll video */
  #scroll-video .shade { background: linear-gradient(to top, rgba(5, 5, 6, 0.92) 0%, rgba(5, 5, 6, 0.55) 24%, rgba(5, 5, 6, 0) 50%); }
  #scroll-video .keyframe .main-title { font-size: 3.5em; }
  #scroll-video .keyframe p { font-size: 1.0625em; line-height: 1.4; }


  /* Footer */
  #main-footer .scrim { background: linear-gradient(to bottom, rgba(10, 10, 10, 0.5) 0%, rgba(10, 10, 10, 0.65) 100%); }
  #main-footer .cols {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2em;
  }
  #main-footer .left { flex: 1 1 0; }
  #main-footer .right { flex: 0 0 auto; width: 46%; }
  #main-footer .contact-form { max-width: none; }
}

/* Small desktops / large tablets (1024px+) */
@media only screen and (min-width: 64em) {
  /* Header */
  .header__inwrap { padding: 1.5em 3em; }
  .header__logo img { width: 10em; }   /* 160px */

  /* Hero */
  #hero .inwrap { padding-top: 6em; padding-bottom: 6em; }
  #hero .info { gap: 2.4375em; }
  #hero .main-title { font-size: 3.75em; line-height: 1.2; letter-spacing: -0.02em; }
  #hero .main-title .line { white-space: nowrap; }   /* una línea por frase, como en el diseño (también en pantallas muy grandes) */
  #hero .lead { font-size: 1.375em; line-height: 1.32; }
  #hero .features { gap: 1.5em 4em; }
  /* Escritorio: el personaje se superpone a la derecha del texto (nunca encima de él) */
  #hero { flex-direction: row; align-items: center; }
  #hero::before,
  #hero::after { display: none; }
  #hero .inwrap::before { content: none; }   /* la foto de fondo del bloque de texto es solo para móvil/tablet */
  #hero .subject {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 68%;
    height: 100%;
    margin: 0;
    display: block;
  }
  #hero .subject .actor.base,
  #hero .subject .actor.slice {
    position: absolute;
    left: auto;
    margin: 0;
    right: 2.5%;
    bottom: 0;
    width: auto;
    max-width: none;
    height: 85%;
  }
  #hero .subject .robot { left: auto; right: -5%; margin: 0; height: 80%; }

  /* Scroll video */
  #scroll-video .keyframe .main-title { font-size: 4em; }
  #scroll-video .keyframe p { font-size: 1.125em; }

  /* Portafolio */
  #portafolio .main-title { font-size: 5.25em; }

  /* Historias */
  #historias .intro .main-title { font-size: min(4.5em, 7.5vh); }
  #historias .intro p { font-size: 1.375em; }

  /* Servicios: índice a la izquierda + panel de detalle a la derecha (los detalles se apilan en la celda del panel) */
  #servicios { padding: 6.5em 0 4em; }   /* arriba deja libre el header fijo (logo / menú) */
  #servicios .head .main-title { font-size: 4.5em; }
  #servicios .services {
    display: grid;
    grid-template-columns: 28fr 34fr;   /* 560 / 680 */
    grid-template-rows: repeat(10, 4em);
    column-gap: 2.5em;
    border-top: 0;
  }
  #servicios .service { display: contents; }
  #servicios .row {
    grid-column: 1;
    height: 4em;
    min-height: 0;
    padding: 0 1em;
  }
  #servicios .service:first-child .row { border-top: 1px solid rgba(255, 255, 255, 0.14); }
  #servicios .service.is-active .row { border-bottom-color: rgba(255, 255, 255, 0.14); }
  #servicios .row .name { font-size: 1.5em; }
  #servicios .row .arrow { opacity: 0; transform: translateX(-0.4em); }
  #servicios .service.is-active .row .arrow { opacity: 1; transform: none; }
  #servicios .row .progress { display: block; }

  #servicios .panel {
    display: block;
    grid-column: 2;
    grid-row: 1 / -1;
    position: relative;
    overflow: hidden;
    border-radius: 1.5em;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(7, 13, 28, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  #servicios .panel .halo {
    position: absolute;
    left: 44%;
    top: -10.0625em;
    width: 28.75em;
    height: 28.75em;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(93, 124, 255, 0.22), rgba(93, 124, 255, 0));
    pointer-events: none;
  }
  #servicios .panel .top {
    position: absolute;
    top: 2.5625em;
    left: 2.5em;
    right: 2.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  #servicios .panel .count {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.75em;
    line-height: 1;
    letter-spacing: 0.12em;
    color: #7b92ff;
  }
  #servicios .panel .count b { font-weight: inherit; }
  #servicios .panel .marks { display: flex; align-items: center; gap: 0.375em; }
  #servicios .panel .marks i {
    width: 0.875em;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.35s ease, background-color 0.35s ease;
  }
  #servicios .panel .marks i.is-on { width: 2em; background: #7b92ff; }

  #servicios .detail {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;   /* centrado vertical en el panel (la mayoría de servicios tienen poco texto) */
    position: relative;
    z-index: 1;
    display: block;
    transition: none;
  }
  #servicios .detail.is-leaving { visibility: visible; }   /* sigue visible mientras sale con fundido */
  #servicios .detail .inner { overflow: visible; }
  #servicios .detail .content {
    gap: 1em;
    padding: 2.5em;
    border-bottom: 0;
  }
  #servicios .detail .title {
    display: block;
    font-family: "Clash Grotesk", "Clash Display", sans-serif;
    font-weight: 600;
    font-size: 3em;
    line-height: 1.04;
    letter-spacing: -0.02em;
  }
  #servicios .detail p:not(.eyebrow) { font-size: 1em; }

  /* Footer */
  #main-footer { padding: 5.2em 0 2.4em; }
  #main-footer .left .main-title { font-size: 3.5em; }
  #main-footer .right { width: 30.5em; }
}

/* Desktop (1280px+) */
@media only screen and (min-width: 80em) {
  .inwrap {
    width: 100%;
    max-width: 90em;
    margin: 0 auto;
    padding: 0 6em;
  }

  /* Hero */
  #hero .main-title { font-size: 4.25em; line-height: 1.2; letter-spacing: -0.02em; }
  #hero .lead { font-size: 1.5em; line-height: 1.3125; }

  /* Scroll video */
  #scroll-video .keyframes { bottom: max(8%, 6em); }
  #scroll-video .keyframe .main-title { font-size: 4.5em; }
  #scroll-video .keyframe p { font-size: 1.25em; margin-top: 0.9em; }

  /* Portafolio */
  #portafolio .main-title { font-size: 6em; line-height: 0.85; }

  /* Historias */
  #historias .intro .main-title { font-size: min(5.5em, 8vh); line-height: 1.04; }

  /* Servicios */
  #servicios .head .main-title { font-size: 5.5em; }   /* 88px */
  #servicios .row .name { font-size: 1.75em; }         /* 28px */
  #servicios .detail .title { font-size: 4em; }        /* 64px */
  #servicios .detail p:not(.eyebrow) { font-size: 1.125em; }

  /* Footer */
  #main-footer .inwrap { padding: 0 4.5em; }
  #main-footer .left .main-title { font-size: 4.28em; }
}

/* Large desktop (1600px+) */
@media only screen and (min-width: 100em) {
  #hero .main-title { font-size: 4.75em; }
}

/* Pantallas muy grandes: escala global */
@media only screen and (min-width: 122em) {
  html { font-size: 1.1vmax; }
}

/* Accesibilidad: sin animaciones */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #preloader { display: none; }
  #page-content { visibility: visible; }
}
