/* GNIA Lab v2 — Home inmersivo + SPA de páginas internas */

:root {
  --lab-bg: #050208;
  --lab-ruby: #d41f4a;
  --lab-gold: #e0b04a;
  --lab-blue: #1a7aab;
  --lab-text: #f5e6c8;
  --lab-text-dim: rgba(245, 230, 200, 0.72);
  --lab-font: "Montserrat", system-ui, sans-serif;
  --lab-heading: "Orbitron", system-ui, sans-serif;
  --lab-brand: "Psionic", "Orbitron", system-ui, sans-serif;
}

@font-face {
  font-family: "Psionic";
  src: url("../../assets/psionic1.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--lab-bg);
  color: var(--lab-text);
  font-family: var(--lab-font);
}

body.is-home {
  overflow: hidden;
  height: 100vh;
  min-height: 100vh;
  background: var(--lab-bg);
  background-image: none;
}

body.is-page {
  overflow: hidden;
  height: 100vh;
  /* El fondo visual lo aporta #particle-bg (gradiente) */
  background: #060a16;
}

body.is-page .lab-page {
  background: transparent;
}

#particle-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Fondo general: gradiente azul-negro → rojo */
  background: linear-gradient(135deg, #060a16 0%, #07060a 45%, #1c0710 100%);
  overflow: hidden;
}

/* Textura neural estática (30%): móvil vertical / escritorio horizontal.
   Términos y Privacidad no usan este shell, así que no la reciben. */
#particle-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  background-image: url("https://firebasestorage.googleapis.com/v0/b/marketchef-573d4.firebasestorage.app/o/LandingGNIA%2FPNGs%20Generales%2FPortadas%20Metadata%20Planes%2FFondo%20vertical%20Web.webp?alt=media&token=9a54e310-8de6-4557-9eab-e4f12ce342d7");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  #particle-bg::after {
    background-image: url("https://firebasestorage.googleapis.com/v0/b/marketchef-573d4.firebasestorage.app/o/LandingGNIA%2FPNGs%20Generales%2FPortadas%20Metadata%20Planes%2FFondo%20Horizontal%20Web.webp?alt=media&token=5ee62312-97ba-4f5a-8823-3cf67399e428");
  }
}

body.is-page #particle-bg {
  opacity: 1;
}

#lab-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  transition: opacity 0.45s ease;
}

/* ---------- Loader ---------- */

.lab-loader {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lab-bg);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.lab-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lab-loader-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(224, 176, 74, 0.2);
  border-top-color: var(--lab-gold);
  animation: lab-spin 0.9s linear infinite;
}

@keyframes lab-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Header superior ---------- */

.lab-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 16px;
  pointer-events: none;
}

.lab-topnav a,
.lab-topnav button {
  pointer-events: auto;
}

.lab-top-acronym {
  display: none;
  margin: 0;
  font-family: var(--lab-heading);
  font-size: clamp(0.52rem, 1.2vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 230, 200, 0.55);
  text-align: center;
  pointer-events: none;
}

body.is-home .lab-topnav {
  min-height: 44px;
  justify-content: flex-end;
}

body.is-home .lab-top-acronym {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  z-index: 1;
}

.lab-acronym-line {
  display: inline;
}

.lab-nav-toggle {
  display: none;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.72);
  color: #ffe08a;
  font-family: var(--lab-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.lab-topnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100vw - 72px);
}

