/* =========================================
   VARIABLES
   ========================================= */
   :root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #e2d1b9;
    --font-main: 'Montserrat', sans-serif;
    --nav-bg: rgba(5, 5, 5, 0.85);
    --nav-height: 80px;
    --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   NAVBAR — logo centro, links izquierda,
   botón Contact derecha
   ========================================= */
.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    padding: 0 5%;
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    /* sin degradado inferior */
}

/* Links izquierda */
.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    opacity: 0.7;
    transition: opacity 0.3s;
    position: relative;
    padding-bottom: 8px;
    display: inline-block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.4s var(--ease-smooth);
}

.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { width: 100%; }

/* Items solo para mobile */
.mobile-only { display: none; }

/* Logo centro */
.nav-logo {
    display: flex;
    align-items: center;
    justify-self: center;
    text-decoration: none;
}

.nav-logo img {
    height: 35px;
    width: auto;
}

.nav-logo:hover { opacity: 0.7; }

/* Derecha: botón + hamburguesa */
.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

/* Botón Contact — inverso a "Explore Work":
   fondo sólido → transparente en hover */
.btn-nav-contact {
    display: inline-block;
    padding: 9px 22px;
    background: var(--accent-color);
    color: var(--bg-color);
    border: 1px solid var(--accent-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    font-family: var(--font-main);
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
}

.btn-nav-contact:hover {
    background: transparent;
    color: var(--accent-color);
}

/* Hamburguesa — oculta en desktop */
.menu-toggle { display: none; }

/* =========================================
   HERO — video full-width, texto editorial
   ========================================= */
   .hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--nav-height) 5% 0;
}

/* Video de fondo único */
.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay oscuro */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: -1;
}

/* Contenido */
.hero-content {
    text-align: left;
    z-index: 1;
}

.hero-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: 0.7rem;
    color: var(--accent-color);
    margin-bottom: 28px;
    opacity: 0.8;
}

.hero-content h1 {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 64px; /* más espacio entre slogan y botón */
}

.hero-content h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent-color);
}

/* =========================================
   SECCIONES — scroll fix
   ========================================= */
.core-services,
.expertise-section,
.footer {
    padding: 0 5%;
    scroll-margin-top: var(--nav-height);
}

.section-title {
    text-align: left;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 10px;
    color: var(--accent-color);
}

/* =========================================
   CORE SERVICES — sin números
   ========================================= */
.core-services {
    padding-top: 100px;
    padding-bottom: 100px;
}

.core-services .section-title {
    height: 12vh;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.core-grid {
    display: flex;
    gap: 20px;
}

.core-card {
    flex: 1;
    padding: 40px;
    background: #0e0e0e;
    border: 1px solid rgba(255, 255, 255, 0.066);
}

.core-card h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    letter-spacing: 1px;
}

.core-card p {
    opacity: 0.6;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =========================================
   EXPERTISE
   ========================================= */
.expertise-section {
    min-height: 200vh;
    padding-bottom: 15vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.title-wrapper {
    height: 20vh;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.expertise-bento-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.expertise-group {
    display: grid;
    grid-template-columns: 3.5fr 3fr 2fr;
    gap: 20px;
}

/* Estado inicial de animación */
/* DESPUÉS */
.expertise-bento-grid .bento-box {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1a1a1a;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Dirección según scroll */
.expertise-bento-grid .bento-box.from-bottom { transform: translateY(30px); }
.expertise-bento-grid .bento-box.from-top    { transform: translateY(-30px); }

.expertise-bento-grid .bento-box.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card overlay y contenido */
.card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background-color 0.5s var(--ease-smooth);
}

.card-content {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 2;
}

.card-content span {
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 4px;
    font-weight: 600;
    opacity: 0.9;
}

/* Hover en expertise */
.expertise-bento-grid .bento-box:hover .card-overlay {
    background-color: rgba(0, 0, 0, 0.2);
}

.expertise-bento-grid .bento-box:hover .card-content span {
    opacity: 1;
    color: var(--accent-color);
}

/* Video en expertise — aparece en hover */
.expertise-bento-grid .box-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* cubre exactamente el bento box */
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.expertise-bento-grid .bento-box:hover .box-video {
    opacity: 1;
}

/* ══ PATRÓN A — impares (1°, 3°…) ══
   eg-1: pequeño arriba-izquierda
   eg-2: completo abajo-izquierda
   eg-3: grande derecha (ambas filas)       */
.expertise-group:nth-child(odd) {
    grid-template-rows: 30vh 30vh;
}

.expertise-group:nth-child(odd) .eg-1 {
    grid-column: 1 / 2; grid-row: 1 / 2;
    width: 75%; justify-self: start;
    transition-delay: 0.1s;
}

.expertise-group:nth-child(odd) .eg-2 {
    grid-column: 1 / 2; grid-row: 2 / 3;
    width: 100%;
    transition-delay: 0.3s;
}

.expertise-group:nth-child(odd) .eg-3 {
    grid-column: 2 / 4; grid-row: 1 / 3;
    transition-delay: 0.2s;
}

/* ══ PATRÓN B — pares (2°, 4°…) — espejo de A ══
   eg-1: grande izquierda (ambas filas)
   eg-2: pequeño arriba-derecha
   eg-3: completo abajo-derecha              */
.expertise-group:nth-child(even) {
    grid-template-rows: 30vh 30vh;
}

.expertise-group:nth-child(even) .eg-1 {
    grid-column: 1 / 3; grid-row: 1 / 3;
    grid-row: 1 / 3;
    width: 75%;
    justify-self: start;
    transition-delay: 0.2s;
}

.expertise-group:nth-child(even) .eg-2 {
    grid-column: 2 / 4; grid-row: 1 / 2;
    width: 55%; justify-self: end;
    transition-delay: 0.1s;
}

.expertise-group:nth-child(even) .eg-3 {
    grid-column: 2 / 4; grid-row: 2 / 3;
    width: 71%;
    justify-self: end;
    transition-delay: 0.3s;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-family: var(--font-main);
    background: transparent;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* =========================================
   FOOTER / CONTACT
   ========================================= */
.footer {
    padding-top: 120px;
    padding-bottom: 60px;
    background-color: #080808;
}

.footer-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
    margin-bottom: 80px;
}

.footer h3 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    max-width: 500px;
    margin-bottom: 0;
    line-height: 1;
    letter-spacing: -1px;
}

/* Formulario más destacado */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group { position: relative; width: 100%; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.4s var(--ease-smooth);
}

.contact-form textarea { resize: none; }

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom: 1px solid var(--accent-color);
}

.contact-form ::placeholder {
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
}

.contact-form .btn-primary {
    align-self: flex-start;
    margin-top: 10px;
}

.input-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent !important;
}

