/* ==========================================================================
   GUERRA TOONS — style.css
   Estilos base (mobile-first) + elementos globales
   ========================================================================== */

html {
  font-size: 1em;
  background: #0a0a0a;
}

body {
  margin: 0;
  font-family: "Clash Display", "Montserrat", sans-serif;
  font-weight: 400;
  color: #fff;
  background: #0a0a0a;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body * { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
li { list-style: none; }
p { padding: 0; margin: 0; }
ul { padding: 0; margin: 0; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }

/* Utilidades globales */
.inwrap {
  width: 95%;
  margin: 0 auto;
  padding-left: 1em;
  padding-right: 1em;
  position: relative;
}

.main-title {
  font-family: "Clash Grotesk", "Clash Display", sans-serif;
  font-weight: 700;
  line-height: 1;
}

/* Botón CTA principal (gradiente azul) */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.8em;
  border-radius: 0.9em;
  font-family: "Clash Display", sans-serif;
  font-weight: 600;
  font-size: 1.125em;
  line-height: 1.35;
  color: #fff !important;
  border: 1px solid rgba(150, 168, 235, 0.38);
  /* degradado de Figma: foco de luz algo a la derecha y por debajo del centro, que cae a azul noche en los extremos
     (en Figma es un degradado "diamante"; el radial da el mismo reparto de luz sin las aristas del diamante) */
  background-color: #1a285c;
  background-image: radial-gradient(ellipse 46% 240% at 61% 75%, #4056a6 0%, #263775 50%, #1a285c 75%, #0d1943 100%);
  background-size: 100% 100%;
  background-clip: padding-box;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 0 0 0 rgba(64, 86, 166, 0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-btn:hover {
  transform: translateY(-0.15em);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 0.8em 2em -0.5em rgba(64, 86, 166, 0.7);
}
.cta-btn i { font-size: 1.05em; }

.link-btn {
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  font-size: 1em;
  color: #fff;
  transition: opacity 0.3s ease;
}
/* el subrayado va solo en el texto, no bajo el icono */
.link-btn .label {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.link-btn:hover { opacity: 0.7; }

/* Indicador de scroll: texto + flechita que cae en bucle (scroll video y portafolio) */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  font-size: 0.75em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 0.6em rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.scroll-cue::after {
  content: "";
  width: 0.8em;
  height: 0.8em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 0.4em rgba(0, 0, 0, 0.7));
  animation: scroll-cue 1.6s ease-in-out infinite;
}
@keyframes scroll-cue {
  0% { opacity: 0; transform: translateY(-0.6em) rotate(45deg); }
  35% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(0.5em) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
}

/* Lightbox de video (YouTube) */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5em 1em 2em;
  background: rgba(5, 5, 8, 0.86);
  backdrop-filter: blur(1em);
  -webkit-backdrop-filter: blur(1em);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.video-lightbox.is-open { opacity: 1; visibility: visible; }
.video-lightbox .frame {
  position: relative;
  width: min(100%, 70em, calc((100vh - 8em) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: 1em;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(150, 168, 235, 0.38);
  box-shadow: 0 2em 5em -1em rgba(0, 0, 0, 0.8), 0 0 4em -1em rgba(64, 86, 166, 0.55);
  transform: translateY(1.5em) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.video-lightbox.is-open .frame { transform: none; }
.video-lightbox iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-lightbox .close {
  position: absolute;
  top: 1.25em;
  right: 1.25em;
  width: 2.75em;
  height: 2.75em;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}
.video-lightbox .close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); }
.video-lightbox .close::before,
.video-lightbox .close::after {
  content: "";
  position: absolute;
  width: 1.1em;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.video-lightbox .close::after { transform: rotate(-45deg); }
html.has-lightbox { overflow: hidden; }

/* Video de fondo genérico */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0;   /* aparece con fundido sobre la imagen de fondo cuando empieza a reproducirse */
  transition: opacity 0.8s ease;
}
.bg-video.is-playing { opacity: 1; }

/* ==========================================================================
   Opener / Preloader
   ========================================================================== */
/* Los estilos de #preloader van en línea en el <head> de index.html: así el opener sale ya maquetado
   aunque esta hoja tarde en llegar (conexiones lentas) */

#page-content { visibility: hidden; }
#page-content.is-ready { visibility: visible; }

/* ==========================================================================
   Header principal
   ========================================================================== */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  pointer-events: none;
}
#main-header > * { pointer-events: auto; }

.header__inwrap {
  /* por encima del menú overlay: la animación de entrada deja un transform aquí (nuevo contexto de apilamiento)
     y sin esto el botón quedaba debajo del overlay y no se veía la X */
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 1.5em;
}
/* Logo con anillo (proporción ≈ 1,63:1): el wordmark ocupa casi todo el ancho y el anillo sobresale arriba y abajo */
.header__logo img {
  width: 7.5em;   /* 120px */
  height: auto;
}
.header__right {
  display: flex;
  align-items: center;
  gap: 1.5em;
}
.header__lang {
  display: flex;
  align-items: center;
  gap: 0.75em;
}
.header__lang a {
  display: block;
  width: 1.5em;
  height: 1.5em;
  opacity: 0.55;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.header__lang a.active,
.header__lang a:hover { opacity: 1; transform: scale(1.08); }
.header__lang img { width: 100%; height: 100%; }

.header__toggle {
  width: 1.5em;
  height: 1.5em;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3125em;
  position: relative;
  z-index: 3;
}
.header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.header__toggle.is-open span:nth-child(1) { transform: translateY(0.4375em) rotate(45deg); }
.header__toggle.is-open span:nth-child(2) { opacity: 0; }
.header__toggle.is-open span:nth-child(3) { transform: translateY(-0.4375em) rotate(-45deg); }

/* Menú overlay */
.header__nav {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(1em);
  -webkit-backdrop-filter: blur(1em);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 2;
}
.header__nav.is-open { opacity: 1; visibility: visible; }
.header__nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25em;
}
.header__nav a {
  font-family: "Clash Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2.25em;
  letter-spacing: -0.02em;
  color: #fff;
  opacity: 0;
  transform: translateY(1em);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}
.header__nav.is-open a { opacity: 1; transform: none; }
.header__nav.is-open li:nth-child(2) a { transition-delay: 0.05s; }
.header__nav.is-open li:nth-child(3) a { transition-delay: 0.1s; }
.header__nav.is-open li:nth-child(4) a { transition-delay: 0.15s; }
.header__nav.is-open li:nth-child(5) a { transition-delay: 0.2s; }
.header__nav a:hover { color: #fed435; }

/* ==========================================================================
   Hero
   ========================================================================== */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;   /* móvil/tablet: texto arriba, personaje debajo (nunca detrás del texto) */
}
#hero .bg {
  position: absolute;
  inset: 0 0 0 -9%;
  width: 109%;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  pointer-events: none;
}
#hero .grid-pattern {
  position: absolute;
  left: -5%;
  right: 0;
  bottom: 0;
  height: 75%;
  opacity: 0.8;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 5.625em 3em;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 30%, transparent 100%);
}

