/*
  Connect AI — Landing Page
  Paleta inspirada na imagem: roxos frios, verdes suaves, azuis claros.
*/
:root{
  --bg:#eef5ff;                 /* azul muito claro */
  --ink:#0f1b3d;                /* azul-escuro neutro */
  --muted:#5b6b8b;             
  --brand:#5B6CFF;             /* roxo-azulado (AI) */
  --brand-600:#4b58e6;
  --accent:#8DE39B;            /* verde botão "Quero saber mais" */
  --card:#ffffff;
  --alt:#f6f8ff;               /* fundo alternativo */
  --ring:rgba(91,108,255,.35);
  --shadow:0 10px 30px rgba(15,27,61,.08);
}

/* Dark theme variables */
:root[data-theme="dark"]{
  --bg:#0c1326;
  --ink:#e6ebff;
  --muted:#a8b0d6;
  --brand:#7c89ff;
  --brand-600:#6c78ff;
  --accent:#7BDB8D;
  --card:#121a35;
  --alt:#0f1730;
  --ring:rgba(124,137,255,.35);
  --shadow:0 10px 30px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) {
    --bg:#0c1326;
    --ink:#e6ebff;
    --muted:#a8b0d6;
    --brand:#7c89ff;
    --brand-600:#6c78ff;
    --accent:#7BDB8D;
    --card:#121a35;
    --alt:#0f1730;
    --ring:rgba(124,137,255,.35);
    --shadow:0 10px 30px rgba(0,0,0,.35);
  }
}

