/* BIOTECS — celeste + blanco (moderno, sin verde bosque) */
:root {
    --brand-ink: #0f172a;
    --brand-bg: #f0f9ff;
    --brand-surface: #ffffff;
    --brand-primary: #0c4a6e;
    --brand-primary-mid: #0284c7;
    --brand-accent: #0369a1;
    --accent-soft: #e0f2fe;
    --brand-sage: #0369a1;
    --brand-line: #bae6fd;
    --brand-muted: #64748b;
    --brand-frost: #f0f9ff;
    --brand-sky-glow: rgba(56, 189, 248, 0.45);
    --footer-bg: #f8fafc;
    --footer-border: #e2e8f0;
    --biotec-navy: var(--brand-primary);
    --lm-blue: var(--brand-primary-mid);
    --lm-blue-dark: #0c4a6e;
    --lm-green: var(--brand-primary-mid);
    --lm-lime: var(--brand-accent);
    --lm-cyan: #0ea5e9;
    --header-z: 1000;
}

.lm-icon-btn {
    position: relative;
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: var(--brand-ink);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lm-icon-btn:hover {
    background-color: rgba(2, 132, 199, 0.08);
}

.lm-badge {
    position: absolute;
    right: -0.15rem;
    top: -0.15rem;
    display: flex;
    height: 1.25rem;
    min-width: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    padding: 0 0.25rem;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.lm-range {
    accent-color: var(--brand-primary-mid);
}

@keyframes lm-page-in {
    from {
        opacity: 0.88;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.lm-page main {
    animation: lm-page-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Panel administrativo: barra lateral fija + scroll interno si hace falta */
body.lm-admin .lm-admin-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.4) transparent;
}

body.lm-admin .lm-admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

body.lm-admin .lm-admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.35);
    border-radius: 9999px;
}

.lm-reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    filter: blur(5px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.55s ease;
    transition-delay: calc(var(--stagger, 0) * 50ms);
    will-change: opacity, transform;
}

.lm-reveal.lm-reveal-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: none;
}

.lm-bg-dots {
    background-image: radial-gradient(circle at center, rgba(2, 132, 199, 0.14) 1px, transparent 1px);
    background-size: 22px 22px;
}

.lm-glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lm-btn-shine {
    position: relative;
    overflow: hidden;
}

.lm-btn-shine::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.45) 48%,
        rgba(255, 255, 255, 0.12) 52%,
        transparent 65%
    );
    transform: translateX(-120%) rotate(12deg);
    animation: lm-shine-sweep 3.2s ease-in-out infinite;
}

@keyframes lm-shine-sweep {
    0%,
    40% {
        transform: translateX(-120%) rotate(12deg);
    }
    55%,
    100% {
        transform: translateX(120%) rotate(12deg);
    }
}

.lm-nav-link {
    position: relative;
}

.lm-nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.lm-nav-link:hover::after {
    width: 65%;
}

/* Aurora celeste + blanco (reemplaza bosque) */
.lm-home-aurora {
    position: absolute;
    inset: -30% -20% auto -20%;
    height: 85%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(56, 189, 248, 0.22), transparent 55%),
        radial-gradient(ellipse at 80% 30%, rgba(14, 165, 233, 0.12), transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(186, 230, 253, 0.35), transparent 45%);
    pointer-events: none;
    animation: lm-aurora-drift 18s ease-in-out infinite alternate;
}

@keyframes lm-aurora-drift {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 0.92;
    }
    to {
        transform: translate(2%, 1%) scale(1.04);
        opacity: 1;
    }
}

/* Malla + brillo para secciones */
.lm-sky-mesh {
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 0% -20%, rgba(125, 211, 252, 0.35), transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(224, 242, 254, 0.9), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, #f0f9ff 55%, #e0f2fe 100%);
}

