/* ============================================
   MONOLITOS VERTICALES - INFRAESTRUCTURA DE IA
   ============================================ */

.monoliths-section {
  background-color: #000000;
  padding-top: 128px;
  padding-bottom: 128px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.monoliths-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.monoliths-header {
  margin-bottom: 96px;
}

.monoliths-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border-left: 2px solid #72021a;
  padding-left: 12px;
}

.monoliths-eyebrow-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #6b7280;
}

.monoliths-title {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.monoliths-description {
  color: #9ca3af;
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 42rem;
  font-weight: 300;
}

.monoliths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .monoliths-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.monolith-card {
  position: relative;
  height: 750px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  background-color: #111827;
  transition: border-color 0.5s ease;
}

.monolith-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Línea de carga superior (Hover Indicator) */
.monolith-hover-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #010c42;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: 30;
}

.monolith-card:hover .monolith-hover-line {
  transform: scaleX(1);
}

/* Imagen de fondo */
.monolith-image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.monolith-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%);
  opacity: 0.8;
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1);
}

.monolith-card:hover .monolith-image {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.03);
}

/* Textura de ruido */
.monolith-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.2;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Gradiente oscuro inferior */
.monolith-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  opacity: 0.9;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.monolith-card:hover .monolith-gradient {
  opacity: 0.8;
}

/* Líneas de escaneo (scanlines) */
.monolith-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(255, 255, 255, 0.5) 50%);
  background-size: 100% 4px;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.monolith-card:hover .monolith-scanlines {
  opacity: 0.1;
}

/* Elementos UI superiores */
.monolith-top-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 10;
}

.monolith-number {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.monolith-plus {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.5s ease;
  pointer-events: none;
}

.monolith-card:hover .monolith-plus {
  color: #ffffff;
  transform: rotate(90deg);
}

.monolith-plus svg {
  width: 100%;
  height: 100%;
}

/* Contenido inferior (animado) */
.monolith-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 48px 32px;
  z-index: 20;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding-top: 120px;
}

.monolith-card:hover .monolith-content {
  transform: translateY(0);
}

/* Línea decorativa roja */
.monolith-red-line {
  width: 48px;
  height: 4px;
  background-color: #72021a;
  margin-bottom: 24px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.monolith-card:hover .monolith-red-line {
  transform: scaleX(1);
}

.monolith-card-title {
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.monolith-card-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 300;
  max-width: 20rem;
  opacity: 0.8;
  transition: opacity 0.5s ease;
}

.monolith-card:hover .monolith-card-description {
  opacity: 1;
}

/* Datos técnicos (aparecen al hover) */
.monolith-tech-info {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #6b7280;
  opacity: 0;
  transition: opacity 0.7s ease 0.1s;
}

.monolith-card:hover .monolith-tech-info {
  opacity: 1;
}

@media (max-width: 767px) {
  .monoliths-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  
  .monoliths-header {
    margin-bottom: 48px;
  }
  
  .monolith-card {
    height: 600px;
  }
  
  .monolith-content {
    padding: 32px 24px;
    padding-top: 100px;
  }
  
  .monolith-card-title {
    font-size: 1.75rem;
  }
}

/* ============================================================
   HERO — PITCH (propuesta de valor + CTA WhatsApp) y FAB
   Adiciones para conversión de tráfico pago. No modifican ninguna
   regla existente. Reutilizan tokens de styles.css (--sans/--muted)
   y la clase .btn-start para el CTA oscuro nativo.
   ============================================================ */
.hero__pitch {
  position: absolute;
  z-index: 14;
  left: clamp(16px, 5vw, 64px);
  top: clamp(112px, 34vh, 340px);
  max-width: min(560px, 46vw);
  font-family: var(--sans);
  /* Fade-in autocontenido (no depende de JS: el CTA nunca queda invisible) */
  opacity: 0;
  animation: hero-pitch-in .9s ease .12s both;
  /* Parallax 3D con el mouse (js/home.js setea las vars; en reposo = identidad) */
  transform: perspective(1000px) rotateX(var(--hrx, 0deg)) rotateY(var(--hry, 0deg))
             translate3d(var(--htx, 0px), var(--hty, 0px), 0);
  transition: transform .25s ease-out;
  will-change: transform;
}
@keyframes hero-pitch-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero__headline {
  margin: 0 0 14px;
  color: #fff;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.02;
  font-size: clamp(30px, 4.4vw, 56px);
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .55); /* legibilidad sobre el video, sin scrim global */
}
.hero__subhead {
  margin: 0 0 26px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
  font-size: clamp(14px, 1.25vw, 17px);
  max-width: 46ch;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .5);
}
.hero__cta { gap: 9px; }                         /* .btn-start ya es inline-flex centrado */
.hero__cta-ico { width: 18px; height: 18px; flex: 0 0 auto; }

/* Botón flotante (FAB) — único acento verde WhatsApp, aislado */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;                                   /* bajo la nav (100), sobre el contenido */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wa-fab:hover {
  transform: translateY(-2px) scale(1.04);
  background: #1ebe5a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
}
.wa-fab svg { width: 30px; height: 30px; }

