:root {
    --primary: #F5B800;
    --secondary: #0a0a0a;
    --accent: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--accent);
    background-color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, 
.stat-number, 
.philosophy-text, 
.headline-primary, 
.headline-secondary, 
.headline-services, 
.headline-cta {
    font-family: var(--font-heading), sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.15;
}

/* Navbar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
}

.brand-logo {
    height: 95px;
    filter: brightness(0) invert(1);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--secondary);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    padding: 1.2rem 3rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    background-color: var(--secondary);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
    animation: slowZoom 25s infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.headline-primary {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.subheadline {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
}

/* Problem Strip */
.problem-strip {
    background-color: transparent;
    padding: 2rem 0 6rem;
    margin-top: -6rem; /* pull up under the hero clip-path */
    z-index: 10;
    position: relative;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.problem-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.problem-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(245, 184, 0, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.yellow-arrow {
    color: var(--primary);
    font-size: 2.2rem;
    line-height: 0.8;
    font-family: var(--font-heading);
}

.logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    max-width: 800px;
    opacity: 0.03;
    pointer-events: none;
    filter: brightness(0) invert(1);
    z-index: 0;
}

.content-container {
    position: relative;
    z-index: 2;
}

/* Context Section */
.context-section {
    background: radial-gradient(circle at center, #141414 0%, var(--secondary) 80%);
    padding: 6rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.context-section::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 10%; 
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 184, 0, 0.3) 50%, transparent 100%);
    z-index: 3;
}

.context-headline {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--accent);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-wrap: balance; /* Evita que queden palabras sueltas */
}

.text-primary {
    color: var(--primary);
    white-space: nowrap; /* Mantiene la palabra junta si es posible */
}

.context-desc {
    max-width: 800px;
    margin: 2.5rem auto 0;
    font-size: 1.25rem;
    color: #b0b0b0;
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.8;
}

/* Stats Bar */
.stats-bar {
    background-color: var(--primary);
    color: var(--secondary);
    padding: 5rem 0;
    clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%);
    position: relative;
    z-index: 2;
    margin-top: -3vw;
    margin-bottom: -3vw;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

@media (min-width: 768px) {
    .stat-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: -1rem;
        top: 15%;
        height: 70%;
        width: 2px;
        background-color: rgba(10, 10, 10, 0.1);
    }
}

.stat-number {
    font-size: clamp(4rem, 6vw, 6rem);
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 200px;
    margin: 0 auto;
    text-wrap: balance;
}

.stat-sub {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(10,10,10,1);
    letter-spacing: 0.06em;
    margin-top: 0.6rem;
    max-width: 240px;
    text-align: center;
    line-height: 1.6;
    text-transform: uppercase;
}

/* Solution Section */
.solution-section {
    background-color: var(--accent);
    color: var(--secondary);
    display: flex;
    flex-wrap: wrap;
    min-height: 80vh;
}

.solution-content {
    flex: 1 1 500px;
    padding: 8rem 4rem;
    display: flex;
    align-items: center;
}

.headline-secondary {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-wrap: balance;
}

.solution-image {
    flex: 1 1 500px;
    position: relative;
    min-height: 400px;
    overflow: hidden;
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Degradado blanco que funde la imagen con el fondo del texto */
.solution-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, #ffffff, transparent);
    z-index: 3;
    pointer-events: none;
}

.solution-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.1);
    transition: opacity 1.5s ease-in-out;
    animation: slowZoom 30s infinite alternate-reverse;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.yellow-diagonal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.3;
    clip-path: none;
    mix-blend-mode: multiply;
}

/* Services */
.services-section {
    background-color: var(--secondary);
    padding: 10rem 0;
    position: relative;
}

