/* Morebat: navy #0b1533 · ink #1c244b · blue #2c6ff0 · sky #4cc3f5 · light #eef4ff */
body { font-family: 'Poppins', sans-serif; }

/* Header fijo: barra superior + menú */
#header { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; }
#topbar { transition: margin-top .3s ease; }
#header.scrolled #topbar { margin-top: -40px; }
#header.scrolled #navbar { box-shadow: 0 10px 30px -12px rgba(11, 21, 51, .25); }

@keyframes fadeInMenu { from { opacity: 0; margin-top: -10px; } to { opacity: 1; margin-top: 0; } }
.group:hover .group-hover\:block { display: block; animation: fadeInMenu 0.2s ease-out forwards; }

.menu-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 0.75rem; transition: background-color .2s; }
.menu-item:hover { background-color: #eef4ff; }
.menu-icon { background: #e3ecff; color: #2c6ff0; padding: 0.5rem; border-radius: 0.6rem; display: inline-flex; flex-shrink: 0; transition: all .2s; }
.menu-item:hover .menu-icon { background: #2c6ff0; color: #fff; }
.mobile-sub { display: block; padding: 0.5rem 0.75rem; font-size: 0.875rem; color: #475569; border-radius: 0 0.5rem 0.5rem 0; }
.mobile-sub:hover { background: #eef4ff; color: #2c6ff0; }

/* Fondo de cuadrícula técnica */
.bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* Etiqueta sobre los títulos */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.btn:hover { transform: translateY(-2px); }
a:focus-visible, button:focus-visible { outline: 2px solid #2c6ff0; outline-offset: 3px; border-radius: 8px; }

/* Tarjetas */
.card { transition: transform .35s ease, box-shadow .35s ease, background-color .35s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(11, 21, 51, .35); }
.feature { position: relative; overflow: hidden; }
.feature::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, #4cc3f5, #2c6ff0); transition: width .35s ease; }
.feature:hover::after { width: 100%; }

/* Líneas de producto: 2 tarjetas grandes arriba y 3 abajo */
@media (min-width: 1024px) {
    .lines-grid > :nth-child(-n+2) { grid-column: span 3; min-height: 380px; }
    .lines-grid > :nth-child(n+3) { grid-column: span 2; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .lines-grid > :last-child { grid-column: span 2; }
}

/* Tarjetas de vidrio (sección GEXIA) */
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px -40px rgba(0, 0, 0, .6); backdrop-filter: blur(10px); transition: transform .35s ease, box-shadow .35s ease; }
.glass:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px rgba(76, 195, 245, .35), 0 40px 80px -40px rgba(0, 0, 0, .7); }

/* Captura dentro de un marco de ventana */
.shot { border-radius: 1rem; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(148, 163, 184, .3), 0 40px 80px -36px rgba(11, 21, 51, .55); position: relative; }
.shot-bar { display: flex; gap: 6px; padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.shot-bar span { width: 10px; height: 10px; border-radius: 9999px; background: #cbd5e1; }
.shot img { display: block; }

/* Cifras */
.stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 1.25rem; padding: 1.1rem 1.25rem; backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: .4rem; }
.stat-num { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: .8rem; color: #cbd5e1; line-height: 1.35; }
@media (max-width: 640px) { .stat-num { font-size: 1.5rem; } .stat-label { font-size: .72rem; } }
.stat-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.75rem 1.5rem; border-radius: 1.5rem; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #cbd5e1; font-size: .875rem; line-height: 1.4; }
.stat-big { font-size: 2.25rem; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .stat-big { font-size: 1.6rem; } .stat-card { padding: 1.25rem 1rem; } }

/* Chips (RADEXA) */
.chip { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.5rem 1rem; border-radius: 1.25rem; background: #eef4ff; color: #1c244b; font-size: .85rem; font-weight: 700; transition: all .3s ease; }
.chip svg { color: #2c6ff0; transition: color .3s ease; }
.chip:hover { background: #2c6ff0; color: #fff; transform: translateY(-4px); }
.chip:hover svg { color: #fff; }
.chip-dark { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: .9rem; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #cbd5e1; font-size: .875rem; }

/* Flechas del flujo (ecosistema RADEXA) */
.flow-arrow { position: absolute; top: 50%; right: -1.15rem; transform: translateY(-50%); color: #2c6ff0; background: #fff; border-radius: 9999px; z-index: 1; }

/* Contacto */
.contact-item { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; border-radius: 1rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: all .25s ease; }
a.contact-item:hover { transform: translateX(4px); box-shadow: 0 10px 24px -14px rgba(11, 21, 51, .35); }
.contact-icon { width: 2.75rem; height: 2.75rem; border-radius: .8rem; background: #eef4ff; color: #2c6ff0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Imagen flotante del hero */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float-slow { animation: float 7s ease-in-out infinite; }

/* Aparición al hacer scroll (main.js agrega .reveal) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .75, .15, 1), transform .8s cubic-bezier(.2, .75, .15, 1); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .float-slow, .marquee-track { animation: none; }
}

/* Carrusel de logos */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.client-logo { filter: grayscale(1); opacity: .7; transition: all .3s ease; mix-blend-mode: multiply; }
.client-logo:hover { filter: none; opacity: 1; }

/* Video (carga al hacer clic) */
.video-grid { display: grid; gap: 2rem; }
.video-grid-single { max-width: 56rem; margin: 0 auto; }
.video-card { margin: 0; }
.video-facade, .video-card iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 1.5rem; overflow: hidden; background: #0b1533; box-shadow: 0 24px 48px -20px rgba(11, 21, 51, .35); cursor: pointer; padding: 0; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }
.video-facade:hover img { transform: scale(1.05); opacity: .85; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 4.5rem; height: 4.5rem; border-radius: 9999px; background: #2c6ff0; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(44, 111, 240, .45); transition: transform .3s ease; }
.video-play svg { margin-left: 4px; fill: currentColor; }
.video-facade:hover .video-play { transform: translate(-50%, -50%) scale(1.1); }

/* Comparativa MIBAT+ */
.mibat-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid #e2e8f0; }
.mibat-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mibat-row dt { color: #64748b; font-size: .9rem; }
.mibat-row dd { margin: 0; text-align: right; font-size: 1.35rem; font-weight: 700; color: #334155; }
.mibat-row dd span { display: block; font-size: .75rem; font-weight: 500; color: #94a3b8; }
.mibat-row-dark { border-color: rgba(255, 255, 255, .12); }
.mibat-row-dark dt { color: #cbd5e1; }
.mibat-row-dark dd { color: #fff; }
.mibat-row-dark dd span { color: #cbd5e1; }
.mibat-row dd .mibat-badge { display: inline-block; margin-top: .35rem; padding: .15rem .6rem; border-radius: 9999px; background: #2c6ff0; color: #fff; font-weight: 700; }

/* Páginas legales */
.legal { color: #475569; line-height: 1.75; }
.legal h2 { margin: 2.5rem 0 .75rem; font-size: 1.35rem; font-weight: 700; color: #1c244b; }
.legal p { margin-bottom: 1rem; }
.legal ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.legal li { margin-bottom: .4rem; }
.legal a { color: #2c6ff0; text-decoration: underline; }
.legal a:hover { color: #1c244b; }
.legal strong { color: #1c244b; }

/* Formulario de HubSpot */
.hbspt-form { width: 100%; }
.hbspt-form iframe { width: 100% !important; min-height: 500px; }