/* Móvil (mismo breakpoint que styles.css:294): en móvil el .meta decorativo
   se apila vertical a la izquierda y chocaría con el pitch. Se oculta SOLO en
   móvil para ceder el espacio superior al CTA de conversión (objetivo del
   tráfico pago). Reversible en una línea; no elimina nada. El pitch se sube
   arriba y libera el borde derecho para el wordmark vertical. El FAB sube
   para librar la barra inferior de la nav (.nav__right pasa a fixed bottom). */
@media (max-width: 760px) {
  .hero .meta { display: none; }
  .hero__pitch {
    left: 16px;
    width: calc(100% - 76px);    /* ancho explícito (right se ignora en absolutos aquí);
                                    ~60px libres a la derecha para el wordmark vertical */
    max-width: 340px;
    top: clamp(96px, 15vh, 150px);
  }
  .hero__headline { font-size: clamp(26px, 7vw, 34px); }
  .hero__subhead { max-width: none; font-size: 14px; }
  .wa-fab { right: 16px; bottom: 88px; width: 52px; height: 52px; }
  .wa-fab svg { width: 28px; height: 28px; }
}

/* Respeta reduce-motion: sin animación de entrada, visible de inmediato */
@media (prefers-reduced-motion: reduce) {
  .hero__pitch { animation: none; opacity: 1; transform: none; transition: none; }
  .wa-fab { transition: none; }
}

/* ============================================================
   Cursor "glow" / mouse trail (index) — lo crea js/home.js.
   Se desactiva sobre los videos de los pasos (.step__frame).
   ============================================================ */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 9998;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(150,185,235,.55), rgba(150,185,235,0) 70%);
  mix-blend-mode: screen;
  opacity: 0; transition: opacity .25s ease;
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

/* ============================================================
   REDISEÑO — legibilidad del HERO
   ============================================================ */
/* Scrim localizado detrás del texto: oscurece SOLO la caja del pitch,
   no el globo. Garantiza contraste en cualquier frame del video. */
.hero__pitch::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -7%; top: -12%; right: -14%; bottom: -16%;
  background: radial-gradient(120% 112% at 22% 42%,
              rgba(4,6,10,.74), rgba(4,6,10,.38) 46%, rgba(4,6,10,0) 72%);
  pointer-events: none;
}
/* Subhead y headline más legibles */
.hero__subhead { color: #dfe3e9; font-weight: 450; font-size: clamp(15px, 1.3vw, 18px); }
.hero__headline { text-shadow: 0 2px 30px rgba(0,0,0,.62), 0 1px 3px rgba(0,0,0,.45); }
/* CTA del hero: hover VERDE WhatsApp (base sigue oscura) */
.hero__cta { transition: background .22s ease, border-color .22s ease, color .22s ease, transform .22s ease; }
.hero__cta:hover { background: #25D366; border-color: #25D366; color: #06140c; transform: translateY(-1px); }

/* ============================================================
   REDISEÑO — PASOS A/B/C (cómo funciona)
   Secciones cohesivas alternadas: texto + contenedor de media premium.
   ============================================================ */
.step {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding: clamp(72px, 10vh, 128px) clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, #0c0f14 0%, #0a0c10 100%);
  color: var(--text);
  overflow: hidden;
}
.step + .step { border-top: 1px solid rgba(255,255,255,.05); }
/* glow de acento (tinte del globo) muy tenue, del lado de la media */
.step::before {
  content: "";
  position: absolute;
  top: 50%; right: -10%;
  width: 54vw; height: 54vw;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(120,155,205,.11), rgba(120,155,205,0) 62%);
  filter: blur(8px);
  pointer-events: none;
}
.step--reverse::before { right: auto; left: -10%; }

.step__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(36px, 4.5vw, 88px);
  align-items: center;
}
.step--reverse .step__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
/* Desktop (≥1201px): contenedor de media un poco más grande */
@media (min-width: 1201px) {
  .step__inner { max-width: 1480px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .step--reverse .step__inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
}
.step--reverse .step__text { order: 2; margin-left: auto; }
.step--reverse .step__media { order: 1; }

/* --- Texto --- */
.step__text { max-width: 520px; }
.step__eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: #8fa0b4; margin-bottom: 22px;
}
.step__idx {
  font-style: normal; font-weight: 500; color: #cfe3ff;
  font-size: 11px; letter-spacing: .1em;
  padding: 3px 8px; border: 1px solid rgba(207,227,255,.28);
  border-radius: 5px; background: rgba(120,155,205,.08);
}
.step__title {
  margin: 0;
  font-family: var(--sans); font-weight: 400; letter-spacing: -.03em;
  line-height: 1.04; font-size: clamp(32px, 4.2vw, 62px); color: #f3f4f6;
}
.step__desc {
  margin: 22px 0 0;
  font-family: var(--sans); font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55; color: var(--muted); max-width: 44ch;
}
.step__chips {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
  margin: 30px 0 0; padding: 0;
}
.step__chips li {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em;
  color: #aeb4bd; padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  background: rgba(255,255,255,.02);
  transition: border-color .25s ease, color .25s ease;
}
.step:hover .step__chips li { border-color: rgba(255,255,255,.2); }

