/**
 * AccessFast DS — v1.0
 * Tokens e componentes base extraídos da home (index.php, nov/2026) e organizados.
 * Fonte única: index.php, documentação (docs/design-system-accessfast.html) e protótipo.
 *
 * Fontes (Google Fonts):
 * https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Montserrat:wght@500;600;700;800;900&family=Roboto:wght@300;400;500&display=swap
 * Ícones: bootstrap-icons@1.11.3
 */

:root {
    /* ════ CORES · MARCA ════
       Laranja = ação (CTA, destaque, foco). Azul = tecnologia/informação (IA, dados, links de apoio).
       Nunca usar laranja e azul com o mesmo papel na mesma tela. */
    --af-orange:        #EE9142;
    --af-orange-vivid:  #FF9D4A;
    --af-orange-deep:   #B4612A;
    --af-blue:          #2E8FC9;
    --af-blue-light:    #7FC3EC;
    --af-blue-deep:     #1A567B;
    /* Cores do emblema (medidas nos pixels do logo). Só para o logo e as partículas, não para interface. */
    --af-emblem-navy:   #04446C;   /* metade escura do círculo */
    --af-emblem-sky:    #04649C;   /* metade clara do círculo */
    --af-emblem-bolt:   #EC842C;   /* raio */

    /* ════ CORES · SUPERFÍCIES (tema escuro único) ════ */
    --af-bg:            #05090E;   /* fundo da página */
    --af-bg-2:          #0A121B;   /* seções alternadas */
    --af-bg-3:          #0E1823;   /* elementos flutuantes */
    --af-surface:       rgba(255, 255, 255, .035);
    --af-surface-2:     rgba(255, 255, 255, .06);
    --af-glass:         rgba(10, 18, 27, .72);
    --af-line:          rgba(255, 255, 255, .08);
    --af-line-strong:   rgba(255, 255, 255, .16);

    /* ════ CORES · TEXTO ════ */
    --af-text:          #E8EEF4;
    --af-text-soft:     #A9B8C6;
    --af-text-muted:    #8A9BAB;
    --af-text-faint:    #4F6273;
    --af-text-on-accent:#1A0E04;

    /* ════ CORES · STATUS ════ */
    --af-success:       #4CBE78;
    --af-warning:       #F3BD4F;
    --af-error:         #E5675B;
    --af-info:          var(--af-blue);
    --af-whatsapp:      #25D366;

    /* ════ GRADIENTES ════ */
    --af-grad-brand:    linear-gradient(90deg, var(--af-blue), var(--af-orange));
    --af-grad-cta:      linear-gradient(135deg, var(--af-orange), var(--af-orange-vivid));
    --af-grad-title:    linear-gradient(180deg, #FFFFFF 0%, #CFDBE6 55%, #6F8598 100%);
    --af-grad-accent:   linear-gradient(180deg, var(--af-orange-vivid), var(--af-orange-deep));
    --af-grad-stat:     linear-gradient(135deg, #FFFFFF, #9FC3DC);
    --af-grad-tile:     linear-gradient(145deg, rgba(238, 145, 66, .16), rgba(46, 143, 201, .10));
    --af-grad-tile-blue:linear-gradient(145deg, rgba(46, 143, 201, .20), rgba(238, 145, 66, .08));
    --af-glow-ambient:  radial-gradient(60% 55% at 78% 30%, rgba(238, 145, 66, .16), transparent 70%),
                        radial-gradient(70% 70% at 15% 80%, rgba(46, 143, 201, .14), transparent 70%);

    /* ════ TIPOGRAFIA ════ */
    --af-font-display:  'Montserrat', system-ui, sans-serif;
    --af-font-body:     'Roboto', system-ui, sans-serif;
    --af-font-mono:     'JetBrains Mono', ui-monospace, monospace;

    --af-fs-xs:         .75rem;     /* 12 · eyebrow, labels */
    --af-fs-sm:         .875rem;    /* 14 · nav, chips, metadados */
    --af-fs-base:       1rem;       /* 16 · corpo */
    --af-fs-lg:         1.15rem;    /* 18 · subtítulo, lead */
    --af-fs-xl:         1.25rem;    /* 20 · título de card */
    --af-fs-2xl:        clamp(1.5rem, 2.6vw, 1.85rem);   /* título de painel */
    --af-fs-3xl:        clamp(2rem, 4.5vw, 3.1rem);      /* título de seção */
    --af-fs-display:    clamp(2.25rem, 4.3vw, 3.9rem);   /* headline do hero */
    --af-fs-hero:       clamp(3rem, 12vw, 9.5rem);       /* wordmark gigante */

    --af-lh-tight:      1.08;
    --af-lh-snug:       1.35;
    --af-lh-body:       1.65;
    --af-track-tight:   -.02em;
    --af-track-label:   .1em;
    --af-track-eyebrow: .3em;

    /* ════ ESPAÇAMENTO · base 4px ════ */
    --af-space-1:  4px;
    --af-space-2:  8px;
    --af-space-3:  12px;
    --af-space-4:  16px;
    --af-space-5:  20px;
    --af-space-6:  24px;
    --af-space-8:  32px;
    --af-space-10: 40px;
    --af-space-12: 48px;
    --af-space-16: 64px;
    --af-space-20: 80px;
    --af-space-24: 96px;
    --af-section-y: clamp(80px, 12vw, 140px);
    --af-container: 1180px;
    --af-gutter:    16px;

    /* ════ RAIOS ════ */
    --af-radius-xs:   6px;    /* tags, kbd */
    --af-radius-sm:   12px;   /* inputs, tiles de ícone pequenos */
    --af-radius-md:   14px;   /* FAQ, logos, badges flutuantes */
    --af-radius-lg:   18px;   /* cards */
    --af-radius-xl:   22px;   /* painéis, formulário, chat */
    --af-radius-full: 999px;  /* botões, chips */

    /* ════ SOMBRAS E BRILHOS ════ */
    --af-shadow-sm:   0 10px 24px rgba(0, 0, 0, .35);
    --af-shadow-md:   0 20px 40px rgba(0, 0, 0, .45);
    --af-shadow-lg:   0 40px 80px rgba(0, 0, 0, .55);
    --af-shadow-cta:  0 10px 34px rgba(238, 145, 66, .30);
    --af-shadow-cta-hover: 0 16px 44px rgba(238, 145, 66, .45);
    --af-glow-orange: 0 0 34px rgba(238, 145, 66, .30);
    --af-glow-blue:   0 0 34px rgba(46, 143, 201, .35);
    --af-ring-focus:  0 0 0 4px rgba(238, 145, 66, .15);
    --af-ring-step:   0 0 0 8px rgba(238, 145, 66, .08);

    /* ════ MOVIMENTO ════ */
    --af-ease:        cubic-bezier(.2, .7, .2, 1);
    --af-dur-fast:    .2s;    /* cor, borda */
    --af-dur-base:    .4s;    /* hover de card */
    --af-dur-slow:    .9s;    /* reveal ao rolar */
    --af-stagger:     110ms;  /* atraso entre itens de uma grade */
    --af-blur-glass:  14px;

    /* ════ CAMADAS ════ */
    --af-z-particles: 0;
    --af-z-content:   1;
    --af-z-float:     40;
    --af-z-nav:       50;
    --af-z-progress:  60;
}

/* ════ BASE ════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; overflow-x: clip; }
body {
    margin: 0; background: var(--af-bg); color: var(--af-text);
    font: 400 var(--af-fs-base)/var(--af-lh-body) var(--af-font-body);
    -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--af-font-display); margin: 0; line-height: var(--af-lh-tight); }
b, strong { color: var(--af-text); font-weight: 500; }
:focus-visible { outline: 2px solid var(--af-orange); outline-offset: 3px; }
::selection { background: rgba(238, 145, 66, .35); }

.container { width: min(var(--af-container), 100% - var(--af-gutter) * 2); margin-inline: auto; }
.hl { color: var(--af-orange); }
.text-gradient { background: var(--af-grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--af-font-mono); }

/* ════ TIPOGRAFIA DE SEÇÃO ════ */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 600 var(--af-fs-xs) var(--af-font-display); letter-spacing: var(--af-track-eyebrow);
    text-transform: uppercase; color: var(--af-orange);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.eyebrow--blue { color: var(--af-blue-light); }
.section-title { margin-top: var(--af-space-4); font-weight: 800; font-size: var(--af-fs-3xl); letter-spacing: var(--af-track-tight); }
.section-title em { font-style: normal; color: var(--af-blue); }
.section-sub { margin-top: 18px; color: var(--af-text-muted); font-size: 1.05rem; }
.lead { color: var(--af-text-soft); font-size: var(--af-fs-lg); font-weight: 300; }

/* ════ BOTÕES ════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
    font: 700 13px var(--af-font-display); letter-spacing: var(--af-track-label); text-transform: uppercase; text-decoration: none;
    padding: 16px 30px; border-radius: var(--af-radius-full); border: 1px solid transparent; color: var(--af-text); background: none;
    transition: transform .25s var(--af-ease), box-shadow .25s, background .25s, border-color .25s;
}
.btn--primary { background: var(--af-grad-cta); color: var(--af-text-on-accent); box-shadow: var(--af-shadow-cta); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--af-shadow-cta-hover); }
.btn--ghost { border-color: var(--af-line-strong); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .05); }
.btn--sm { padding: 10px 20px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn i { transition: transform .25s var(--af-ease); }
.btn:hover .bi-arrow-right, .btn:hover .bi-arrow-up-right { transform: translateX(4px); }

/* ════ CHIPS E BADGES ════ */
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--af-radius-full); font-size: 13px;
    background: rgba(46, 143, 201, .1); border: 1px solid rgba(46, 143, 201, .3); color: #B9D8EC;
}
.chip--orange { background: rgba(238, 145, 66, .1); border-color: rgba(238, 145, 66, .3); color: #F6C79C; }
.status {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: var(--af-radius-full);
    font: 600 11px var(--af-font-mono); letter-spacing: .12em; text-transform: uppercase;
    border: 1px solid var(--af-line-strong); color: var(--af-text-soft);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status--ok   { color: var(--af-success); border-color: rgba(76, 190, 120, .35); }
.status--live { color: var(--af-orange); border-color: rgba(238, 145, 66, .35); }
.status--info { color: var(--af-blue-light); border-color: rgba(46, 143, 201, .35); }
.status--err  { color: var(--af-error); border-color: rgba(229, 103, 91, .35); }

/* ════ CARD (com holofote que segue o mouse: --mx/--my) ════ */
.card {
    position: relative; overflow: hidden; padding: 38px 32px 34px; border-radius: var(--af-radius-lg);
    background: var(--af-surface); border: 1px solid var(--af-line);
    transition: border-color var(--af-dur-base), background var(--af-dur-base), transform var(--af-dur-base) var(--af-ease);
}
.card::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--af-dur-base);
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(238, 145, 66, .12), transparent 60%);
}
.card:hover { border-color: rgba(238, 145, 66, .35); background: var(--af-surface-2); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card__num { position: absolute; top: 26px; right: 28px; font: 700 13px var(--af-font-display); color: rgba(255, 255, 255, .14); letter-spacing: .1em; }
.card__icon {
    width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 26px;
    font-size: 26px; color: var(--af-orange); background: var(--af-grad-tile); border: 1px solid rgba(238, 145, 66, .25);
    transition: transform .5s var(--af-ease), box-shadow .5s;
}
.card:hover .card__icon { transform: rotate(-6deg) scale(1.06); box-shadow: var(--af-glow-orange); }
.card h3 { font-size: var(--af-fs-xl); font-weight: 700; margin-bottom: 12px; }
.card p { margin: 0; color: var(--af-text-muted); font-size: .97rem; }
.card--blue .card__icon { color: var(--af-blue-light); background: var(--af-grad-tile-blue); border-color: rgba(46, 143, 201, .35); }
.card--blue:hover { border-color: rgba(46, 143, 201, .45); }
.card--blue::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(46, 143, 201, .16), transparent 60%); }

