/* ========== VARIABLES GLOBALES ========== */
:root {
    --neon-blue: #1304ea;
    --neon-purple: #8137ff;
    --logo-width-desktop: 35vw;
    --content-gap-bottom: 10vh;
    --transition-normal: 0.3s ease;
}

/* ========== RESET UNIVERSAL ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    box-sizing: border-box;
}

/* ========== BASE STYLES ========== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    background-color: #dfeaff;
}

.brand-name {
    font-weight: bolder;
}

.brand-x {
    color: #0000FF;
    font-weight: bolder;
}

/* ========== SCROLL WRAPPER ========== */
.scroll-wrapper {
    height: 100vh;
    height: 100dvh; /* fix iOS Safari: adapta al viewport real (sin chrome del navegador) */
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch; /* momentum scroll en iOS */
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    position: relative;
    width: 100%;
    max-width: 100vw;
    scrollbar-width: auto;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

body {
    background: transparent;
}

/* ========== PAGE SCROLLBAR ========== */
html, body {
    scrollbar-width: auto;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ========== BACKGROUND ========== */
.tunnel-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-image: url("img/Wisepex Background.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ========== GLOBAL SITE CONTAINER ========== */
.global-site-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 16vh clamp(20px, 4vw, 3rem) 5vh;
    box-sizing: border-box;
}


/* ========== HERO GLOBAL (título e intro — idéntico en todas las páginas) ========== */
.main-title {
    display: flex;
    position: relative;
    text-align: center;
    font-size: clamp(2.5rem, 5vw, 5.5rem);
    font-weight: 600;
    margin: 20vh auto 3vh auto;
    max-width: 95%;
    z-index: 102;
    opacity: 1;
    animation: titleAppear 1s ease-out 2.5s forwards;
}

.hero-intro {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    line-height: 1.6;
    margin: 0 auto 10vh auto;
    text-align: center;
    max-width: 90%;
}


/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 2vh;
    margin: 0 auo;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    padding: 0.3vh 0.5rem;
    z-index: 1000;
    justify-content: center;
    box-sizing: border-box;
}

.logo-nav {
    font-weight: bold;
    color: black;
    font-size: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
}

.logo-nav span {
    color: var(--neon-purple);
    margin-left: 2px;
}

.logo-nav-img {
    width: clamp(7rem, 12vw, 10rem);
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2.4vw, 2rem);
}

.nav-links a {
    color: black;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--neon-blue);
}

.divider {
    width: 2px;
    min-width: 2px;
    height: 3vh;
    background-color: #0044ff;
}


/* "Scroll" */
.scroll-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.arrow-down {
    width: 30px;
    height: 30px;
    margin: 0 auto;
}


.arrow-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid #333;
    border-right: 3px solid #333;
    transform: rotate(45deg);
    margin: -10px auto 0 auto;
    animation: arrow 2s infinite;
}

/* Definición de la animación de rebote */
@keyframes arrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px);
    }}


.arrow-down span:nth-child(2) {
    animation-delay: -0.2s;
}

.arrow-down span:nth-child(3) {
    animation-delay: -0.4s;
}

/* ----- Footer (glassmorphism) ----- */
.site-footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    padding: 4vh 5vh 2vh 5vh;
    /* safe-area-inset-bottom: evita que el footer quede bajo el home indicator en iPhone X+ */
    padding-bottom: max(2vh, env(safe-area-inset-bottom));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: start;
}

.footer-divider {
    width: 100%;
    max-width: 1600px;
    height: 1px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 2vh;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--neon-blue);
}


