/* Estilos exclusivos da landing page (#site-principal). Carregado sempre, mas todos os
   seletores são escopados à landing ou a classes ls-* — zero impacto no portal do cliente.
   Convenção: reveals/animações só ativam quando <html> tem .ls-on (adicionada pelo
   js/landing.js quando o usuário NÃO pediu prefers-reduced-motion). Sem JS ou com motion
   reduzido, tudo fica visível e estático — conteúdo nunca depende de animação. */

/* ── Reveal ao rolar ─────────────────────────────────────────────────────── */
.ls-on [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
    transition:
        opacity .75s cubic-bezier(.22, 1, .36, 1),
        transform .75s cubic-bezier(.22, 1, .36, 1),
        filter .75s cubic-bezier(.22, 1, .36, 1);
    will-change: opacity, transform, filter;
}

.ls-on [data-reveal="left"] { transform: translateX(-36px); }
.ls-on [data-reveal="right"] { transform: translateX(36px); }
.ls-on [data-reveal="zoom"] { transform: scale(.92) translateY(10px); }

.ls-on [data-reveal].ls-in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.ls-hero {
    background:
        radial-gradient(1100px 560px at 78% -12%, rgba(0, 137, 80, .16), transparent 62%),
        radial-gradient(900px 520px at 8% 112%, rgba(212, 175, 55, .12), transparent 58%),
        linear-gradient(180deg, #071B31 0%, #0A2540 52%, #0C2B4E 100%);
}

#ls-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Texto com brilho dourado varrendo (títulos de impacto) */
.ls-shimmer {
    background: linear-gradient(100deg, #D4AF37 0%, #F5E6B3 28%, #D4AF37 55%, #E5C665 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: ls-shimmer 7s ease-in-out infinite;
}

@keyframes ls-shimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

/* Indicador de scroll no rodapé do hero */
.ls-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(226, 232, 240, .55);
    animation: ls-cue 2.4s ease-in-out infinite;
}

@keyframes ls-cue {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .55; }
    50% { transform: translateX(-50%) translateY(9px); opacity: 1; }
}

/* ── Nav: encolhe e ganha sombra ao rolar ────────────────────────────────── */
.ls-nav-inner { height: 5rem; transition: height .3s ease; }
.ls-nav-scrolled .ls-nav-inner { height: 4rem; }
.ls-nav-scrolled { box-shadow: 0 10px 34px -12px rgba(10, 37, 64, .28) !important; }

/* Âncoras não somem embaixo da nav fixa */
#site-principal section[id] { scroll-margin-top: 96px; }

/* Acessibilidade: anel de foco na identidade da marca */
#site-principal :focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Tilt 3D nos cards (transform aplicado pelo JS por frame) ────────────── */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}

[data-tilt].ls-tilting { transition: box-shadow .35s ease; }

/* ── Seção Plataforma ────────────────────────────────────────────────────── */
.ls-plataforma {
    background:
        radial-gradient(1000px 600px at 50% -10%, rgba(17, 58, 99, .55), transparent 65%),
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(180deg, #061726 0%, #0A2540 100%);
    background-size: auto, 44px 44px, 44px 44px, auto;
}

/* Card-moldura do destaque IA: borda gradiente + halo pulsando */
.ls-spotlight {
    position: relative;
    border-radius: 1.75rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(212, 175, 55, .7), rgba(0, 137, 80, .55) 50%, rgba(212, 175, 55, .7));
    animation: ls-halo 4.5s ease-in-out infinite;
}

@keyframes ls-halo {
    0%, 100% { box-shadow: 0 24px 90px -28px rgba(212, 175, 55, .38); }
    50% { box-shadow: 0 24px 110px -22px rgba(0, 137, 80, .42); }
}

.ls-spotlight-inner {
    border-radius: calc(1.75rem - 1px);
    background: linear-gradient(160deg, #0B2036 0%, #0A2540 55%, #0D2E54 100%);
    overflow: hidden;
}

.ls-badge-ia {
    animation: ls-pulse 2.6s ease-in-out infinite;
}

@keyframes ls-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, .45); }
    55% { box-shadow: 0 0 0 9px rgba(212, 175, 55, 0); }
}

