/* MirAI — Restyle blanco / negro / verde oscuro (experimento local)

   El verde oscuro entra como tercer color de marca, para DETALLES: botones, acentos,
   estados "en vivo", la gema del agente, los íconos de características. Sus tonos
   (la rampa --verde-*) dan las variaciones. Los colores cálidos de "El Problema" se
   quedan a propósito: la historia de la página va de cálido (el problema) a verde
   (la solución), y la escena 3D hace lo mismo con los badges de las burbujas.

   Todo va bajo .theme-verde (el wrapper de las páginas públicas, ver app.jsx) porque
   el dashboard comparte .btn--primary y no tiene que cambiar. Lo que depende de que
   la escena 3D esté corriendo va además bajo body.has-scene3d: sin WebGL la página
   queda con sus fondos y el hub con su centro negro, como antes. */

:root {
  --verde-950: #06170F;
  --verde-900: #0C2C1D;
  --verde-800: #113D28;
  --verde-700: #154D32;
  --verde-600: #1D6541;
  --verde-500: #2A8054;
  --verde-400: #46A06F;
  --verde-300: #78C197;
  --verde-200: #B2DEC3;
  --verde-100: #DCF0E3;
  --verde-50:  #F1F9F4;
  --verde-glow: rgba(42, 128, 84, 0.18);
}

.theme-verde ::selection { background: var(--verde-700); color: #fff; }

/* ====== Escena 3D ====== */
.scene3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.2,.7,.2,1);
}
.scene3d.is-ready { opacity: 1; }
body.has-scene3d #app { position: relative; z-index: 1; }


