/* =========================================================
   Box Star — Responsividade (mobile-first breakpoints)
   ========================================================= */

/* ---------- ≤1440px ---------- */
@media (max-width: 1440px) {
    .hero-orbit--2 { display: none; }
}

/* ---------- ≤1200px ---------- */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1.15fr repeat(3, 0.8fr); gap: 30px; }
}

/* ---------- ≤1120px ---------- */
@media (max-width: 1120px) {
    :root { --header-height: 74px; }

    .site-header { padding: 6px 0; }
    .site-header.is-scrolled { height: var(--header-height); }
    .header-inner { min-height: 62px; }
    .main-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        position: fixed;
        top: var(--header-height);
        left: 14px;
        right: 14px;
        max-height: calc(100vh - var(--header-height) - 18px);
        margin: 0;
        padding: 14px;
        overflow-y: auto;
        background: rgba(7, 7, 15, 0.98);
        backdrop-filter: blur(24px) saturate(140%);
        -webkit-backdrop-filter: blur(24px) saturate(140%);
        border: 1px solid rgba(139, 46, 255, 0.25);
        border-radius: 0 0 20px 20px;
        box-shadow: 0 24px 65px rgba(0, 0, 0, 0.62);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-12px) scale(0.985);
        transform-origin: top center;
        transition: transform var(--transition-medium), opacity var(--transition-fast), visibility var(--transition-fast);
    }
    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
    .nav-link {
        justify-content: flex-start;
        width: 100%;
        padding: 13px 15px;
        font-size: 0.94rem;
        border-radius: 12px;
    }
    .nav-link::after {
        top: 50%;
        right: 15px;
        bottom: auto;
        left: auto;
        transform: translateY(-50%) scale(0.5);
    }
    .nav-link.is-active::after,
    .nav-dropdown.is-current > .nav-link::after,
    .nav-dropdown.has-active-child > .nav-link::after { transform: translateY(-50%) scale(1); }

    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { justify-content: space-between; }
    .nav-dropdown-toggle::after { display: none; }
    .nav-dropdown-menu {
        position: static;
        width: 100%;
        max-height: 0;
        margin: 0;
        padding: 0 8px;
        overflow: hidden;
        background: rgba(139, 46, 255, 0.04);
        border: 0;
        border-radius: 14px;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none;
        transition: max-height var(--transition-medium), opacity var(--transition-fast), visibility var(--transition-fast), padding var(--transition-fast), margin var(--transition-fast);
    }
    .nav-dropdown.is-open .nav-dropdown-menu {
        max-height: 330px;
        margin: 3px 0 7px;
        padding: 8px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-dropdown.is-open .nav-dropdown-toggle i { transform: rotate(180deg); }
    .nav-dropdown-label { display: none; }
    .nav-dropdown-link { min-height: 56px; }

    .nav-mobile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
        margin-top: 7px;
        padding-top: 13px;
        border-top: 1px solid var(--border-soft);
    }
    .nav-mobile-actions .btn { width: 100%; padding: 12px 14px; font-size: 0.78rem; }
    .nav-toggle { display: flex; }

    .about-grid, .split-section, .split-section.reverse { grid-template-columns: 1fr; }
    .split-section .split-visual, .split-section.reverse .split-visual { order: -1; }
    .market-insights-layout { grid-template-columns: 1fr; }

    .counters { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .process-timeline { grid-template-columns: repeat(2, 1fr); }
    .process-timeline::before { display: none; }

    .compare-grid { grid-template-columns: 1fr; }
    .compare-divider { width: 100%; height: 1px; margin: 24px 0; background: linear-gradient(90deg, transparent, var(--purple), transparent); }

    .footer-top { grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { grid-template-columns: 1fr 1fr; }
    .footer-legal { justify-content: flex-end; }
    .footer-signature { grid-column: 1 / -1; justify-content: flex-start; padding-right: 0; text-align: left; }

    .floating-card--3 { display: none; }
}

/* ---------- ≤768px (tablet) ---------- */
@media (max-width: 768px) {
    .section { padding: 84px 0; }
    .section-subtitle { margin-bottom: 32px; }

    .tech-marquee { min-height: 92px; padding: 22px 0; }
    .tech-marquee__item { padding: 0 28px; font-size: 0.86rem; }
    .tech-marquee--images,
    .tech-marquee--mixed { min-height: 205px; padding: 16px 0; }
    .tech-marquee__media { width: min(76vw, 350px); height: auto; aspect-ratio: 16 / 9; margin: 0 8px; padding: 6px; border-radius: 16px; }
    .tech-marquee__media img { border-radius: 10px; }

    .header-actions .btn-primary { display: none; }
    .header-contact-quick { display: none; }

    .main-nav { left: 8px; right: 8px; padding: 12px; }
    .nav-mobile-actions { grid-template-columns: 1fr; }

    .hero { min-height: auto; padding: calc(var(--header-height) + 40px) 20px 60px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .hero-indicators { flex-direction: column; align-items: flex-start; gap: 14px; margin: 0 auto; width: fit-content; }

    .about-visual { margin-top: 40px; }
    .floating-card { position: relative; inset: auto !important; margin-top: 12px; animation: none; }
    .floating-card--1, .floating-card--2 { top: auto; left: auto; right: auto; bottom: auto; }

    .counters { grid-template-columns: 1fr 1fr; gap: 14px; }
    .counter-card { padding: 28px 14px; }

    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }

    .process-timeline { grid-template-columns: 1fr; gap: 24px; }

    .compare-col { padding: 28px 22px; }

    .market-data-chart, .executive-brief { padding: 22px; }
    .market-data-chart__head { flex-direction: column; gap: 12px; }
    .market-data-row__meta { gap: 12px; }
    .market-data-row__meta b { font-size: 1.15rem; }

    .impact-cta { padding: 70px 22px; }

    .footer-top { grid-template-columns: 1fr; gap: 30px; }
    .footer-signal__shard--b,
    .footer-signal__shard--d,
    .footer-signal__shard--f,
    .footer-signal__shard--h,
    .footer-signal__shard--j { display: none; }
    .footer-col h5 { margin-top: 0; margin-bottom: 16px; }
    .footer-contact > p { max-width: 420px; }
    .footer-bottom { grid-template-columns: 1fr; align-items: flex-start; gap: 12px; }
    .footer-legal { justify-content: flex-start; flex-wrap: wrap; gap: 10px 20px; }
    .footer-signature { grid-column: auto; }

    .form-grid { grid-template-columns: 1fr; }
    .radio-cards { grid-template-columns: 1fr; }

    .back-to-top { right: 20px; bottom: 90px; }
    .whatsapp-float { right: 20px; bottom: 20px; width: 52px; height: 52px; font-size: 22px; }
}

/* ---------- ≤425px (celular) ---------- */
@media (max-width: 425px) {
    .container { padding: 0 18px; }
    .brand span { display: none; }
    .footer-brand .brand span { display: inline; }
    .hero-badge { font-size: 0.72rem; padding: 6px 14px 6px 6px; }
    .hero-title { font-size: clamp(1.9rem, 9vw, 2.6rem); }
    .hero-text { font-size: 0.92rem; }
    .counters { grid-template-columns: 1fr; }
    .section-title { font-size: 1.7rem; }
    .impact-cta h2 { font-size: 1.9rem; }
    .contact-link__btn { width: 100%; justify-content: center; margin-top: 4px; }
    .site-footer, .home-page .site-footer { padding-top: 72px; }
    .footer-availability { align-items: flex-start; border-radius: 14px; }
}

/* ---------- ≤375px ---------- */
@media (max-width: 375px) {
    .hero-logo img, .hero-logo svg { height: 58px; }
    .btn { padding: 14px 22px; font-size: 0.88rem; }
}

/* ---------- Cursor customizado só em dispositivos com mouse fino ---------- */
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
}