/* ════ PAINEL DE VIDRO (cards de serviço sobre as partículas) ════ */
.glass {
    position: relative; border-radius: var(--af-radius-xl); padding: clamp(26px, 3.4vw, 38px);
    background: var(--af-glass); border: 1px solid var(--af-line-strong);
    backdrop-filter: blur(var(--af-blur-glass)) saturate(1.2); -webkit-backdrop-filter: blur(var(--af-blur-glass)) saturate(1.2);
    box-shadow: var(--af-shadow-lg);
}
.glass::after { /* filete de luz no topo */
    content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 157, 74, .7), rgba(127, 195, 236, .5), transparent);
}
.svc__tag { font: 500 12px var(--af-font-mono); color: var(--af-orange); letter-spacing: .08em; }
.svc h3 { margin-top: 10px; font-size: var(--af-fs-2xl); font-weight: 800; letter-spacing: var(--af-track-tight); }
.svc > p { margin: 14px 0 0; color: var(--af-text-soft); }
.svc__list { list-style: none; margin: 22px 0 0; padding: 0; }
.svc__list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0;
    border-top: 1px solid var(--af-line); font-size: 15px;
}
.svc__list li span { font: 400 12px var(--af-font-mono); color: var(--af-text-muted); text-align: right; }

/* ════ ESTATÍSTICA ════ */
.stat { position: relative; padding: 22px; border-radius: 16px; background: var(--af-surface); border: 1px solid var(--af-line); }
.stat i { position: absolute; right: 18px; top: 18px; font-size: 20px; color: var(--af-blue); opacity: .7; }
.stat__num { display: block; font: 800 clamp(1.9rem, 3.4vw, 2.5rem)/1 var(--af-font-display); background: var(--af-grad-stat); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { display: block; margin-top: 8px; font-size: 13px; color: var(--af-text-muted); }

/* ════ HUD (legenda técnica das partículas) ════ */
.hud { font: 500 11px/1.7 var(--af-font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--af-text-muted); text-align: right; }
.hud b { color: var(--af-orange); font-weight: 500; }

/* ════ FORMULÁRIO ════ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; letter-spacing: var(--af-track-label); text-transform: uppercase; color: var(--af-text-muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 14px 16px; border-radius: var(--af-radius-sm); font: inherit; color: var(--af-text);
    background: rgba(0, 0, 0, .35); border: 1px solid var(--af-line-strong); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--af-orange); box-shadow: var(--af-ring-focus); }
.field--error input { border-color: var(--af-error); }
.field__error { margin-top: 6px; font-size: 12px; color: #F08A80; }

/* ════ FAQ ════ */
.faq-item { border-radius: var(--af-radius-md); background: var(--af-surface); border: 1px solid var(--af-line); transition: border-color .3s, background .3s; }
.faq-item[open] { border-color: rgba(238, 145, 66, .35); background: var(--af-surface-2); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 600 1rem var(--af-font-display); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--af-line-strong); color: var(--af-orange); transition: transform .35s var(--af-ease); }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 22px 22px; color: var(--af-text-muted); }

/* ════ REVEAL AO ROLAR ════ */
.reveal { opacity: 0; transform: translateY(46px) scale(.97); filter: blur(6px);
    transition: opacity var(--af-dur-slow) var(--af-ease), transform var(--af-dur-slow) var(--af-ease), filter var(--af-dur-slow) var(--af-ease);
    transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* ════ PALCO DE PARTÍCULAS ════ */
.af-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--af-z-particles); pointer-events: none; }
.af-stage { position: relative; aspect-ratio: 1; width: 100%; }
.af-stage__fallback { position: absolute; inset: 18%; width: 64%; opacity: 0; }
.no-webgl .af-stage__fallback { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; filter: none; }
}
