/* ==========================================================================
   Bransk Notificador - Camada de efeitos (fx.js)
   Movimento, profundidade e energia. Com prefers-reduced-motion tudo fica estático.
   ========================================================================== */

@property --fx-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --fx-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --fx-neon: var(--brand-alt, #00E5FF);
    --fx-hot: var(--brand-hot, var(--brand, #FF3DA6));
}

/* --------------------------------------------------------------------------
   Campo de sinais (fundo) e camada de comemoração
   -------------------------------------------------------------------------- */
.fx-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    animation: fx-fade-in 1.2s ease forwards;
}

.hud-backdrop .fx-field {
    mask-image: radial-gradient(ellipse 90% 80% at 55% 30%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 55% 30%, #000 30%, transparent 85%);
}

.fx-burst {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100000;
}

/* Orbes de luz respiram devagar */
.hud-orb.o1 { animation: fx-drift-a 22s ease-in-out infinite alternate; }
.hud-orb.o2 { animation: fx-drift-b 26s ease-in-out infinite alternate; }
.hud-orb.o3 { animation: fx-drift-a 30s ease-in-out infinite alternate-reverse; }

/* --------------------------------------------------------------------------
   Entrada da página e revelação na rolagem
   Só opacidade e deslocamento (rodam na GPU, sem filtro de desfoque) e ficam pausadas
   enquanto <html> tem .fx-hold (página ainda carregando fontes e scripts, ver _head.php)
   -------------------------------------------------------------------------- */
html.fx-hold body *,
html.fx-hold body *::before,
html.fx-hold body *::after {
    animation-play-state: paused !important;
}

.main-wrapper > :not(.modal-backdrop):not(script):not(style) {
    animation: fx-rise 0.55s var(--fx-ease) both;
}

.main-wrapper > :nth-child(2) { animation-delay: 0.05s; }
.main-wrapper > :nth-child(3) { animation-delay: 0.1s; }
.main-wrapper > :nth-child(4) { animation-delay: 0.15s; }
.main-wrapper > :nth-child(n + 5) { animation-delay: 0.2s; }

.app-shell .kpi-card,
.feature-tile {
    animation: fx-pop 0.5s var(--fx-ease) both;
}

.dash-kpi-grid > :nth-child(1), .feature-grid > :nth-child(1) { animation-delay: 0.08s; }
.dash-kpi-grid > :nth-child(2), .feature-grid > :nth-child(2) { animation-delay: 0.12s; }
.dash-kpi-grid > :nth-child(3), .feature-grid > :nth-child(3) { animation-delay: 0.16s; }
.dash-kpi-grid > :nth-child(4), .feature-grid > :nth-child(4) { animation-delay: 0.2s; }
.dash-kpi-grid > :nth-child(5), .feature-grid > :nth-child(5) { animation-delay: 0.24s; }
.dash-kpi-grid > :nth-child(n + 6), .feature-grid > :nth-child(n + 6) { animation-delay: 0.28s; }

@supports (animation-timeline: view()) {
    #dash_app > .dash-block:not(.dash-pulse),
    .feature-group + .feature-group {
        animation: fx-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
}

/* Linhas de tabela entram em cascata */
.app-shell .table tbody tr {
    animation: fx-row 0.45s var(--fx-ease) both;
}
.app-shell .table tbody tr:nth-child(2) { animation-delay: 0.03s; }
.app-shell .table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.app-shell .table tbody tr:nth-child(4) { animation-delay: 0.09s; }
.app-shell .table tbody tr:nth-child(5) { animation-delay: 0.12s; }
.app-shell .table tbody tr:nth-child(6) { animation-delay: 0.15s; }
.app-shell .table tbody tr:nth-child(7) { animation-delay: 0.18s; }
.app-shell .table tbody tr:nth-child(n + 8) { animation-delay: 0.21s; }

/* Título sendo decodificado */
.fx-decoding {
    color: var(--fx-neon) !important;
    text-shadow: 0 0 18px color-mix(in srgb, var(--fx-neon) 60%, transparent);
}

/* Título com brilho que percorre as letras */
.app-shell .page-title:not(.fx-decoding),
.auth-brand-title:not(.fx-decoding) {
    background: linear-gradient(100deg, var(--text-primary) 0%, var(--text-primary) 38%, var(--fx-neon) 46%, var(--fx-hot) 54%, var(--text-primary) 62%, var(--text-primary) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fx-title-sheen 7s ease-in-out 1s infinite;
}

/* --------------------------------------------------------------------------
   Holofote que segue o cursor e inclinação 3D
   -------------------------------------------------------------------------- */
.main-wrapper .card {
    position: relative;
}

.main-wrapper .card::after,
.app-shell .kpi-card::after,
.feature-tile::after,
.fx-spot::after,
.auth-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background:
        radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--fx-neon) 9%, transparent), transparent 60%);
    z-index: 0;
}

