/* Custom Styles */
@layer utilities {
    .bg-grid-white {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(255 255 255 / 0.05)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
    }

    .text-gradient {
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-image: linear-gradient(to right, #06b6d4, #3b82f6);
    }
}

/* Glassmorphism Card Utility */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(6, 182, 212, 0.4);
    /* Cyan accent */
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.2);
}

/* Shimmer Highlight for Cards */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.5s;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 100%;
    transition: 0.7s ease-in-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
    border: 2px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

/* Animations & Micro-interactions */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Scroll Reveal Utility */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Card Hoover */
.hover-card-effect {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.15);
    /* Slate shadow */
}

/* Typography Hierarchy */
h1,
h2,
h3 {
    letter-spacing: -0.02em;
    /* Tighter for modern look */
}

/* Custom Scrollbar for Filters */
.overflow-x-auto::-webkit-scrollbar {
    height: 4px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

/* Performance Optimizations */
section,
.grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
    /* Placeholder size for faster initial layout */
}

/* Ensure navbar is always rendered immediately */
nav {
    content-visibility: visible !important;
}

/* Navbar scroll state */
nav.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.12);
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: #25D366;
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float {
        padding: 1rem;
        border-radius: 50%;
    }
}

/* Stats counter */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Partner badge */
.partner-badge {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.08) 0%, rgba(234, 88, 12, 0.06) 100%);
    border: 1px solid rgba(8, 145, 178, 0.15);
}

/* Process step connector */
.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: calc(100% + 0.5rem);
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(90deg, #0891b2, transparent);
}

@media (max-width: 1023px) {
    .process-step::after {
        display: none;
    }
}

/* CTA gradient section */
.cta-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Hero — layout estilo conexão rápida */
.hero-section {
    background: #ffffff;
}

.hero-yellow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    width: min(88vw, 680px);
    height: min(88vw, 680px);
    border: 2px solid rgba(234, 179, 8, 0.28);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-side-mesh {
    position: absolute;
    top: 10%;
    bottom: 10%;
    width: min(22vw, 200px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-width='0.6'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='60' cy='35' r='2'/%3E%3Ccircle cx='100' cy='25' r='2'/%3E%3Ccircle cx='35' cy='70' r='2'/%3E%3Ccircle cx='85' cy='80' r='2'/%3E%3Ccircle cx='55' cy='95' r='2'/%3E%3Cline x1='20' y1='20' x2='60' y2='35'/%3E%3Cline x1='60' y1='35' x2='100' y2='25'/%3E%3Cline x1='20' y1='20' x2='35' y2='70'/%3E%3Cline x1='60' y1='35' x2='85' y2='80'/%3E%3Cline x1='35' y1='70' x2='55' y2='95'/%3E%3Cline x1='85' y1='80' x2='55' y2='95'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
}

.hero-side-mesh--left {
    left: 0;
    mask-image: linear-gradient(to right, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, transparent 100%);
}

.hero-side-mesh--right {
    right: 0;
    mask-image: linear-gradient(to left, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 0%, transparent 100%);
}

.hero-headline {
    letter-spacing: 0.02em;
}

.hero-connect-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(8, 145, 178, 0.2);
    border-radius: 9999px;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.06), 0 8px 30px rgba(15, 23, 42, 0.08);
}

@media (min-width: 640px) {
    .hero-connect-bar {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
        padding: 0.35rem 0.35rem 0.35rem 0.5rem;
    }
}

.hero-connect-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
}

.hero-connect-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.hero-connect-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: #334155;
    padding: 0.75rem 0;
    outline: none;
}

.hero-connect-input::placeholder {
    color: #94a3b8;
}

.hero-connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #06b6d4 100%);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.hero-connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.45);
}

.hero-connect-btn:active {
    transform: translateY(0);
}

.hero-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: #ea580c;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    border-radius: 0.375rem;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.hero-cta-primary:hover {
    background: #c2410c;
    transform: translateY(-1px);
}

.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    background: #fff;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: background 0.2s, border-color 0.2s;
}

.hero-cta-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Hero — ecossistema Master Tek */
.hero-ecosystem {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(76, 29, 149, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.35);
}

.hero-ecosystem-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.75rem;
}