/* Links de contacto */
.contact-links {
    height: 20vh;
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.contact-links a:hover { opacity: 1; }

.contact-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.copyright {
    font-size: 0.7rem;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   ANIMACIONES GLOBALES
   ========================================= */
.section-title {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-title.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.core-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.core-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.core-grid .core-card:nth-child(1) { transition-delay: 0.1s; }
.core-grid .core-card:nth-child(2) { transition-delay: 0.3s; }
.core-grid .core-card:nth-child(3) { transition-delay: 0.5s; }

/* =========================================
   ABOUT PAGE
   ========================================= */

/* Hero — disposición de 2 columnas como footer/contact */
.about-hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 5% 10vh;
}

.about-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: end;
    width: 100%;
    padding-top: var(--nav-height);
}

.eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: 0.7rem;
    color: var(--accent-color);
    margin-bottom: 30px;
    opacity: 0.8;
}

.about-hero-left h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -2px;
}

.about-hero-left h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent-color);
}

.about-hero-right {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 8px;
}

.about-hero-right .btn-primary {
    align-self: flex-start;
}

.about-hero-right p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* Métricas — inmediatamente debajo del hero */
.about-metrics {
    padding: 60px 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.stat-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -2px;
    line-height: 1;
    display: block;
    margin-bottom: 12px;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.65rem;
    opacity: 0.5;
}

/* Fotos en acción */
.about-action {
    padding: 0 5% 0;
}

.action-photo-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 35vh 35vh;
    gap: 15px;
}

.action-photo {
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
}

.action-photo.ap-large {
    grid-row: 1 / 3;
}

/* Body */
.about-body {
    padding: 10vh 5%;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    margin-bottom: 120px;
    align-items: start;
}

.about-grid-label {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.7rem;
    color: var(--accent-color);
    opacity: 0.7;
    padding-top: 8px;
}

.about-grid-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
}

.about-grid-text p:last-child { margin-bottom: 0; }

.about-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 120px;
}

.about-back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.3s;
    margin-bottom: 80px;
}

.about-back:hover { opacity: 1; }
.about-back::before { content: '←'; font-size: 1rem; }

/* =========================================
   RESPONSIVE — MÓVIL (≤ 768px)
   ========================================= */
@media (max-width: 768px) {

    .core-card {
        padding: 20px;
    }

    .core-services {
        padding-top: 50px;
    }

    /* Navbar: logo centrado, hamburguesa visible */
    .navbar {
        display: flex;              /* ← cambiar de grid a flex */
        justify-content: center;
        align-items: center;        /* ← centra verticalmente */
        height: 70px;
        position: fixed;
        width: 100%;
        padding: 0 5%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s var(--ease-smooth);
        z-index: 1000;
    }

    .nav-links.active { right: 0; }

    /* Mostrar link Contact en menú mobile */
    .mobile-only { display: block; }

    /* Ocultar botón Contact en mobile */
    .btn-nav-contact { display: none; }

    /* Hamburguesa */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        position: fixed;
        top: 24px;
        right: 5%;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle .bar {
        height: 2px;
        width: 100%;
        background-color: var(--text-color);
        transition: all 0.3s ease;
    }

    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

    /* Hero — video único se adapta solo */
    .hero {
        padding-bottom: 12vh;
    }

    /* Services */
    .core-grid { flex-direction: column; }

    /* Expertise */
    .expertise-group {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 12px;
    }

    .expertise-group .bento-box {
        grid-column: 1 / 2 !important;
        grid-row: auto !important;
        height: 300px;
        width: 100% !important;
        justify-self: stretch !important;
    }

    /* Footer full height en mobile */
    .footer {
        min-height: 100svh !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: flex !important;
        flex-direction: column;
    }

    .footer .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-top: 60px;
        padding-bottom: 40px;
        width: 100%;
    }

    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 0;
    }

    /* Formulario: quitar border-left en mobile */
    .contact-form {
        border-left: none;
        padding-left: 0;
    }

    /* Contact links — solo iconos, centrados, 75% ancho */
    .contact-links {
        width: 75%;
        margin: 0 auto;
        justify-content: space-between;
        gap: 0;
        margin-bottom: 0;
    }

    .contact-links .link-label { display: none; }

    .contact-icon {
        width: 22px;
        height: 22px;
    }

    /* About responsive */
    .about-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-metrics { padding: 40px 5%; }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .action-photo-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 30vh);
    }

    .action-photo.ap-large { grid-row: auto; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 60px;
    }

    .about-divider { margin-bottom: 60px; }
}

/* Tablet 768–900px */
@media (max-width: 900px) and (min-width: 769px) {
    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer h3 { font-size: 2.5rem; }
}