*{box-sizing:border-box}

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html{scroll-behavior:smooth;width:100vw !important;overflow-x:hidden}
html,body{margin:0;padding:0;width:100vw !important}
body{
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:linear-gradient(90deg, color-mix(in oklab, var(--alt) 75%, #fff 25%) 0%, var(--bg) 50%, color-mix(in oklab, var(--alt) 65%, #fff 35%) 100%);
}

/* Ajuste do container para melhor respiro lateral e layout consistente */
.container{max-width:1120px; width:100%; margin-inline:auto; padding-inline:clamp(16px,4vw,28px)}
.skip-link{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:16px;top:16px;width:auto;height:auto;background:var(--brand);color:#fff;padding:10px 12px;border-radius:10px;z-index:9999}
.section{padding:88px 0}
.section--alt{background:var(--alt)}
.section__title{font-size:clamp(1.6rem,2.4vw,2.2rem);line-height:1.2;margin:0 0 28px}

/* HEADER */
.header{position:sticky;top:0;z-index:50;background:color-mix(in oklab, var(--card), transparent 30%);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid color-mix(in oklab, var(--ink), transparent 94%)}
.header__inner{display:flex;align-items:center;justify-content:space-between;padding-block:14px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.brand__logo{width:28px;height:28px}
.brand__name{font-weight:800}

.nav__toggle{display:none;background:none;border:0;font-size:28px;line-height:1;cursor:pointer}
.nav__list{display:flex;gap:22px;align-items:center;list-style:none;margin:0;padding:0}
.nav__list a{color:var(--ink);text-decoration:none;font-weight:600;position:relative;outline:0}
.nav__list a::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--brand);transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.nav__list a:hover{color:var(--ink)}
.nav__list a:hover::after{transform:scaleX(1)}
/* Ajustes para botões dentro do menu: manter texto branco e sem sublinhado */
.nav__list a.btn,.nav__list a.btn--brand,.nav__list a.btn--accent{color:#fff}
 .nav__list a.btn::after,.nav__list a.btn--brand::after,.nav__list a.btn--accent::after{display:none}
 .nav__list a.btn:hover,.nav__list a.btn--brand:hover,.nav__list a.btn--accent:hover{color:#fff}

.theme-toggle{margin-left:12px;inline-size:44px;block-size:44px;border-radius:50%;border:1px solid color-mix(in oklab, var(--ink), transparent 85%);background:var(--card);cursor:pointer;box-shadow:var(--shadow);color:var(--ink);display:inline-grid;place-items:center}
.theme-toggle:hover{transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:none;box-shadow:0 0 0 4px var(--ring)}

/* HERO */
.hero{padding:96px 0}
.hero__grid{display:grid;grid-template-columns:1.1fr 0.9fr;gap:40px;align-items:center}
.hero__title{font-size:clamp(2rem,3.6vw,3rem);line-height:1.1;margin:0 0 10px;font-weight:900;color:var(--ink)}
.hero__subtitle{font-size:clamp(1.05rem,1.6vw,1.2rem);color:var(--muted);margin:0 0 26px}
.hero__cta{display:flex;gap:12px;align-items:center}
.hero__note{margin-top:16px;color:var(--muted);font-weight:600}
.hero__mockup{width:100%;max-width:420px;filter:drop-shadow(0 20px 30px rgba(15,27,61,.12))}

/* FEATURES */
.features{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;margin-top:22px}
.feature{background:var(--card);border-radius:16px;padding:22px;box-shadow:var(--shadow);border:1px solid color-mix(in oklab, var(--ink), transparent 94%);transition:transform .2s ease, box-shadow .2s ease}
.feature:hover{transform:translateY(-2px)}
.feature__icon{width:44px;height:44px;color:var(--brand);margin-bottom:10px}
.feature h3{margin:6px 0 4px}
.feature p{margin:0;color:var(--muted)}

.video-placeholder{margin-top:26px;display:flex;justify-content:center;align-items:center;height:180px;border:2px dashed color-mix(in oklab, var(--ink), transparent 85%);border-radius:16px;color:var(--muted);background:color-mix(in oklab, var(--card), transparent 40%)}

/* STATS */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:10px}
.stat{background:var(--card);border-radius:16px;padding:24px;text-align:center;box-shadow:var(--shadow);border:1px solid color-mix(in oklab, var(--ink), transparent 94%)}
.stat__number{font-weight:900;font-size:clamp(1.6rem,3vw,2.2rem);color:var(--brand)}
.stat__label{color:var(--muted)}
.mini-chart{margin-top:24px;border-radius:14px;overflow:hidden;background:#fff;border:1px solid color-mix(in oklab, var(--ink), transparent 94%);box-shadow:var(--shadow)}

/* SLIDER */
.slider{position:relative}
.slides{display:grid}
.slide{display:none;background:var(--card);border:1px solid color-mix(in oklab, var(--ink), transparent 94%);box-shadow:var(--shadow);border-radius:16px;padding:28px;transition:opacity .25s ease, transform .25s ease}
.slide.is-active{display:block;opacity:1;transform:none}
.slide blockquote{font-size:clamp(1.05rem,1.6vw,1.2rem);margin:0 0 8px;color:var(--ink)}
.slide figcaption{color:var(--muted)}
.slider__controls{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:14px}
.slider__prev,.slider__next{width:40px;height:40px;border-radius:50%;border:0;background:var(--brand);color:#fff;font-size:20px;cursor:pointer;box-shadow:var(--shadow);transition:transform .15s ease, background .2s ease}
.slider__prev:hover,.slider__next:hover{transform:translateY(-1px);background:var(--brand-600)}
.slider__dots{display:flex;gap:8px}
.slider__dots button{width:9px;height:9px;border-radius:50%;border:0;background:color-mix(in oklab, var(--ink), transparent 80%);cursor:pointer}
.slider__dots button[aria-selected="true"]{background:var(--brand)}

/* LOGIN */
.login{display:flex;justify-content:center}
.login__box{width:min(560px, 100%);background:var(--card);border:1px solid color-mix(in oklab, var(--ink), transparent 94%);box-shadow:var(--shadow);border-radius:18px;padding:26px}
.login__note{color:var(--muted);margin:0 0 12px}
.form{display:grid;gap:14px}
.form__row{display:grid;gap:6px}
.form__row input{padding:12px 14px;border:1px solid color-mix(in oklab, var(--ink), transparent 80%);border-radius:12px;font-size:1rem;outline:none;background:var(--card);color:var(--ink)}
.form__row input:focus{border-color:var(--brand);box-shadow:0 0 0 4px var(--ring)}
.form__actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.form__link{text-decoration:none;color:var(--muted)}

/* CTA */
.cta{background:linear-gradient(135deg, #5B6CFF 0%, #6b7dff 40%, #89e6a0 100%);color:#0b1a2b}
.cta__inner{display:flex;align-items:center;justify-content:space-between;gap:20px}
.cta h2{margin:0 0 6px;color:#0b1a2b}
.cta p{margin:0}

/* FOOTER */
.footer{padding:40px 0 24px;background:#0f1530;color:#c8d1ff}
.footer__grid{display:flex;justify-content:space-between;gap:22px;align-items:flex-start}
.footer__links{display:flex;gap:14px;flex-wrap:wrap}
.footer__links a{color:#c8d1ff;text-decoration:none}
.footer__copy{margin-top:16px;color:#9aa6ff;opacity:.9;text-align:center}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;padding:12px 16px;font-weight:800;text-decoration:none;border:0;cursor:pointer;transition:transform .18s ease, box-shadow .22s ease, filter .2s ease}
.btn:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 12px 24px rgba(15,27,61,.12)}
.btn:active{transform:translateY(0) scale(0.99)}
.btn--brand{background:var(--brand);color:#fff}
.btn--brand:hover{background:var(--brand-600)}
.btn--accent{background:var(--accent);color:#0f1b3d}
.btn--accent:hover{filter:saturate(1.05)}
.btn--lg{padding:14px 18px;font-size:1.05rem}
.btn--placeholder[aria-disabled="true"]{opacity:.7;cursor:not-allowed}
.btn--placeholder[aria-disabled="true"]:hover{transform:none}
/* Reduced motion: desativar animações fortes */
@media (prefers-reduced-motion: reduce){
  .btn,.feature,.slider__prev,.slider__next{transition:none}
  .btn:hover,.feature:hover{transform:none}
}
.nav__list a:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion: reduce){
  .nav__list a::after{transition:none}
}

/* BACK TO TOP */
.back-to-top{position:fixed;right:20px;bottom:20px;width:44px;height:44px;border-radius:50%;border:0;background:var(--brand);color:#fff;font-weight:900;box-shadow:var(--shadow);cursor:pointer;display:none}
.back-to-top.is-visible{display:inline-grid;place-items:center}

/* RESPONSIVE - Mobile First Optimizations */
/* Base styles are mobile-first, then enhanced for larger screens */
@media (max-width: 960px){
  .hero__grid{grid-template-columns:1fr;}
  .features{grid-template-columns:repeat(2,1fr)}
  .stats{grid-template-columns:repeat(2,1fr)}
  /* Optimize touch targets for mobile */
  .btn{min-height:44px;min-width:44px}
  .theme-toggle{min-height:44px;min-width:44px}
}
@media (max-width: 680px){
  .nav__toggle{display:inline}
  .nav__list{position:absolute;inset:56px 16px auto auto;flex-direction:column;background:var(--card);border:1px solid color-mix(in oklab, var(--ink), transparent 92%);border-radius:12px;padding:12px 16px;box-shadow:var(--shadow);display:none}
  .nav__list.is-open{display:flex}
  .cta__inner{flex-direction:column;align-items:flex-start}
  /* Mobile-specific optimizations */
  .section{padding:64px 0} /* Reduce vertical padding on mobile */
  .hero{padding:72px 0} /* Reduce hero padding on mobile */
}

/* === Trust / Segurança (3 colunas) === */
.section--trust {
  background: linear-gradient(180deg, rgba(31,58,95,0.04), transparent 60%);
}
.features.features--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.features.features--3 .feature {
  background: var(--bg);
  border: 1px solid var(--muted-2);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.features.features--3 .feature h3 { margin-top: .5rem; }
.features.features--3 .feature__icon {
  width: 48px; height: 48px; color: var(--brand);
}

/* === Planos & Preços === */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.plan {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--muted-2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  display: flex; flex-direction: column;
}
.plan h3 { font-size: 1.25rem; margin-bottom: .25rem; }
.plan__desc { color: var(--muted); margin-bottom: .75rem; }
.plan__list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plan__list li { padding: .35rem 0; border-bottom: 1px dashed var(--muted-2); }
.plan__list li:last-child { border-bottom: 0; }
.plan__cta { margin-top: auto; }
.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 16px 36px rgba(31,58,95,0.15);
  transform: translateY(-4px);
}
.plan--featured .plan__cta { filter: brightness(1.05); }
.badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--brand); color: #fff;
  padding: .25rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
}

/* === FAQ (accordion nativo) === */
.faq { display: grid; gap: .75rem; }
.faq__item {
  background: var(--bg);
  border: 1px solid var(--muted-2);
  border-radius: 12px; overflow: hidden;
}
.faq__item summary {
  cursor: pointer; list-style: none; user-select: none;
  padding: .9rem 1rem; position: relative; font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "▸"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--muted);
}
.faq__item[open] summary::after { content: "▾"; color: var(--brand); }
.faq__item p { padding: 0 1rem 1rem; color: var(--muted); }

/* === Demonstração (chat) === */
.demo__box {
  border: 1px solid var(--muted-2);
  border-radius: 16px;
  padding: 1rem; background: linear-gradient(180deg, rgba(31,58,95,0.03), transparent 70%);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}
.chat {
  height: 280px; overflow: auto; padding: .5rem; border-radius: 12px;
  background: var(--bg);
  border: 1px dashed var(--muted-2);
}
.msg { max-width: 75%; padding: .6rem .8rem; border-radius: 14px; margin:.35rem 0; line-height: 1.35; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.msg--ai { background: var(--muted-2); color: var(--text); }
.msg--user { background: var(--accent); color: #0e2a1a; }
.demo__form { display: flex; gap: .5rem; margin-top: .75rem; }
.demo__input { flex: 1; border: 1px solid var(--muted-2); border-radius: 999px; padding: .75rem 1rem; }
.demo__note { margin-top: .5rem; color: var(--muted); font-size: .9rem; }

/* Hover/Focus better */
.plan a.btn:focus-visible,
.plan a.btn:hover { transform: translateY(-1px); }

/* Responsividade */
@media (max-width: 960px) {
  .features.features--3 { grid-template-columns: 1fr 1fr; }
  .pricing__grid { grid-template-columns: 1fr 1fr; }
  /* Improve mobile performance */
  .feature:hover, .plan:hover { transform: none; } /* Disable hover effects on touch devices */
}
@media (max-width: 680px) {
  .features.features--3, .pricing__grid { grid-template-columns: 1fr; }
  .plan--featured { transform: none; }
  /* Mobile-first spacing optimizations */
  .features { gap: 16px; }
  .stats { gap: 14px; }
}

/* Motion safe */
@media (prefers-reduced-motion: reduce) {
  .plan--featured { transform: none; }
  .plan a.btn:hover { transform: none; }
}

/* Modal (acessível) */
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 22, 46, .6); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay[aria-hidden="false"] { display: flex; }
.modal-dialog { width: min(920px, 92vw); max-height: 86vh; overflow: auto; background: var(--bg); color: var(--text); border: 1px solid var(--muted-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.modal-content { padding: 1.25rem 1.25rem 1.5rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--muted-2); padding-bottom: .5rem; position: sticky; top: 0; background: var(--bg); }
.modal-header h2 { font-size: 1.35rem; margin: 0; }
.modal-close { border: 1px solid var(--muted-2); background: transparent; color: var(--text); border-radius: 999px; width: 32px; height: 32px; display: grid; place-items: center; font-size: 1.1rem; cursor: pointer; }
.modal-close:hover, .modal-close:focus-visible { background: var(--muted-2); }
.modal-body { padding-top: 1rem; }
.modal-body h3 { margin-top: 1rem; font-size: 1.05rem; }
.modal-body .legal__note { color: var(--muted); font-size: .9rem; margin-top: 1rem; }

@media (max-width: 680px){
  .modal-content { padding: 1rem; }
  .modal-dialog { width: 94vw; border-radius: 12px; }
}
/* Fallback para browsers sem suporte total a inert */
[inert]{ pointer-events: none; user-select: none; }
[inert] a, [inert] button, [inert] input, [inert] select, [inert] textarea{ pointer-events: none; }
.header__actions{display:flex; align-items:center; gap:16px}
.header__actions nav{display:flex; align-items:center}
@media (max-width:960px){
  .header__actions{gap:10px}
}