/*
 BIOHACKING 360 LABS — DESIGN SYSTEM V1

 FUENTE CENTRAL DE VERDAD:
 1. Ancho del contenido
 2. Margenes horizontales
 3. Hero y banner
 4. Escalas tipograficas
 5. Seguridad responsive

 Nuevos modulos deben reutilizar estas variables.
*/

:root {
    --bh-content-max: 1400px;
    --bh-gutter: clamp(32px, 4vw, 64px);
    --bh-side: max(
        var(--bh-gutter),
        calc((100vw - var(--bh-content-max)) / 2)
    );

    --bh-space-1: 8px;
    --bh-space-2: 16px;
    --bh-space-3: 24px;
    --bh-space-4: 32px;
    --bh-space-5: 48px;
    --bh-space-6: 64px;

    --bh-navy: #142d54;
    --bh-blue: #195db8;
    --bh-muted: #536985;
    --bh-border: #e0e9f4;

    --bh-radius: 14px;

    --bh-h1: clamp(34px, 3.35vw, 54px);
    --bh-h2: clamp(26px, 2.5vw, 38px);
    --bh-body: clamp(14px, 1vw, 16px);
}

/* Modelo de cajas universal */

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

html {
    max-width: 100%;
}

body {
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

img, video, svg {
    max-width: 100%;
}

img {
    height: auto;
}

/* RETICULA GLOBAL
   La misma anchura en cada modulo. */

.wrap,
header .wrap.header-inner,
.bh-showcase .wrap,
footer .wrap {
    width: min(
        var(--bh-content-max),
        calc(100% - 2 * var(--bh-gutter))
    ) !important;

    max-width: var(--bh-content-max) !important;
    margin-inline: auto !important;
}

/* Evitar que columnas empujen el contenedor */

.wrap > *,
.bh-showcase-grid > *,
.hero-content,
.header-inner > * {
    min-width: 0;
}

/* HEADER */

header .wrap.header-inner {
    min-height: 88px;
    padding-block: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2vw, 32px);
}

header .official-brand {
    flex: 0 0 auto;
}

header .official-brand img {
    width: clamp(190px, 14vw, 240px) !important;
    max-width: 240px !important;
    height: auto;
    object-fit: contain;
}

header #main-navigation {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
}

header #main-navigation a {
    font-size: clamp(12px, .88vw, 15px);
    line-height: 1.45;
}

/* HERO — TEXTO E IMAGEN ALINEADOS
   CON LA MISMA RETICULA */

.hero {
    position: relative;
    isolation: isolate;
    min-height: 590px;

    background:
        linear-gradient(
            110deg,
            #ffffff 0%,
            #ffffff 53%,
            #f6f9fe 100%
        ) !important;
}

/* El banner no debe llegar hasta el borde
   del navegador: termina en el mismo
   margen del contenido. */

.hero::before {
    content: "" !important;
    position: absolute !important;

    inset: 0 var(--bh-side) 0 auto !important;

    width: min(47vw, 690px) !important;
    height: 100% !important;

    background-image:
        url('/landing/banner-v2.webp') !important;

    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: contain !important;

    background-color: transparent !important;
    opacity: 1 !important;

    mask-image: none !important;
    -webkit-mask-image: none !important;

    pointer-events: none;
    z-index: 0 !important;
}

.hero::after {
    display: none !important;
    content: none !important;
}

.hero > .wrap {
    position: relative;
    z-index: 2;
    min-height: 590px;

    display: flex;
    align-items: center;

    padding-block: 72px;
}

.hero .hero-content {
    width: 46%;
    max-width: 580px;
}

.hero h1 {
    font-size: var(--bh-h1) !important;
    font-weight: 700 !important;
    line-height: 1.16 !important;
    letter-spacing: -.042em !important;
    color: var(--bh-navy) !important;
    max-width: 100% !important;
}

.hero p {
    font-size: var(--bh-body) !important;
    line-height: 1.8 !important;
    color: var(--bh-muted) !important;
    max-width: 100% !important;
}

/* La decoracion no puede alterar
   posicion ni anchura del contenido. */

.hero .bh-tech-scene {
    pointer-events: none;
    opacity: .12;
}

/* SECCIONES INTERIORES */

.bh-showcase .wrap {
    max-width: var(--bh-content-max) !important;
}

.bh-showcase .bh-showcase-grid {
    grid-template-columns:
        minmax(0, 2fr)
        minmax(280px, .86fr);

    gap: var(--bh-space-3);
}

.bh-showcase .bh-showcase-photos {
    min-width: 0;
}

.bh-showcase .bh-showcase-photos img {
    max-width: 100%;
    object-fit: cover;
}

/* Tipografia de secciones */

.bh-showcase .bh-showcase-heading h2,
.section-head h2 {
    font-size: var(--bh-h2);
    line-height: 1.23;
    letter-spacing: -.035em;
}

/* TABLETA */

@media (max-width: 1100px) {
    :root {
        --bh-gutter: 24px;
    }

    header .wrap.header-inner {
        min-height: 76px;
    }

    header .official-brand img {
        width: 185px !important;
    }

    .hero::before {
        width: 48% !important;
    }

    .hero .hero-content {
        width: 49%;
    }

    .bh-showcase .bh-showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* MOVIL */

@media (max-width: 700px) {
    :root {
        --bh-gutter: 16px;
    }

    header .wrap.header-inner {
        min-height: 68px;
        gap: 8px;
    }

    header .official-brand img {
        width: clamp(128px, 34vw, 165px) !important;
    }

    .hero {
        min-height: 0;
        display: block;
    }

    .hero > .wrap {
        min-height: 0;
        display: block;

        padding-top: 50px;
        padding-bottom: 295px;
    }

    .hero .hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero::before {
        inset: auto var(--bh-gutter) 0
               var(--bh-gutter) !important;

        width: calc(
            100% - 2 * var(--bh-gutter)
        ) !important;

        height: 265px !important;

        background-position:
            center bottom !important;

        background-size: contain !important;
    }

    .hero h1 {
        font-size: clamp(32px, 8vw, 42px) !important;
    }

    .bh-showcase .bh-showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* Accesibilidad */

@media (prefers-reduced-motion: reduce) {
    .hero .bh-tech-scene *,
    .hero .bh-tech-scene *::before,
    .hero .bh-tech-scene *::after {
        animation: none !important;
    }
}