/* Sujeto (actor): en flujo, debajo del texto y centrado (en escritorio pasa a la derecha, ver responsive.css) */
#hero .subject {
  position: relative;
  width: 100%;
  margin-top: auto;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
#hero .subject img {
  display: block;
  pointer-events: auto;
  will-change: transform, opacity, clip-path;
}
#hero .subject .actor.base {
  position: relative;
  width: 78%;
  max-width: 30em;
  height: auto;
}
#hero .subject .actor.slice {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: 0;
  width: 78%;
  max-width: 30em;
  height: auto;
}
#hero .subject .robot {
  position: absolute;
  left: -50%;
  right: -50%;
  margin: 0 auto;   /* centrado sobre el actor aunque sea más ancho que él */
  bottom: 0;
  height: 94%;
  width: auto;
  max-width: none;
  opacity: 0;
}
#hero .subject .slice {
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
#hero .subject .slice-a { filter: sepia(1) saturate(9) hue-rotate(-55deg) brightness(1.1); }
#hero .subject .slice-b { filter: sepia(1) saturate(9) hue-rotate(150deg) brightness(1.1); }
#hero .subject .scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.35) 2px, rgba(0, 0, 0, 0.35) 3px);
  mix-blend-mode: multiply;
}
#hero .subject .glow { display: none; }

