/* eSocial Connect — site público e páginas de conta. Identidade AnaCodeTech. */
:root {
    --navy-950: #020c1f;
    --navy-900: #051a42;
    --brand: #0046a4;
    --sky: #2f7bff;
    --sky-soft: #8fbbff;
    --ice: #dcebff;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
html, body { overflow-x: clip; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--sky); color: #fff; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

/* ---------- Fundo do hero ---------- */
.hero-bg {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(60rem 38rem at 85% -8%, rgba(47, 123, 255, .38), transparent 60%),
        radial-gradient(44rem 34rem at -5% 35%, rgba(0, 70, 164, .6), transparent 62%),
        linear-gradient(180deg, var(--navy-950), var(--navy-900) 72%, #071f4f);
}
.grid-lines::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(143, 187, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 187, 255, .07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 30%, transparent 75%);
}

/* ---------- Utilitários visuais ---------- */
.glass {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .13);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.text-gradient {
    background: linear-gradient(100deg, #fff 10%, var(--sky-soft) 55%, var(--sky) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand);
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: currentColor; border-radius: 2px; }
.on-dark .eyebrow { color: var(--sky-soft); }

/* ---------- Botões ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    overflow: hidden;
    border-radius: .9rem;
    padding: .85rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, border-color .3s, color .3s;
    will-change: transform;
}
.btn:active { transform: translateY(0) scale(.98) !important; }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--brand));
    box-shadow: 0 10px 30px -10px rgba(47, 123, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px rgba(47, 123, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); transform: translateY(-2px); }
.btn-outline { color: var(--brand); border: 1.5px solid rgba(0, 70, 164, .35); background: #fff; }
.btn-outline:hover { border-color: var(--brand); background: #f1f7ff; transform: translateY(-2px); }
.btn-light { color: var(--brand); background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.btn-light:hover { transform: translateY(-2px); background: var(--ice); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Header ---------- */
.site-header { transition: background-color .35s, box-shadow .35s, border-color .35s, padding .35s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled {
    background: rgba(2, 12, 31, .78);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 40px -20px rgba(0, 0, 0, .6);
}
.nav-link { position: relative; padding: .4rem 0; color: rgba(255, 255, 255, .72); font-size: .875rem; font-weight: 500; transition: color .25s; }
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sky), var(--sky-soft));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

.burger { width: 2.75rem; height: 2.75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: .8rem; }
.burger span { display: block; width: 1.25rem; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 6rem 1.5rem 2rem;
    background: rgba(2, 12, 31, .96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-menu a.m-link {
    display: block;
    padding: 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mobile-menu.is-open a.m-link { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 60ms + 120ms); }

/* ---------- Revelar ao rolar ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
@media (min-width: 1024px) {
    .js [data-reveal="left"] { transform: translateX(-32px); }
    .js [data-reveal="right"] { transform: translateX(32px); }
}
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Janela de código ---------- */
.code-window { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(143, 187, 255, .12); }
.code-tab { padding: .45rem .85rem; border-radius: .6rem; font-size: .75rem; font-weight: 600; color: rgba(255, 255, 255, .55); transition: color .25s, background-color .25s; }
.code-tab:hover { color: #fff; }
.code-tab[aria-selected="true"] { color: #fff; background: rgba(47, 123, 255, .28); }
.code-pane { scrollbar-width: thin; scrollbar-color: rgba(143, 187, 255, .35) transparent; display: none; animation: pane-in .45s var(--ease); }
.code-pane.is-active { display: block; }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.code-pane pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.75; tab-size: 2; }
.tk-k { color: #7cb3ff; } .tk-s { color: #9be7c4; } .tk-c { color: #6f86ab; } .tk-n { color: #ffcf8a; }
.resp { border-top: 1px dashed rgba(143, 187, 255, .22); margin-top: 1rem; padding-top: 1rem; }
.resp .line { opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.resp.is-shown .line { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 140ms); }
.caret { display: inline-block; width: .5ch; height: 1.05em; vertical-align: -.15em; background: var(--sky-soft); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.float-chip { animation: float 6s ease-in-out infinite; animation-delay: var(--fd, 0s); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Faixa de eventos ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: .75rem; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cards com brilho que segue o cursor ---------- */
.spot { position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s; }
.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 123, 255, .16), transparent 55%);
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
}
.spot:hover { transform: translateY(-6px); border-color: rgba(47, 123, 255, .45); box-shadow: 0 30px 60px -28px rgba(0, 70, 164, .45); }
.spot:hover::before { opacity: 1; }
.icon-tile {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: .95rem;
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--brand));
    box-shadow: 0 10px 24px -10px rgba(47, 123, 255, .8);
    transition: transform .5s var(--ease);
}
.spot:hover .icon-tile { transform: rotate(-8deg) scale(1.08); }

/* ---------- Caminho do dado ---------- */
.flow-line { position: relative; flex: 1; min-height: 3.5rem; }
.flow-line::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed rgba(143, 187, 255, .35);
}
.flow-line i {
    position: absolute;
    left: 50%;
    top: 0;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--sky-soft);
    box-shadow: 0 0 16px 3px rgba(47, 123, 255, .9);
    animation: packet-y 2.4s var(--ease) infinite;
    animation-delay: var(--pd, 0s);
    opacity: 0;
}
@keyframes packet-y { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
@media (min-width: 1024px) {
    .flow-line { min-height: 0; height: 2px; align-self: center; }
    .flow-line::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 0; border-left: 0; border-top: 2px dashed rgba(143, 187, 255, .35); }
    .flow-line i { left: 0; top: 50%; margin: -5px 0 0; animation-name: packet-x; }
}
@keyframes packet-x { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
.pulse-ring { position: relative; }
.pulse-ring::before, .pulse-ring::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 2rem;
    border: 1.5px solid rgba(47, 123, 255, .55);
    animation: ring 3.2s var(--ease) infinite;
}
.pulse-ring::after { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- Passo a passo interativo ---------- */
.step-btn { text-align: left; border: 1px solid #e3ebf7; background: #fff; border-radius: 1.1rem; padding: 1.1rem 1.25rem; transition: border-color .35s, box-shadow .35s, transform .35s var(--ease), background-color .35s; }
.step-btn:hover { transform: translateX(4px); border-color: #b9d1f5; }
.step-btn[aria-selected="true"] { border-color: var(--sky); box-shadow: 0 18px 40px -22px rgba(0, 70, 164, .55); background: linear-gradient(180deg, #fff, #f3f8ff); }
.step-btn .num { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; font-weight: 700; font-size: .9rem; color: var(--brand); background: #e6f0ff; transition: background .35s, color .35s; }
.step-btn[aria-selected="true"] .num { color: #fff; background: linear-gradient(135deg, var(--sky), var(--brand)); }
.step-btn .bar { display: block; height: 3px; margin-top: .9rem; border-radius: 3px; background: #e6eefb; overflow: hidden; }
.step-btn .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sky), var(--brand)); }
.step-btn[aria-selected="true"].is-auto .bar i { animation: fill var(--dur, 6s) linear forwards; }
.step-btn[aria-selected="true"]:not(.is-auto) .bar i { width: 100%; }
@keyframes fill { to { width: 100%; } }
.step-pane { display: none; }
.step-pane.is-active { display: block; animation: pane-in .55s var(--ease); }
.mock-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: .8rem; background: #f3f8ff; border: 1px solid #e3ecfa; font-size: .8rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge-ok { color: #047857; background: #d1fae5; } .badge-wait { color: #92400e; background: #fef3c7; } .badge-info { color: #0046a4; background: #dcebff; }

/* ---------- Planos ---------- */
.plan-pro { position: relative; isolation: isolate; }
.plan-pro::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(from var(--ang, 0deg), var(--sky), #8fbbff, var(--brand), var(--sky));
    animation: spin-ang 6s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-ang { to { --ang: 360deg; } }
.tilt { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid #e3ebf7; }
.faq-item:last-child { border-bottom: 0; }
.faq-q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; text-align: left; font-weight: 600; color: #0b1a33; transition: color .25s; }
.faq-q:hover { color: var(--brand); }
.faq-q .plus { position: relative; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: #eaf2ff; transition: background .3s, transform .4s var(--ease); }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: var(--brand); border-radius: 2px; transition: transform .4s var(--ease), background .3s; }
.faq-q .plus::after { transform: rotate(90deg); }
.faq-item.is-open .plus { background: var(--brand); transform: rotate(180deg); }
.faq-item.is-open .plus::before, .faq-item.is-open .plus::after { background: #fff; }
.faq-item.is-open .plus::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }

/* ---------- Barra fixa no celular ---------- */
.sticky-cta { transform: translateY(120%); transition: transform .5s var(--ease); }
.sticky-cta.is-visible { transform: none; }

/* ---------- Formulários ---------- */
.field { position: relative; }
.field label { display: block; margin-bottom: .4rem; font-size: .8rem; font-weight: 600; color: #334765; }
.input {
    width: 100%;
    border-radius: .85rem;
    border: 1.5px solid #d6e2f3;
    background: #fff;
    padding: .8rem 1rem;
    font-size: .92rem;
    color: #0b1a33;
    transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.input::placeholder { color: #9aacc6; }
.input:hover { border-color: #b4c9e8; }
.input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(47, 123, 255, .16); }
.input.is-error { border-color: #f87171; background: #fff8f8; }
.pw-toggle { position: absolute; right: .35rem; bottom: .35rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: .6rem; color: #6b7f9e; transition: color .2s, background-color .2s; }
.pw-toggle:hover { color: var(--brand); background: #eef4ff; }
.plan-opt { cursor: pointer; border: 1.5px solid #d6e2f3; border-radius: 1rem; padding: 1rem; transition: border-color .3s, background-color .3s, box-shadow .3s, transform .3s var(--ease); }
.plan-opt:hover { transform: translateY(-2px); border-color: #9cc0f2; }
.plan-opt:has(input:checked) { border-color: var(--sky); background: linear-gradient(180deg, #f5f9ff, #eaf2ff); box-shadow: 0 14px 30px -18px rgba(0, 70, 164, .6); }
.plan-opt:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.spinner { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }

.page-in { animation: page-in .7s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
}