/* =========================================================
   Aurora Command Center — comportamento responsivo da home
   ========================================================= */
@media (max-width: 1120px) {
    .home-page { --header-height: 92px; }
    .home-page .site-header { padding: 10px 0; }
    .home-page .header-inner { min-height: 68px; }
    .home-page .main-nav {
        top: calc(var(--header-height) - 4px);
        border-radius: 20px;
    }
    .home-page .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 54px) 0 82px;
    }
    .home-page .hero + .tech-marquee { margin-top: 0; }
    .home-page .hero-layout {
        grid-template-columns: 1fr;
        gap: 54px;
    }
    .home-page .hero-content { max-width: 760px; }
    .home-page .hero-title { max-width: 760px; }
    .home-page .hero-command { width: min(100%, 740px); margin: 0 auto; }
    .home-page .hero-media-carousel { width: min(100%, 740px); height: clamp(420px, 68vw, 560px); margin: 0 auto; }
    .home-page .hero-glow { left: 50%; }
    .home-page .hero > .hero-orbit--1,
    .home-page .hero > .hero-orbit--2 { left: 50%; }
    .home-page #marketing .split-section { grid-template-columns: 1fr; }
    .home-page #marketing .split-text { padding: 24px; }
    .content-carousel__slide,
    .content-carousel--services .content-carousel__slide { flex-basis: calc((100% - 22px) / 2); }
    .content-carousel--compact .content-carousel__slide { flex-basis: 76%; }
}