.main-wrapper .card:hover::after,
.app-shell .kpi-card:hover::after,
.feature-tile:hover::after,
.fx-spot:hover::after,
.auth-card:hover::after {
    opacity: 1;
}

.app-shell .kpi-card,
.app-shell .kpi-card:hover,
.feature-tile,
.feature-tile:hover,
.feature-tile:focus-visible,
[data-tilt] {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
    transition: transform 0.6s var(--fx-ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.app-shell .kpi-card:hover,
.feature-tile:hover,
.feature-tile:focus-visible {
    --lift: -4px;
}

.fx-tilting {
    transition: transform 0.12s linear, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

/* Ícone das funcionalidades: anel orbitando no hover */
.feature-tile-icon {
    position: relative;
}

.feature-tile-icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 1px dashed color-mix(in srgb, var(--fx-neon) 55%, transparent);
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
    transition: opacity 0.3s ease, transform 0.4s var(--fx-ease);
}

.feature-tile:hover .feature-tile-icon::after,
.feature-tile:focus-visible .feature-tile-icon::after {
    opacity: 1;
    transform: scale(1);
    animation: fx-spin 6s linear infinite;
}

.feature-tile:hover .feature-tile-icon {
    color: var(--fx-neon);
    box-shadow: 0 0 22px color-mix(in srgb, var(--fx-neon) 35%, transparent);
}

/* --------------------------------------------------------------------------
   Botões: onda de energia, brilho e decolagem
   -------------------------------------------------------------------------- */
.app-shell .btn,
.auth-btn-primary,
.feature-tile,
.btn-period {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.fx-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, color-mix(in srgb, var(--fx-neon) 30%, transparent) 35%, transparent 70%);
    transform: scale(0);
    animation: fx-ripple 0.65s ease-out forwards;
    z-index: -1;
}

.app-shell .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    transition: left 0s;
}

.app-shell .btn-primary:hover::before {
    left: 130%;
    transition: left 0.7s ease;
}

.app-shell .btn-primary:hover {
    box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--fx-neon) 35%, transparent);
}

.btn-launch .launch-icon svg {
    transition: transform 0.35s var(--fx-ease);
}

.btn-launch:hover .launch-icon svg {
    animation: fx-rumble 0.35s linear infinite;
}

.btn-launch.is-launching .launch-icon svg {
    animation: fx-liftoff 0.7s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

/* Borda neon girando (destaques) */
.fx-border {
    position: relative;
    border-color: transparent !important;
}

.fx-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--fx-angle), transparent 0deg, var(--brand) 60deg, var(--fx-neon) 120deg, transparent 180deg, transparent 240deg, color-mix(in srgb, var(--brand) 60%, transparent) 300deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: fx-angle 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Trilho e barra de comando: energia correndo
   -------------------------------------------------------------------------- */
.rail-link.active::before {
    animation: fx-beam 2.4s ease-in-out infinite;
}

.rail-link .rail-link-icon {
    transition: transform 0.3s var(--fx-ease), color 0.2s ease, box-shadow 0.2s ease;
}