.lab-topnav a {
  font-family: var(--lab-heading);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(245, 230, 200, 0.55);
  padding: 8px 9px;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.lab-topnav a[data-lab-nav="info"] {
  letter-spacing: 0.08em;
}

.lab-topnav a:hover,
.lab-topnav a.is-active {
  color: #ffe08a;
  text-shadow:
    0 0 6px rgba(255, 215, 0, 0.9),
    0 0 14px rgba(224, 176, 74, 0.65);
}

body.is-home .lab-topnav-links,
body.is-home .lab-nav-toggle {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.is-page .lab-topnav-links {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

body.is-page.lab-nav-open {
  overflow: hidden;
}

.lab-nav-backdrop {
  display: none;
}

/* Audio toggle — bocina */

.lab-eq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  width: 28px;
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.lab-eq-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.lab-eq-icon--off {
  display: none;
}

.lab-eq.is-playing {
  color: var(--lab-gold, #ffd700);
}

.lab-eq:not(.is-playing) .lab-eq-icon--on {
  display: none;
}

.lab-eq:not(.is-playing) .lab-eq-icon--off {
  display: block;
}

.lab-eq:hover {
  color: #fff;
}

.lab-eq.is-playing:hover {
  color: #ffe08a;
}

/* Login — superior derecha (home) / páginas */
.lab-login-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 134, 11, 0.55);
  background: linear-gradient(120deg, #b8860b 0%, #ffd700 45%, #fff4b0 55%, #ffd700 100%);
  color: #000;
  font-family: var(--lab-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.22);
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lab-login-btn:hover {
  color: #000;
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.35);
  transform: translateY(-1px);
}

.lab-login-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #000;
}

.lab-login-label {
  color: #000;
}

body.is-home .lab-login-btn {
  display: inline-flex;
  position: fixed;
  right: 16px;
  top: 10px;
  z-index: 50;
}

body.is-home .lab-eq {
  position: fixed;
  left: 16px;
  top: 12px;
  margin-left: 0;
  z-index: 50;
}

/* Desktop: páginas — bocina izq, login solo icono der */
@media (min-width: 901px) {
  body.is-page .lab-eq,
  body.gnia-lab-standalone .lab-eq {
    position: fixed;
    left: 16px;
    top: 12px;
    margin-left: 0;
    z-index: 50;
  }

  body.is-page .lab-login-btn,
  body.gnia-lab-standalone .lab-login-btn {
    display: inline-flex;
    position: fixed;
    right: 16px;
    top: 10px;
    z-index: 50;
    padding: 7px;
    gap: 0;
    min-width: 32px;
    min-height: 32px;
  }

  body.is-page .lab-login-label,
  body.gnia-lab-standalone .lab-login-label {
    display: none;
  }

  body.is-page .lab-login-icon,
  body.gnia-lab-standalone .lab-login-icon {
    width: 16px;
    height: 16px;
  }

  body.is-page .lab-topnav,
  body.gnia-lab-standalone .lab-topnav {
    padding-left: 52px;
    padding-right: 56px;
  }

  body.is-page .lab-topnav-links,
  body.gnia-lab-standalone .lab-topnav-links {
    max-width: calc(100vw - 160px);
  }
}

/* Home icon — solo móvil (pares con .lab-eq) */
.lab-home-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.lab-home-btn:hover,
.lab-home-btn:focus-visible,
.lab-home-btn.is-active {
  color: #ffe08a;
}

.lab-home-icon {
  display: block;
  width: 18px;
  height: 18px;
}

/* ---------- Views ---------- */

.lab-view {
  position: relative;
  z-index: 2;
  display: none;
}

.lab-view.is-active {
  display: block;
}

/* ---------- HOME ---------- */

#view-home {
  /* Mismo viewport que #lab-canvas: evita el desfase 100vh vs barra del navegador */
  position: fixed;
  inset: 0;
  height: auto;
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4vw;
  pointer-events: none;
  z-index: 2;
}

#view-home.is-active {
  display: flex;
}

.lab-hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(960px, 94vw);
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  pointer-events: none;
  /* Centro geométrico del núcleo (sin empujar hacia abajo) */
  transform: none;
}