/* Cards de módulo (são <button> — reset + visual) */
.ls-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    cursor: pointer;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, .09);
    background: linear-gradient(165deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
    padding: 1.5rem;
    overflow: hidden;
    transition: border-color .35s ease, background .35s ease, box-shadow .35s ease;
}

/* fio de luz no topo do card */
.ls-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .55), transparent);
    opacity: 0;
    transition: opacity .35s ease;
}

.ls-card:hover, .ls-card:focus-visible {
    border-color: rgba(212, 175, 55, .45);
    background: linear-gradient(165deg, rgba(212, 175, 55, .10), rgba(255, 255, 255, .02));
    box-shadow: 0 22px 60px -24px rgba(4, 14, 26, .9);
}

.ls-card:hover::before { opacity: 1; }

.ls-card-icone {
    width: 3rem;
    height: 3rem;
    border-radius: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, .12);
    border: 1px solid rgba(212, 175, 55, .25);
    color: #E5C665;
    margin-bottom: 1rem;
    transition: transform .35s ease;
}

.ls-card:hover .ls-card-icone { transform: translateY(-3px) scale(1.06); }

.ls-card-hint {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    padding-top: 1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(229, 198, 101, .85);
    opacity: .75;
    transition: opacity .3s ease, transform .3s ease;
}

.ls-card:hover .ls-card-hint { opacity: 1; transform: translateX(3px); }

.ls-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #CBD5E1;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Modal 3D dos módulos ────────────────────────────────────────────────── */
.ls-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ls-modal[hidden] { display: none; }

.ls-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 14, 26, .8);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.ls-modal-panel {
    position: relative;
    width: min(1020px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(160deg, #0B2036 0%, #0A2540 60%, #0C2B4E 100%);
    box-shadow: 0 40px 140px -30px rgba(0, 0, 0, .75);
}

.ls-on .ls-modal-panel { animation: ls-modal-in .5s cubic-bezier(.22, 1, .36, 1); }

@keyframes ls-modal-in {
    from { opacity: 0; transform: translateY(30px) scale(.96); }
    to { opacity: 1; transform: none; }
}

/* Palco do canvas 3D com cantoneiras estilo HUD */
.ls-modal-stage {
    position: relative;
    min-height: 300px;
    background:
        radial-gradient(480px 300px at 50% 45%, rgba(17, 58, 99, .65), transparent 75%),
        #071B31;
}

.ls-modal-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.ls-hud-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(212, 175, 55, .55);
    pointer-events: none;
}

.ls-hud-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.ls-hud-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.ls-hud-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.ls-hud-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

@media (min-width: 768px) {
    .ls-modal-grid { display: grid; grid-template-columns: 1.05fr 1fr; }
    .ls-modal-stage { min-height: 460px; }
}

/* ── Linha do tempo da Nossa História ────────────────────────────────────── */
.ls-timeline { position: relative; }

.ls-timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #D4AF37 0%, #008950 55%, rgba(0, 137, 80, .15) 100%);
    border-radius: 2px;
}

.ls-tl-item { position: relative; padding-left: 3rem; }

.ls-tl-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #0A2540;
    border: 2px solid #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px rgba(212, 175, 55, .12);
}

.ls-tl-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #D4AF37;
}