.rail-link:hover .rail-link-icon {
    transform: translateX(2px) scale(1.06);
    color: var(--fx-neon);
}

.app-commandbar::after {
    background: linear-gradient(90deg, transparent 0%, var(--fx-neon) 35%, var(--fx-hot) 65%, transparent 100%) !important;
    background-size: 40% 100% !important;
    background-repeat: no-repeat !important;
    animation: fx-scan 6s ease-in-out infinite;
    opacity: 0.7;
}

/* Halo da marca: só a opacidade de um brilho fixo varia (sem repintar filtro a cada quadro) */
.brand-mark {
    position: relative;
    isolation: isolate;
}

.brand-mark::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 14px;
    background: radial-gradient(circle, color-mix(in srgb, var(--fx-hot) 45%, transparent), color-mix(in srgb, var(--fx-neon) 20%, transparent) 55%, transparent 72%);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    animation: fx-breathe 4s ease-in-out infinite;
}

.cmdk-trigger:hover {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--fx-neon) 40%, transparent), 0 0 24px color-mix(in srgb, var(--fx-neon) 18%, transparent);
}

/* Paleta de comandos surge com zoom e desfoque */
.cmdk:not([hidden]) .cmdk-panel {
    animation: fx-warp-in 0.32s var(--fx-ease) both;
}

/* Modais: aproximação holográfica */
.modal-backdrop.show .modal-dialog {
    animation: fx-warp-in 0.38s var(--fx-ease) both;
}

/* Valores mudando ao vivo */
.fx-counting {
    color: var(--fx-neon);
}

/* --------------------------------------------------------------------------
   Painel RCall · Pulso da operação
   -------------------------------------------------------------------------- */
.dash-pulse {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pulse-hero.card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 3rem);
    padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.25rem, 3vw, 2.5rem);
    overflow: hidden;
    background:
        radial-gradient(600px 300px at 15% 50%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%),
        radial-gradient(500px 260px at 95% 0%, color-mix(in srgb, var(--fx-neon) 12%, transparent), transparent 70%),
        var(--bg-card);
}

.pulse-hero > * {
    position: relative;
    z-index: 2;
}

/* Reator */
.reactor {
    --size: clamp(200px, 22vw, 260px);
    --glow: var(--fx-neon);
    position: relative;
    width: var(--size);
    height: var(--size);
    flex-shrink: 0;
}

.reactor[data-level="top"] { --glow: #10B981; }
.reactor[data-level="good"] { --glow: var(--fx-neon); }
.reactor[data-level="low"] { --glow: #FF5C7A; }
.reactor[data-level="idle"] { --glow: var(--brand); }

.reactor::before {
    content: '';
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--glow) 32%, transparent), transparent 70%);
    filter: blur(12px);
    animation: fx-core 3.2s ease-in-out infinite;
}

.reactor-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.reactor-orbit {
    fill: none;
    stroke: color-mix(in srgb, var(--fx-neon) 60%, transparent);
    stroke-width: 1;
    transform-origin: 120px 120px;
}

.reactor-orbit-outer {
    stroke-dasharray: 2 10;
    animation: fx-spin 40s linear infinite;
}

.reactor-orbit-inner {
    stroke-dasharray: 30 14 4 14;
    stroke: color-mix(in srgb, var(--brand) 75%, transparent);
    animation: fx-spin 18s linear infinite reverse;
}

.reactor-ticks {
    stroke: color-mix(in srgb, var(--text-primary) 30%, transparent);
    stroke-width: 1.2;
    transform-origin: 120px 120px;
    animation: fx-spin 120s linear infinite;
}

.reactor-track {
    fill: none;
    stroke: color-mix(in srgb, var(--text-primary) 12%, transparent);
    stroke-width: 12;
}

.reactor-progress {
    fill: none;
    stroke: url(#reactor_grad);
    stroke-width: 12;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 70%, transparent));
    transition: stroke-dasharray 1.6s var(--fx-ease);
}