/* ====== Botones ====== */
.theme-verde .btn--primary {
  background: var(--verde-700);
  border-color: var(--verde-700);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(21, 77, 50, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.theme-verde .btn--primary:hover {
  background: var(--verde-600);
  border-color: var(--verde-600);
  box-shadow: 0 14px 30px -12px rgba(21, 77, 50, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.theme-verde .btn--primary .arrow { background: rgba(255, 255, 255, 0.18); }

.theme-verde .btn--outline {
  background: rgba(255, 255, 255, 0.7);
  color: var(--verde-800);
  border-color: var(--verde-700);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.theme-verde .btn--outline:hover { background: var(--verde-700); color: #fff; }
.theme-verde .btn--outline .arrow { background: rgba(21, 77, 50, 0.12); }
.theme-verde .btn--outline:hover .arrow { background: rgba(255, 255, 255, 0.2); }

.theme-verde .btn--ghost:hover { border-color: var(--verde-700); background: var(--verde-50); }

/* ====== Nav ====== */
.theme-verde .nav__menu {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.theme-verde .nav__menu a:hover { color: var(--verde-800); background: var(--verde-50); }
.theme-verde .nav__menu a.active { color: #fff; background: var(--verde-700); }
.theme-verde .nav__user { border-color: var(--verde-700); color: var(--verde-800); background: rgba(255, 255, 255, 0.7); }
.theme-verde .nav__user:hover { background: var(--verde-700); color: #fff; }
.theme-verde .nav__mobile__list a.nav__mobile__highlight { background: var(--verde-700); }

/* ====== Tipografía y detalles ====== */
.theme-verde .eyebrow {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(21, 77, 50, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.theme-verde .eyebrow .dot {
  background: var(--verde-500);
  box-shadow: 0 0 0 3px var(--verde-glow);
}
.theme-verde .hero__accent { color: var(--verde-700); }
/* En el inicio los dos puntos "en vivo" (la píldora del titular y el que titila en
   "Procesando leads en vivo") quedan en rojo, como estaban: es la señal de actividad,
   no un detalle de marca. El que titila ya es rojo en styles.css. */
.theme-verde .hero__headline-kicker .dot {
  background: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.theme-verde .section-head__tag { color: var(--verde-700); }
.theme-verde .section-head__tag::before,
.theme-verde .section-head__tag::after { background: var(--verde-500); }

/* ====== Fondos: la escena 3D queda a la vista ====== */
body.has-scene3d .theme-verde .section--band,
body.has-scene3d .theme-verde .flow-section { background: transparent; }
body.has-scene3d .theme-verde .section--band { border-color: transparent; }
body.has-scene3d .theme-verde .footer--compact {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

/* Sobre nosotros, Onboarding y Dashboard llevan la mascota en modo ambiente: el fondo
   de la página tiene que dejar ver el canvas (el onboarding conserva su degradé). */
body.has-scene3d .theme-verde .subpage,
body.has-scene3d .theme-verde .about,
body.has-scene3d .theme-verde .dp-page { background: transparent; }
body.has-scene3d .theme-verde .onboarding {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.025) 0%, rgba(255, 255, 255, 0) 32%);
}

/* Tarjetas de vidrio esmerilado: el 3D pasa por detrás, desenfocado, y el texto
   sigue leyéndose sobre blanco. */
.theme-verde .problema-inbox,
.theme-verde .problema-item,
.theme-verde .problema-ch-icon,
.theme-verde .feature-card,
.theme-verde .campana-card,
.theme-verde .flow__tile {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
}
.theme-verde .problema-msg { background: rgba(250, 250, 250, 0.7); }

/* Características y Agente de campañas: la tarjeta muestra el ícono y el título; la
   descripción aparece al pasar el mouse (o con el foco del teclado), y la tarjeta se
   ilumina. Crece hacia abajo flotando sobre lo que tiene debajo —cada celda de la
   grilla tiene alto fijo—, así la grilla no se mueve y todo queda alineado. En
   pantallas táctiles, sin hover, se ve completa. */
@media (hover: hover) and (min-width: 901px) {
  /* La fila de arriba de Características queda siempre un nivel por encima de la de
     abajo: si el nivel subía solo con el hover, al soltar el mouse la tarjeta perdía el
     "encima" antes de terminar de achicarse y la de abajo le quedaba por arriba unos
     px. Las de abajo (y la única fila de Campañas) crecen hacia el espacio vacío. */
  .theme-verde .features-grid > *,
  .theme-verde .campana-grid > * { position: relative; height: 160px; z-index: 1; }
  .theme-verde .features-grid > *:nth-child(-n+3) { z-index: 2; }
  .theme-verde .features-grid .feature-card,
  .theme-verde .campana-grid .campana-card { position: absolute; top: 0; left: 0; right: 0; outline: none; }
  .theme-verde .features-grid .feature-card:hover,
  .theme-verde .features-grid .feature-card:focus-visible,
  .theme-verde .campana-grid .campana-card:hover,
  .theme-verde .campana-grid .campana-card:focus-visible {
    background: rgba(255, 255, 255, 0.97);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 24px 48px -20px rgba(21, 77, 50, 0.35);
    border-color: transparent;
  }
  .theme-verde .features-grid .feature-card:focus-visible,
  .theme-verde .campana-grid .campana-card:focus-visible { box-shadow: 0 0 0 3px var(--verde-300), 0 24px 48px -20px rgba(21, 77, 50, 0.35); }
  .theme-verde .feature-card__desc,
  .theme-verde .campana-card__desc {
    max-height: 0;
    opacity: 0;
    margin-top: -14px; /* anula el gap de la tarjeta mientras está cerrada */
    overflow: hidden;
    transition: max-height 380ms cubic-bezier(.2,.7,.2,1), opacity 260ms ease, margin-top 380ms cubic-bezier(.2,.7,.2,1);
  }
  .theme-verde .feature-card:hover .feature-card__desc,
  .theme-verde .feature-card:focus-visible .feature-card__desc,
  .theme-verde .campana-card:hover .campana-card__desc,
  .theme-verde .campana-card:focus-visible .campana-card__desc {
    max-height: 160px;
    opacity: 1;
    margin-top: 0;
  }
}
@media (hover: hover) and (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .theme-verde .feature-card__desc,
  .theme-verde .campana-card__desc { transition: none; }
}

/* Menú de mobile: el botón de Contáctanos va a WhatsApp y lleva su verde (el verde de
   marca de .btn--primary lo pisaba). */
.theme-verde .nav__mobile__cta .btn { background: #25D366; border-color: #25D366; color: #fff; box-shadow: 0 10px 24px -12px rgba(37, 211, 102, 0.6); }
.theme-verde .nav__mobile__cta .btn:hover { background: #20b858; border-color: #20b858; }
.theme-verde .feature-card:hover,
.theme-verde .campana-card:hover { background: rgba(255, 255, 255, 0.86); }

/* ====== El Cambio: el agente 3D es el centro del hub ====== */
.theme-verde .cambio-pulse-dot { fill: var(--verde-500); }
body.has-scene3d .theme-verde .cambio-center__core { fill: transparent; animation: none; }
body.has-scene3d .theme-verde .cambio-orbit,
body.has-scene3d .theme-verde .cambio-ring { display: none; }
body.has-scene3d .theme-verde .cambio-hub-wrap::before { content: none; }
.theme-verde .cambio-node > circle { fill: rgba(255, 255, 255, 0.92); }
.theme-verde .cambio-center__core { fill: var(--verde-700); }

/* ====== Flujo ====== */
.theme-verde .flow__num { background: var(--verde-700); }
.theme-verde .flow__tile--brand { background: var(--verde-700); border-color: var(--verde-700); }

/* Lugar arriba de las tarjetas para la personita que las recorre (y su salto). Solo
   cuando las seis están en una fila: en pantallas chicas no aparece. */
@media (min-width: 901px) {
  body.has-scene3d .theme-verde .flow { padding-top: 124px; }
}

/* Recorrido de la personita (scene3d.jsx): el paso donde está parada es .is-current y
   los que ya pasó, .is-done. El tramo de línea que llega a cada paso se llena de
   verde, así se lee el avance aunque no la mires a ella. */
.theme-verde .flow__tile {
  transition: transform 420ms cubic-bezier(.34,1.56,.64,1), box-shadow 320ms ease, border-color 320ms ease;
}
.theme-verde .flow__num { transition: background 320ms ease, transform 320ms cubic-bezier(.34,1.56,.64,1); }
.theme-verde .flow__label { transition: color 320ms ease; }
.theme-verde .flow__step.is-done .flow__num,
.theme-verde .flow__step.is-current .flow__num { background: var(--verde-500); }
.theme-verde .flow__step.is-current .flow__num { transform: scale(1.18); }
.theme-verde .flow__step.is-current .flow__tile {
  border-color: var(--verde-500);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 0 5px var(--verde-glow), 0 18px 32px -16px rgba(21, 77, 50, 0.55);
}
.theme-verde .flow__step.is-current .flow__label { color: var(--verde-800); }
@media (min-width: 901px) {
  .theme-verde .flow__step::after {
    content: "";
    position: absolute;
    top: 38px;
    left: -50%;
    width: 100%;
    height: 2px;
    margin-top: -0.5px;
    background: var(--verde-500);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 520ms cubic-bezier(.2,.7,.2,1);
    z-index: 0;
  }
  .theme-verde .flow__step:first-child::after { content: none; }
  .theme-verde .flow__step.is-done::after,
  .theme-verde .flow__step.is-current::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .theme-verde .flow__tile, .theme-verde .flow__num, .theme-verde .flow__step::after { transition: none; }
}
.theme-verde .flow__step::before {
  background: repeating-linear-gradient(90deg, rgba(42, 128, 84, 0.55) 0 5px, transparent 5px 11px);
}
.theme-verde .flow__step:hover .flow__tile { border-color: var(--verde-500); }

/* ====== Caso de éxito ====== */
.theme-verde .case {
  background:
    radial-gradient(80% 110% at 100% 0%, rgba(42, 128, 84, 0.42), rgba(0, 0, 0, 0) 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(21, 77, 50, 0.35), rgba(0, 0, 0, 0) 62%),
    #030806;
  border-color: var(--verde-900);
}
.theme-verde .case .eyebrow {
  background: rgba(120, 193, 151, 0.08);
  border-color: rgba(120, 193, 151, 0.28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.theme-verde .case .eyebrow .dot { background: var(--verde-300); box-shadow: none; }
.theme-verde .case__quote .mark { color: var(--verde-300); }
.theme-verde .case__avatar { background: var(--verde-300); color: var(--verde-950); }
.theme-verde .case__stat { border-color: rgba(120, 193, 151, 0.22); background: rgba(120, 193, 151, 0.06); }
.theme-verde .case__stat .delta { color: var(--verde-300); }

/* El centro del hub ES la mascota 3D (tiene cara): el rótulo "AGENTE / MIRAI" le
   quedaba encima de los ojos. Sin escena, el hub conserva su centro y su texto. */
body.has-scene3d .theme-verde .cambio-center text { display: none; }
