:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-label: #666666;
    --accent-color: #ff4d00; /* Naranja HC vibrante */
    --font-display: 'Teko', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default; /* Remove pointer unless specified */
}

/* Custom Selection */
::selection {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    height: auto;
    min-height: 1200vh; /* Agilizado para mejor ritmo */
}

@media (max-width: 768px) {
    body {
        height: 550vh; /* Scroll height for mobile */
    }
}

a, button, .accordion-header, .social-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1;
}

.loader-bar-wrapper {
    width: 200px;
    height: 1px;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--text-primary);
    transition: width 0.1s linear;
}

.loader-percentage {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.logo {
    pointer-events: auto;
}

.header-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.preloader-logo-img {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto 2rem;
}

.nav {
    display: flex;
    gap: 2.5rem;
    pointer-events: auto;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.6;
}

/* Canvas Container */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#heroCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Content Wrapper */
.main-content {
    position: relative;
    z-index: 10;
    pointer-events: none; /* Sections will enable pointer events where needed */
}

.section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Typography Globals */
.section-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--text-label);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

/* 01 / HERO */
.section-hero {
    opacity: 1;
    visibility: visible;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
}

.hero-text-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 14rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 0.8;
    margin-bottom: -1rem;
    
    /* Efecto Shiny Text */
    background: linear-gradient(
        90deg, 
        #1a1a1a 0%, 
        #1a1a1a 40%, 
        #ffffff 50%, 
        #1a1a1a 60%, 
        #1a1a1a 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 10, 0.4);
    padding: 0.8rem 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 2px;
}

.tagline-left {
    left: 8%;
    text-align: left;
    border-left: 2px solid var(--text-primary);
}

.tagline-right {
    right: 8%;
    text-align: right;
    border-right: 2px solid var(--text-primary);
}

#type-convierten::after, #type-escalan::after {
    content: '|';
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-indicator span {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
}

.arrow-down {
    width: 1px;
    height: 40px;
    background-color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.arrow-down::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-primary);
    animation: scrollArrow 2s ease-in-out infinite;
}

@keyframes scrollArrow {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* 01 / ABOUT */
.section-about {
    align-items: center;
    z-index: 20; /* Por encima de todo en el hero */
}

.about-container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
    padding-bottom: 8vh;
}

.about-content {
    max-width: 800px;
}

.about-reflexive-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text {
    font-family: var(--font-display);
    font-size: 3.2rem; /* Ligeramente más pequeño para mejor balance */
    line-height: 1.1;
    color: var(--text-primary);
    font-weight: 400;
    max-width: 750px;
}

/* 02 / SERVICIOS */
.section-servicios {
    background-color: var(--bg-color);
    padding: 0;
}

.services-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.service-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
}

.service-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.85) 30%, rgba(10, 10, 10, 0.6) 100%);
    z-index: 0;
}

#service-1 { background-image: url('../img/services/web-design-real.webp'); }
#service-2 { background-image: url('../img/services/ecommerce-v4.webp'); }
#service-3 { background-image: url('../img/services/landing-v4.webp'); }
#service-4 { background-image: url('../img/services/branding.webp'); }

.service-slide .container {
    position: relative;
    z-index: 1;
}

.service-slide.active {
    opacity: 1;
    visibility: visible;
}

.service-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-big-title {
    font-family: var(--font-display);
    font-size: 12rem;
    font-weight: 700;
    line-height: 0.85;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.service-description {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 300;
}


/* STORY SCROLL (FLOW SECTIONS) */
.section-trabajos {
    padding: 0;
    background-color: var(--bg-color);
}

.flow-art-main {
    width: 100%;
    height: 100%;
    position: relative;
}

.flow-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
}

.flow-art-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrado vertical */
    align-items: center;    /* Centrado horizontal */
    padding: 5vw;
    text-align: center;
    will-change: transform;
}

.flow-big-title {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 16vw, 18rem); /* Tamaño masivo para impacto total */
    font-weight: 700;
    line-height: 0.8;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin: 1.5rem 0;
}