.reactor-core {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.15rem;
}

.reactor-core strong {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 24px color-mix(in srgb, var(--glow) 70%, transparent);
    font-variant-numeric: tabular-nums;
}

.reactor-core span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Satélites de canal orbitando */
.reactor-sats {
    position: absolute;
    inset: 0;
    animation: fx-spin 48s linear infinite;
}

.reactor-sat {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform: rotate(var(--a)) translateX(calc(var(--size) / 2 + 2px)) rotate(calc(var(--a) * -1));
}

.reactor-sat-body {
    position: absolute;
    left: 0;
    top: 0;
    translate: -50% -50%;
    white-space: nowrap;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
    border: 1px solid var(--sat, var(--fx-neon));
    box-shadow: 0 0 14px color-mix(in srgb, var(--sat, var(--fx-neon)) 40%, transparent);
    animation: fx-spin 48s linear infinite reverse;
}

.reactor-sat-body b {
    color: var(--sat, var(--fx-neon));
    font-weight: 700;
}

.reactor-sat.chip-whatsapp { --sat: #34D399; }
.reactor-sat.chip-email { --sat: #60A5FA; }
.reactor-sat.chip-sms { --sat: #FFB224; }

/* Texto do pulso */
.pulse-copy {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.pulse-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fx-neon);
}

.pulse-headline {
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2.3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(95deg, var(--text-primary) 10%, var(--brand-deep, var(--brand)) 45%, var(--fx-hot) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse-sub {
    margin: 0;
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.pulse-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    max-width: 640px;
}

.pulse-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--text-primary) 2.5%, transparent);
    min-width: 0;
}

.pulse-stat span,
.pulse-stat small {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pulse-stat small {
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 0.68rem;
}

.pulse-stat strong {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pulse-stat strong.is-up { color: #059669; text-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
.pulse-stat strong.is-down { color: #FF5C7A; text-shadow: 0 0 14px rgba(255, 92, 122, 0.4); }

.pulse-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.pulse-actions .btn-launch {
    padding-inline: 1.2rem;
    font-weight: 600;
}

/* Faixa de transmissões */
.pulse-ticker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    height: 44px;
    padding-left: 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-card) 70%, transparent);
    overflow: hidden;
}

.ticker-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--fx-neon);
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: fx-ticker var(--ticker-duration, 40s) linear infinite;
}

.ticker-track.is-static {
    animation: none;
}

.pulse-ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-clone {
    display: flex;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.4rem;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-right: 1px dashed color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.ticker-item time {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.ticker-arrow {
    color: var(--fx-neon);
}

/* KPIs: minigráfico e medidor */
.kpi-spark {
    display: block;
    width: 100%;
    height: 30px;
    margin-top: 0.6rem;
    color: var(--status-success);
    overflow: visible;
}

.kpi-spark-bad {
    color: var(--status-danger);
}

.kpi-spark-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: fx-draw 1.6s var(--fx-ease) 0.5s forwards;
    filter: drop-shadow(0 0 4px currentColor);
}

.kpi-meter {
    height: 8px;
    margin-top: 0.75rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--text-primary) 12%, transparent);
    overflow: hidden;
}

.kpi-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--fx-hot), var(--fx-neon), #10B981);
    box-shadow: 0 0 10px color-mix(in srgb, var(--fx-neon) 55%, transparent);
    transition: width 1.6s var(--fx-ease);
}

/* Barras de canal enchem com brilho correndo */
.app-shell .dash-bar-fill {
    position: relative;
    overflow: hidden;
    animation: fx-grow 1.2s var(--fx-ease) both;
    transform-origin: left center;
}

.app-shell .dash-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    background-size: 50% 100%;
    background-repeat: no-repeat;
    animation: fx-shimmer 2.8s ease-in-out infinite;
}