/* Móvil/tablet: "borde de escenario" bajo el personaje para que no quede flotando
   sobre la parte oscura del scroll video (halo azul + línea de luz) */
#hero::before,
#hero::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  bottom: 0;
  pointer-events: none;
}
#hero::before {
  height: 11em;
  z-index: 1;
  background:
    radial-gradient(ellipse 75% 100% at 62% 100%, rgba(64, 86, 166, 0.68) 0%, rgba(64, 86, 166, 0.22) 45%, rgba(64, 86, 166, 0) 75%);
}
#hero::after {
  height: 1px;
  z-index: 3;
  background: linear-gradient(to right, rgba(64, 86, 166, 0) 0%, rgba(64, 86, 166, 0.9) 22%, #a5efff 62%, rgba(64, 86, 166, 0.9) 85%, rgba(64, 86, 166, 0) 100%);
  box-shadow: 0 0 1em 1px rgba(90, 120, 220, 0.75), 0 0 2.75em 0.25em rgba(64, 86, 166, 0.5);
}

#hero .inwrap {
  width: 100%;
  z-index: 2;
  pointer-events: none;   /* deja pasar el hover al sujeto; el contenido sí es interactivo */
  padding-top: 7em;
  padding-bottom: 2.5em;
}
/* Móvil/tablet (personaje debajo del texto): foto del estudio con velo oscuro solo tras el bloque de texto;
   se funde por abajo para no cortar en seco sobre el personaje. En escritorio se quita (responsive.css) */
#hero .inwrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(5, 7, 13, 0.82) 0%, rgba(5, 7, 13, 0.6) 45%, rgba(5, 7, 13, 0.75) 100%),
    url('./img/hero-bg-mobile.webp?v=2') 68% center / cover no-repeat;   /* 68 %: centra al actor principal (a la derecha de la foto) */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 6em), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 6em), transparent 100%);
}
#hero .info {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 1.75em;
  max-width: 38.6875em;   /* 619px */
}
#hero .main-title {
  font-size: 2.5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
#hero .main-title .line { display: block; }
#hero .main-title .accent { color: #4056a6; }   /* azul de marca, color sólido (el tono final del antiguo degradado) */
#hero .lead {
  font-size: 1.125em;
  line-height: 1.35;
  margin-top: -0.75em;
}
#hero .lead p + p { margin-top: 0.75em; }
#hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
#hero .features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em 2.5em;
  margin-top: 0.5em;
}
#hero .features li {
  display: flex;
  align-items: center;
  gap: 1em;
  font-size: 0.875em;
  line-height: 1.45;
}
#hero .features img { width: 2.25em; height: 2.25em; flex-shrink: 0; }

/* ==========================================================================
   Scroll video (sección pineada)
   ========================================================================== */
#scroll-video {
  position: relative;
  /* sin fondo y por encima del portafolio: al despinearse, la tarjeta sube con el scroll
     sobre el portafolio (ya pineado debajo), cuyo título aparece mientras la tarjeta sale */
  z-index: 2;
  pointer-events: none;
}
#scroll-video .pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
#scroll-video .media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  border-radius: 0;
  will-change: transform, width, height, border-radius;
}
#scroll-video .scrub-video,
#scroll-video .frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#scroll-video .scrub-video {
  object-fit: cover;
  object-position: center;
  opacity: 0;   /* se muestra solo cuando el video carga (.has-video) */
  z-index: 1;
}
#scroll-video .frames { z-index: 2; }
#scroll-video .shade { z-index: 3; }
#scroll-video .glass { z-index: 4; }
/* Sombreado suave por abajo para la legibilidad del texto (se disuelve en la contracción) */
#scroll-video .shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.7) 28%, rgba(5, 5, 6, 0) 58%);
}
#scroll-video .media.has-video .scrub-video { opacity: 1; }
#scroll-video .media.has-video .frames { visibility: hidden; }
#scroll-video .frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#scroll-video .frame.is-active { opacity: 1; }
/* iOS: secuencia de fotogramas en canvas (sustituye a las 4 imágenes en cuanto carga el primero) */
#scroll-video .seq {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
#scroll-video .media.has-seq .seq { opacity: 1; }
#scroll-video .media.has-seq .frame { visibility: hidden; }