/* --- Contenedor de media premium --- */
.step__media { position: relative; }
/* reveal de entrada (fade + translate + scale); la clase .anim-in la lleva a su estado final */
.step__media[data-anim] {
  transform: translateY(42px) scale(.975);
  transition: opacity 1s ease, transform 1.15s cubic-bezier(.22,1,.36,1);
}
.step__media[data-anim].anim-in { transform: none; }

.step__frame {
  position: relative; margin: 0;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(160deg, #12161c, #0c0f13);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.75),
              0 12px 30px -12px rgba(0,0,0,.6),
              inset 0 1px 0 rgba(255,255,255,.06);
  /* Hover 3D: tilt (rotateX/Y) + escala; las variables las setea js/home.js */
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .3s ease;
  will-change: transform;
}
.step__frame:hover {
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 62px 120px -28px rgba(0,0,0,.85),
              0 20px 46px -14px rgba(0,0,0,.7),
              inset 0 1px 0 rgba(255,255,255,.1);
}
/* glare que sigue el cursor (sutil, sobre el video) */
.step__frame::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.07), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.step__frame:hover::after { opacity: 1; }
.step__chrome {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.015);
}
.step__chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.step__chrome span {
  margin-left: 12px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .2em; text-transform: uppercase; color: #7d8794;
}
.step__slot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }  /* JS lo ajusta al ratio real del video */
.step__media-el {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .7s ease;   /* fade-in cuando empieza a reproducir */
}
.step__media-el.is-playing { opacity: 1; }

/* Botón "pantalla completa" (lo inyecta js/home.js) */
.step__expand {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,13,18,.55); border: 1px solid rgba(255,255,255,.16); color: #fff;
  cursor: pointer; opacity: 0;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
.step__frame:hover .step__expand { opacity: 1; }
.step__expand:hover { background: rgba(22,27,34,.8); transform: scale(1.06); }
.step__expand svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* En táctil (sin hover): el botón siempre visible y el frame invita a tocar */
@media (hover: none) {
  .step__expand { opacity: 1; }
  .step__frame { cursor: pointer; }
}

/* placeholder skeleton con shimmer (se ve intencional aún sin media) */
.step__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    repeating-linear-gradient(115deg, #0f1319 0 12px, #0d1116 12px 24px);
}
.step__ph::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.06) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: step-shimmer 2.6s ease-in-out infinite;
}
.step__ph span {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: #5b6470;
}
@keyframes step-shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* --- Cierre .cta: oscurecido para coherencia (antes fondo blanco) --- */
.cta { background: linear-gradient(180deg, #0b0e13, #0a0c10); color: var(--muted); }
.cta__heading { color: #f3f4f6; }
.cta__text p { color: var(--muted); }
.cta__media img {
  border-radius: 16px; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
}

/* --- Responsive pasos (stack a 1 columna, media debajo del texto) --- */
@media (max-width: 900px) {
  .step { min-height: auto; padding: 64px 20px; }
  .step__inner,
  .step--reverse .step__inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .step__text,
  .step--reverse .step__text { order: 1; max-width: none; margin: 0; }
  .step__media,
  .step--reverse .step__media { order: 2; }
  .step__title { font-size: clamp(26px, 7vw, 40px); }
  .step__title br { display: none; }   /* que envuelva natural, sin desbordar */
  .step::before { width: 130vw; height: 130vw; right: -35%; }
  .step--reverse::before { left: -35%; right: auto; }
}

/* Tablets / laptops medianos (2 columnas pero más compacto → marco más grande) */
@media (min-width: 901px) and (max-width: 1200px) {
  .step { padding: clamp(64px, 8vh, 100px) clamp(20px, 3.2vw, 36px); }
  .step__inner { gap: clamp(28px, 3.4vw, 56px); }
}

/* Teléfonos chicos */
@media (max-width: 600px) {
  .step { padding: 52px 16px; }
  .step__inner { gap: 26px; }
  .step__eyebrow { margin-bottom: 16px; }
  .step__desc { margin-top: 16px; }
  .step__chips { margin-top: 22px; gap: 8px; }
  .step__chips li { font-size: 11px; padding: 7px 12px; }
}

/* Landscape de poca altura (teléfono/tablet apaisado): sin min-height que corte */
@media (orientation: landscape) and (max-height: 640px) {
  .step { min-height: auto; padding-top: 56px; padding-bottom: 56px; }
}

/* --- reduce-motion: sin parallax/shimmer/reveal --- */
@media (prefers-reduced-motion: reduce) {
  .step__media[data-anim] { transition: none; transform: none; }
  .step__frame { transform: none; }
  .step__ph::before { animation: none; }
}
