:root {
    --bg: #0a0a0f;
    --bg-soft: rgba(255,255,255,0.05);
    --surface: rgba(255,255,255,0.06);
    --surface-strong: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.10);
    --text: #f7f7f8;
    --muted: #b4b4be;
    --title: #ffffff;
    --accent: #f6c316;
    --accent-strong: #ffcf21;
    --shadow: 0 18px 50px rgba(0,0,0,0.35);
    --hero-glow: radial-gradient(circle at top right, rgba(246,195,22,0.20), transparent 28%), radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 25%);
    --card-glow: linear-gradient(135deg, rgba(246,195,22,0.16), transparent 45%, transparent 100%);
    --loading-bg: rgba(4,4,8,0.86);
}

html[data-theme="light"] {
    --bg: #f4f5f7;
    --bg-soft: #ffffff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --border: rgba(15,23,42,0.08);
    --text: #171717;
    --muted: #5f6673;
    --title: #101010;
    --accent: #d9a400;
    --accent-strong: #f0b900;
    --shadow: 0 16px 38px rgba(15,23,42,0.08);
    --hero-glow: radial-gradient(circle at top right, rgba(240,185,0,0.15), transparent 28%), radial-gradient(circle at top left, rgba(15,23,42,0.05), transparent 22%);
    --card-glow: linear-gradient(135deg, rgba(240,185,0,0.12), transparent 45%, transparent 100%);
    --loading-bg: rgba(255,255,255,0.86);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.section { padding: 84px 0; }

.section-muted {
    background: color-mix(in srgb, var(--bg) 92%, white 8%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(16px);
    background: linear-gradient(180deg, #f1f2f4 0%, #e6e8eb 100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 96px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand-logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.button,
.theme-toggle {
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 12px 16px;
    font-size: .95rem;
    font-weight: 600;
    transition: .25s ease;
    cursor: pointer;
}

.nav-link,
.theme-toggle {
    background: rgba(0,0,0,0.04);
    color: #1f2937;
    border-color: rgba(0,0,0,0.10);
}

.nav-link:hover,
.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(246,195,22,0.35);
    background: rgba(0,0,0,0.06);
}

.button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #141414;
    border-color: rgba(246,195,22,0.28);
    box-shadow: 0 12px 30px rgba(246,195,22,0.18);
}

.button:hover { transform: translateY(-2px); }

/* =========================
   MENU MOBILE
========================= */
.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.55);
    color: #1f2937;
    border-radius: 14px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: .25s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.72);
    border-color: rgba(0,0,0,0.14);
}

.menu-toggle-bars {
    position: relative;
    width: 20px;
    height: 14px;
    display: inline-block;
}

.menu-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .25s ease, opacity .25s ease, top .25s ease;
}

.menu-toggle-bars span:nth-child(1) { top: 0; }
.menu-toggle-bars span:nth-child(2) { top: 6px; }
.menu-toggle-bars span:nth-child(3) { top: 12px; }

.menu-toggle.active .menu-toggle-bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.menu-toggle.active .menu-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-toggle-bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-glow);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 40px;
    align-items: center;
    padding: 96px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(246,195,22,0.18);
    background: rgba(246,195,22,0.10);
    color: var(--accent-strong);
    font-size: .9rem;
    font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }

.hero h1 {
    margin: 22px 0 0;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--title);
}

.hero p.lead,
.text-soft {
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.06rem;
}

.hero-spacing {
    margin-top: 22px;
    padding-top: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-panel {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-panel::before,
.system-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--card-glow);
    opacity: .9;
    pointer-events: none;
}

.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 20px;
    background: var(--surface);
    margin-bottom: 14px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.feature-card:last-child { margin-bottom: 0; }

.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(246,195,22,0.28);
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    margin-bottom: 12px;
    background: rgba(246,195,22,0.13);
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 700;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 34px;
}

.section-head-text {
    max-width: 560px;
}