.hero-ecosystem-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-ecosystem-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.hero-ecosystem-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.hero-ecosystem-pill--orion {
    background: rgba(124, 58, 237, 0.35);
    border-color: rgba(167, 139, 250, 0.45);
    padding-left: 0.5rem;
}

.hero-ecosystem-pill--orion:hover {
    background: rgba(124, 58, 237, 0.5);
    border-color: rgba(196, 181, 253, 0.6);
}

.hero-ecosystem-pill img {
    height: 1.25rem;
    width: auto;
    object-fit: contain;
}

.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;
}

@media (max-width: 639px) {
    .hero-yellow-ring {
        width: min(95vw, 420px);
        height: min(95vw, 420px);
    }

    .hero-side-mesh {
        display: none;
    }

    .hero-connect-bar {
        border-radius: 1rem;
    }

    .hero-connect-btn {
        border-radius: 0.75rem;
        width: 100%;
    }
}

/* Hero readability panel */
.hero-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .hero-panel {
        background: rgba(255, 255, 255, 0.97);
        padding: 1.5rem !important;
    }
}

/* Canvas must stay behind content */
#webgl-canvas {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 768px) {
    #webgl-canvas {
        display: none !important;
    }
}

/* Section transitions for visual continuity */
.section-bridge-light {
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.section-bridge-dark {
    background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 40%, #0f172a 100%);
    padding-top: 4rem;
    margin-top: -1px;
}

.section-dark-rounded {
    border-radius: 2rem 2rem 0 0;
    margin-top: -2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .section-dark-rounded {
        border-radius: 3rem 3rem 0 0;
        margin-top: -3rem;
    }
}

/* Process steps — unified on mobile */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.process-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
}

.process-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(8, 145, 178, 0.3);
}

.process-card .step-num {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    background: rgba(8, 145, 178, 0.15);
    border: 1px solid rgba(8, 145, 178, 0.35);
    color: #22d3ee;
}

.process-card:last-child .step-num {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.35);
    color: #fb923c;
}

/* Label contrast on dark backgrounds */
.label-on-dark {
    color: #22d3ee;
    letter-spacing: 0.2em;
}

/* Stats cards — solid background for readability */
.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

/* Safe area for mobile WhatsApp button */
@media (max-width: 640px) {
    .whatsapp-float {
        bottom: max(1rem, env(safe-area-inset-bottom));
        right: max(1rem, env(safe-area-inset-right));
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
}

/* Disable float animation on hero for readability */
@media (prefers-reduced-motion: reduce) {
    .animate-float {
        animation: none;
    }
}

/* Bozza expertise section */
.bozza-highlight {
    background: linear-gradient(135deg, #f0fdfa 0%, #fff7ed 100%);
    border: 1px solid #e2e8f0;
}

.product-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
}

/* Fix content-visibility jump on hero */
header,
nav,
.hero-panel {
    content-visibility: visible !important;
}

/* Contact page */
.contact-channel-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

a.contact-channel-card:hover {
    border-color: rgba(8, 145, 178, 0.35);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.contact-channel-card--whatsapp:hover {
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.12);
}

.contact-channel-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.contact-form-card {
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.1);
}

.contact-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #334155;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-input:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.contact-input::placeholder {
    color: #94a3b8;
}

/* Educação Tecnológica — dual brand navbar lockup */
.edu-nav-brandlock {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem 0.375rem 0.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    transition: box-shadow 0.2s, transform 0.2s;
}

a.edu-nav-brandlock:hover {
    box-shadow: 0 6px 20px rgba(76, 29, 149, 0.28);
    transform: translateY(-1px);
}

.edu-nav-brandlock__mastertek {
    height: 2rem;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    border-radius: 0.375rem;
    padding: 0.125rem 0.25rem;
}

@media (min-width: 768px) {
    .edu-nav-brandlock__mastertek {
        height: 2.25rem;
        padding: 0.15rem 0.35rem;
    }
}

.edu-nav-brandlock__divider {
    width: 1px;
    height: 1.75rem;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.edu-nav-brandlock__orion {
    height: 1.625rem;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .edu-nav-brandlock__orion {
        height: 1.875rem;
    }
}

.edu-nav-brandlock__tag {
    display: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(196, 181, 253, 0.85);
    line-height: 1.2;
    max-width: 4.5rem;
}

@media (min-width: 1024px) {
    .edu-nav-brandlock__tag {
        display: block;
    }
}