/* Seletor de tema compartilhado entre o site principal e a experiencia mobile. */
:root {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --blue-dark: #a9c9ff;
    --blue: #6da4ff;
    --bg: #020817;
    --text: #f7f9fc;
    --muted: #b4bfd0;
    --line: #253651;
    --white: #ffffff;
    --shadow-soft: 0 22px 58px rgba(0, 0, 0, 0.42);
    --shadow-card: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
    position: relative;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dce5f2;
    border-radius: 14px;
    color: #082f7a;
    background: #f4f7fc;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    outline: 3px solid rgba(255, 106, 0, 0.22);
    outline-offset: 2px;
}

.desktop-theme-toggle {
    width: 42px;
    height: 42px;
    margin-left: auto;
    font-size: 1rem;
}

.theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

:root[data-theme="dark"] .theme-toggle {
    border-color: #2b4162;
    color: #ffd08a;
    background: #102441;
}

/* Site principal: tema escuro institucional. */
:root[data-theme="dark"] body {
    background: #020817;
    color: #f7f9fc;
}

:root[data-theme="dark"] .nav-content {
    border-color: rgba(148, 184, 239, 0.18);
    background: rgba(6, 20, 43, 0.96);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .main-nav a,
:root[data-theme="dark"] .nav-phone {
    color: #dbe8ff;
}

:root[data-theme="dark"] .main-nav a:hover,
:root[data-theme="dark"] .main-nav a.is-active {
    color: #ffffff;
    background: #17345e;
}

:root[data-theme="dark"] .mobile-menu-toggle {
    border-color: #2b4162;
    color: #dbe8ff;
    background: #102441;
}

:root[data-theme="dark"] .hero {
    background: #020817;
}

:root[data-theme="dark"] .hero::after {
    background:
        linear-gradient(90deg, rgba(2, 8, 23, 0.99) 0%, rgba(2, 8, 23, 0.94) 35%, rgba(2, 8, 23, 0.66) 57%, rgba(2, 8, 23, 0.12) 80%),
        linear-gradient(180deg, rgba(2, 8, 23, 0.06) 48%, #020817 100%);
}

:root[data-theme="dark"] .hero-slide {
    filter: saturate(0.88) contrast(1.02) brightness(0.82);
}

:root[data-theme="dark"] .hero-kicker,
:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .hero h1 span,
:root[data-theme="dark"] .hero p,
:root[data-theme="dark"] .hero-proof,
:root[data-theme="dark"] .microcopy span,
:root[data-theme="dark"] .microcopy strong,
:root[data-theme="dark"] .quote-calculator .form-head h2,
:root[data-theme="dark"] .quote-calculator .quote-contact-field,
:root[data-theme="dark"] .quote-calculator .quote-estimate-mode > strong,
:root[data-theme="dark"] .hero-stats strong,
:root[data-theme="dark"] #necessidade .section-title,
:root[data-theme="dark"] .section-before-after .section-title,
:root[data-theme="dark"] .about-hero h2,
:root[data-theme="dark"] .value-card h3,
:root[data-theme="dark"] .metric-card strong,
:root[data-theme="dark"] .clients-hero-content,
:root[data-theme="dark"] .clients-hero-content > p,
:root[data-theme="dark"] .clients-title,
:root[data-theme="dark"] .clients-title em {
    color: #f7f9fc;
}

:root[data-theme="dark"] .hero h1 span,
:root[data-theme="dark"] .hero-kicker span,
:root[data-theme="dark"] .hero-proof i,
:root[data-theme="dark"] .microcopy i,
:root[data-theme="dark"] .hero-stats i {
    color: var(--orange);
}

:root[data-theme="dark"] .hero p,
:root[data-theme="dark"] .hero-proof,
:root[data-theme="dark"] .microcopy small,
:root[data-theme="dark"] .quote-calculator .form-head p,
:root[data-theme="dark"] .hero-stats span,
:root[data-theme="dark"] #necessidade .section-subtitle,
:root[data-theme="dark"] .section-before-after .section-subtitle,
:root[data-theme="dark"] .about-hero p,
:root[data-theme="dark"] .metric-card {
    color: #b4bfd0;
}

:root[data-theme="dark"] .btn-ghost,
:root[data-theme="dark"] .microcopy span,
:root[data-theme="dark"] .quote-calculator,
:root[data-theme="dark"] .hero-stats,
:root[data-theme="dark"] .modalities-arrow,
:root[data-theme="dark"] .modalities-dots,
:root[data-theme="dark"] .before-after-tabs,
:root[data-theme="dark"] .about-pill,
:root[data-theme="dark"] .value-card,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .clients-badge,
:root[data-theme="dark"] .clients-rating-card,
:root[data-theme="dark"] .review-card,
:root[data-theme="dark"] .step-card,
:root[data-theme="dark"] .faq-card,
:root[data-theme="dark"] .urgency-grid,
:root[data-theme="dark"] .modality-card,
:root[data-theme="dark"] .modality-card-copy {
    border-color: #253651;
    background: #0a1930;
    color: #f7f9fc;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .btn-ghost,
:root[data-theme="dark"] .modalities-arrow,
:root[data-theme="dark"] .modalities-dots,
:root[data-theme="dark"] .about-pill,
:root[data-theme="dark"] .clients-badge {
    color: #dbe8ff;
}

:root[data-theme="dark"] .quote-calculator .quote-contact-field input,
:root[data-theme="dark"] .quote-calculator .quote-address-input,
:root[data-theme="dark"] .quote-calculator .quote-property-field select,
:root[data-theme="dark"] .quote-calculator .quote-item-input-wrap,
:root[data-theme="dark"] .quote-calculator .quote-mode-card {
    border-color: #304460;
    background: #0f213d;
    color: #f7f9fc;
}

:root[data-theme="dark"] .quote-calculator input,
:root[data-theme="dark"] .quote-calculator select,
:root[data-theme="dark"] .quote-calculator textarea {
    color: #f7f9fc;
}

:root[data-theme="dark"] .quote-calculator input::placeholder,
:root[data-theme="dark"] .quote-calculator textarea::placeholder {
    color: #8fa0b8;
}

:root[data-theme="dark"] .quote-calculator .quote-mode-card:hover,
:root[data-theme="dark"] .quote-calculator .quote-mode-card.is-active {
    border-color: #6da4ff;
    background: #17345e;
}

:root[data-theme="dark"] #necessidade,
:root[data-theme="dark"] .section-before-after,
:root[data-theme="dark"] .section-authority {
    background: linear-gradient(180deg, #020817 0%, #06142b 52%, #020817 100%);
    color: #f7f9fc;
}

:root[data-theme="dark"] .before-after-tabs button {
    background: #102441;
    color: #b4bfd0;
}

:root[data-theme="dark"] .before-after-tabs button:hover,
:root[data-theme="dark"] .before-after-tabs button.is-active {
    color: #ffffff;
}

:root[data-theme="dark"] .before-after-tabs button.is-active {
    background: #1355c5;
}

:root[data-theme="dark"] .about-hero,
:root[data-theme="dark"] .clients-hero {
    background: #06142b;
}

:root[data-theme="dark"] .about-hero::after {
    background: linear-gradient(180deg, rgba(6, 20, 43, 0.88), rgba(6, 20, 43, 0.98));
}

:root[data-theme="dark"] .clients-hero-bg {
    background:
        linear-gradient(180deg, rgba(6, 20, 43, 0.78), rgba(6, 20, 43, 0.96)),
        url("../assets/hero-carousel-2.jpg") center / cover no-repeat;
}

:root[data-theme="dark"] .clients-hero::after {
    background: radial-gradient(circle at center, rgba(109, 164, 255, 0.2), transparent 44%);
}

/* Experiencia mobile: tema escuro com a mesma hierarquia do tema claro. */
:root[data-theme="dark"] .app-shell {
    --bg: #020817;
    --panel: #08182f;
    --panel-2: #102544;
    --line: #293b58;
    --text: #f7f9fc;
    --muted: #b4bfd0;
    --navy: #a9c9ff;
    --navy-dark: #dbe8ff;
    background: #020817;
    border-color: #172842;
    color: #f7f9fc;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .app-topbar {
    background: rgba(4, 17, 38, 0.96);
    border-color: #1f314d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.app-shell .app-topbar {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

.app-shell .app-topbar .brand img {
    width: min(152px, 100%);
}

.mobile-theme-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 13px;
}

:root[data-theme="dark"] .app-topbar .icon-button:not(.icon-button-whatsapp) {
    color: #dbe8ff;
    background: #102441;
    border-color: #2b4162;
}

:root[data-theme="dark"] .app-topbar .icon-button-whatsapp {
    color: #ffffff;
    background: var(--green);
    border-color: var(--green);
}

:root[data-theme="dark"] .secondary-cta,
:root[data-theme="dark"] .ghost-link,
:root[data-theme="dark"] .section-panel,
:root[data-theme="dark"] .service-card,
:root[data-theme="dark"] .about-card,
:root[data-theme="dark"] .solution-card,
:root[data-theme="dark"] .mobile-form,
:root[data-theme="dark"] .attachment-box,
:root[data-theme="dark"] .form-card,
:root[data-theme="dark"] .attachment-item {
    color: #f7f9fc;
    background: #08182f;
    border-color: #293b58;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .hello,
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .service-body h3,
:root[data-theme="dark"] .service-body h4,
:root[data-theme="dark"] .about-card h3,
:root[data-theme="dark"] .solution-card h3,
:root[data-theme="dark"] .mobile-form label,
:root[data-theme="dark"] .company-screen h2,
:root[data-theme="dark"] .budget-intro h2,
:root[data-theme="dark"] .form-card h3,
:root[data-theme="dark"] .attachment-item strong {
    color: #f7f9fc;
}

:root[data-theme="dark"] .quote-card,
:root[data-theme="dark"] .important-box,
:root[data-theme="dark"] .reasons-panel,
:root[data-theme="dark"] .trust-card,
:root[data-theme="dark"] .calculator-link,
:root[data-theme="dark"] .orange-panel {
    color: #f7f9fc;
    background: #102544;
    border-color: #2b4162;
}

:root[data-theme="dark"] .quote-card h3,
:root[data-theme="dark"] .quote-card a,
:root[data-theme="dark"] .important-box strong,
:root[data-theme="dark"] .reasons-panel > strong,
:root[data-theme="dark"] .trust-card > strong,
:root[data-theme="dark"] .calculator-link {
    color: #dbe8ff;
}

:root[data-theme="dark"] .quick-tile,
:root[data-theme="dark"] .included-grid span,
:root[data-theme="dark"] .addon-scroller span,
:root[data-theme="dark"] .pill-grid span,
:root[data-theme="dark"] .contact-actions a {
    color: #dbe8ff;
    background: #0f213d;
    border-color: #293b58;
}

:root[data-theme="dark"] .mobile-form input,
:root[data-theme="dark"] .mobile-form textarea,
:root[data-theme="dark"] .mobile-form select,
:root[data-theme="dark"] .form-question,
:root[data-theme="dark"] .mobile-address-suggestions,
:root[data-theme="dark"] .form-card .form-field-stack > label,
:root[data-theme="dark"] .form-card .form-question select,
:root[data-theme="dark"] .form-card .form-question input[type="date"] {
    color: #f7f9fc;
    background: #0f213d;
    border-color: #304460;
}

:root[data-theme="dark"] .mobile-form input::placeholder,
:root[data-theme="dark"] .mobile-form textarea::placeholder,
:root[data-theme="dark"] .form-card input::placeholder,
:root[data-theme="dark"] .form-card textarea::placeholder {
    color: #8fa0b8;
}

:root[data-theme="dark"] .bottom-nav {
    background: rgba(4, 17, 38, 0.97);
    border-color: #293b58;
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .bottom-nav a {
    color: #aab8cc;
}

:root[data-theme="dark"] .bottom-nav a.active,
:root[data-theme="dark"] .bottom-nav a.active i {
    color: #a9c9ff;
}

:root[data-theme="dark"] .side-menu-panel,
:root[data-theme="dark"] .form-hero {
    color: #f7f9fc;
    background: #08182f;
    border-color: #293b58;
}

:root[data-theme="dark"] .side-menu-panel a,
:root[data-theme="dark"] .form-hero h2,
:root[data-theme="dark"] .form-hero .back-link {
    color: #dbe8ff;
    border-color: #293b58;
}

:root[data-theme="dark"] .form-hero .back-link {
    background: #102441;
}

:root[data-theme="dark"] .budget-screen {
    background: #020817;
}

:root[data-theme="dark"] .budget-intro,
:root[data-theme="dark"] .form-card h3 {
    border-color: #293b58;
}

:root[data-theme="dark"] .form-card .form-field-stack > span,
:root[data-theme="dark"] .form-card .form-question::before,
:root[data-theme="dark"] .privacy-note {
    color: #aab8cc;
}

:root[data-theme="dark"] .form-card .form-question-date input[type="date"] {
    color-scheme: dark;
}

:root[data-theme="dark"] .form-card .form-question-date input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

:root[data-theme="dark"] .form-card .attachment-box,
:root[data-theme="dark"] .form-card .mobile-address-suggestions,
:root[data-theme="dark"] .form-card .mobile-address-suggestions button,
:root[data-theme="dark"] .form-card .mobile-address-message {
    color: #f7f9fc;
    background: #0f213d;
    border-color: #304460;
}

:root[data-theme="dark"] .intent-guide-launcher {
    color: #f7f9fc;
    background: rgba(8, 24, 47, 0.97);
    border-color: #304460;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

:root[data-theme="dark"] .intent-guide-dialog {
    color: #f7f9fc;
    background: #08182f;
    border-color: #304460;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.48);
}

:root[data-theme="dark"] .intent-guide-head {
    border-color: #293b58;
}

:root[data-theme="dark"] .intent-guide-head small,
:root[data-theme="dark"] .intent-guide-step > p:not(.intent-guide-eyebrow),
:root[data-theme="dark"] .intent-guide-options small {
    color: #aab8cc;
}

:root[data-theme="dark"] .intent-guide-head strong,
:root[data-theme="dark"] .intent-guide-step h2,
:root[data-theme="dark"] .intent-guide-options > button {
    color: #f7f9fc;
}

:root[data-theme="dark"] .intent-guide-close,
:root[data-theme="dark"] .intent-guide-options > button,
:root[data-theme="dark"] .intent-guide-back {
    background: #0f213d;
    border-color: #304460;
}

:root[data-theme="dark"] .intent-guide-close,
:root[data-theme="dark"] .intent-guide-back {
    color: #dbe8ff;
}

:root[data-theme="dark"] .intent-guide-options > button:hover,
:root[data-theme="dark"] .intent-guide-options > button:focus-visible {
    border-color: #6da4ff;
    background: #17345e;
}

:root[data-theme="dark"] .intent-guide-options > button > i:first-child {
    color: #a9c9ff;
    background: #17345e;
}

@media (max-width: 768px) {
    .desktop-theme-toggle {
        display: none;
    }

    :root[data-theme="dark"] .navbar {
        background: rgba(4, 17, 38, 0.97);
        border-color: #293b58;
    }

    :root[data-theme="dark"] .hero .hero-carousel {
        background: #102441;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
    }

    :root[data-theme="dark"] .hero::after {
        background: linear-gradient(180deg, rgba(2, 8, 23, 0.02) 20%, rgba(2, 8, 23, 0.28) 54%, #020817 100%);
    }

    :root[data-theme="dark"] .hero-content {
        border-color: #253651;
        background: rgba(8, 24, 47, 0.97);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    }

    :root[data-theme="dark"] .mobile-bottom-nav {
        border-color: #293b58;
        background: rgba(4, 17, 38, 0.97);
        box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.34);
    }

    :root[data-theme="dark"] .mobile-bottom-nav a {
        color: #aab8cc;
    }

    :root[data-theme="dark"] .mobile-bottom-nav i {
        color: #a9c9ff;
    }
}

@media (max-width: 360px) {
    .app-topbar-actions {
        gap: 5px;
    }

    .mobile-theme-toggle,
    .app-topbar-actions .icon-button {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .app-topbar .brand img {
        width: 136px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle {
        transition: none;
    }
}

/* Carrossel de modalidades no Clean: leve, fotografico e separado do dark. */
:root[data-theme="light"] #necessidade {
    background: linear-gradient(180deg, #f5f8fd 0%, #ffffff 50%, #f6f8fc 100%);
}

:root[data-theme="light"] .modality-card {
    border: 1px solid #dce5f1;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(8, 47, 122, 0.14);
    opacity: 0.56;
    filter: blur(1.4px) brightness(1.03) saturate(0.72);
    transform: scale(0.9);
}

:root[data-theme="light"] .modality-card.is-near {
    opacity: 0.78;
    filter: blur(0.7px) brightness(1.02) saturate(0.82);
    transform: scale(0.94);
}

:root[data-theme="light"] .modality-card.is-active {
    border-color: rgba(8, 47, 122, 0.16);
    box-shadow: 0 28px 72px rgba(8, 47, 122, 0.18);
    opacity: 1;
    filter: none;
    transform: scale(1);
}

:root[data-theme="light"] .modality-card img {
    filter: saturate(0.96) contrast(0.97) brightness(1.03);
}

:root[data-theme="light"] .modality-card::before {
    background: rgba(238, 244, 252, 0.18);
    backdrop-filter: blur(3px);
}

:root[data-theme="light"] .modality-card.is-active::before {
    background: transparent;
    backdrop-filter: blur(0);
}

:root[data-theme="light"] .modality-card::after {
    background:
        linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 38%, rgba(255, 255, 255, 0.78) 55%, rgba(255, 255, 255, 0.16) 78%, rgba(255, 255, 255, 0.03) 100%),
        linear-gradient(180deg, rgba(247, 250, 255, 0.02) 48%, rgba(8, 47, 122, 0.08) 100%);
}

:root[data-theme="light"] .modality-card-copy {
    width: min(390px, 55%);
    gap: 13px;
    padding: 38px 42px;
    color: #101828;
    background: transparent;
}

:root[data-theme="light"] .modality-card-copy span {
    padding: 7px 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ff7200, #ed5800);
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.2);
}

:root[data-theme="light"] .modality-card-copy h3 {
    color: #082f7a;
    font-size: clamp(2rem, 2.8vw, 2.9rem);
    line-height: 0.98;
    text-shadow: none;
}

:root[data-theme="light"] .modality-card-copy p {
    color: #475467;
    font-size: 0.96rem;
    line-height: 1.5;
}

:root[data-theme="light"] .modality-card-copy li {
    color: #25324a;
    font-size: 0.9rem;
}

:root[data-theme="light"] .modality-card-copy li::before {
    background: #ff6a00;
    box-shadow: 0 0 0 5px rgba(255, 106, 0, 0.12);
}

:root[data-theme="light"] .modality-card-copy .btn {
    min-height: 48px;
    border: 1px solid #cbd9ed;
    border-radius: 13px;
    color: #0b3d91;
    background: #eef4ff;
    box-shadow: none;
    text-transform: none;
}

:root[data-theme="light"] .modality-card.is-active .modality-card-copy .btn {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #ff7200, #ed5800);
    box-shadow: 0 12px 26px rgba(255, 106, 0, 0.24);
}

:root[data-theme="light"] .modality-card-copy .btn:hover,
:root[data-theme="light"] .modality-card-copy .btn:focus-visible {
    border-color: #ff6a00;
    color: #ffffff;
    background: #ff6a00;
}

:root[data-theme="light"] .modalities-controls {
    margin-top: 22px;
}

:root[data-theme="light"] .modalities-arrow,
:root[data-theme="light"] .modalities-dots {
    border-color: #dce5f1;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(8, 47, 122, 0.1);
}

:root[data-theme="light"] .modalities-arrow {
    color: #082f7a;
}

:root[data-theme="light"] .modalities-arrow:hover,
:root[data-theme="light"] .modalities-arrow:focus-visible {
    color: #ffffff;
    background: #ff6a00;
}

:root[data-theme="light"] .modalities-dot {
    background: #bdc9db;
}

:root[data-theme="light"] .modalities-dot.is-active {
    background: #ff6a00;
}

@media (max-width: 768px) {
    :root[data-theme="light"] .modality-card {
        filter: blur(0.8px) brightness(1.02) saturate(0.76);
    }

    :root[data-theme="light"] .modality-card.is-active {
        filter: none;
    }

    :root[data-theme="light"] .modality-card::after {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 12%, rgba(255, 255, 255, 0.78) 54%, rgba(255, 255, 255, 0.98) 76%, #ffffff 100%);
    }

    :root[data-theme="light"] .modality-card-copy {
        width: 100%;
        padding: 26px 22px;
    }

    :root[data-theme="light"] .modality-card-copy h3 {
        font-size: 2rem;
    }
}
