/* ONFIRE V2 - Industrial Vanguard Design System */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;600;900&family=Saira+Stencil+One&family=Space+Grotesk:wght@300;500;700&display=swap');

:root {
    /* Color Palette - Premium Dark */
    --void-black: #050505;
    --carbon-gray: #121212;
    --steel-gray: #2A2A2A;
    --safety-red: #FF1F1F;
    --alert-red: #D32F2F;
    --pure-white: #FFFFFF;
    --dim-white: rgba(255, 255, 255, 0.7);

    /* Typography */
    --font-display: 'Saira Stencil One', sans-serif;
    --font-heading: 'Archivo', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Spacing & Layout */
    --container-max: 1440px;
    --gutter: 20px;

    /* Effects */
    --glow-red: 0 0 20px rgba(255, 31, 31, 0.4);
    --glass: rgba(255, 255, 255, 0.05);
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--void-black);
    color: var(--pure-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

/* Utility Classes */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.text-red {
    color: var(--safety-red);
}

.bg-red {
    background-color: var(--safety-red);
}

.uppercase {
    text-transform: uppercase;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: var(--safety-red);
    border-radius: 4px;
}

/* --- Components --- */

/* Buttons */
.btn-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid var(--safety-red);
    color: var(--safety-red);
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--safety-red);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-out-expo);
    z-index: -1;
}

.btn-v2:hover {
    color: var(--void-black);
    box-shadow: var(--glow-red);
}

.btn-v2:hover::before {
    transform: translateX(0);
}

/* Section Header */
/* Section Header */
.section-header-v2 {
    margin-bottom: 15px;
    /* Reduced margin to keep elements tighter if needed, or stick to 80px. Let's keep visually balanced spacing. */
    margin-bottom: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: var(--border-glass);
    padding-bottom: 40px;
}

.section-header-v2 h2 {
    font-family: var(--font-heading);
    /* Archivo - Clean Industrial */
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--pure-white);
    /* Solid White */
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

/* --- Layout Sections --- */

/* Header */
.nav-island {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    border: var(--border-glass);
    border-radius: 50px;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-links-v2 {
    display: flex;
    gap: 20px;
}

.nav-links-v2 a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-links-v2 a:hover {
    opacity: 1;
    color: var(--safety-red);
}

.nav-links-v2 a.active {
    opacity: 1;
    color: var(--safety-red);
}

.logo-small img {
    height: 90px;
    width: auto;
    transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Hero */
.hero-v2 {
    height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    padding-top: 100px;
    /* Space for nav */
    position: relative;
    overflow: hidden;
}

.hero-text-area {
    padding: 0 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.glitch-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 8vw;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--dim-white);
    max-width: 500px;
    margin-bottom: 50px;
    border-left: 2px solid var(--safety-red);
    padding-left: 20px;
}

.hero-visual-area {
    position: relative;
    height: 100%;
}

.hero-img-container {
    width: 100%;
    height: 90%;
    background: var(--carbon-gray);
    position: relative;
    overflow: hidden;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-img-container video,
.hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.1);
    transition: transform 10s ease;
}

/* Marquee */
.ticker-wrap {
    width: 100%;
    background: var(--safety-red);
    color: var(--void-black);
    overflow: hidden;
    padding: 15px 0;
    transform: rotate(-1deg) scale(1.05);
    margin: 50px 0;
    border-top: 2px solid var(--pure-white);
    border-bottom: 2px solid var(--pure-white);
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    text-transform: uppercase;
    padding: 0 40px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Services Bento Grid */
.services-v2 {
    padding: 100px var(--gutter);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 16px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.bento-card {
    background: linear-gradient(168deg, var(--carbon-gray) 0%, #0e0e0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1px solid rgba(255, 31, 31, 0.15);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition:
        transform 0.35s var(--ease-out-expo),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

/* Dark overlay on hover for text readability */
.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.6) 0%, rgba(5, 5, 5, 0.85) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s var(--ease-out-expo);
    pointer-events: none;
}

.bento-card:hover::before {
    opacity: 1;
}

/* Red glow line at bottom on hover */
.bento-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--safety-red), transparent);
    opacity: 0;
    z-index: 3;
    transition: opacity 0.4s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 31, 31, 0.4);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 16px 48px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 31, 31, 0.08);
}