@media (max-width: 768px) {
    .home-page { --header-height: 84px; }
    .home-page .site-header,
    .home-page .site-header.is-scrolled { height: var(--header-height); padding: 8px 0; }
    .home-page .header-inner,
    .home-page .site-header.is-scrolled .header-inner {
        min-height: 66px;
        padding: 8px 9px 8px 12px;
        border-radius: 18px;
    }
    .home-page .main-nav { top: calc(var(--header-height) - 2px); }
    .home-page .hero { padding: calc(var(--header-height) + 42px) 0 68px; }
    .home-page .hero-layout { gap: 40px; }
    .home-page .hero-title { font-size: clamp(2.5rem, 11vw, 4rem); }
    .home-page .hero-rotator-line { min-height: 3.8em; font-size: 1rem; }
    .home-page .hero-actions { flex-direction: row; }
    .home-page .hero-actions .btn { width: auto; flex: 1 1 220px; }
    .home-page .hero-indicators {
        grid-template-columns: 1fr 1fr;
        width: 100%;
        margin: 0;
        gap: 8px;
    }
    .home-page .hero-command { padding: 11px; border-radius: 24px; }
    .home-page .hero-media-carousel { height: min(118vw, 560px); border-radius: 24px; }
    .home-page .hero-media-carousel__caption { left: 20px; right: 20px; bottom: 30px; }
    .home-page .hero-command__stage { height: 280px; }
    .home-page .hero-command__top { padding-right: 2px; padding-left: 2px; }
    .home-page .hero-command__orbit--1 { width: 204px; height: 204px; }
    .home-page .hero-command__orbit--2 { width: 148px; height: 148px; }
    .home-page .hero > .hero-orbit { opacity: .48; }
    .home-page .section { padding: 84px 0; }
    .home-page .section--tight { padding: 52px 0; }
    .home-page .section::before { top: 25px; right: 18px; font-size: 4.4rem; }
    .home-page .about-grid { padding: 24px; border-radius: 26px; }
    .home-page .counters { gap: 0; }
    .home-page .counter-card:nth-child(2) { border-right: 0; }
    .home-page .counter-card:nth-child(-n+2) { border-bottom: 1px solid rgba(176, 38, 255, .12); }
    .home-page .service-card { min-height: 0; }
    .home-page #marketing .split-section { padding: 14px; border-radius: 26px; }
    .home-page #marketing .split-text { padding: 16px 8px 22px; }
    .home-page .flow-chart { flex-direction: column; align-items: center; }
    .home-page .flow-node { width: 100%; min-height: 78px; }
    .home-page .flow-connector {
        width: 1px;
        height: 30px;
        flex: 0 0 30px;
        background: linear-gradient(180deg, rgba(139, 46, 255, .35), #b026ff);
    }
    .home-page .flow-connector::after {
        right: auto;
        bottom: -5px;
        left: 50%;
        top: auto;
        transform: translateX(-50%);
        border-left-color: transparent;
        border-top-color: #b026ff;
    }
    .home-page .impact-cta { padding: 72px 22px; border-radius: 26px; }
    .section-head--carousel { grid-template-columns: 1fr; gap: 22px; margin-bottom: 28px; }
    .carousel-controls { width: fit-content; }
    .content-carousel__slide,
    .content-carousel--compact .content-carousel__slide,
    .content-carousel--services .content-carousel__slide { flex-basis: 86%; }
    .testimonial-card { min-height: 280px; padding: 24px; }
}

@media (max-width: 560px) {
    .tech-marquee--images,
    .tech-marquee--mixed { min-height: 218px; padding: 16px 0; }
    .tech-marquee__media { width: 84vw; max-width: 340px; aspect-ratio: 16 / 10; margin: 0 7px; }
    .home-page .hero-badge { max-width: 100%; letter-spacing: .075em; }
    .home-page .hero-title { font-size: clamp(2.35rem, 12vw, 3.35rem); }
    .home-page .hero-actions { flex-direction: column; }
    .home-page .hero-actions .btn { flex: none; width: 100%; }
    .home-page .hero-indicators { grid-template-columns: 1fr; }
    .home-page .hero-indicators li { width: 100%; }
    .home-page .hero-command__product > span:last-child { display: none; }
    .home-page .hero-command__status { font-size: .52rem; }
    .home-page .hero-command__stage { height: 255px; }
    .home-page .hero-command__node { min-width: 0; padding: 7px; }
    .home-page .hero-command__node > i { width: 28px; height: 28px; flex-basis: 28px; }
    .home-page .hero-command__node div { display: none; }
    .home-page .hero-command__node--site { left: 12px; top: 20px; }
    .home-page .hero-command__node--marketing { right: 12px; top: 47px; }
    .home-page .hero-command__node--data { right: 18px; bottom: 20px; }
    .home-page .hero-command__metrics { grid-template-columns: 1fr; }
    .home-page .hero-command__metrics > div { grid-template-columns: 1fr auto; align-items: center; }
    .home-page .hero-command__chart { grid-template-columns: .9fr 1.1fr; height: 76px; }
    .home-page .hero-command__bars { height: 46px; }
    .home-page .about-grid { padding: 20px; }
    .home-page .counters { padding: 8px; }
    .home-page .counter-card { border-right: 0; border-bottom: 1px solid rgba(176, 38, 255, .12); }
    .home-page .counter-card:last-child { border-bottom: 0; }
    .content-carousel__track { gap: 14px; }
    .content-carousel__slide,
    .content-carousel--compact .content-carousel__slide,
    .content-carousel--services .content-carousel__slide { flex-basis: 91%; }
    .carousel-status { min-width: 62px; }
}

@media (max-width: 375px) {
    .home-page .hero-command__chart { grid-template-columns: 1fr; height: auto; }
    .home-page .hero-command__chart > div:first-child { display: none; }
    .home-page .hero-command__metrics strong { font-size: .54rem; }
}