/* Tarjeta glass: solo borde y un reflejo suave; el video se sigue viendo dentro hasta que la tarjeta sale */
#scroll-video .glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(234, 191, 255, 0.55);
  background: radial-gradient(circle at 15% 20%, rgba(165, 239, 255, 0.16) 0%, rgba(110, 191, 244, 0.04) 55%, rgba(70, 144, 212, 0) 100%);
  opacity: 0;
  pointer-events: none;
}
#scroll-video .glass .noise {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-size: 57.8em 28.9em;
  opacity: 0.08;
  mix-blend-mode: overlay;
}

#scroll-video .scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2em;
  transform: translateX(-50%);
  z-index: 3;
  transition: opacity 0.5s ease;
}
#scroll-video.is-card .scroll-cue { opacity: 0; }

/* Textos por keyframe: abajo (arriba tapaban las caras de los personajes), por encima del indicador de scroll */
#scroll-video .keyframes {
  position: absolute;
  bottom: 5.5em;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}
#scroll-video .keyframe {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 92%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
}
#scroll-video .keyframe .main-title {
  font-size: 2em;
  color: #fff;
  letter-spacing: -0.02em;
}
#scroll-video .keyframe .word {
  display: inline-block;
  color: rgba(255, 255, 255, 0.5);
}
#scroll-video .keyframe .word.blur { filter: blur(0.13em); }
#scroll-video .keyframe p {
  margin: 0.8em auto 0;
  max-width: 52em;
  font-family: "Clash Grotesk", sans-serif;
  font-size: 0.9375em;
  line-height: 1.35;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Portafolio — galería 3D
   ========================================================================== */
#portafolio {
  position: relative;
  /* se solapa con el final del scroll video: se pinea justo cuando este se suelta */
  margin-top: -100vh;
  margin-top: -100svh;
  background-color: #0a0a0a;
  background-size: 9.84em 9.84em;
  background-blend-mode: soft-light;
}
#portafolio .pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  perspective: 75em;
  perspective-origin: 50% 50%;
}
#portafolio .main-title {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 43.125em;   /* 690px */
  text-align: center;
  font-size: 3em;
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  z-index: 1;
  will-change: transform, opacity, filter;
}
#portafolio .gallery {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  z-index: 2;
}
#portafolio .project {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  aspect-ratio: 3 / 2;
  border-radius: 1em;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 1.5em 3em -0.75em rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
#portafolio .project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#portafolio .hint {
  position: absolute;
  bottom: 2em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  z-index: 3;
  white-space: nowrap;
  transition: opacity 0.5s ease;
}

/* ==========================================================================
   Historias: "Damos vida a tus historias" (sección pineada un instante)
   ========================================================================== */
#historias {
  position: relative;
  /* se solapa con el final del portafolio (ya vacío): su entrada arranca sin pantalla en negro */
  margin-top: -100vh;
  margin-top: -100svh;
  background-color: #0a0a0a;
  background-size: 9.84em 9.84em;
  background-blend-mode: soft-light;
}
#historias .pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 1em;   /* texto centrado (un poco por debajo del header fijo) */
}
#historias .intro {
  position: relative;
  width: 92%;
  max-width: 56.875em;   /* 910px */
  text-align: center;
  z-index: 2;
}
#historias .intro .main-title {
  font-size: min(2.5em, 5.5vh);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
#historias .intro .accent { color: #fed435; }
#historias .intro p {
  margin-top: 1em;
  font-size: 1em;
  line-height: 1.35;
}

/* ==========================================================================
   Servicios — Qué hacemos (sección normal, sin pin)
   Base (móvil/tablet): acordeón. Desde 64em: índice + panel de detalle (ver responsive.css)
   ========================================================================== */
#servicios {
  position: relative;
  background-color: #05070d;
  background-size: cover;
  background-position: center;
  padding: 4em 0;
  overflow: hidden;
}
#servicios .scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(3, 6, 10, 0) 67.6%, rgba(3, 6, 10, 0.85) 100%),
    linear-gradient(to bottom, rgba(3, 6, 10, 0.5) 0%, rgba(3, 6, 10, 0.72) 22%, rgba(4, 8, 15, 0.82) 60%, rgba(3, 6, 10, 0.92) 100%);
}
#servicios .inwrap { z-index: 2; }