.bento-card:hover::after {
    opacity: 1;
}

.hover-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transform: scale(1.1);
    transition:
        opacity 0.5s var(--ease-out-expo),
        transform 0.8s var(--ease-out-expo);
    pointer-events: none;
}

.bento-card:hover .hover-bg-img {
    opacity: 0.35;
    transform: scale(1);
}

.bento-card>*:not(.hover-bg-img):not(iframe) {
    position: relative;
    z-index: 2;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-icon {
    font-size: 2.5rem;
    color: var(--safety-red);
    margin-bottom: 20px;
    transition: transform 0.35s var(--ease-out-expo), filter 0.35s ease;
    filter: drop-shadow(0 0 0px transparent);
}

.bento-card:hover .bento-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px rgba(255, 31, 31, 0.5));
}

.bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.bento-card:hover h3 {
    color: var(--pure-white);
}

/* Nossas Unidades */
.unidades-section {
    padding: 100px var(--gutter);
    background: var(--void-black);
}

.unidades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.unidade-card {
    background: var(--carbon-gray);
    border: var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s, box-shadow 0.4s;
}

.unidade-card:hover {
    transform: translateY(-6px);
    border-color: var(--safety-red);
    box-shadow: 0 20px 50px rgba(255, 31, 31, 0.12);
}

.unidade-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--void-black);
}

/* Solid dark bar at bottom to mask any sub-pixel bleed from scaled image */
.unidade-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--carbon-gray);
    z-index: 3;
    pointer-events: none;
}

.unidade-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.6s var(--ease-out-expo), filter 0.6s var(--ease-out-expo);
}

.unidade-card:hover .unidade-img-wrap img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.unidade-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(5, 5, 5, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    z-index: 1;
    pointer-events: none;
}

.unidade-badge {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--pure-white);
    background: var(--safety-red);
    padding: 6px 16px;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    pointer-events: auto;
}

.unidade-info {
    padding: 24px;
    position: relative;
    z-index: 2;
    background: var(--carbon-gray);
    margin-top: -1px;
}

.unidade-info h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--pure-white);
}

