/**
 * Main CSS — below-the-fold styles loaded asynchronously.
 *
 * Contains: utilities + cards + marquee + carousel + services + clients +
 *           team + cta + footer + scroll-reveal + elementor-compat.
 * Source files are preserved individually for development.
 *
 * @package HUMO
 * @since   1.1.0
 */

/* ==================== TYPOGRAPHY ==================== */
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-regular { font-weight: 400; }
.font-light { font-weight: 300; }

.label-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
}

/* ==================== UTILITY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== SERVICE CARDS ==================== */
.service-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 2.5rem;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

@media (min-width: 768px) {
    .service-card {
        padding: 3rem;
    }
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(139, 104, 255, 0.15),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    border-color: rgba(139, 104, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.service-card-glow {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 10rem;
    height: 10rem;
    background: rgba(139, 104, 255, 0.2);
    filter: blur(50px);
    opacity: 0.5;
    transition: opacity 0.5s;
    pointer-events: none;
    will-change: opacity;
}

.service-card:hover .service-card-glow {
    opacity: 1;
}

.service-icon {
    display: inline-block;
    color: var(--smoke-purple);
    margin-bottom: 2rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-icon .humo-icon {
    width: 3.5rem;
    height: 3.5rem;
}

.service-card:hover .service-icon {
    transform: scale(1.12) rotate(10deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .service-title {
        font-size: 1.75rem;
    }
}

.service-description {
    color: rgba(224, 224, 224, 0.5);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .service-description {
        font-size: 1.125rem;
    }
}

/* Service CTA — button + badge + tooltip */
.service-cta {
    position: relative;
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.service-cta__btn {
    display: inline-block;
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.service-cta__badge {
    background: rgba(139,104,255,0.15);
    color: var(--smoke-purple);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid rgba(139,104,255,0.25);
}

.service-cta__tooltip {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(10,22,40,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139,104,255,0.2);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: rgba(224,224,224,0.7);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10;
}

.service-cta__tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(10,22,40,0.95);
}

.service-cta:hover .service-cta__tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== MARQUEE ==================== */
.marquee-container {
    position: relative;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
}

.marquee-track {
    display: flex;
    gap: 4rem;
    animation: marquee-left 40s linear infinite;
    width: max-content;
}

.marquee-track-reverse {
    animation: marquee-right 40s linear infinite;
    margin-top: 0.5rem;
}

.client-logo {
    flex-shrink: 0;
    width: 10rem;
    height: auto;
    object-fit: contain;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    will-change: opacity;
    /* filter: brightness(0) invert(1); — activar si se suben logos a color */
}

@media (min-width: 768px) {
    .client-logo {
        width: 12rem;
    }
}

.client-logo:hover {
    opacity: 1;
}

/* ==================== TEAM CAROUSEL ==================== */
.team-carousel {
    position: relative;
    width: 100%;
}

.team-carousel__viewport {
    overflow: hidden;
    border-radius: 1rem;
}

.team-carousel__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.team-carousel__slide {
    flex: 0 0 60%;
    padding: 0 0.5rem;
    opacity: 0.4;
    filter: brightness(0.5);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.team-carousel__slide--active {
    opacity: 1;
    filter: brightness(1);
}

.team-carousel__slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 1rem;
    aspect-ratio: 1081 / 1351;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 4%, black 92%, transparent 100%),
                        linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent 0%, black 4%, black 92%, transparent 100%),
                linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-composite: intersect;
}

.team-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.team-carousel__arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.team-carousel__arrow:active {
    transform: translateY(-50%) scale(0.92);
}

.team-carousel__arrow--prev {
    left: 0.75rem;
}

.team-carousel__arrow--next {
    right: 0.75rem;
}

.team-carousel__arrow .humo-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* --- Roster --- */
.team-roster {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.team-member {
    display: grid;
    grid-template-columns: 3px 1fr;
    gap: 0 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s ease;
    cursor: pointer;
}

.team-member:last-child {
    border-bottom: none;
}

.team-member-accent {
    width: 3px;
    height: 70%;
    min-height: 3rem;
    background: var(--ember-lime);
    border-radius: 2px;
    opacity: 0.15;
    transition: opacity 0.4s ease;
}

.team-member-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.team-member-role {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ember-lime);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.team-member-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.4s ease;
}

.team-member-desc {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(224, 224, 224, 0.2);
    line-height: 1.5;
    margin-top: 0.25rem;
    transition: color 0.4s ease;
}

/* Active member (synced with carousel) */
.team-member.active .team-member-accent {
    opacity: 1;
}

.team-member.active .team-member-role {
    opacity: 1;
}

.team-member.active .team-member-name {
    color: white;
}

.team-member.active .team-member-desc {
    color: rgba(224, 224, 224, 0.6);
}

/* Hover still works for non-active */
.team-member:hover .team-member-accent {
    opacity: 0.7;
}

.team-member:hover .team-member-name {
    color: rgba(255, 255, 255, 0.8);
}

.team-member:hover .team-member-desc {
    color: rgba(224, 224, 224, 0.5);
}

/* Mobile carousel adjustments */
@media (max-width: 767px) {
    .team-carousel__slide {
        flex: 0 0 75%;
    }

    .team-carousel__arrow {
        width: 2.5rem;
        height: 2.5rem;
    }

    .team-carousel__arrow .humo-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    .team-carousel__arrow--prev {
        left: 0.5rem;
    }

    .team-carousel__arrow--next {
        right: 0.5rem;
    }
}

/* ==================== SERVICES SECTION ==================== */
.services {
    padding: 6rem 1.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .services {
        padding: 8rem 3rem;
    }
}

.services-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(139, 104, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 6rem;
    }
}

.section-title {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: rgba(224, 224, 224, 0.5);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        gap: 3rem;
    }
}

/* Services section - fit viewport on desktop only (mobile unchanged) */
@media (min-width: 768px) {
    .services {
        padding: 4rem 3rem 8rem 3rem;
    }

    .services .section-header {
        margin-bottom: 2.5rem;
    }

    .services .services-grid {
        gap: 1.5rem;
    }

    .services .service-card {
        padding: 2rem;
    }

    .services .service-icon {
        margin-bottom: 1.25rem;
    }

    .services .service-icon .humo-icon {
        width: 3rem;
        height: 3rem;
    }

    .services .service-title {
        margin-bottom: 0.75rem;
        font-size: 1.5rem;
    }

    .services .service-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .services .service-cta {
        margin-top: 1rem;
    }
}

@media (min-width: 1024px) {
    .services .services-grid {
        gap: 2rem;
    }
}

/* ==================== CLIENTS SECTION ==================== */
.clients {
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .clients {
        padding: 5rem 0;
    }
}

.clients-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.clients-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
}

