/* =========================================================
   TECHNOSERP — RESPONSIVE
   ========================================================= */


/* =========================================================
   TABLET — ATÉ 1024px
   ========================================================= */

@media (max-width: 1024px) {

    .container {
        width: min(100% - 40px, 1180px);
    }


    /* HEADER */

    .main-nav,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }


    /* HERO */

    .hero {
        padding: 90px 0 70px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero-text {
        max-width: 760px;
    }

    .hero-visual {
        max-width: 600px;
        width: 100%;
        margin: 0 auto;
    }


    /* SERVICES */

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* GENERIC GRIDS */

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }


    /* HIGHLIGHT */

    .highlight-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    /* FOOTER */

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

}


/* =========================================================
   MOBILE — ATÉ 768px
   ========================================================= */

@media (max-width: 768px) {

    .container {
        width: min(100% - 32px, 1180px);
    }


    /* HEADER */

    .site-header {
        height: 72px;
    }

    .brand-text strong {
        font-size: 14px;
    }

    .brand-text span {
        font-size: 10px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }


    /* HERO */

    .hero {
        padding: 65px 0 55px;
    }

    .hero-content {
        gap: 40px;
    }

    .hero-label {
        font-size: 11px;
    }

    .hero h1 {
        font-size: clamp(38px, 10vw, 58px);
        line-height: 1.05;
        letter-spacing: -1.8px;
    }

    .hero-description {
        font-size: 15px;
        line-height: 1.7;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-info-item {
        width: 100%;
    }


    /* HERO VISUAL */

    .hero-visual-card {
        padding: 24px;
    }

    .hero-visual-top {
        gap: 10px;
    }

    .hero-chip {
        width: 64px;
        height: 64px;
    }

    .hero-chip i {
        font-size: 24px;
    }


    /* SECTIONS */

    .section {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-title {
        font-size: 30px;
        line-height: 1.15;
    }

    .section-description {
        font-size: 14px;
    }


    /* SERVICES */

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

    .service-card {
        padding: 24px;
    }


    /* GENERIC GRIDS */

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }


    /* PAGE HEADER */

    .page-header {
        padding: 55px 0 45px;
    }

    .page-header h1 {
        font-size: 36px;
    }

    .page-header-description {
        font-size: 14px;
    }


    /* HIGHLIGHT */

    .highlight {
        padding: 60px 0;
    }

    .highlight-content {
        gap: 30px;
    }

    .highlight h2 {
        font-size: 30px;
    }


    /* CTA */

    .cta {
        padding: 30px 24px;
    }

    .cta-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .cta .btn {
        width: 100%;
        justify-content: center;
    }


    /* CONTACT */

    .contact-grid {
        grid-template-columns: 1fr;
    }


    /* FOOTER */

    .footer {
        padding: 50px 0 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

}


/* =========================================================
   SMALL MOBILE — ATÉ 480px
   ========================================================= */

@media (max-width: 480px) {

    .container {
        width: min(100% - 24px, 1180px);
    }


    /* HEADER */

    .site-header {
        height: 66px;
    }

    .brand {
        gap: 9px;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text span {
        display: none;
    }


    /* MOBILE MENU */

    .mobile-menu {
        top: 66px;
    }


    /* HERO */

    .hero {
        padding: 55px 0 45px;
    }

    .hero h1 {
        font-size: 36px;
        letter-spacing: -1.3px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-label {
        padding: 6px 10px;
        font-size: 9px;
    }


    /* BUTTONS */

    .btn {
        min-height: 46px;
        padding: 11px 16px;
        font-size: 13px;
    }


    /* HERO VISUAL */

    .hero-visual-card {
        padding: 20px;
        border-radius: 14px;
    }

    .hero-chip {
        width: 54px;
        height: 54px;
    }

    .hero-chip i {
        font-size: 20px;
    }


    /* SECTIONS */

    .section {
        padding: 55px 0;
    }

    .section-title {
        font-size: 27px;
    }


    /* CARDS */

    .card,
    .service-card,
    .system-box,
    .contact-card {
        border-radius: 14px;
    }


    /* PAGE HEADER */

    .page-header {
        padding: 45px 0 35px;
    }

    .page-header h1 {
        font-size: 32px;
    }


    /* FORMS */

    .form-control {
        font-size: 14px;
    }


    /* FOOTER */

    .footer {
        padding: 45px 0 20px;
    }

    .footer-bottom {
        font-size: 11px;
    }

}


/* =========================================================
   VERY SMALL SCREENS — ATÉ 360px
   ========================================================= */

@media (max-width: 360px) {

    .container {
        width: min(100% - 20px, 1180px);
    }

    .hero h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 25px;
    }

    .hero-visual-card {
        padding: 16px;
    }

}

/* =========================================================
   BREAKPOINTS DOS COMPONENTES QUE AS PÁGINAS USAM DE FATO
========================================================= */

@media (max-width: 1250px) {
    .main-navigation,
    .header-action {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .mobile-menu {
        display: block;
    }
}

@media (max-width: 1024px) {
    .main-navigation,
    .main-nav,
    .header-action,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .mobile-menu {
        display: block;
    }

    .footer-container,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 28px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        min-height: 72px;
        gap: 14px;
    }

    .mobile-menu {
        top: 72px;
    }

    .content-section {
        padding: 65px 0;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .footer-container,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-container,
    .footer-grid {
        gap: 30px;
        padding: 48px 0 36px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 16px 0;
    }

    .cta {
        padding: 32px 24px;
    }

    .cta-content > .cta-actions {
        width: 100%;
        margin-top: 0;
    }

    .highlight-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 25px;
        padding: 32px 24px;
    }

    .highlight-actions {
        width: 100%;
        flex-direction: column;
    }

    .highlight-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        min-height: 66px;
    }

    .mobile-menu {
        top: 66px;
        padding-inline: 12px;
    }

    .content-section {
        padding: 52px 0;
    }

    .page-header h1 {
        font-size: clamp(30px, 9vw, 36px);
    }

    .cta {
        padding: 27px 20px;
    }
}

/* =========================================================
   AJUSTES GERAIS PARA TELAS PEQUENAS
   Aplicados aos componentes reais utilizados nas páginas.
========================================================= */

@media (max-width: 1024px) {
    .hero-container {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 42px;
    }

    .hero-visual { width: 100%; }
}

@media (max-width: 768px) {
    html { scroll-padding-top: 76px; }

    body { min-width: 320px; }

    .container { width: min(100% - 32px, var(--container)); }

    .site-header { position: sticky; top: 0; }

    .header-container {
        min-height: 68px;
        gap: 12px;
    }

    .brand { min-width: 0; gap: 10px; }
    .brand img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
    .brand-text { min-width: 0; }
    .brand-text strong { font-size: 14px; }
    .brand-text span { font-size: 9px; }

    .menu-toggle {
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: rgba(255, 255, 255, .035);
    }

    .mobile-menu {
        position: fixed;
        z-index: 99;
        top: 68px;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 68px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 10px 16px 18px;
        background: rgba(5, 8, 13, .98);
        backdrop-filter: blur(16px);
    }

    .mobile-menu a {
        min-height: 46px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .hero { padding: 58px 0 52px; }
    .hero-container { gap: 34px; }
    .hero h1 { font-size: clamp(36px, 9.2vw, 54px); line-height: 1.08; }
    .hero-description { font-size: 15px; }
    .hero-actions { align-items: stretch; }
    .hero-actions .btn { min-height: 48px; }

    .hero-card {
        width: 100%;
        min-height: 335px;
        padding: 24px;
    }

    .hero-card-content strong { font-size: clamp(24px, 7vw, 30px); }
    .hero-card-footer { flex-wrap: wrap; gap: 12px; }
    .hero-carousel-controls { margin-top: 14px; }

    .content-section { padding: 58px 0; }
    .page-header { padding: 54px 0 44px; }
    .system-banner { padding: 54px 0 44px; }
    .page-header h1 { font-size: clamp(33px, 8.8vw, 48px); line-height: 1.08; }
    .page-header-description { font-size: 14px; }
    .breadcrumb { row-gap: 6px; font-size: 10px; }
    .section-title { margin-bottom: 28px; }
    .section-title h2 { font-size: clamp(27px, 7vw, 36px); line-height: 1.14; }
    .section-title p { font-size: 14px; }

    .grid-2,
    .grid-3,
    .grid-4,
    .services-grid,
    .feature-grid,
    .system-showcase-grid,
    .system-video-grid,
    .footer-container,
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .services-grid,
    .feature-grid { gap: 14px; }

    .card,
    .service-box,
    .system-box { min-width: 0; padding: 22px; }
    .system-box { min-height: 0; }
    .service-box { height: 100%; }
    .card.system-video-card { padding: 0; }

    .cta { padding: 28px 22px; }
    .cta-content { align-items: stretch; gap: 20px; }
    .cta-content > * { min-width: 0; }
    .cta .btn,
    .cta-actions .btn { width: 100%; justify-content: center; }

    .contact-layout,
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .contact-form,
    .contact-card,
    .contact-card-content { min-width: 0; }
    input, textarea, select { max-width: 100%; }

    .footer-container,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 18px;
        padding: 42px 0 30px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-column,
    .footer-brand { min-width: 0; }
    .footer-column a,
    .footer-column span,
    .footer-brand p { overflow-wrap: anywhere; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }

    .about-history,
    .about-logo-section,
    .about-mission-grid { grid-template-columns: minmax(0, 1fr); }
    .about-logo-display { min-height: 260px; }

    .terminal-marquee { max-width: 100vw; }
}

@media (max-width: 480px) {
    .container { width: min(100% - 28px, var(--container)); }
    .header-container { min-height: 64px; }
    .brand img { width: 34px; height: 34px; }
    .brand-text span { display: none; }
    .mobile-menu { top: 64px; }

    .hero { padding: 46px 0 42px; }
    .hero h1 { font-size: clamp(33px, 9vw, 42px); letter-spacing: -.045em; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .hero-info { gap: 9px; }
    .hero-info-item { font-size: 11px; }

    .hero-card { min-height: 310px; padding: 20px; }
    .hero-card-icon { width: 68px; height: 68px; }
    .hero-card-footer { font-size: 10px; }
    .terminal-marquee { min-height: 42px; }
    .terminal-marquee-track { font-size: 10px; }

    .content-section { padding: 48px 0; }
    .page-header { padding: 44px 0 36px; }
    .page-header h1 { font-size: clamp(30px, 8.7vw, 38px); }
    .section-title h2 { font-size: clamp(25px, 7.2vw, 31px); }
    .card,
    .service-box,
    .system-box { padding: 19px; }

    .system-banner { min-height: 0; padding: 44px 0 36px; }
    .system-showcase-copy { padding: 17px; }
    .system-video-copy { padding: 17px; }

    .contact-card { align-items: flex-start; gap: 12px; padding: 17px; }
    .contact-card-icon { width: 42px; height: 42px; }
    .form-group { min-width: 0; }

    .footer-container,
    .footer-grid { padding-top: 36px; }

    .section-actions,
    .highlight-actions { width: 100%; flex-direction: column; align-items: stretch; }
    .section-actions .btn,
    .highlight-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
    .tech-history-timeline {
        gap: 14px;
        margin-top: 38px;
    }

    .tech-history-timeline::before,
    .tech-history-timeline::after {
        left: 50%;
    }

    .tech-history-event {
        grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
        gap: 9px;
        min-height: 0;
    }

    .tech-history-card,
    .tech-history-event.is-right .tech-history-card {
        padding: 18px 15px;
    }

    .tech-history-node {
        grid-column: 2;
    }

    .tech-history-spacer {
        display: none;
    }

    .tech-history-future {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .tech-history-heading {
        text-align: center;
    }

    .tech-history-heading p {
        margin-inline: auto;
        text-align: center;
    }

    .tech-history-card,
    .tech-history-event.is-right .tech-history-card {
        padding: 16px 12px;
    }

    .tech-history-card h3 {
        font-size: 17px;
    }

    .tech-history-card p {
        font-size: 12px;
    }

    .tech-history-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 13px;
    }

    .tech-history-meta small {
        text-align: left;
    }

    .tech-history-future {
        padding: 24px 18px;
    }

    .tech-history-frontiers {
        gap: 7px;
        margin: 20px 0;
    }
}

@media (max-width: 350px) {
    .tech-history-timeline::before,
    .tech-history-timeline::after {
        left: 11px;
    }

    .tech-history-event {
        grid-template-columns: 22px minmax(0, 1fr);
        gap: 10px;
    }

    .tech-history-card,
    .tech-history-event.is-right .tech-history-card {
        grid-column: 2;
    }

    .tech-history-node {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tech-history-event,
    .tech-history-icon,
    .tech-history-node {
        transition: none;
    }

}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .system-stats-track { animation: none; }
    .system-stats-marquee { overflow-x: auto; }
}