.section-kicker {
    margin-bottom: 10px;
    color: var(--accent-strong);
    letter-spacing: .24em;
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 700;
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
    color: var(--title);
    margin-bottom: 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.system-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.system-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(246,195,22,0.30);
    box-shadow: 0 22px 55px rgba(0,0,0,0.28);
}

.system-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent 40%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}

.system-card:hover::after { opacity: 1; }

.tag {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(246,195,22,0.10);
    border: 1px solid rgba(246,195,22,0.15);
    color: var(--accent-strong);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.system-card h3,
.system-card p,
.system-card .card-link { position: relative; z-index: 1; }

.system-card h3 {
    margin: 18px 0 12px;
    font-size: 1.55rem;
    color: var(--title);
}

.system-card p {
    color: var(--muted);
    min-height: 88px;
    line-height: 1.75;
    margin-bottom: 0;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--accent-strong);
    font-weight: 700;
}

.info-card,
.timeline-card,
.cta-box {
    border-radius: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.info-card,
.timeline-card {
    padding: 26px;
}

.grid-2 {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 26px;
    align-items: start;
}

.timeline-stack,
.info-grid { display: grid; gap: 18px; }

.timeline-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(246,195,22,0.10);
    color: var(--accent-strong);
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.gallery-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.gallery-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 12px);
    gap: 18px;
    overflow: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

.gallery-slide {
    min-width: 0;
}

.gallery-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 24px;
    background: color-mix(in srgb, var(--bg) 86%, white 14%);
    border: 1px solid var(--border);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.gallery-slide:hover .gallery-image { transform: scale(1.04); }

.gallery-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    animation: fadeInTag 1s ease;
}

@keyframes fadeInTag {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-arrow {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--title);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
    flex: 0 0 auto;
}

.gallery-arrow:hover {
    transform: translateY(-2px);
    border-color: rgba(246,195,22,0.35);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    border: none;
    cursor: pointer;
    transition: .2s ease;
}

html[data-theme="light"] .gallery-dot {
    background: rgba(0,0,0,0.14);
}

.gallery-dot.active {
    width: 26px;
    background: var(--accent-strong);
}

.cta-box {
    padding: 34px;
    background: linear-gradient(135deg, rgba(246,195,22,0.14), rgba(246,195,22,0.06));
    border-color: rgba(246,195,22,0.18);
}

.cta-title,
.cta-text {
    color: #111111;
}

html[data-theme="dark"] .cta-title {
    color: #ffffff !important;
}

html[data-theme="dark"] .cta-text {
    color: #e5e7eb !important;
}

.site-footer {
    background: #00080A;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-container {
    padding-top: 10px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1fr;
    gap: 26px;
    align-items: start;
}

.footer-brand {
    font-size: 1.05rem;
    color: #fff;
}

.footer-col-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.footer-note {
    color: #9ca3af;
}

.footer-note-wide {
    margin-top: 10px;
    line-height: 1.8;
    max-width: 360px;
}

.footer-contact-lines {
    line-height: 1.9;
}

.footer-contact-lines a {
    color: #f6c316;
}

.footer-video-box {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    max-height: 180px;
    background: #00080A;
}

.footer-video {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #00080A;
    display: block;
    filter: brightness(0.75);
}

.footer-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
}

.footer-video-text {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #9ca3af;
    text-align: center;
    line-height: 1.8;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    background: var(--loading-bg);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-logo {
    width: 120px;
    animation: pulseLogo 1.6s ease-in-out infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(246,195,22,0)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 18px rgba(246,195,22,0.35)); }
}

.spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 3px solid rgba(246,195,22,0.20);
    border-top-color: var(--accent-strong);
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    color: var(--muted);
    font-weight: 600;
}

@keyframes bounceSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.fab-wrap {
    position: fixed !important;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.fab {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: bounceSoft 2.6s ease-in-out infinite;
    transition: transform .2s ease;
    position: relative;
}

.fab:hover {
    transform: scale(1.08) rotate(-6deg);
}

.fab:active {
    transform: scale(0.94) rotate(-8deg);
}

.fab img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    touch-action: manipulation;
}