/* ========== MEDIA QUERIES GLOBALES (navbar, container, tunnel-bg) ========== */
@media (max-width: 900px) {
    .tunnel-bg {
        background-position: center top;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1vh 2vw;
    }

    .logo-nav {
        font-size: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .logo-nav span {
        color: var(--neon-purple);
        margin-left: 2px;
    }

    .logo-nav-img {
        width: clamp(4.2rem, 5vw, 4rem);
        object-fit: contain;
    }

    .nav-links {
        gap: clamp(0.7rem, 2.2vw, 1.7rem);
    }

    .nav-links a {
        font-size: 0.5rem;
    }

    .nav-links a:hover {
        color: var(--neon-blue);
    }

    .divider {
        display: none;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .navbar {
        margin: 0 2vh;
        padding: 0.3vh 3vw;
    }

    .logo-nav-img {
        width: clamp(4rem, 16vw, 8rem);
    }

    .nav-links {
        gap: clamp(0.6rem, 3vw, 1rem);
    }

    .nav-links a {
        font-size: 0.5rem;
    }

    .divider {
        height: 2vh;
    }

    .main-title {
        margin-top: 15vh;
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .hero-intro {
        margin-bottom: 8vh;
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        font-size: 0.8rem;
    }

    .site-footer {
        padding: 4vh;
        margin-top: 1vh;
        align-items: center;
    }

}

/* Hero: 480px sobreescribe el breakpoint de 768px */
@media (max-width: 480px) {
    .main-title {
        margin-top: 12vh;
        font-size: 1.6rem;
    }

    .hero-intro {
        margin-bottom: 6vh;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .navbar {
        padding: 0.5vh 3vw;
    }
}

/* Hero: pantallas grandes — refuerzo del margen superior del título */
@media (min-width: 1200px) {
    .main-title {
        margin-top: 20vh;
    }
}

@media (max-width: 1023px) {
    .navbar {
        justify-content: center;
        gap: clamp(0.5rem, 2.2vw, 1.8rem);
    }

    .logo-nav {
        margin-right: 0;
        flex-shrink: 0;
    }

    .nav-links {
        justify-content: center;
        gap: clamp(0.55rem, 2.4vw, 1rem);
    }

}


@media (min-width: 1024px) {

    :root {
        --content-gap-bottom: 12vh;
    }

    .navbar {
        padding: 0.3vh 3vw;
        top: 3vh;
        border-radius: 80px;
    }

    .logo-nav-img {
        width: clamp(7rem, 12vw, 10rem);
        object-fit: contain;
    }
    
    .nav-links {
        display: flex;
        align-items: center;
        gap: clamp(0.8rem, 1.6vw, 2rem);
    }
    
    .nav-links a {
        color: black;
        text-decoration: none;
        font-weight: bold;
        letter-spacing: 0.05em;
        transition: color 0.3s;
        
    }

    .logo-nav {
        margin-right: 2.5vw;
    }
}

@media (min-width: 1200px) {
    .nav-links a {
        font-size: 0.8rem;
    }

    .divider {
        height: 3vh;
    }
}


/* ========================================================
   SHARED CONTENT LAYOUT — home.css + lebenszyklus.css
   Controla el ancho del "cascarón" de grids y cards.
   Los estilos internos (padding, tipografía, imágenes)
   permanecen en home.css / lebenszyklus.css.
   ======================================================== */

/* --- Padding del contenedor principal: idéntico en todas las páginas --- */
.global-site-container {
    padding-top: 16vh;
}

@media (max-width: 1024px) {
    .global-site-container { padding-top: 14vh; }
}

@media (max-width: 768px) {
    .global-site-container {
        padding-top: 13vh;
        padding-left: 20px;
        padding-right: 20px;
        width: 97%;
    }

}

@media (max-width: 480px) {
    .global-site-container { padding-top: 12vh; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .global-site-container { padding-top: 16vh; }
}

/* --- Contenedores de sección: passthrough de ancho completo --- */
.features-container,
.lebenszyklus-container {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- Rejillas unificadas: mismo gap, max-width y alineación --- */
.features-grid,
.lebenszyklus-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 20vh;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
}

/* --- Ancho unificado del "cascarón" de las cards — Mobile base --- */
.feature-card,
.lebenszyklus-card {
    box-sizing: border-box;
    padding: 5vh;
}


@media (max-width: 932px) and (orientation: landscape) {
    .main-title {
        margin: 14vh auto 3vh auto;
    }

    .hero-intro {
        line-height: 1.4;
    }

    .arrow-down span {
        width: 17px;
        height: 17px;
        border-bottom: 2px solid #333;
        border-right: 2px solid #333;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .main-title {
        margin: 18vh auto 3vh auto;
        font-size: clamp(1.8rem, 6vw, 2rem);
    }

    .hero-intro {
        margin-bottom: 2vh;
        font-size: 1rem;
    }

}

/* Tablet / Small Desktop (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .feature-card,
    .lebenszyklus-card {
        margin: 0 12vh;    
    }
}


/* Mobile: gap reducido y grids a ancho completo */
@media (max-width: 767px) {
    .features-grid,
    .lebenszyklus-grid {
        gap: 15vh;
        margin: 0 auto;
    }

}

/* Desde 1024px: cards a ancho completo del grid */
@media (min-width: 1024px) {
    .feature-card,
    .lebenszyklus-card {
        margin: 0 15vh;    }
}

/* Large Desktop (>1200px): max-width fijo */
@media (min-width: 1200px) {
    .feature-card,
    .lebenszyklus-card {
        margin: 0 18vh;    }

}

/* Extra Large (>1400px): max-width ampliado */
@media (min-width: 1400px) {
    .feature-card,
    .lebenszyklus-card {
        margin: 0 20vh;    }

    .main-title {
        margin-top: 17vh;
    }

    .hero-intro {
        margin-bottom: 0vh;
    }
}

/* ===== AJUSTES SUTILES PARA ULTRA-WIDE (>1900px) ===== */
@media (min-width: 1901px) {
    .logo-nav {
        font-size: 1.6rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .main-title {
        font-size: clamp(2.6rem, 4.8vw, 6.9rem);
    }

    .hero-intro {
        font-size: clamp(1.05rem, 2.4vw, 2.7rem);
    }

    .scroll-hint {
        height: 12vh !important;
    }

    .footer-links {
        gap: 3rem;
    }

    .footer-links a {
        font-size: 1.5rem;
    }
}