/* Layout interactivo */
.services-interactive {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Lista de pestañas (izquierda) */
.services-tabs {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
}

.service-tab {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.8rem 1.5rem;
    cursor: pointer;
    border-left: 3px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.service-tab:first-child {
    border-top: 1px solid rgba(255,255,255,0.05);
}

.service-tab:hover {
    background: rgba(245,184,0,0.04);
    border-left-color: rgba(245,184,0,0.3);
}

.service-tab.active {
    background: rgba(245,184,0,0.06);
    border-left-color: var(--primary);
}

.tab-num {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.1em;
    min-width: 28px;
    transition: color 0.3s ease;
}

.service-tab.active .tab-num,
.service-tab:hover .tab-num {
    color: var(--primary);
}

.tab-info {
    flex: 1;
}

.tab-title {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.service-tab.active .tab-title,
.service-tab:hover .tab-title {
    color: var(--accent);
}

.tab-short {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.3);
    font-weight: 300;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.service-tab.active .tab-short {
    color: rgba(255,255,255,0.5);
}

.tab-chevron {
    color: rgba(255,255,255,0.15);
    font-size: 1.8rem;
    line-height: 1;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    flex-shrink: 0;
    align-self: center;
}

.tab-num {
    align-self: flex-start;
    padding-top: 2px;
}

.service-tab.active .tab-chevron,
.service-tab:hover .tab-chevron {
    color: var(--primary);
    transform: translateX(4px);
}

/* Panel de detalle (derecha) */
.service-detail-panel {
    flex: 1;
    position: sticky;
    top: 3rem;
    background: linear-gradient(160deg, rgba(28,28,28,0.7) 0%, rgba(10,10,10,0.97) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 3px solid var(--primary);
    border-radius: 20px;
    padding: 4rem 3.5rem;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(245,184,0,0.06);
}

.detail-bg-num {
    position: absolute;
    bottom: -30px;
    right: 10px;
    font-family: var(--font-heading);
    font-size: 18rem;
    line-height: 1;
    color: rgba(245,184,0,0.045);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
    transition: opacity 0.2s ease;
}

.detail-inner {
    position: relative;
    z-index: 2;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.service-detail-panel.fading .detail-inner {
    opacity: 0;
    transform: translateX(14px);
}

.detail-title {
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.detail-divider {
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    margin-bottom: 2rem;
    border-radius: 2px;
}

.detail-desc {
    color: #c0c0c0;
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.85;
    margin-bottom: 3rem;
}

.services-note {
    width: 100%;
    text-align: center;
    margin-top: 4.5rem;
    color: #888;
    font-size: 1rem;
    font-weight: 300;
}

.services-note p {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.03em;
}

/* Philosophy Strip */
.philosophy-strip {
    background-color: var(--primary);
    color: var(--secondary);
    padding: 8rem 2rem;
    text-align: center;
}

.philosophy-text {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 1100px;
    margin: 0 auto;
}

/* CTA Final */
.cta-final {
    background-color: var(--secondary);
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
    margin-top: -6rem;
    display: flex;
    flex-wrap: wrap;
    min-height: 65vh;
    overflow: hidden;
}

.cta-text-side {
    flex: 1 1 500px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12rem 5rem 8rem;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.cta-image-side {
    flex: 0 0 42%;
    position: relative;
    overflow: hidden;
}

.cta-team-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) contrast(1.1);
}

.cta-image-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(to right, var(--secondary), transparent);
    z-index: 2;
}

.cta-image-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0.3;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.headline-cta {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 700px;
    line-height: 1.1;
    color: var(--accent);
}

/* Footer */
.site-footer {
    background-color: #000;
    padding: 5rem 2rem 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 70px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.tagline {
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.9rem;
}

.photo-credits {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.08em;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

/* Modal Overlay */
.modal-overlay {
    display: none; /* Se activa con JS (display: flex) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(170deg, #1f1f1f 0%, #0a0a0a 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 4rem 3rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 40px rgba(245, 184, 0, 0.1);
    border-top: 4px solid var(--primary);
    overflow: hidden;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-watermark {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 250px;
    opacity: 0.04;
    filter: brightness(0) invert(1);
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: 0;
}

.modal-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    z-index: 2;
}

.modal-desc {
    color: #e0e0e0;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.btn-modal {
    font-size: 1rem;
    padding: 1rem 2.5rem;
    position: relative;
    z-index: 2;
    cursor: pointer;
}



/* =====================
   RESPONSIVE — MOBILE
   ===================== */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 1.2rem 1.5rem;
    }

    .brand-logo {
        height: 60px;
    }

    /* Hero */
    .hero {
        clip-path: polygon(0 0, 100% 0, 100% 97%, 0 100%);
        min-height: 100svh;
        padding: 0 1.5rem;
        align-items: flex-end;
        padding-bottom: 10vh;
    }

    .headline-primary {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        margin-bottom: 1rem;
    }

    .subheadline {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Botones full-width en mobile */
    .btn-primary {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Problem strip */
    .problem-strip {
        margin-top: -2rem;
        padding: 1rem 0 3rem;
    }

    .problem-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .problem-item {
        padding: 1rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .yellow-arrow {
        font-size: 1.6rem;
    }

    /* Context */
    .context-section {
        padding: 4rem 0 5rem;
    }

    .context-desc {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    /* Stats */
    .stats-bar {
        clip-path: none;
        padding: 4rem 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1rem;
    }

    .stat-item::after {
        display: none !important;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Solution */
    .solution-section {
        flex-direction: column;
    }

    .solution-content {
        flex: 1 1 100%;
        padding: 4rem 1.5rem;
        order: 2;
    }

    .solution-image {
        flex: 1 1 100%;
        min-height: 260px;
        order: 1;
        overflow: hidden;
        clip-path: none;
    }

    .solution-image::before {
        display: none;
    }

    .headline-secondary {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    .yellow-diagonal-overlay {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 0.6;
    }

    /* Desactivar animación zoom en mobile — evita desbordamiento */
    .hero-bg,
    .solution-bg {
        animation: none;
        transform: none;
    }

    /* Quitar clip-path del hero en mobile para evitar corrimiento */
    .hero {
        clip-path: none;
        height: 100svh;
        min-height: unset;
    }

    /* Resetear márgenes negativos del stats bar */
    .stats-bar {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Quitar clip-path del context que puede causar solapamiento */
    .context-section::before {
        display: none;
    }

    /* Services */
    .services-section {
        padding: 5rem 0;
    }

    .services-interactive {
        flex-direction: column;
        gap: 0;
    }

    .services-tabs {
        flex: none;
        width: 100%;
    }

    .service-tab {
        padding: 1.2rem 1rem;
        gap: 0.9rem;
    }

    .tab-short {
        display: none;
    }

    .tab-title {
        font-size: 0.95rem;
    }

    .service-detail-panel {
        position: static;
        width: 100%;
        padding: 2.5rem 1.5rem;
        min-height: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
        scroll-margin-top: 1rem;
    }

    .detail-bg-num {
        font-size: 7rem;
    }

    .detail-title {
        font-size: 1.7rem;
    }

    .detail-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    #detail-cta {
        display: block;
        width: 100%;
        text-align: center;
    }

    .services-note {
        margin-top: 3rem;
    }

    .services-note p {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
        border-radius: 30px;
    }

    /* Philosophy */
    .philosophy-strip {
        padding: 5rem 1.5rem;
    }

    /* CTA final */
    .cta-final {
        clip-path: none;
        margin-top: 0;
        flex-direction: column;
        min-height: auto;
    }

    .cta-text-side {
        flex: none;
        width: 100%;
        padding: 5rem 1.5rem 3rem;
        align-items: center;
        text-align: center;
    }

    .cta-image-side {
        flex: none;
        width: 100%;
        min-height: 300px;
        order: -1;
    }

    .cta-image-fade {
        width: 100%;
        background: linear-gradient(to bottom, transparent 50%, var(--secondary));
    }

    .headline-cta {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    /* Footer */
    .site-footer {
        padding: 4rem 1.5rem 1.5rem;
    }

    .tagline {
        font-size: 0.75rem;
        text-align: center;
    }
}