.fab-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    opacity: 0.9;
}

html[data-theme="light"] .fab-label {
    color: #383636 !important;
}

.fab-tooltip {
    position: absolute;
    right: 72px;
    bottom: 50%;
    transform: translateY(50%) translateX(6px);
    background: #111;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.fab-tooltip::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #111;
}

.fab:hover .fab-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(50%) translateX(0);
}

html[data-theme="dark"] .hero-secondary-link {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.25) !important;
}

@media (max-width: 980px) {
    .hero-grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .gallery-carousel {
        grid-auto-columns: calc(50% - 10px);
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .hero-grid {
        padding: 76px 0;
    }

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

/* =========================================================
   MOBILE HEADER FINAL
========================================================= */
@media (max-width: 860px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .site-header .header-inner {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: auto;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-header .brand {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .site-header .brand-logo {
        display: block;
        width: auto;
        height: auto;
        max-width: 240px;
        max-height: 52px;
        object-fit: contain;
    }

    .site-header .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: static;
        transform: none;
        width: 46px;
        height: 46px;
        margin: 0 auto;
        padding: 0;
        z-index: 1001;
        border: 1px solid rgba(0,0,0,0.10);
        background: rgba(255,255,255,0.55);
        color: #1f2937;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(15,23,42,0.08);
        backdrop-filter: blur(8px);
    }

    .site-header .menu-toggle:hover {
        background: rgba(255,255,255,0.72);
        border-color: rgba(0,0,0,0.14);
    }

    .site-header .main-nav,
    .site-header .nav-actions.main-nav,
    .site-header nav.main-nav {
        display: none !important;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        border-radius: 18px;
        background: rgba(255,255,255,0.98);
        border: 1px solid rgba(15,23,42,0.10);
        box-shadow: 0 20px 50px rgba(15,23,42,0.12);
        z-index: 999;
    }

    html[data-theme="dark"] .site-header .main-nav,
    html[data-theme="dark"] .site-header .nav-actions.main-nav,
    html[data-theme="dark"] .site-header nav.main-nav {
        background: rgba(255,255,255,0.98);
        border: 1px solid rgba(15,23,42,0.10);
        box-shadow: 0 20px 50px rgba(15,23,42,0.12);
    }

    .site-header .main-nav.active,
    .site-header .nav-actions.main-nav.active,
    .site-header nav.main-nav.active {
        display: flex !important;
    }

    .site-header .main-nav .theme-toggle {
        display: none !important;
    }

    .site-header .main-nav .nav-link,
    .site-header .main-nav .theme-toggle {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 13px 14px;
        border-radius: 14px;
        color: #1f2937 !important;
        background: rgba(0,0,0,0.04) !important;
        border-color: rgba(0,0,0,0.10) !important;
    }

    .site-header .main-nav .theme-toggle {
        margin-top: 2px;
    }
}

@media (min-width: 861px) {
    .main-nav {
        display: flex !important;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .section { padding: 68px 0; }
    .hero-grid { padding: 62px 0; }
    .gallery-carousel { grid-auto-columns: 100%; }

    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .fab-wrap {
        right: 14px;
        bottom: 14px;
    }
}

.lista-trajetoria {
    padding-left: 18px;
    margin: 10px 0 0;
}

.lista-trajetoria li {
    margin-bottom: 6px;
}

#companyCounter {
    display: inline-block;
    margin-top: 8px;
    line-height: 1.8;
}

.timeline-vertical {
    position: relative;
    margin-top: 40px;
    padding-left: 30px;
}

.timeline-vertical::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--accent-strong);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(246,195,22,0.4);
}

.timeline-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-strong);
    margin-bottom: 6px;
    letter-spacing: 0.08em;
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    color: var(--title);
}