@media (max-width: 900px) {
    .pulse-hero.card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .pulse-copy {
        align-items: center;
    }

    .pulse-stats {
        width: 100%;
    }

    .pulse-actions {
        justify-content: center;
    }

    .reactor {
        --size: 200px;
        margin: 1.4rem 0 0.4rem;
    }
}

@media (max-width: 520px) {
    .pulse-stats {
        grid-template-columns: 1fr 1fr;
    }

    .pulse-stat:last-child {
        grid-column: span 2;
    }

    .pulse-actions .btn {
        flex: 1 1 100%;
    }
}

/* --------------------------------------------------------------------------
   Login: cartão holográfico
   -------------------------------------------------------------------------- */
.auth-card {
    position: relative;
    animation: fx-warp-in 0.8s var(--fx-ease) 0.15s both;
}

/* --------------------------------------------------------------------------
   Transição entre páginas (View Transitions entre documentos)
   -------------------------------------------------------------------------- */
@view-transition {
    navigation: auto;
}

.app-rail { view-transition-name: fx-rail; }
.app-commandbar { view-transition-name: fx-commandbar; }
.bottom-bar { view-transition-name: fx-dock; }
.hud-backdrop { view-transition-name: fx-backdrop; }

/* Troca de página é só um esmaecer rápido: o movimento fica com a entrada do conteúdo,
   senão os dois deslocamentos somam e a tela "treme" */
::view-transition-old(root) {
    animation: fx-vt-out 0.16s ease-in both;
}

::view-transition-new(root) {
    animation: fx-vt-in 0.24s ease-out both;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes fx-fade-in { to { opacity: 1; } }
@keyframes fx-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: none; } }
@keyframes fx-pop { from { opacity: 0; scale: 0.96; translate: 0 8px; } to { opacity: 1; scale: none; translate: none; } }
@keyframes fx-row { from { opacity: 0; translate: -10px 0; } to { opacity: 1; translate: none; } }
@keyframes fx-reveal { from { opacity: 0; translate: 0 40px; scale: 0.98; } to { opacity: 1; translate: none; scale: none; } }
@keyframes fx-spin { to { rotate: 360deg; } }
@keyframes fx-angle { to { --fx-angle: 360deg; } }
@keyframes fx-ripple { to { transform: scale(1); opacity: 0; } }
@keyframes fx-drift-a { from { translate: 0 0; scale: 1; } to { translate: 12vw 8vh; scale: 1.15; } }
@keyframes fx-drift-b { from { translate: 0 0; scale: 1.05; } to { translate: -10vw 14vh; scale: 0.9; } }
@keyframes fx-title-sheen { 0%, 70% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
@keyframes fx-beam { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes fx-scan { 0% { background-position: -40% 0; } 100% { background-position: 140% 0; } }
@keyframes fx-breathe { 0%, 100% { opacity: 0; } 50% { opacity: 0.9; } }
@keyframes fx-warp-in { from { opacity: 0; transform: perspective(900px) translateY(16px) rotateX(8deg) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fx-core { 0%, 100% { opacity: 0.7; scale: 0.92; } 50% { opacity: 1; scale: 1.08; } }
@keyframes fx-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@keyframes fx-grow { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes fx-shimmer { 0% { background-position: -60% 0; } 60%, 100% { background-position: 160% 0; } }
@keyframes fx-rumble { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-1px, 1px) rotate(-4deg); } 75% { transform: translate(1px, -1px) rotate(4deg); } }
@keyframes fx-liftoff { 0% { transform: translate(0, 0); } 30% { transform: translate(-2px, 2px); } 100% { transform: translate(40px, -40px); opacity: 0; } }
@keyframes fx-vt-out { to { opacity: 0; } }
@keyframes fx-vt-in { from { opacity: 0; } }

/* --------------------------------------------------------------------------
   Movimento reduzido: sem animação, só o estado final
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .fx-field { opacity: 1; }
    .kpi-spark-line { stroke-dashoffset: 0; }

    @view-transition {
        navigation: none;
    }
}