.flow-description {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    line-height: 1.4;
    max-width: 45ch;
    font-weight: 300;
    margin: 0 auto 2.5rem auto;
}

.flow-footer {
    display: flex;
    gap: 1.5vw;
    margin-top: auto;
}

.flow-tag {
    font-family: var(--font-display);
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid currentColor;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.flow-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flow-btn {
    position: absolute;
    right: 8vw;
    top: 50%;
    transform: translateY(-50%);
    padding: 1.5rem 3rem;
    border: 1px solid var(--text-primary);
    border-radius: 4rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    background: transparent;
    z-index: 100;
}

.flow-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding-right: 4rem; /* Efecto de expansión lateral */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.flow-btn::after {
    content: '→';
    position: absolute;
    right: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.flow-btn:hover::after {
    opacity: 1;
    right: 1.2rem;
}

.project-num {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-label);
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-primary);
}

.project-details {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 04 / CONTACTO */
.section-contacto {
    align-items: center;
    justify-content: center;
    text-align: center;
}

#contacto {
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9) 20%, rgba(10, 10, 10, 0.4) 100%);
    z-index: 0;
}

.contacto-container {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.contacto-heading {
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 700;
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.contacto-subheading {
    color: var(--accent-color);
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: block;
}

.cta-button {
    display: inline-block;
    border: 1px solid var(--text-primary);
    padding: 1.2rem 3rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-bottom: 4rem;
}

.cta-button:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: #444444;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link i {
    margin-right: 8px;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
}

.social-link:hover i {
    transform: translateY(-3px);
    color: var(--accent-color);
}

.social-dot {
    color: #444444;
    font-size: 0.7rem;
}

.footer {
    padding: 4rem 0;
    background-color: var(--bg-color);
    border-top: 1px solid #1a1a1a;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 3rem; /* Espacio después de las redes sociales */
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.footer-legal:hover {
    opacity: 1;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-dot {
    color: #444;
    font-size: 0.6rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header {
        padding: 1.2rem;
    }
    
    .nav {
        display: none; /* Simplificamos para móvil */
    }

    /* Hero */
    #hero {
        justify-content: flex-start !important;
        padding-top: 0vh !important; /* Lo más arriba posible */
    }

    .hero-title {
        position: absolute !important;
        top: 8vh !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: clamp(3.5rem, 15vw, 6rem) !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    .hero-tagline {
        flex-direction: column;
        top: auto;
        bottom: 22vh; /* Bajamos el texto para no tapar la cara */
        gap: 0.8rem;
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
    }

    .tagline-divider {
        display: none; /* Quitamos la barra vertical en móvil */
    }

    .tagline-right {
        display: none !important; /* Eliminamos la segunda frase en móvil para máxima limpieza */
    }

    .tagline-left {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* About Section */
    .about-content {
        align-items: flex-start;
        padding: 0 1.5rem 5vh 1.5rem;
        text-align: left;
    }

    .about-vision {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .about-text {
        font-size: 1.1rem; /* Un poco más grande para mejor lectura */
        line-height: 1.5;
        max-width: 100%;
        font-weight: 400;
    }

    /* Services */
    .service-big-title {
        font-size: 2rem !important; /* Reducción agresiva definitiva */
        line-height: 1;
        margin-bottom: 1rem;
    }

    .service-desc {
        font-size: 0.95rem;
        max-width: 100%;
    }

    /* Flow Sections (Proyectos) */
    .flow-art-container {
        padding: 10vw 6vw;
    }

    .flow-big-title {
        font-size: clamp(3rem, 12vw, 5rem);
        line-height: 0.9;
        margin: 1rem 0;
    }

    .flow-btn {
        position: static !important;
        transform: none !important;
        margin: 0 auto;
        display: inline-block;
        padding: 1.2rem 2.5rem;
        font-size: 0.8rem;
    }

    .flow-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }

    .flow-footer {
        justify-content: center;
        margin-top: 3rem;
        width: 100%;
    }

    /* Contacto */
    .contacto-heading {
        font-size: 3.5rem;
        line-height: 0.9;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 0.8rem;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}