.unidade-info p {
    font-family: var(--font-body);
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats (Integrated) */
.stats-strip {
    display: flex;
    justify-content: space-around;
    padding: 100px 0;
    background: var(--carbon-gray);
    margin: 50px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.stat-box-v2 {
    text-align: center;
}

.stat-num-v2 {
    display: block;
    font-family: var(--font-display);
    font-size: 5rem;
    color: var(--pure-white);
    line-height: 1;
}

.stat-label-v2 {
    font-family: var(--font-body);
    color: var(--safety-red);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Footer */
.footer-v2 {
    padding: 100px var(--gutter) 40px;
    border-top: var(--border-glass);
    text-align: center;
}

.footer-logo-big img {
    width: 600px;
    margin: 0 auto 40px;
    filter: brightness(0) invert(1);
    opacity: 0.5;
}

.responsive-map {
    width: 100%;
    height: 400px;
    filter: grayscale(1) invert(1) contrast(1.2);
    border-radius: 20px;
    margin-bottom: 60px;
}

/* ===== MOBILE HAMBURGER MENU ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--pure-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 992px) {
    /* Nav Island - Mobile */
    .nav-island {
        padding: 8px 16px;
        border-radius: 30px;
        width: 92%;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-links-v2 {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        border: var(--border-glass);
        border-radius: 16px;
        padding: 20px;
        flex-direction: column;
        gap: 8px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    }

    .nav-links-v2.mobile-open {
        display: flex;
    }

    .nav-links-v2 a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 1rem;
        opacity: 0.9;
        transition: background 0.2s, opacity 0.2s;
    }

    .nav-links-v2 a:hover,
    .nav-links-v2 a.active {
        background: rgba(255, 31, 31, 0.1);
    }

    /* Hide desktop "Orçamento" button, keep WhatsApp icon */
    .nav-island > div:last-child .btn-v2 {
        display: none;
    }

    .logo-small img {
        height: 55px;
    }

    /* Hero */
    .hero-v2 {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        padding-top: 90px;
    }

    .hero-text-area {
        padding: 30px 20px 40px;
    }

    .hero-img-container {
        clip-path: none;
        height: 40vh;
        order: -1;
    }

    .glitch-title {
        font-size: 11vw;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-actions .btn-v2 {
        padding: 12px 24px;
        font-size: 0.8rem;
    }

    /* Ticker */
    .ticker-wrap {
        margin: 20px 0;
        padding: 10px 0;
    }

    .ticker-item {
        font-size: 1.2rem;
        padding: 0 20px;
    }

    /* Stats */
    .stats-strip {
        flex-direction: column;
        gap: 30px;
        padding: 60px 20px;
        margin: 20px 0;
    }

    .stat-num-v2 {
        font-size: 3rem;
    }

    .stat-label-v2 {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    /* Unidades */
    .unidades-section {
        padding: 60px 16px;
    }

    .unidades-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Section Headers */
    .section-header-v2 {
        margin-bottom: 40px;
        padding-bottom: 25px;
    }

    .section-header-v2 h2 {
        font-size: 2rem;
    }

    /* Services Bento Grid */
    .services-v2 {
        padding: 60px 16px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-large,
    .bento-tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Override inline grid-column: span 2 on bento-cards */
    .bento-card[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    .bento-card[style*="grid-column: 1 / -1"] {
        grid-column: span 1 !important;
        min-height: 250px !important;
    }

    .bento-card {
        padding: 24px;
    }

    .bento-icon {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .bento-card h3 {
        font-size: 1.2rem;
    }

    /* Products section teaser */
    #products {
        padding: 60px 16px !important;
    }

    #products .bento-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    #products .bento-card {
        height: auto !important;
        min-height: 200px;
    }

    #products .bento-card img {
        height: 120px !important;
        margin-bottom: 10px !important;
    }

    #products .bento-card h3 {
        font-size: 0.85rem !important;
    }

    /* Projects section */
    #projects {
        padding: 60px 16px !important;
    }

    #projects .bento-grid {
        grid-template-columns: 1fr !important;
    }

    #projects .bento-card.bento-large {
        height: 280px !important;
    }

    /* Footer */
    .footer-v2 {
        padding: 60px 16px 30px;
    }

    .footer-logo-big img {
        width: 280px;
    }

    .footer-v2 h2 {
        font-size: 1.8rem !important;
        margin-bottom: 25px !important;
    }

    .footer-v2 .container {
        padding: 0 10px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .nav-island {
        top: 10px;
        width: 95%;
        padding: 6px 12px;
    }

    .logo-small img {
        height: 45px;
    }

    .hero-v2 {
        padding-top: 75px;
    }

    .hero-text-area {
        padding: 20px 16px 30px;
    }

    .glitch-title {
        font-size: 13vw;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .section-header-v2 h2 {
        font-size: 1.6rem;
    }

    .stat-num-v2 {
        font-size: 2.5rem;
    }

    .unidade-info {
        padding: 16px;
    }

    .unidade-info h3 {
        font-size: 1rem;
    }

    #products .bento-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-logo-big img {
        width: 200px;
    }

    .footer-v2 h2 {
        font-size: 1.5rem !important;
    }

    .btn-v2 {
        padding: 12px 20px;
        font-size: 0.8rem;
    }
}