/* Título "que se resuelve": letras sueltas (las genera main.js) */
#servicios .wd { display: inline-block; white-space: nowrap; }
#servicios .ch { display: inline-block; }

#servicios .head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5em 2em;
  margin-bottom: 2.5em;
}
#servicios .head .main-title {
  font-size: 3em;
  letter-spacing: -0.02em;
}
/* Variante del CTA en esta sección: degradado lineal azul, Inter, destellos + flecha */
#servicios .head .cta-btn {
  gap: 0.6667em;
  padding: 0.9444em 1.4444em;   /* 56px de alto */
  border: 0;
  border-radius: 0.8889em;
  font-family: "Inter", sans-serif;
  font-size: 1.125em;
  line-height: 1.2;
  background-color: #2a3f99;
  background-image: linear-gradient(to right, #5d7cff, #172968);
  box-shadow: 0 0.6667em 1.5556em -0.4444em rgba(10, 22, 63, 0.5);
}
#servicios .head .cta-btn:hover { box-shadow: 0 0.8em 2em -0.5em rgba(93, 124, 255, 0.6); }
#servicios .head .cta-btn img { width: 0.8889em; height: 0.8889em; flex-shrink: 0; }
#servicios .head .cta-btn .arrow { width: 1em; height: 1em; transition: transform 0.3s ease; }
#servicios .head .cta-btn:hover .arrow { transform: translateX(0.2em); }

/* Índice de servicios */
#servicios .services { border-top: 1px solid rgba(255, 255, 255, 0.14); }
#servicios .row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25em;
  width: 100%;
  min-height: 4em;
  padding: 0.875em 1em;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: none;
  color: #fff;
  text-align: left;
  transition: border-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Fondo de la fila activa (degradado azul que se desvanece a la derecha) */
#servicios .row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(93, 124, 255, 0.16), rgba(93, 124, 255, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#servicios .row:focus { outline: none; }
#servicios .row:focus-visible { outline: 2px solid rgba(123, 146, 255, 0.8); outline-offset: -2px; }
#servicios .row .num {
  position: relative;
  flex: 0 0 2em;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.75em;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(123, 146, 255, 0.7);
  transition: color 0.3s ease;
}
#servicios .row .name {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  font-family: "Clash Grotesk", "Clash Display", sans-serif;
  font-weight: 600;
  font-size: 1.375em;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}
#servicios .row .arrow {
  position: relative;
  flex-shrink: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.5em;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.35s ease;
}
/* Línea de progreso del autoplay (solo escritorio) */
#servicios .row .progress {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(to right, #5d7cff, #172969);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
#servicios .service.is-active .row::before { opacity: 1; }
#servicios .service.is-active .row .num { color: #7b92ff; }
#servicios .service.is-active .row .name { color: #fff; }
#servicios .service.is-active .row .arrow { opacity: 1; transform: rotate(90deg); }   /* acordeón abierto */
#servicios .service.is-active .row { border-bottom-color: transparent; }   /* fila + detalle forman un solo bloque */

/* Detalle: en móvil se despliega bajo su fila (0fr → 1fr) */
#servicios .detail {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s;
}
#servicios .service.is-active .detail {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}
#servicios .detail .inner { min-height: 0; overflow: hidden; }
#servicios .detail .content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75em;
  padding: 0.25em 1em 1.75em 3.75em;   /* alineado con el nombre de la fila */
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
#servicios .detail .eyebrow {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.75em;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b92ff;
}
#servicios .detail .title { display: none; }   /* en el acordeón el nombre ya está en la fila */
#servicios .detail p:not(.eyebrow) {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 1em;
  line-height: 1.5;
  color: rgba(222, 230, 242, 0.95);
}
#servicios .detail p:not(.eyebrow) + p { color: rgba(222, 230, 242, 0.8); }
#servicios .detail .ask {
  display: inline-flex;
  align-items: baseline;
  gap: 0.625em;
  padding-top: 0.75em;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1em;
  line-height: 1;
  color: #fff;
}
#servicios .detail .ask span {
  display: inline-block;
  font-weight: 400;
  font-size: 1.125em;
  color: #7b92ff;
  transition: transform 0.3s ease;
}
#servicios .detail .ask:hover span { transform: translateX(0.25em); }

