/* ==========================================================================
   AnySalesLab — Landing Page · CSS Custom
   Complementa Tailwind com gradientes, animações e ajustes finos do tema
   Material Design 3 Dark Premium.
   ========================================================================== */

:root {
    --asl-primary: #5C8FB4;
    --asl-primary-light: #A7D8F0;
    --asl-primary-dark: #0F1D2B;
    --asl-bg: #0a0f14;
    --asl-card: #141a22;
    --asl-hover: #1a2530;
    --asl-border: #2a3540;
    --asl-text: #ffffff;
    --asl-text-mute: #a0a8b0;
    --asl-success: #3fb950;
    --asl-warning: #d29922;
    --asl-danger: #f85149;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--asl-bg);
    color: var(--asl-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* ==========================================================================
   Atmosphere — orbs blurred + partículas (background ambiente)
   Decorativo · pointer-events: none · pausa em prefers-reduced-motion
   ========================================================================== */
.bg-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
/* Garantir que main e elementos da página fiquem acima da atmosphere */
body > main, body > nav, body > header, body > footer, body > section { position: relative; z-index: 1; }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(96px);
    will-change: transform;
    mix-blend-mode: screen;
}
.orb-1 { width: 520px; height: 520px; background: #5C8FB4; top: -8%;  left: -8%;  opacity: 0.55; animation: orbFloat 28s ease-in-out infinite; }
.orb-2 { width: 440px; height: 440px; background: #A7D8F0; top: 38%;  right: -10%; opacity: 0.42; animation: orbFloat 32s ease-in-out infinite -10s; }
.orb-3 { width: 580px; height: 580px; background: #5C8FB4; top: 78%;  left: 22%;  opacity: 0.40; animation: orbFloat 36s ease-in-out infinite -18s; }
.orb-4 { width: 360px; height: 360px; background: #A7D8F0; bottom: 8%; right: 12%; opacity: 0.36; animation: orbFloat 30s ease-in-out infinite -22s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(48px, -36px) scale(1.06); }
    50%      { transform: translate(-30px, 28px) scale(0.96); }
    75%      { transform: translate(-50px, -20px) scale(1.04); }
}

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    bottom: -10px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(167, 216, 240, 0.9);
    box-shadow: 0 0 14px rgba(167, 216, 240, 0.7), 0 0 4px rgba(167, 216, 240, 0.9);
    animation: particleRise 18s linear infinite;
    opacity: 0;
    mix-blend-mode: screen;
}
.particle.p1  { left: 6%;  animation-duration: 22s; animation-delay: -2s; }
.particle.p2  { left: 14%; animation-duration: 18s; animation-delay: -7s;  width: 3px; height: 3px; }
.particle.p3  { left: 24%; animation-duration: 24s; animation-delay: -14s; }
.particle.p4  { left: 36%; animation-duration: 20s; animation-delay: -9s;  width: 5px; height: 5px; opacity: 0; }
.particle.p5  { left: 46%; animation-duration: 26s; animation-delay: -3s;  width: 3px; height: 3px; }
.particle.p6  { left: 58%; animation-duration: 19s; animation-delay: -15s; }
.particle.p7  { left: 68%; animation-duration: 23s; animation-delay: -6s; }
.particle.p8  { left: 78%; animation-duration: 21s; animation-delay: -11s; width: 3px; height: 3px; }
.particle.p9  { left: 86%; animation-duration: 25s; animation-delay: -1s; }
.particle.p10 { left: 93%; animation-duration: 20s; animation-delay: -17s; width: 5px; height: 5px; }

@keyframes particleRise {
    0%   { transform: translateY(0)        translateX(0);   opacity: 0; }
    10%  { opacity: 0.7; }
    50%  { transform: translateY(-50vh)    translateX(20px);}
    90%  { opacity: 0.7; }
    100% { transform: translateY(-105vh)   translateX(-10px); opacity: 0; }
}

/* Reduce motion: para tudo */
@media (prefers-reduced-motion: reduce) {
    .orb, .particle { animation: none !important; }
}

/* Mobile: reduz quantidade visível pra economizar GPU */
@media (max-width: 768px) {
    .orb-3, .orb-4 { display: none; }
    .particle.p2, .particle.p4, .particle.p6, .particle.p8, .particle.p10 { display: none; }
    .orb { filter: blur(64px); opacity: 0.16; }
}

/* ---------- Backgrounds atmosféricos ----------
   alpha mais baixo nos base layers para a "bg-atmosphere" global vazar de forma perceptível. */
.bg-hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(92, 143, 180, 0.20), transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 30%, rgba(167, 216, 240, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(10, 15, 20, 0.62) 0%, rgba(14, 21, 28, 0.7) 100%);
}
.bg-section-elevated {
    background: linear-gradient(180deg, rgba(10, 15, 20, 0.7) 0%, rgba(13, 20, 27, 0.72) 50%, rgba(10, 15, 20, 0.7) 100%);
}
.bg-section-deep {
    background:
        radial-gradient(ellipse 100% 50% at 50% 0%, rgba(15, 29, 43, 0.45), transparent 70%),
        rgba(6, 10, 15, 0.72);
}
.bg-section-finale {
    background:
        radial-gradient(ellipse 60% 60% at 50% 100%, rgba(92, 143, 180, 0.26), transparent 60%),
        linear-gradient(180deg, rgba(10, 15, 20, 0.65) 0%, rgba(14, 21, 28, 0.72) 100%);
}

/* Malha pontilhada sutil (textura de fundo opcional) */
.bg-grid {
    background-image:
        radial-gradient(circle at center, rgba(92, 143, 180, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ---------- Cartões e superfícies ---------- */
.card-asl {
    background: var(--asl-card);
    border: 1px solid var(--asl-border);
    border-radius: 16px;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.card-asl:hover {
    transform: translateY(-2px);
    border-color: rgba(92, 143, 180, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(92, 143, 180, 0.2);
}
.card-asl-interactive { cursor: pointer; }

.glass-card {
    background: rgba(20, 26, 34, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(92, 143, 180, 0.18);
    border-radius: 16px;
}

/* ---------- Botões ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #5C8FB4 0%, #4a7799 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: transform 160ms ease, box-shadow 220ms ease, filter 160ms ease;
    box-shadow: 0 4px 16px rgba(92, 143, 180, 0.32);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 8px 28px rgba(92, 143, 180, 0.5); }
.btn-primary:focus-visible { outline: 2px solid #A7D8F0; outline-offset: 3px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #fff;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 200ms ease;
}
.btn-secondary:hover { border-color: rgba(167, 216, 240, 0.5); background: rgba(92, 143, 180, 0.08); }
.btn-secondary:focus-visible { outline: 2px solid #A7D8F0; outline-offset: 3px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: var(--asl-text-mute);
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: color 160ms ease;
}
.btn-ghost:hover { color: var(--asl-text); }

/* ---------- Tipografia destacada ---------- */
.headline-xl { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.headline-lg { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.headline-md { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; line-height: 1.2; }

.text-gradient {
    background: linear-gradient(135deg, #A7D8F0 0%, #5C8FB4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* Número grande estilizado para pilares/passos */
.step-number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, rgba(92, 143, 180, 0.85) 0%, rgba(15, 29, 43, 0.4) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    letter-spacing: -0.04em;
}

/* ---------- Navbar — versão sólida (matching body bg) ----------
   Não tenta blend transparente: assume a "faixa" do header como elemento
   distinto, sólida na cor base da página. */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 50;
    background-color: #0a0f14;
    border-bottom: 1px solid transparent;
    transition: border-color 220ms ease, box-shadow 220ms ease;
}
.navbar.scrolled {
    border-bottom-color: rgba(42, 53, 64, 0.7);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}

/* ---------- FAQ acordeão ---------- */
.faq-item { border-bottom: 1px solid var(--asl-border); }
.faq-button {
    width: 100%;
    text-align: left;
    padding: 22px 0;
    background: transparent;
    border: none;
    color: var(--asl-text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 160ms ease;
}
.faq-button:hover { color: var(--asl-primary-light); }
.faq-button .faq-icon { transition: transform 240ms ease; flex-shrink: 0; color: var(--asl-text-mute); }
.faq-button[aria-expanded="true"] .faq-icon { transform: rotate(180deg); color: var(--asl-primary-light); }
.faq-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 320ms ease;
}
.faq-panel-inner { padding: 0 0 22px; color: var(--asl-text-mute); font-size: 15px; line-height: 1.6; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(6, 10, 15, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.modal-card {
    background: var(--asl-card);
    border: 1px solid var(--asl-border);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 32px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-card-wide { max-width: 680px; }
.input-asl {
    width: 100%;
    padding: 12px 14px;
    background: var(--asl-bg) !important;
    border: 1px solid var(--asl-border) !important;
    border-radius: 10px;
    color: var(--asl-text) !important;
    font-size: 15px;
    transition: border-color 160ms ease;
}
.input-asl:focus { outline: none; border-color: var(--asl-primary); }
.input-asl::placeholder { color: var(--asl-text-mute); opacity: 0.7; }

label.label-asl {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--asl-text-mute);
    margin-bottom: 6px;
}

/* Select dark (gotcha mencionado no CLAUDE.md) */
select.input-asl {
    background-color: var(--asl-bg);
    color: var(--asl-text);
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23a0a8b0' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
select.input-asl option { background: var(--asl-bg); color: var(--asl-text); }

/* ---------- Material Symbols ---------- */
.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.icon-light { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48; }

/* ---------- Acessibilidade: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Powered by (Hero) — logos parceiras AI/canais
   ========================================================================== */
.powered-by {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}
.powered-by-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--asl-text-mute);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.powered-by-logos {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}
.powered-by-logos a {
    display: inline-flex;
    align-items: center;
    opacity: 0.78;
    transition: opacity 220ms ease, transform 220ms ease;
}
.powered-by-logos a:hover { opacity: 1; transform: scale(1.06); }
.powered-by-logos a:focus-visible { outline: 2px solid var(--asl-primary-light); outline-offset: 4px; border-radius: 4px; }
.powered-by-logos img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 220ms ease;
}
.powered-by-logos img.logo-small { height: 28px; }

/* WhatsApp/Telegram: SVG icon + texto HTML do wordmark
   SVG já tem fill="#ffffff" no arquivo — não precisa de filter raster */
.powered-by-logos a.logo-with-text { gap: 8px; }
.powered-by-logos img.logo-svg-icon {
    height: 32px;
    width: auto;
    filter: none;
}
.powered-by-logos .logo-wordmark {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.015em;
    line-height: 1;
}

@media (max-width: 768px) {
    .powered-by { align-items: center; margin-left: auto; margin-right: auto; }
    .powered-by-logos { gap: 24px; justify-content: center; }
    .powered-by-logos img { height: 28px; }
    .powered-by-logos img.logo-small { height: 22px; }
    .powered-by-logos img.logo-telegram { height: 26px; }
}

/* ==========================================================================
   Animações dos loops (Hero / Wizard / Observatório)
   ========================================================================== */

/* Mensagens de chat (Hero e Observatório) ----------------------------------- */
.anim-msg, .obs-msg, .wiz-msg {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 320ms ease-out, transform 320ms ease-out;
    will-change: opacity, transform;
}
.anim-msg.is-visible, .obs-msg.is-visible, .wiz-msg.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Indicador "digitando..." -------------------------------------------------- */
.anim-typing {
    opacity: 0;
    transition: opacity 200ms ease;
    display: flex;
    gap: 8px;
}
.anim-typing.is-visible { opacity: 1; }
.anim-typing[data-side="right"] { justify-content: flex-end; }
.anim-typing[data-side="left"]  { justify-content: flex-start; }
.anim-typing .bubble {
    background: #1f2c33;
    border-radius: 12px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.anim-typing[data-side="right"] .bubble { background: #005c4b; }
.anim-typing .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: typingDot 1.2s infinite ease-in-out;
}
.anim-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.anim-typing .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Card de avaliação flutuante (Hero) --------------------------------------- */
.anim-card {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 420ms ease-out, transform 420ms ease-out;
}
.anim-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Wizard ------------------------------------------------------------------- */
.wiz-block {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 360ms ease-out, transform 360ms ease-out;
}
.wiz-block.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.wiz-block .wiz-check {
    transform: scale(0);
    transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms;
}
.wiz-block.is-visible .wiz-check { transform: scale(1); }

.wiz-final {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 420ms ease-out, transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wiz-final.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Observação destaque (Seção 02b) ---------------------------------- */
.obs-msg-d {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}
.obs-msg-d.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.obs-dim-bar {
    transition: transform 600ms ease-out, filter 400ms ease;
    transform-origin: bottom;
    will-change: transform;
}
.obs-dim-bar.is-pulsing {
    animation: dimBarPulse 700ms ease-out;
}
@keyframes dimBarPulse {
    0%   { transform: scaleY(0.6); filter: brightness(1.5); }
    100% { transform: scaleY(1);   filter: brightness(1); }
}
.obs-kpi {
    transition: color 200ms ease;
}

/* Observatório indicators -------------------------------------------------- */
.obs-indicator {
    opacity: 0.35;
    transition: opacity 320ms ease, color 320ms ease;
}
.obs-indicator.is-active { opacity: 1; }
.obs-indicator.is-warn .obs-status { color: #d29922; }
.obs-indicator.is-active .obs-status:not(.warn-text) { color: #3fb950; }

.obs-opportunity {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 360ms ease-out, transform 360ms ease-out;
}
.obs-opportunity.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Utilidades ---------- */
.divider-soft {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--asl-border), transparent);
}
.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--asl-primary-light);
    margin-bottom: 12px;
}


/* Alpine.js — evita flash de conteúdo antes da inicialização */
[x-cloak] { display: none !important; }


/* Inputs: vencer o autofill do Chrome (fundo claro) e o plugin forms do Tailwind */
.input-asl:-webkit-autofill,
.input-asl:-webkit-autofill:hover,
.input-asl:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--asl-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--asl-bg) inset !important;
    caret-color: var(--asl-text);
}
