/* ═══════════════════════════════════════════════════════════════
   Capa «cine» (versión de prueba) sobre estilos.css
   - Oscuro por defecto, más profundo. Titulares en Geist enorme y apretada;
     la serif cursiva queda solo para acentos.
   - Estilos que necesitan las animaciones de js/cine.js. Todo lo que
     depende de JavaScript cuelga de html.cine: sin JS la web se ve completa.
   ═══════════════════════════════════════════════════════════════ */

/* ── tokens: negro cálido profundo ── */
[data-tema='oscuro'] {
  --fondo: #090908;
  --fondo-2: #0d0d0b;
  --superficie: #121210;
  --superficie-2: #191916;
  --borde: #23221e;
  --borde-fuerte: #34322d;
  --texto-2: #9d998e;
  --tinta: #151513;
  --brillo: rgb(47 217 165 / 0.1);
}

/* ── tipografía display ── */
h1,
h2 {
  font-family: var(--letra);
  font-weight: 600;
  font-synthesis: initial;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.seccion h2,
.por-que-texto h2 {
  font-size: clamp(2.6rem, 6.2vw, 5.8rem);
  line-height: 0.92;
}

.dos-columnas h2,
.faq-rejilla h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
}

.cab-pagina h1 {
  font-size: clamp(3rem, 9vw, 8.6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  max-width: 14ch;
}

.banda-texto h2 {
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  line-height: 0.9;
}

.celda-web h3,
.lanzado-texto h3,
.estudio-principal h2,
.tr-cuerpo h3,
.tarjeta-formacion h3,
.servicio h2,
.etapa-texto h2,
.tarjeta-contacto h2 {
  font-family: var(--letra);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.lanzado-texto h3 {
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 0.95;
}

.estudio-principal h2 {
  font-size: clamp(2.6rem, 5.6vw, 5rem);
}

.tarjeta-contacto h2 {
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}

.menu-nav a {
  font-family: var(--letra);
  font-weight: 600;
  font-size: 2.2rem;
  letter-spacing: -0.045em;
}

.menu-nav a[aria-current='page'] {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.carga-linea > span {
  font-family: var(--letra);
  font-weight: 600;
  letter-spacing: -0.055em;
}

/* cifras en display; la unidad, en serif cursiva */
.cifra strong {
  font-family: var(--letra);
  font-weight: 600;
  letter-spacing: -0.07em;
  font-size: clamp(3.4rem, 6.4vw, 6rem);
}

/* ═══════════ HERO: una sola columna, titular a todo lo ancho ═══════════ */

.hero {
  padding: 40px 0 40px;
  overflow: clip;
}

@media (min-width: 1024px) {
  .hero {
    padding: 56px 0 64px;
  }
}

.hero-rejilla {
  grid-template-columns: 1fr !important;
  gap: 0;
}

.hero-texto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 48px;
}

@media (min-width: 900px) {
  .hero-texto {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'ante ante'
      'h1 h1'
      'sub acciones';
    align-items: end;
  }

  .antetitulo { grid-area: ante; }
  .hero h1 { grid-area: h1; }
  .hero-sub { grid-area: sub; }
  .hero-acciones { grid-area: acciones; justify-content: flex-end; }
}

.antetitulo {
  justify-self: start;
}

.hero h1 {
  font-size: clamp(3.3rem, 8.4vw, 9.4rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
  max-width: none;
}

.hero h1 .acento span {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  padding-right: 0.06em;
}

.hero-sub {
  margin-top: 32px;
}

.hero-acciones {
  margin-top: 28px;
}

/* la escena de capturas, centrada y amplia, bajo el titular */
.hero-visual {
  width: 100%;
  max-width: 1060px;
  margin: 64px auto 0;
  transform-origin: 50% 0%;
}

/* brillo que sigue al ratón por el hero (solo con JS y ratón) */
.cine .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px circle at var(--hx, 50%) var(--hy, 30%), var(--brillo), transparent 70%);
  pointer-events: none;
}

/* ═══════════ SCROLL SUAVE (Lenis) ═══════════ */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: clip;
}

/* ═══════════ CON ANIMACIONES ACTIVAS (html.cine) ═══════════
   GSAP toma el relevo de las entradas por CSS de estos elementos; si el
   script no carga, la clase no existe y todo se ve con las de siempre. */

.cine .hero .entra,
.cine .titular-palabras .p > span {
  animation: none;
  opacity: 1;
  transform: none;
}

.cine .flota {
  animation: none;
}

.cine .cinta-pista {
  animation: none;
}

/* los botones magnéticos se mueven con GSAP: sin transición de transform */
.cine .btn {
  transition-property: background-color, box-shadow, color;
}

/* ── servicios en pista horizontal (escritorio) ── */
.bento.en-pista {
  --alto-pista: clamp(340px, calc(100dvh - var(--cabecera) - 96px), 470px);
  display: flex;
  gap: 20px;
  width: max-content;
  grid-template-areas: none;
  will-change: transform;
}

.en-pista > .celda {
  flex: none;
  width: 400px;
  height: var(--alto-pista);
}

.en-pista > .celda-web {
  width: min(860px, 68vw);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
}

.en-pista .celda-web .celda-texto {
  justify-content: center;
}

.en-pista .celda-web .celda-img {
  margin: 0;
  height: var(--alto-pista);
  border-radius: 0;
  box-shadow: none;
}

.en-pista .celda-web .celda-img img {
  height: 100%;
  aspect-ratio: auto;
}

/* barra de avance de la pista */
.pista-avance {
  height: 2px;
  margin-top: 28px;
  background: var(--borde);
  overflow: hidden;
}

.pista-avance span {
  display: block;
  height: 100%;
  background: var(--acento);
  transform: scaleX(var(--avance, 0));
  transform-origin: left;
}

/* ── proceso: línea que se dibuja con el scroll ── */
.cine .pasos {
  position: relative;
}

.cine .pasos::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  z-index: 1;
  height: 2px;
  background: var(--acento);
  transform: scaleX(var(--linea, 0));
  transform-origin: left;
}

/* ── pie: el nombre gigante, en contorno, que sube al llegar ── */
.cine .pie {
  overflow: hidden;
}

.cine .pie::after {
  content: 'Viktor López' / '';
  display: block;
  padding: 0 0 2vw;
  font-size: 17vw;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-align: center;
  white-space: nowrap;
  /* relleno que se funde con el fondo (el contorno enseñaría los trazos
     internos de la fuente variable) */
  color: transparent;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  transform: translateY(var(--pie-y, 0%));
  pointer-events: none;
  user-select: none;
}

/* ── cursor propio (solo ratón): anillo que sigue y crece sobre lo pulsable ── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 1px solid var(--acento);
  pointer-events: none;
  opacity: 0;
  transition:
    width 300ms var(--salida),
    height 300ms var(--salida),
    margin 300ms var(--salida),
    background-color 300ms ease,
    border-color 300ms ease,
    opacity 300ms ease;
}

.cursor.activo {
  opacity: 1;
}

.cursor.sobre {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: var(--acento-suave);
  border-color: transparent;
}

.cursor.pulsa {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
}

/* SplitText: líneas con máscara para que el texto suba desde detrás */
.linea-mascara {
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .cine .pie::after {
    display: none;
  }
}