.ls-tl-item:last-child .ls-tl-dot { border-color: #008950; box-shadow: 0 0 0 5px rgba(0, 137, 80, .14); }
.ls-tl-item:last-child .ls-tl-dot::after { background: #008950; }

/* ── Flutuação suave (chips do hero, elementos decorativos) ──────────────── */
.ls-on .ls-float { animation: ls-float 7s ease-in-out infinite; }
.ls-on .ls-float-slow { animation: ls-float 10s ease-in-out infinite; }

@keyframes ls-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ── Telas do sistema no palco do modal (réplica da UI com efeitos) ──────── */
.ls-screen-wrap {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2rem 1.4rem 2.6rem;
    perspective: 1100px;
    pointer-events: none;
}

.ls-steps-palco {
    width: 100%;
    display: flex;
    justify-content: center;
    perspective: 1100px;
}

.ls-screen {
    position: relative;
    width: min(430px, 96%);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, .38);
    background: linear-gradient(168deg, #10305A 0%, #0B2444 55%, #0A1F3A 100%);
    box-shadow: 0 34px 70px -26px rgba(0, 0, 0, .85), 0 0 46px -16px rgba(0, 137, 80, .45);
    transform: rotateY(-8deg) rotateX(3deg);
    overflow: hidden;
    font-size: 12px;
    color: #DCE6F2;
}

.ls-on .ls-screen { animation: ls-screen-float 7s ease-in-out infinite; }

@keyframes ls-screen-float {
    0%, 100% { transform: rotateY(-8deg) rotateX(3deg) translateY(0); }
    50% { transform: rotateY(-6deg) rotateX(2deg) translateY(-8px); }
}

.ls-on .ls-screen-entra .ls-screen-inner { animation: ls-screen-in .55s cubic-bezier(.22, 1, .36, 1); }

@keyframes ls-screen-in {
    from { opacity: 0; transform: translateX(46px); }
    to { opacity: 1; transform: none; }
}

.ls-scr-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .04);
}

.ls-scr-dots { display: inline-flex; gap: 4px; }