.lab-brand {
  margin: 0;
  font-family: var(--lab-brand);
  font-weight: 400;
  font-size: clamp(2.4rem, 7.5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.lab-tagline {
  margin: 0;
  max-width: none;
  width: min(94vw, 920px);
  font-family: var(--lab-heading);
  font-weight: 600;
  font-size: clamp(0.68rem, 1.55vw, 1.02rem);
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  text-wrap: nowrap;
  -webkit-text-fill-color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.55),
    0 0 22px rgba(255, 255, 255, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.45);
}

.lab-gold-metal {
  background: linear-gradient(
    115deg,
    #8a6a1a 0%,
    #b8860b 18%,
    #ffd700 38%,
    #fff4b0 50%,
    #ffd700 62%,
    #c9a227 82%,
    #8a6a1a 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lab-gold-sheen 7s ease-in-out infinite;
}

@keyframes lab-gold-sheen {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-gold-metal {
    animation: none;
    background-position: 40% 50%;
  }
}

/* Nav inferior — en Home (todas las vistas). En páginas internas, solo móvil. */

.lab-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: auto;
  max-width: min(980px, 96vw);
  padding: 12px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
  pointer-events: auto;
}

body.is-home .lab-bottom-nav {
  display: flex;
}

body.is-page .lab-bottom-nav,
body.gnia-lab-standalone .lab-bottom-nav {
  display: none;
}

.lab-bottom-nav a {
  font-family: var(--lab-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  padding: 11px 12px;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.lab-bottom-nav a[data-lab-nav="info"] {
  letter-spacing: 0.04em;
}

.lab-bottom-nav a:hover,
.lab-bottom-nav a.is-active {
  color: #ffe08a;
  text-shadow:
    0 0 6px rgba(255, 215, 0, 0.95),
    0 0 14px rgba(224, 176, 74, 0.75),
    0 0 28px rgba(224, 176, 74, 0.45);
}

/* Iniciar DEMO — CTA dorado destacado */
.lab-bottom-nav a[data-gnia-demo],
.lab-bottom-nav a[data-gnia-prueba],
.lab-topnav a[data-gnia-demo],
.lab-topnav a[data-gnia-prueba] {
  color: #000 !important;
  text-shadow: none !important;
  background: linear-gradient(120deg, #b8860b 0%, #ffd700 45%, #fff4b0 55%, #ffd700 100%);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.28);
}

.lab-bottom-nav a[data-gnia-demo]:hover,
.lab-bottom-nav a[data-gnia-demo].is-active,
.lab-bottom-nav a[data-gnia-prueba]:hover,
.lab-bottom-nav a[data-gnia-prueba].is-active,
.lab-topnav a[data-gnia-demo]:hover,
.lab-topnav a[data-gnia-demo].is-active,
.lab-topnav a[data-gnia-prueba]:hover,
.lab-topnav a[data-gnia-prueba].is-active {
  color: #000 !important;
  text-shadow: none !important;
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgba(255, 215, 0, 0.4);
}

/* Modal Planes */
.gnia-planes-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 32px 24px 28px;
  border-radius: 20px;
  background: rgba(8, 12, 28, 0.94);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.gnia-planes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.gnia-planes-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

/* Escritorio: sin scroll — compactar márgenes verticales */
@media (min-width: 901px) {
  .gnia-planes-dialog {
    max-height: min(92vh, 820px);
    overflow: hidden;
    padding: 20px 22px 16px;
  }

  .gnia-planes-dialog .gnia-empezar-title {
    margin: 0 0 6px;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
  }

  .gnia-planes-grid {
    gap: 10px;
    margin-top: 4px;
  }

  /* Restaurantes primero; luego PRO; Acceso Gratis al final */
  .gnia-planes-card[data-gnia-plan="started"] {
    order: 0;
  }

  .gnia-planes-card[data-gnia-plan="advanced"] {
    order: 1;
  }

  .gnia-planes-card[data-gnia-plan="spectral"] {
    order: 2;
  }

  .gnia-planes-card[data-gnia-plan="enterprise"] {
    order: 3;
  }

  .gnia-planes-card[data-gnia-plan="pro"] {
    order: 4;
  }

  .gnia-planes-card[data-gnia-plan="free"] {
    order: 5;
  }

  .gnia-planes-card {
    gap: 4px;
  }

  .gnia-planes-card img,
  .gnia-planes-nucleus,
  .gnia-planes-media-started {
    aspect-ratio: 16 / 9;
  }

  .gnia-planes-card-label {
    padding: 2px 8px 0;
    font-size: 0.68rem;
  }

  .gnia-planes-card-desc {
    padding: 0 10px 8px;
    font-size: 0.68rem;
    line-height: 1.28;
  }
}

.gnia-planes-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.gnia-planes-card img,
.gnia-planes-nucleus {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.gnia-planes-media-started {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(52, 211, 153, 0.35), transparent 55%),
    linear-gradient(135deg, #022c22 0%, #064e3b 35%, #10b981 50%, #064e3b 65%, #022c22 100%);
  overflow: hidden;
}

.gnia-planes-card .gnia-planes-media-started span {
  font-family: Orbitron, Montserrat, sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  letter-spacing: 0.16em;
  color: #ecfdf5;
  text-shadow: 0 2px 18px rgba(16, 185, 129, 0.55);
  padding: 0;
}

.gnia-planes-card[data-gnia-plan="started"] {
  border-color: rgba(16, 185, 129, 0.35);
}

.gnia-planes-card[data-gnia-plan="started"]:hover {
  border-color: rgba(16, 185, 129, 0.55);
}

.gnia-planes-nucleus {
  position: relative;
  min-height: 132px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(190, 18, 60, 0.18), transparent 58%),
    radial-gradient(ellipse at 50% 50%, rgba(10, 8, 20, 0.95), #050208 80%);
  overflow: hidden;
}

.gnia-planes-nucleus[data-theme="pro"] {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(59, 130, 246, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(8, 16, 40, 0.96), #050812 82%);
}

.gnia-planes-nucleus[data-theme="started"] {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(16, 185, 129, 0.32), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(2, 44, 34, 0.96), #021510 82%);
}

.gnia-planes-nucleus[data-theme="advanced"] {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 176, 32, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(28, 18, 4, 0.96), #0a0702 82%);
}

.gnia-planes-nucleus[data-theme="ultra"] {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(225, 29, 72, 0.3), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(24, 4, 10, 0.96), #080104 82%);
}

.gnia-planes-nucleus[data-theme="spectral"] {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.16), transparent 26%),
    radial-gradient(ellipse at 50% 48%, rgba(190, 18, 60, 0.38), transparent 52%),
    radial-gradient(ellipse at 50% 55%, rgba(8, 2, 6, 0.96), #020104 88%);
}

.gnia-planes-nucleus[data-theme="enterprise"] {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.16), transparent 26%),
    radial-gradient(ellipse at 50% 48%, rgba(224, 176, 74, 0.4), transparent 52%),
    radial-gradient(ellipse at 50% 55%, rgba(8, 6, 2, 0.96), #050401 88%);
}

.gnia-planes-nucleus-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gnia-planes-card.has-nucleus:hover .gnia-planes-nucleus {
  box-shadow: inset 0 0 40px rgba(224, 176, 74, 0.12);
}

.gnia-planes-card.is-activating {
  pointer-events: none;
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 28px rgba(190, 18, 60, 0.35);
}

.gnia-planes-card span,
.gnia-planes-card-label {
  font-family: var(--lab-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 10px 4px;
}

.gnia-planes-card-desc {
  margin: 0;
  padding: 0 12px 14px;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(226, 232, 240, 0.78);
  text-align: center;
}

/* ---------- Páginas internas (full-bleed, sin marco) ---------- */

.lab-page {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  padding: 48px 0 0;
  overflow: hidden;
  box-sizing: border-box;
}

.lab-page-inner {
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.lab-page-title {
  display: none;
}

.lab-frame-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent !important;
}

.lab-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent !important;
  color-scheme: dark;
  display: block;
  /* El scroll vive dentro del iframe, no en el body SPA */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* PLANES — padding lateral en full width */

.lab-planes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 4vw 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.lab-plan-card {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0610;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.lab-plan-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.lab-plan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 2, 8, 0.92) 0%, rgba(5, 2, 8, 0.15) 55%, transparent 100%);
  pointer-events: none;
}

.lab-plan-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  font-family: var(--lab-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.lab-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(212, 31, 74, 0.12);
}

.lab-plan-card:hover img {
  transform: scale(1.04);
}

/* EMPEZAR / CONTACTO */

.lab-cta-panel {
  max-width: 560px;
  margin: 10vh auto 60px;
  text-align: center;
  padding: 48px 36px;
  border-radius: 22px;
  background: rgba(10, 6, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.lab-cta-panel h2 {
  font-family: var(--lab-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 14px;
  color: #fff;
}

.lab-cta-panel p {
  color: var(--lab-text-dim);
  line-height: 1.7;
  margin: 0 0 28px;
}

.lab-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.lab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--lab-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.lab-btn:hover {
  transform: translateY(-2px);
}

.lab-btn-gold {
  color: #050208;
  background: linear-gradient(120deg, var(--lab-gold), #f0d078);
}

.lab-btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
}

/* Modal Empezar */
.gnia-empezar-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.gnia-empezar-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gnia-empezar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.gnia-empezar-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 36px 28px 28px;
  border-radius: 20px;
  background: rgba(8, 12, 28, 0.94);
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.gnia-empezar-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gnia-empezar-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.gnia-empezar-title {
  font-family: var(--lab-heading);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 28px;
  background: linear-gradient(120deg, #b8860b 0%, #ffd700 45%, #fff4b0 55%, #ffd700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gnia-empezar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gnia-empezar-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--lab-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.gnia-empezar-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.gnia-empezar-btn--gold {
  color: #0f172a;
  background: linear-gradient(120deg, #b8860b 0%, #ffd700 45%, #fff4b0 55%, #ffd700 100%);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(255, 215, 0, 0.25);
}

.gnia-empezar-btn--store {
  flex-direction: row;
  gap: 10px;
  background: rgba(0, 180, 120, 0.16);
  border-color: rgba(0, 220, 150, 0.35);
}

.gnia-contacto-lead {
  margin: -12px 0 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  line-height: 1.5;
}

.gnia-empezar-btn--whatsapp {
  flex-direction: row;
  gap: 10px;
  color: #ecfdf5;
  background: linear-gradient(135deg, #0b3d2e 0%, #128c7e 42%, #25d366 78%, #9ef0c2 100%);
  border-color: rgba(37, 211, 102, 0.55);
  box-shadow:
    0 10px 28px rgba(18, 140, 126, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.gnia-empezar-btn--whatsapp:hover {
  box-shadow:
    0 14px 34px rgba(37, 211, 102, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.gnia-empezar-btn--soon {
  opacity: 0.72;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.04);
}

.gnia-empezar-btn--campamento {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
}

.gnia-empezar-btn--campamento:hover {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 10px 28px rgba(255, 215, 0, 0.18);
}

body.is-navigating .lab-hero-stack {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.55s ease, transform 0.7s ease;
}

.lab-hero-stack {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gnia-empezar-btn-label {
  line-height: 1.2;
}

.gnia-empezar-btn-sub {
  font-family: var(--lab-body, "Montserrat", sans-serif);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(255, 215, 0, 0.75);
}

.gnia-empezar-btn-sub.gnia-empezar-btn-sub--mixed {
  text-transform: none;
  letter-spacing: 0.06em;
}

.gnia-prueba-dialog .gnia-empezar-title {
  display: none;
}

.gnia-prueba-dialog {
  padding-top: 44px;
}

.gnia-prueba-dialog .gnia-empezar-actions {
  margin-top: 0;
}

body.gnia-empezar-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .lab-planes-grid,
  .gnia-planes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-tagline {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(0.55rem, 2.6vw, 0.78rem);
    letter-spacing: 0.02em;
  }

  #view-home {
    padding: 0 3vw;
  }

  .lab-hero-stack {
    gap: 8px;
    width: min(100%, 96vw);
    /* Misma ancla que la esfera; leve lift óptico por el peso del tagline */
    transform: translateY(-1.5vh);
  }

  body.is-home .lab-topnav {
    min-height: 48px;
    padding: 12px 14px;
  }

  body.is-home .lab-top-acronym {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: clamp(0.48rem, 2.4vw, 0.58rem);
    letter-spacing: 0.12em;
    width: min(86vw, 420px);
    max-width: calc(100vw - 96px);
    padding-left: 36px;
    padding-right: 36px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  body.is-home .lab-top-acronym .lab-acronym-line {
    display: block;
  }

  /* Icono Home — solo en páginas (no en Home) */
  body.is-page .lab-home-btn,
  body.gnia-lab-standalone .lab-home-btn {
    display: inline-flex;
    position: fixed;
    left: 12px;
    top: 10px;
    z-index: 50;
    pointer-events: auto;
  }

  body.is-home .lab-home-btn {
    display: none !important;
  }

  body.is-home .lab-eq {
    position: fixed;
    left: 12px;
    top: 10px;
    margin-left: 0;
    z-index: 50;
  }

  body.is-home .lab-login-btn {
    right: 12px;
    top: 8px;
    padding: 7px;
    gap: 0;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.52rem;
  }

  body.is-home .lab-login-label {
    display: none;
  }

  body.is-home .lab-login-icon {
    width: 16px;
    height: 16px;
  }

  /* Movil: sin header/navegacion en paginas — menu inferior estatico */
  body.is-page .lab-topnav,
  body.gnia-lab-standalone .lab-topnav {
    justify-content: flex-end;
    min-height: 0;
    padding: 10px 12px;
    pointer-events: none;
  }

  body.is-page .lab-nav-toggle,
  body.is-page .lab-topnav-links,
  body.gnia-lab-standalone .lab-nav-toggle,
  body.gnia-lab-standalone .lab-topnav-links {
    display: none !important;
  }

  /* Móvil páginas: casa izq · login centro · bocina der */
  body.is-page .lab-eq,
  body.gnia-lab-standalone .lab-eq {
    pointer-events: auto;
    position: fixed;
    left: auto;
    right: 12px;
    top: 10px;
    transform: none;
    margin-left: 0;
    z-index: 50;
  }

  body.is-page .lab-login-btn,
  body.gnia-lab-standalone .lab-login-btn {
    display: inline-flex;
    position: fixed;
    left: 50%;
    top: 8px;
    right: auto;
    transform: translateX(-50%);
    z-index: 50;
    padding: 5px 12px;
    font-size: 0.52rem;
    gap: 5px;
    min-width: 0;
    min-height: 0;
  }

  body.is-page .lab-login-label,
  body.gnia-lab-standalone .lab-login-label {
    display: inline;
  }

  body.is-page .lab-login-icon,
  body.gnia-lab-standalone .lab-login-icon {
    width: 12px;
    height: 12px;
  }

  body.is-page .lab-page {
    padding: 0 0 128px;
  }

  body.gnia-lab-standalone {
    padding-bottom: 128px;
  }

  /* Menú inferior: visible en Home y en todas las páginas (móvil) */
  body.is-home .lab-bottom-nav,
  body.is-page .lab-bottom-nav,
  body.gnia-lab-standalone .lab-bottom-nav {
    display: grid !important;
  }

  body.is-page.lab-nav-open .lab-topnav-links,
  body.is-page .lab-nav-backdrop,
  body.is-page.lab-nav-open .lab-nav-backdrop {
    display: none !important;
  }

  .lab-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(2, 6, 23, 0.55);
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .lab-bottom-nav a[data-gnia-demo],
  .lab-bottom-nav a[data-gnia-prueba] {
    padding: 9px 10px;
  }

  .lab-bottom-nav {
    bottom: 12px;
    left: 50%;
    width: calc(100vw - 20px);
    max-width: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 6px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 16px;
    background: rgba(5, 2, 8, 0.5);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10050;
    isolation: isolate;
  }

  .lab-bottom-nav a {
    padding: 10px 6px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-align: center;
    white-space: nowrap;
  }

  /* Home: menú inferior sin caja (solo en esta página) */
  body.is-home .lab-bottom-nav {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 560px) {
  .lab-planes-grid,
  .gnia-planes-grid {
    grid-template-columns: 1fr;
  }

  .lab-topnav {
    padding: 8px 8px;
  }

  .lab-topnav a {
    padding: 6px 7px;
    font-size: 0.55rem;
  }

  .lab-bottom-nav {
    bottom: 10px;
    width: calc(100vw - 16px);
    padding: 12px 8px 14px;
    gap: 3px 4px;
  }

  .lab-bottom-nav a {
    font-size: 0.62rem;
    padding: 9px 4px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-bottom-nav {
    animation: none;
  }
}
