*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red:          #E05E3B;
    --red-dark:     #C04E2D;
    --navy:         #074866;
    --bg:           #F4F5F7;
    --card-bg:      #FFFFFF;
    --text:         #074866;
    --muted:        #6B7A8D;
    --radius:       14px;
    --shadow-hover: 0 10px 36px rgba(224, 94, 59, .26);
    --transition:   .25s cubic-bezier(.4, 0, .2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Subtle background blobs */
body::before {
    content: '';
    position: fixed;
    top: -130px; right: -130px;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224,94,59,.09) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: background .6s ease;
}

body[data-active-tab="sistemas-gv"]::before {
    background: radial-gradient(circle, rgba(7,72,102,.11) 0%, transparent 70%);
}
body::after {
    content: '';
    position: fixed;
    bottom: 60px; left: -100px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(7,72,102,.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── HEADER ───────────────────────────── */
header {
    position: relative; z-index: 10;
    background: var(--card-bg);
    border-bottom: 1px solid rgba(7,72,102,.08);
    padding: 14px 5vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ── Logo images from img/ folder ──────
    Replace logo-vilarouca.svg and logo-gvtech.svg
    inside an "img" folder next to this HTML file.
    Recommended heights: 34px (desktop), 26px (mobile).
─────────────────────────────────────── */
.logo-vilarouca,
.logo-gvtech {
    height: 34px;
    width: auto;
    display: block;
}

.divider-line {
    width: 1px;
    height: 34px;
    background: rgba(7,72,102,.18);
    flex-shrink: 0;
}

/* ── HERO ─────────────────────────────── */
.hero {
    position: relative; z-index: 5;
    text-align: center;
    padding: 56px 5vw 40px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 14px;
}
.hero h1 strong { font-weight: 800; }

.hero p {
    font-size: clamp(.88rem, 2vw, 1rem);
    color: var(--muted);
    font-weight: 400;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── CARD GRID ────────────────────────── */
.grid-section {
    position: relative; z-index: 5;
    padding: 0 5vw 60px;
    flex: 1;
}

.grid-wrapper {
    background: rgba(255,255,255,.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 22px;
    padding: clamp(24px, 4vw, 44px);
    box-shadow: 0 2px 32px rgba(7,72,102,.07);
    max-width: 900px;
    margin: 0 auto;
    transition: height .42s cubic-bezier(.4,0,.2,1);
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* ── CARD ─────────────────────────────── */
.card {
    flex: 0 1 calc(33.333% - 11px);
    max-width: calc(33.333% - 11px);

    display: flex; /* ← ISSO É OBRIGATÓRIO */
    align-items: center;
    gap: 14px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius);
    padding: 18px 20px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
    animation: fadeUp .5s ease both;
}

.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .10s; }
.card:nth-child(3) { animation-delay: .15s; }
.card:nth-child(4) { animation-delay: .20s; }
.card:nth-child(5) { animation-delay: .25s; }
.card:nth-child(6) { animation-delay: .30s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* shimmer on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.18), transparent);
    transition: left .5s ease;
}
.card:hover::before { left: 130%; }

.card:hover {
    background: var(--red-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
}
.card:active { transform: scale(.97); }

.card-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    background: rgba(255,255,255,.18);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-icon svg {
    width: 20px; height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.card-label {
    font-size: .62rem;
    font-weight: 500;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.card-title {
    font-size: clamp(.82rem, 1.5vw, .93rem);
    font-weight: 700;
    line-height: 1.2;
}

/* ── FOOTER ───────────────────────────── */
footer {
    position: relative; z-index: 10;
    background: var(--navy);
    color: rgba(255,255,255,.5);
    text-align: center;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .04em;
    padding: 20px 5vw;
}
footer span { color: rgba(255,255,255,.85); }

/* ── TAB SWITCHER ─────────────────────── */
.tab-switcher-wrap {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 0 5vw 24px;
}

.tab-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.95);
    border-radius: 60px;
    padding: 5px;
    box-shadow: 0 2px 24px rgba(7,72,102,.1);
    width: min(580px, calc(100% - 10vw));
}

/* Sliding pill indicator */
.tab-indicator {
    position: absolute;
    border-radius: 50px;
    pointer-events: none;
    z-index: 0;
    transition:
        left   .38s cubic-bezier(.4,0,.2,1),
        top    .38s cubic-bezier(.4,0,.2,1),
        width  .38s cubic-bezier(.4,0,.2,1),
        height .38s cubic-bezier(.4,0,.2,1),
        background .3s ease,
        box-shadow .3s ease;
}

.tab-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .02em;
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: color .3s ease, transform .15s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tab-btn.active { color: #fff; }
.tab-btn.active[data-tab="sistemas-industria"] { color: var(--red); }

.tab-btn:hover:not(.active) { color: var(--text); }

.tab-btn:active { transform: scale(.96); }

/* ── TAB PANELS ───────────────────────── */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: panelIn .4s cubic-bezier(.4,0,.2,1) both;
}

.tab-panel.panel-exit {
    display: block;
    animation: panelOut .26s cubic-bezier(.4,0,.2,1) both;
    pointer-events: none;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes panelOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

/* ── GV SYSTEMS CARDS (navy) ──────────── */
[data-panel="sistemas-gv"] .card {
    background: var(--navy);
}

[data-panel="sistemas-gv"] .card:hover {
    background: #0a5f84;
    box-shadow: 0 10px 36px rgba(7,72,102,.35);
}

/* ── INDUSTRY CARDS (orange outline) ─────── */
[data-panel="sistemas-industria"] .card {
    background: #fff;
    color: var(--navy);
    border: 1.5px solid rgba(7,72,102,.3);
}

[data-panel="sistemas-industria"] .card:hover {
    background: rgba(224,94,59,.06);
    box-shadow: 0 10px 36px rgba(224,94,59,.26);
    border-color: rgba(224,94,59,.65);
    color: var(--red);
}

[data-panel="sistemas-industria"] .card:hover .card-icon {
    background: rgba(224,94,59,.15);
}

[data-panel="sistemas-industria"] .card:hover .card-icon svg {
    stroke: var(--red);
}

[data-panel="sistemas-industria"] .card-icon {
    background: rgba(7,72,102,.1);
}

[data-panel="sistemas-industria"] .card-icon svg {
    stroke: var(--navy);
}

[data-panel="sistemas-industria"] .card::before {
    background: linear-gradient(120deg, transparent, rgba(7,72,102,.08), transparent);
}

/* ── COMING SOON CARD ─────────────────── */
.card--soon {
    pointer-events: none;
    cursor: default;
}

.card--soon:hover {
    transform: none;
    box-shadow: none;
}

/* reutiliza o ::before (shimmer) como camada clara fixa para esmaecimento */
.card--soon::before {
    left: 0 !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.55) !important;
    transition: none !important;
    z-index: 2;
}

.card--soon::after {
    content: 'EM BREVE';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 22px;
    background: var(--red);
    color: var(--card-bg);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.45rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 820px) {
    .grid {
        gap: 16px;
    }

    .card {
        flex: 0 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media (max-width: 520px) {
    .tab-btn {
        font-size: .68rem;
        padding: 10px 10px;
        letter-spacing: 0;
    }

    .hero {
        padding: 36px 5vw 24px;
    }

    .grid-section {
        padding: 0 4vw 40px;
    }

    .grid-wrapper {
        padding: 20px;
        border-radius: 18px;
    }

    .grid {
        gap: 12px;
    }

    .card {
        flex: 0 1 100%;
        max-width: 100%;
        padding: 16px 18px;
    }

    .logo-vilarouca,
    .logo-gvtech {
        height: 26px;
    }

    .divider-line {
        height: 26px;
    }
}