/* ==========================================================
   Sistec Connected Accounting — site público
   ========================================================== */
:root {
    --red: #d20e0e;
    --red-dark: #a80b0b;
    --ink: #2b2b2b;
    --muted: #6b6b6b;
    --line: #e6e6e6;
    --soft: #eeeeee;
    --footer: #2f2e2e;
    --radius: 6px;
    --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
main { overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 500; }
.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(900px, 100% - 40px); }
.center { text-align: center; }
.red { color: var(--red); }
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 14px; z-index: 999; }
.skip-link:focus { left: 10px; }

.btn-outline { display: inline-block; border: 1px solid var(--ink); border-radius: 30px; padding: 9px 40px; font-size: 12px; letter-spacing: .04em; text-decoration: none; transition: .2s; white-space: nowrap; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-red { display: inline-block; background: var(--red); color: #fff; border-radius: 30px; padding: 12px 30px; text-decoration: none; font-weight: 500; transition: .2s; }
.btn-red:hover { background: var(--red-dark); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #f1f1f1; }
.header-inner { display: flex; align-items: center; gap: 30px; min-height: 50px; padding: 4px 0; }
.brand { display: flex; align-items: center; gap: 2px; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 44px; width: auto; }
.main-nav { display: flex; align-items: center; flex: 1; gap: 30px; }
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; flex: 1; }
.main-nav ul a { display: block; padding: 10px 14px; font-size: 14px; font-weight: 500; text-decoration: none; color: #3a3a3a; transition: color .2s; }
.main-nav ul a:hover, .main-nav ul a.active { color: var(--red); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 330px; display: grid; place-items: center; background: var(--hero-bg) center/cover no-repeat; color: #fff; text-align: center; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.hero-content { position: relative; padding: 64px 0 70px; }
.hero-pill { display: inline-block; background: var(--red); color: #fff; font-weight: 600; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; padding: 14px 30px; border-radius: 60px; margin: 0 0 48px; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.hero-sub { font-size: clamp(16px, 1.8vw, 22px); font-weight: 400; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.45); }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-title { font-size: clamp(22px, 2.4vw, 27px); font-weight: 400; color: #3b3b3b; margin-bottom: 36px; }
.page-title { font-size: clamp(26px, 3vw, 36px); font-weight: 500; margin-bottom: 40px; }

/* Serviços (carrossel) */
.carousel { position: relative; }
.carousel-track { display: flex; gap: 9px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.service-card { flex: 1 0 170px; max-width: 230px; aspect-ratio: 184 / 245; scroll-snap-align: start; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; padding: 14px; }
.service-card.has-img { padding: 0; }
.service-card img { width: 100%; height: 100%; object-fit: cover; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.service-icon { color: var(--red); font-size: 42px; margin-bottom: 10px; }
.service-title { font-size: 14px; }
.service-desc { font-size: 12px; color: var(--muted); margin-top: 6px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 24px; line-height: 1; cursor: pointer; color: #444; }
.carousel-btn.prev { left: -18px; }
.carousel-btn.next { right: -18px; }
.carousel-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }

/* Benefícios (slider em fade, duas imagens lado a lado como no Wix) */
.slider { position: relative; touch-action: pan-y; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; display: flex; gap: 8px; margin: 0; align-items: center; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.slide.active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.slide-img { overflow: hidden; }
.slide-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s ease-out; }
.slide.active .slide-img img { transform: scale(1); }
.slide-img-1 { flex: 397 1 0; aspect-ratio: 397 / 292; }
.slide-img-2 { flex: 483 1 0; aspect-ratio: 483 / 292; }
.slide-text { display: flex; align-items: center; gap: 30px; padding-left: 8px; }
.slide-text strong { display: block; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; line-height: 1.2; }
.slide-text p { color: var(--muted); margin: 8px 0 0; }
.waves { width: 96px; height: 100px; flex-shrink: 0; background: repeating-linear-gradient(to bottom, transparent 0 14px, var(--red) 14px 17px); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 100'%3E%3Cpath d='M0 10 Q24 0 48 10 T96 10 M0 30 Q24 20 48 30 T96 30 M0 50 Q24 40 48 50 T96 50 M0 70 Q24 60 48 70 T96 70 M0 90 Q24 80 48 90 T96 90' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 100'%3E%3Cpath d='M0 10 Q24 0 48 10 T96 10 M0 30 Q24 20 48 30 T96 30 M0 50 Q24 40 48 50 T96 50 M0 70 Q24 60 48 70 T96 70 M0 90 Q24 80 48 90 T96 90' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; background: var(--red); }
.slider-nav { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.slider-nav button { border: 1px solid var(--line); background: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; color: #555; }
.slider-nav button:hover { border-color: var(--red); color: var(--red); }

/* Promo */
.promo { padding: 40px 0 70px; }
.promo-text { text-align: center; font-size: clamp(22px, 3vw, 32px); font-weight: 600; margin: 0; color: #333; }
.promo-text .red { text-shadow: 1px 2px 3px rgba(0,0,0,.18); }
.promo-text small { font-size: .6em; }

/* Últimas publicações */
.latest-posts { background: #fafafa; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 30px; }
.post-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s; }
.post-tile:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.post-tile-img { display: block; aspect-ratio: 4/3; background: #ddd; overflow: hidden; }
.post-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-tile:hover .post-tile-img img { transform: scale(1.04); }
.post-tile-body { padding: 18px 20px 22px; }
.post-tile-body h3 { font-size: 17px; margin: 6px 0 0; }
.post-tile-body h3 a { text-decoration: none; }
.post-tile-body h3 a:hover { color: var(--red); }
.post-meta { font-size: 12px; color: var(--muted); }

/* ---------- Banner de página ---------- */
.page-banner { min-height: 260px; display: grid; place-items: center; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), var(--banner-bg) center/cover; color: #fff; text-align: center; }
.page-banner h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 600; margin: 0; }

/* A Sistec */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
.about-text p { text-align: justify; }
.founder { margin: 0; text-align: center; position: sticky; top: 90px; }
.founder img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12); margin-inline: auto; }
.founder figcaption { margin-top: 14px; color: var(--muted); }
.founder strong { color: var(--ink); }
.mission { background: var(--red); color: #fff; }
.mission h2 { letter-spacing: .12em; font-weight: 600; }
.mission-text { font-size: clamp(17px, 2vw, 21px); }
.countries { opacity: .9; margin-top: 20px; }
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; text-align: center; }
.partners-grid h3 { letter-spacing: .1em; font-size: 16px; color: var(--red); }
.partners-grid img { margin-inline: auto; max-height: 160px; width: auto; }

/* Atendimento */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 50px; }
.contact-card { border: 1px solid var(--line); border-radius: 10px; padding: 30px 24px; text-align: center; transition: .25s; }
.contact-card:hover { border-color: var(--red); box-shadow: 0 10px 30px rgba(210,14,14,.08); }
.contact-card svg { color: var(--red); margin: 0 auto 12px; }
.contact-card h2 { font-size: 18px; margin-bottom: 8px; }
.contact-card a { color: var(--red); text-decoration: none; font-weight: 500; word-break: break-word; }
.contact-card small { display: block; color: var(--muted); margin-top: 6px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 14px; }
.contact-social h2 { font-size: 20px; }
.contact-social .social { justify-content: center; }
.contact-social .social a { color: var(--red); border-color: var(--red); }
.map { margin-top: 40px; border-radius: 10px; overflow: hidden; }
.map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 18px; font-weight: 500; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 300; color: var(--red); transition: transform .25s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { color: var(--red); }
.faq-answer { padding: 0 0 22px; color: #444; }

/* ---------- Blog ---------- */
.blog-wrap { position: relative; background: var(--blog-bg) center/cover fixed; padding: 50px 0 80px; min-height: 70vh; isolation: isolate; }
.blog-bg { position: absolute; inset: 0; z-index: -1; clip-path: inset(0); }
.blog-video { position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: cover; pointer-events: none; }
.blog-container { position: relative; }
.blog-container { width: min(940px, 100% - 30px); }
.blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; padding: 10px 18px; margin-bottom: 20px; flex-wrap: wrap; }
.blog-cats { display: flex; gap: 18px; flex-wrap: wrap; }
.blog-cats a { text-decoration: none; font-size: 14px; color: #555; }
.blog-cats a.active, .blog-cats a:hover { color: var(--red); }
.blog-search { display: flex; align-items: center; border-bottom: 1px solid #ccc; }
.blog-search input { border: 0; outline: 0; padding: 6px; font: inherit; font-size: 14px; width: 170px; }
.blog-search button { border: 0; background: none; cursor: pointer; color: #555; }
.blog-filter-info { background: #fff; padding: 10px 18px; font-size: 14px; }
.blog-card { display: grid; grid-template-columns: 454fr 486fr; background: #fff; margin-bottom: 20px; min-height: 280px; }
.blog-card-img { display: block; position: relative; overflow: hidden; background: #ddd; min-height: 240px; }
.blog-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.blog-card:hover .blog-card-img img { transform: scale(1.03); }
.blog-card-body { padding: 26px 30px; display: flex; flex-direction: column; }
.blog-card-body h2 { font-size: 22px; font-weight: 400; margin: 14px 0 12px; }
.blog-card-body h2 a { text-decoration: none; }
.blog-card-body h2 a:hover { color: var(--red); }
.blog-card-body p { font-size: 14px; color: #555; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.blog-card-foot a { color: var(--red); text-decoration: none; }
.blog-empty { background: #fff; padding: 60px; text-align: center; }
.author-line { display: flex; align-items: center; gap: 10px; }
.author-line .avatar { width: 32px; height: 32px; border-radius: 50%; background: #f3f3f3; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.author-line .avatar img { width: 20px; }
.author-line .author { display: block; font-size: 13px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; background: #fff; text-decoration: none; border-radius: 4px; font-size: 14px; }
.pagination .current { background: var(--red); color: #fff; }

/* Post */
.post-page { padding: 50px 0 80px; background: #fff; }
.post-article { width: min(760px, 100% - 40px); }
.post-header h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 500; margin: 24px 0 16px; }
.post-lead { font-size: 18px; color: #555; }
.post-cover { margin: 30px 0; }
.post-cover img { width: 100%; border-radius: 4px; }
.rich { font-size: 17px; line-height: 1.8; }
.rich h2 { font-size: 24px; font-weight: 600; margin: 1.6em 0 .6em; }
.rich h3 { font-size: 20px; font-weight: 600; margin: 1.4em 0 .5em; }
.rich p { margin: 0 0 1em; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.rich li { margin-bottom: .3em; }
.rich blockquote { border-left: 4px solid var(--red); margin: 1.4em 0; padding: .4em 1.2em; color: #555; font-style: italic; background: #fafafa; }
.rich a { color: var(--red); }
.rich img { border-radius: 4px; margin: 1em auto; }
.rich .ql-align-center { text-align: center; }
.rich .ql-align-right { text-align: right; }
.rich .ql-align-justify { text-align: justify; }
.rich iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.rich .note { background: #fff6e5; border-left: 4px solid #f0a500; padding: 12px 16px; font-size: 15px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; }
.post-tags a { border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px; font-size: 13px; text-decoration: none; color: #555; }
.post-tags a:hover { border-color: var(--red); color: var(--red); }
.post-footer { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.share { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.share a, .share button { color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.share a:hover, .share button:hover { color: var(--red); }
.post-stats a { color: var(--red); text-decoration: none; }
.draft-alert { background: #fff3cd; border: 1px solid #ffe08a; padding: 10px 14px; border-radius: 4px; font-size: 14px; }
.related { width: min(1000px, 100% - 40px); margin-top: 70px; }
.related-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.related-head h2 { font-size: 18px; }
.related-head a { color: var(--red); text-decoration: none; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 60px 0 40px; width: min(860px, 100% - 40px); }
.footer-col h3 { font-size: 20px; font-weight: 500; margin-bottom: 24px; }
.footer-lead { margin: 0 0 22px; opacity: .9; }
.footer-phone { font-size: 17px; font-weight: 600; margin: 0 0 22px; }
.footer-phone a { text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.6; opacity: .9; }
.site-footer address a { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0 0 20px; }
.footer-links li { margin-bottom: 18px; }
.footer-links a { text-decoration: underline; }
.footer-links a:hover { color: #ff8b8b; }
.social { display: flex; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); display: grid; place-items: center; transition: .2s; }
.social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; text-align: center; font-size: 12px; opacity: .8; }

/* Botão flutuante */
.chat-float { position: fixed; right: 26px; bottom: 26px; z-index: 60; display: flex; align-items: center; gap: 10px; background: var(--red); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: 30px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 14px; transition: .2s; }
.chat-float:hover { background: var(--red-dark); transform: translateY(-2px); }

/* ---------- Animações de entrada ---------- */
.hero-pill { animation: heroIn .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-sub { animation: heroIn .9s .25s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(-24px) scale(.97); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.reveal[data-reveal="left"] { transform: translateX(-48px); }
.reveal[data-reveal="right"] { transform: translateX(48px); }
.reveal[data-reveal="zoom"] { transform: scale(.92); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .hero-pill, .hero-sub { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
    .menu-toggle { display: block; }
    .main-nav { position: fixed; inset: 54px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 20px 24px; gap: 10px; box-shadow: 0 12px 24px rgba(0,0,0,.1); transform: translateY(-120%); transition: transform .3s; }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; }
    .main-nav ul a { padding: 12px 4px; border-bottom: 1px solid #f2f2f2; }
    .btn-account { text-align: center; }
    .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .about-grid { grid-template-columns: 1fr; }
    .founder { position: static; }
    .blog-card { grid-template-columns: 1fr; }
    .blog-card-img { aspect-ratio: 4/3; }
    .slide-text { padding: 20px 0 0; }
    .carousel-btn { display: none; }
}
@media (max-width: 700px) {
    .slide { flex-direction: column; align-items: stretch; }
    .slide-img-1, .slide-img-2 { flex: none; width: 100%; }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-pill { padding: 12px 20px; border-radius: 30px; }
    .chat-float span { display: none; }
    .chat-float { padding: 14px; }
    .blog-wrap { background-attachment: scroll; }
    .section { padding: 50px 0; }
}