.clients-subtitle {
    color: rgba(224, 224, 224, 0.4);
    font-size: 0.875rem;
    font-weight: 300;
}

/* ==================== TEAM SECTION ==================== */
.team {
    padding: 6rem 1.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .team {
        padding: 7rem 3rem;
    }
}

.team-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.team-body {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .team-body {
        display: grid;
        grid-template-columns: 3fr 1fr;
        gap: 3rem;
        align-items: center;
    }
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 6rem 1.5rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .cta-section {
        padding: 8rem 3rem;
    }
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(139, 104, 255, 0.03), transparent);
    pointer-events: none;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: rgba(139, 104, 255, 0.08);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse-glow 4s ease-in-out infinite;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cta-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-subtitle {
    color: rgba(224, 224, 224, 0.5);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    font-style: italic;
}

.cta-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2.5rem;
    padding: 3rem 2rem;
    backdrop-filter: blur(20px);
}

@media (min-width: 768px) {
    .cta-box {
        padding: 4rem;
        border-radius: 3rem;
    }
}

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

@media (min-width: 768px) {
    .cta-actions {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

.cta-actions .btn-primary {
    padding: 1.5rem 3rem;
    font-size: 0.75rem;
}

.cta-email-link {
    color: rgba(224, 224, 224, 0.6);
    font-size: 0.875rem;
    font-weight: 300;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.cta-email-link:hover {
    color: var(--ember-lime);
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 4rem 1.5rem;
    position: relative;
    background: var(--primary-blue);
}

@media (min-width: 768px) {
    .footer {
        padding: 6rem 3rem;
    }
}

.footer-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(139, 104, 255, 0.05), transparent);
    pointer-events: none;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

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

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

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

@media (min-width: 768px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo img {
    height: 2rem;
    width: auto;
}

.footer-logo span {
    font-weight: 900;
    font-size: 1.125rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: white;
}

.footer-tagline {
    color: rgba(224, 224, 224, 0.3);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-links {
        gap: 2.5rem;
    }
}

.footer-link {
    color: rgba(224, 224, 224, 0.4);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--ember-lime);
}

.footer-copyright {
    color: rgba(224, 224, 224, 0.4);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-copyright {
        text-align: right;
    }
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 300ms; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== ELEMENTOR COMPATIBILITY ==================== */
/* Reserved for overrides if Elementor conflicts arise. */