.lm-sky-mesh::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(2, 132, 199, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(2, 132, 199, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
    pointer-events: none;
}

.lm-float-slow {
    animation: lm-float-y 7s ease-in-out infinite;
}

@keyframes lm-float-y {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.lm-glow-ring {
    box-shadow:
        0 0 0 1px rgba(14, 165, 233, 0.12),
        0 25px 50px -12px rgba(2, 132, 199, 0.2);
}

.lm-header.is-scrolled {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.lm-contact-shell {
    background:
        radial-gradient(ellipse 90% 60% at 10% -10%, var(--brand-sky-glow), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
        linear-gradient(180deg, var(--brand-frost) 0%, #f8fafc 45%, #ffffff 100%);
}

.lm-contact-grid {
    background-image:
        linear-gradient(to right, rgba(2, 132, 199, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

.lm-contact-map-frame {
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 24px 48px -16px rgba(2, 132, 199, 0.18);
}

.lm-contact-pill {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lm-contact-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(2, 132, 199, 0.2);
}

.lm-card-pro {
    border-left: 3px solid transparent;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.lm-card-pro:hover {
    border-left-color: var(--brand-primary-mid);
}

.lm-noise {
    position: relative;
}

body.lm-nav-open {
    overflow: hidden;
}

.lm-nav-mobile-sheet {
    animation: lm-nav-slide-in 0.28s var(--ppt-ease-soft) both;
}

@keyframes lm-nav-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0.96;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lm-nav-mobile-sheet {
        animation: none;
    }
}

.lm-noise::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Hero tipo presentación (PPT): diapositivas apiladas + bloques por pasos —— */
.lm-hero-cinematic {
    --ppt-ease: cubic-bezier(0.33, 0.86, 0.36, 1);
    --ppt-ease-soft: cubic-bezier(0.25, 0.8, 0.35, 1);
}

.lm-hero-viewport {
    position: relative;
    touch-action: manipulation;
}

/* Paneles apilados: escena completa (fondo va dentro de .lm-hero-scene-inner) */
.lm-hero-ppt-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.65s var(--ppt-ease),
        visibility 0.65s;
    z-index: 0;
    pointer-events: none;
}

/* Espacio reservado para flechas + puntos + barra de lectura */
.lm-hero-has-dock .lm-hero-ppt-panel {
    bottom: 5.85rem;
}

@media (max-width: 1023px) {
    .lm-hero-has-dock .lm-hero-ppt-panel {
        bottom: 6.75rem;
    }

    .lm-hero-dock {
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    .lm-hero-prev-cin,
    .lm-hero-next-cin {
        top: min(42%, 18rem);
    }

    .lm-hero-trans-bars {
        flex-wrap: wrap;
        row-gap: 0.35rem;
        justify-content: center;
    }

    .lm-hero-trans-bar {
        flex: 1 1 0;
        min-width: 2px;
    }

    .lm-hero-scene-inner {
        min-height: min(68vh, 640px);
    }

    .lm-ppt-stats {
        max-width: 100%;
    }

    .lm-hero-bullets {
        gap: 0.35rem;
    }
}

/* Cruces (+) tipo catálogo médico */
.lm-hero-med-cross {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath stroke='white' stroke-width='1.2' opacity='0.9' d='M36 10v52M10 36h52'/%3E%3C/svg%3E");
    background-size: 72px 72px;
}

/* Barras de transición entre pasos (se iluminan de izquierda a derecha) */
.lm-hero-trans-bar {
    transition:
        background 0.45s var(--ppt-ease-soft),
        box-shadow 0.45s ease,
        transform 0.35s ease;
}

.lm-hero-trans-bar.is-on {
    background: linear-gradient(90deg, #67e8f9, #f0f9ff);
    box-shadow: 0 0 14px rgba(103, 232, 249, 0.55);
}

.lm-hero-ppt-panel.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    pointer-events: auto;
}

/* Bloques ocultos hasta la secuencia JS (base = sube desde abajo) */
.lm-ppt-block {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0);
    filter: blur(1px);
    transition:
        opacity 0.52s var(--ppt-ease-soft),
        transform 0.55s var(--ppt-ease-soft),
        filter 0.45s ease;
}

.lm-ppt-block.is-ppt-in {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

/* Variantes de entrada (evitan el “todo igual”; trayectos más cortos = más suave) */
.lm-ppt-block.lm-ppt-enter--left:not(.is-ppt-in) {
    transform: translate3d(-1.1rem, 0.2rem, 0);
}

.lm-ppt-block.lm-ppt-enter--right:not(.is-ppt-in) {
    transform: translate3d(1.1rem, 0, 0);
}

.lm-ppt-block.lm-ppt-enter--up:not(.is-ppt-in) {
    transform: translate3d(0, 1rem, 0);
}

.lm-ppt-block.lm-ppt-enter--diag:not(.is-ppt-in) {
    transform: translate3d(0.85rem, 0.65rem, 0);
}

.lm-ppt-block.lm-ppt-enter--zoom:not(.is-ppt-in) {
    transform: translate3d(0, 0.35rem, 0) scale(0.94);
}

.lm-ppt-block.lm-ppt-enter--scale:not(.is-ppt-in) {
    transform: translate3d(0, 0, 0) scale(0.9);
}

.lm-ppt-block.lm-ppt-enter--pop:not(.is-ppt-in) {
    transform: translate3d(0, 0.5rem, 0) scale(0.92);
}

.lm-ppt-block.lm-hero-caption.lm-ppt-enter--corner:not(.is-ppt-in) {
    transform: translate3d(0.65rem, 0.85rem, 0);
    opacity: 0;
}

.lm-ppt-block.lm-ppt-eyebrow:not(.is-ppt-in) {
    transform: translate3d(-1.1rem, 0, 0) scale(0.96);
}

.lm-ppt-block.lm-ppt-eyebrow.is-ppt-in {
    transform: translate3d(0, 0, 0) scale(1);
}

/* Título: palabras con trayectorias alternadas (nth) */
.lm-ppt-word {
    display: inline-block;
    margin-right: 0.32em;
    overflow: hidden;
    padding-bottom: 0.05em;
    vertical-align: top;
}

.lm-ppt-word-inner {
    display: inline-block;
    transform: translate3d(0, 105%, 0);
    opacity: 0;
    transition:
        transform 0.48s var(--ppt-ease-soft),
        opacity 0.42s ease;
}

.lm-ppt-word:nth-child(4n + 2) .lm-ppt-word-inner {
    transform: translate3d(-1.1rem, 0.2rem, 0);
}

.lm-ppt-word:nth-child(4n + 3) .lm-ppt-word-inner {
    transform: translate3d(1.1rem, -0.15rem, 0);
}

.lm-ppt-word:nth-child(4n + 4) .lm-ppt-word-inner {
    transform: translate3d(0, -105%, 0);
}

.lm-ppt-word.is-ppt-in .lm-ppt-word-inner {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Imagen: revelado L→R (por defecto) o R→L */
.lm-ppt-wipe {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    filter: blur(3px);
    transition:
        clip-path 0.88s var(--ppt-ease-soft),
        opacity 0.35s ease,
        filter 0.65s ease;
}

.lm-ppt-wipe.is-ppt-in {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0);
}

.lm-ppt-wipe.lm-ppt-wipe--from-right:not(.is-ppt-in) {
    clip-path: inset(0 0 0 100%);
}

.lm-ppt-wipe.lm-ppt-wipe--from-right.is-ppt-in {
    clip-path: inset(0 0 0 0);
}

.lm-ppt-caption {
    transition:
        opacity 0.45s ease,
        transform 0.5s var(--ppt-ease-soft);
}

.lm-hero-visual {
    position: relative;
    border-radius: 1.75rem;
    overflow: visible;
}

/* Mosaico 2×2 junto a la foto principal (espaciado, no apilado) */
@media (min-width: 1024px) {
    .lm-hero-mosaic {
        align-content: start;
    }
}

@media (max-width: 639px) {
    .lm-hero-ken {
        min-height: 12.5rem;
    }
}

.lm-hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 42%, transparent 58%, rgba(2, 132, 199, 0.06) 100%);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.lm-hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.lm-hero-ken {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.lm-hero-ken img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    animation: lm-kenburns 22s ease-in-out infinite alternate;
    animation-play-state: paused;
}

/* Zoom suave solo cuando la imagen ya entró en escena */
.lm-hero-ppt-panel.lm-ppt-ready .lm-hero-ken img {
    animation-play-state: running;
}

@keyframes lm-kenburns {
    0% {
        transform: scale(1.06) translate(1%, 0.35%);
    }
    100% {
        transform: scale(1.12) translate(-1.25%, -1%);
    }
}

.lm-hero-caption {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
}

.lm-hero-caption.is-ppt-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Barra: tiempo de lectura antes de la siguiente diapositiva */
.lm-hero-hold-bar {
    transition: transform linear;
}

@media (prefers-reduced-motion: reduce) {
    .lm-page main,
    .lm-reveal,
    .lm-btn-shine::after,
    .lm-home-aurora,
    .lm-float-slow {
        animation: none !important;
        transition: none !important;
    }

    .lm-reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .lm-contact-pill:hover {
        transform: none;
    }

    .lm-ppt-block,
    .lm-ppt-word-inner,
    .lm-hero-caption {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
    }

    .lm-ppt-wipe {
        clip-path: none !important;
    }

    .lm-hero-ken img {
        animation: none !important;
        transform: none !important;
    }

    .lm-hero-hold-bar {
        display: none;
    }

    .lm-hero-trans-bar {
        transition: none !important;
    }
}