.ls-scr-dots i { width: 8px; height: 8px; border-radius: 999px; display: block; }
.ls-dot-r { background: #F25A56; }
.ls-dot-a { background: #E5C665; }
.ls-dot-v { background: #10C47C; }

.ls-scr-titulo { font-weight: 700; color: #fff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ls-scr-tag {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #E5C665;
    border: 1px solid rgba(212, 175, 55, .4);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.ls-scr-corpo { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }

.ls-scr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .035);
}

.ls-scr-row > span { flex: 1; }
.ls-scr-row > span:first-child { flex: 1.4; }
.ls-scr-row > span:last-child { text-align: right; }

.ls-scr-thead {
    background: none;
    padding-bottom: 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #7E93AC;
}

.ls-scr-linha { display: flex; gap: 9px; align-items: flex-start; padding: 5px 8px; border-radius: 7px; background: rgba(255, 255, 255, .035); }

.ls-scr-ic {
    width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08);
    font-weight: 800; font-size: 11px; color: #CBD5E1;
}

.ls-scr-linha-txt { display: flex; flex-direction: column; gap: 1px; }
.ls-scr-linha-txt b { font-size: 12px; color: #EDF2F8; font-weight: 600; }
.ls-scr-linha-txt small { color: #7E93AC; font-size: 10.5px; }

.ls-scr-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

.ls-scr-kpi {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 8px;
    padding: 8px 9px;
    display: flex; flex-direction: column; gap: 2px;
}

.ls-scr-kpi small { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: #7E93AC; font-weight: 700; }
.ls-scr-kpi b { font-size: 15px; }

.ls-scr-flipbig {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px dashed rgba(212, 175, 55, .4);
    border-radius: 9px;
    padding: 8px 12px;
}

.ls-scr-flipbig small { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #A9BBD0; font-weight: 700; }
.ls-scr-flipbig b { font-size: 21px; }

.ls-scr-barras { display: flex; align-items: flex-end; gap: 7px; height: 62px; padding: 2px 6px 0; }

.ls-scr-barras i {
    flex: 1;
    background: linear-gradient(180deg, rgba(212, 175, 55, .85), rgba(212, 175, 55, .3));
    border-radius: 3px 3px 0 0;
    min-height: 8%;
}

.ls-scr-barras i.ls-barra-hi { background: linear-gradient(180deg, rgba(16, 196, 124, .95), rgba(16, 196, 124, .35)); }

.ls-on .ls-scr-barras i { animation: ls-barra-sobe .9s cubic-bezier(.22, 1, .36, 1) backwards; }
.ls-on .ls-scr-barras i:nth-child(2) { animation-delay: .08s; }
.ls-on .ls-scr-barras i:nth-child(3) { animation-delay: .16s; }
.ls-on .ls-scr-barras i:nth-child(4) { animation-delay: .24s; }
.ls-on .ls-scr-barras i:nth-child(5) { animation-delay: .32s; }
.ls-on .ls-scr-barras i:nth-child(6) { animation-delay: .4s; }

@keyframes ls-barra-sobe { from { height: 0 !important; opacity: 0; } }

.ls-scr-texto { margin: 0; color: #A9BBD0; font-size: 11px; line-height: 1.55; }

.ls-scr-chip {
    align-self: flex-start;
    background: rgba(16, 196, 124, .13);
    border: 1px solid rgba(16, 196, 124, .4);
    color: #3BDE9C;
    font-weight: 700;
    font-size: 10.5px;
    border-radius: 999px;
    padding: 4px 11px;
    opacity: 0;
    transform: translateY(6px) scale(.94);
    transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}

.ls-scr-chip.ls-visivel { opacity: 1; transform: none; }

/* estados de cor + flip vermelho→verde */
.ls-vermelho { color: #F87171 !important; }
.ls-verde { color: #34D399 !important; }
.ls-dourado { color: #E5C665 !important; }

.ls-num { font-variant-numeric: tabular-nums; font-weight: 700; }

.ls-on .ls-pulsa { animation: ls-pulsa 1.1s ease-in-out infinite; }

@keyframes ls-pulsa { 50% { opacity: .45; } }

.ls-pop { animation: ls-pop .55s cubic-bezier(.22, 1, .36, 1); }

@keyframes ls-pop {
    0% { transform: scale(.7); }
    55% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* varredura de scan da IA sobre a tela */
.ls-scr-scan {
    position: absolute;
    left: 0; right: 0; top: -12%;
    height: 34px;
    background: linear-gradient(180deg, transparent, rgba(16, 196, 124, .16) 55%, rgba(16, 196, 124, .55));
    border-bottom: 1px solid rgba(16, 196, 124, .8);
    pointer-events: none;
}

.ls-on .ls-scr-scan { animation: ls-scan 4.4s ease-in-out infinite; }

@keyframes ls-scan {
    0% { top: -14%; opacity: 0; }
    8% { opacity: 1; }
    46% { top: 104%; opacity: 1; }
    54% { opacity: 0; }
    100% { top: 104%; opacity: 0; }
}

/* trilha de passos da trajetória da IA */
.ls-steps { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.ls-step {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .05);
    color: #B9C8DA;
    border-radius: 999px;
    padding: 4px 11px 4px 5px;
    font-size: 10.5px;
    font-weight: 700;
    transition: all .4s ease;
}

.ls-step b {
    width: 17px; height: 17px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .12);
    font-size: 10px;
}

.ls-step.ls-ativo {
    border-color: rgba(212, 175, 55, .65);
    background: rgba(212, 175, 55, .14);
    color: #F0DFA0;
}

.ls-step.ls-ativo b { background: #D4AF37; color: #0A2540; }

@media (max-width: 480px) {
    .ls-screen { font-size: 11px; }
    .ls-scr-kpi b { font-size: 13px; }
    .ls-step span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Cinto e suspensório: se o SO pedir menos movimento, desliga tudo ────── */
@media (prefers-reduced-motion: reduce) {

    .ls-on [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    .ls-shimmer, .ls-scroll-cue, .ls-spotlight, .ls-badge-ia,
    .ls-on .ls-float, .ls-on .ls-float-slow,
    .ls-on .ls-screen, .ls-on .ls-scr-scan, .ls-on .ls-pulsa,
    .ls-on .ls-scr-barras i, .ls-pop { animation: none !important; }

    .ls-on .ls-modal-panel { animation: none; }
}