/* Marco del panel de detalle: solo escritorio */
#servicios .panel { display: none; }

/* ==========================================================================
   Footer / Contacto
   ========================================================================== */
#main-footer {
  position: relative;
  background-color: #111;
  background-size: cover;
  background-position: center;
  padding: 5em 0 2.5em;
  overflow: hidden;
}
#main-footer .scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* velo oscuro sobre la foto del estudio para que el texto y el formulario se lean bien
     (en móvil el texto cae sobre zonas claras de la foto: velo algo mayor; desde tablet se aligera en responsive.css) */
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.6) 0%, rgba(10, 10, 10, 0.72) 100%);
}
#main-footer .inwrap { z-index: 2; }

#main-footer .cols {
  display: flex;
  flex-direction: column;
  gap: 3em;
}
#main-footer .left {
  display: flex;
  flex-direction: column;
  gap: 2em;
}
#main-footer .left .main-title {
  font-family: "Clash Display", sans-serif;
  font-weight: 500;
  font-size: 2.25em;
  line-height: 1;
  letter-spacing: -0.04em;
}

#main-footer .contact {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: 20.75em;
}
#main-footer .contact h3 {
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#main-footer .contact a,
#main-footer .contact address {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
  font-style: normal;
  font-weight: 500;
  font-size: 0.75em;
  line-height: 1.35;
  transition: color 0.3s ease;
}
#main-footer .contact a:hover { color: #fed435; }
#main-footer .contact img { width: 1.1667em; height: 1.1667em; margin-top: 0.1em; flex-shrink: 0; }

/* Formulario */
#main-footer .contact-form {
  width: 100%;
  max-width: 30.5em;   /* 488px */
  padding: 1.25em;
  border-radius: 1em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(0.5625em);
  -webkit-backdrop-filter: blur(0.5625em);
  box-shadow: 0 0.75em 3em rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.625em;
}
#main-footer .contact-form h3 {
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.1em;
}
#main-footer .contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}
#main-footer .contact-form label span {
  font-weight: 500;
  font-size: 0.625em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#main-footer .contact-form input,
#main-footer .contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8125em;
  color: #fff;
  padding: 0 0.9231em;
  height: 3.3846em;   /* 44px */
  border-radius: 0.6154em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}
#main-footer .contact-form textarea {
  height: 6.7692em;   /* 88px */
  padding: 0.9231em;
  resize: vertical;
}
#main-footer .contact-form input::placeholder,
#main-footer .contact-form textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
#main-footer .contact-form input:focus,
#main-footer .contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
}
#main-footer .submit-btn {
  width: 100%;
  height: 3.6667em;   /* 44px a 12px */
  border: 0;
  border-radius: 0.6667em;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.75em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.3s ease, transform 0.3s ease;
}
#main-footer .submit-btn:hover { background: #fed435; transform: translateY(-0.1em); }
#main-footer .submit-btn:disabled { cursor: default; opacity: 0.7; transform: none; }
#main-footer .submit-btn:disabled:hover { background: #fff; }
/* Campo trampa antispam: fuera de la vista (no display:none, que algunos bots detectan) */
#main-footer .contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Mensaje de estado del envío */
#main-footer .form-status {
  font-weight: 500;
  font-size: 0.8125em;
  line-height: 1.4;
}
#main-footer .form-status:empty { display: none; }
#main-footer .form-status.is-ok { color: #7ee2a8; }
#main-footer .form-status.is-error { color: #ff8a8a; }

/* Pie inferior */
#main-footer .bottom {
  margin-top: 3.25em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}
#main-footer .meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  font-weight: 500;
  font-size: 0.625em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
#main-footer .meta .logo { width: 6.5em; height: auto; }
#main-footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.6em;
}
#main-footer .links a { transition: color 0.3s ease; }
#main-footer .links a:hover { color: #fed435; }
#main-footer .bar {
  width: 100%;
  height: 1.5em;
  border-radius: 0.375em;
  background: #fff;
}
#main-footer .credits {
  font-weight: 500;
  font-size: 0.625em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
#main-footer .credits a { transition: color 0.3s ease; }
#main-footer .credits a:hover { color: #fed435; }

/* Elementos con animación de entrada (GSAP) */
[data-reveal] { will-change: transform, opacity; }


