/* ==========================================================================
   QS.SE — landing page institucional
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop).
   ========================================================================== */

:root{
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --bg:#0f172a; --surface:#111827; --surface2:#161f2e; --line:#22304a;
  --text:#e5e7eb; --muted:#9ca3af; --primary:#17B9EB; --accent:#2F6BFF;
  --soft:rgba(47,107,255,.14); --cyansoft:rgba(23,185,235,.12);
  --ph2:rgba(148,163,184,.20);

  --container: 1180px;
}

[data-theme="light"]{
  --bg:#ffffff; --surface:#f8fafc; --surface2:#f1f5f9; --line:#e2e8f0;
  --text:#1e293b; --muted:#64748b; --primary:#0D6985; --accent:#1D4ED8;
  --soft:rgba(29,78,216,.07); --cyansoft:rgba(13,105,133,.08);
  --ph2:rgba(100,116,139,.18);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; height:auto; display:block; }

a{ color: var(--primary); text-decoration:none; }
a:hover{ color: var(--accent); }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,h2,h3{ font-weight:800; letter-spacing:-.02em; margin:0; }
p{ margin:0; }

.visually-hidden{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.skip-link{
  position:absolute; left:12px; top:-48px;
  background: var(--accent); color:#fff;
  padding:10px 16px; border-radius:8px; font-size:14px; font-weight:600;
  z-index:100; transition: top .15s ease;
}
.skip-link:focus{ top:12px; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:600; padding:13px 22px; border-radius:10px;
  border:1px solid transparent; cursor:pointer; white-space:nowrap;
}
.btn-accent{ color:#fff; background: var(--accent); }
.btn-accent:hover{ color:#fff; filter:brightness(1.08); }
.btn-outline{ color: var(--text); border-color: var(--line); background:transparent; }
.btn-outline:hover{ color: var(--text); border-color: var(--muted); }

.btn-theme{
  font-family:var(--font); font-size:13px; color:var(--muted);
  background:transparent; border:1px solid var(--line); border-radius:8px;
  padding:8px 12px; cursor:pointer;
}
.btn-theme:hover{ color:var(--text); border-color:var(--muted); }

/* Layout helpers */
.eyebrow{
  font-family: var(--mono); font-size:12px; letter-spacing:.16em;
  text-transform:uppercase; color: var(--primary); margin:0 0 10px;
}

.section{ padding: 56px 20px; max-width: var(--container); margin:0 auto; }
/* Faixa de fundo full-bleed: o conteúdo permanece alinhado à mesma coluna
   das seções normais (container + 20px de respiro lateral). */
.section-surface{
  background: var(--surface); max-width:none;
  padding-left: max(20px, calc((100% - var(--container)) / 2 + 20px));
  padding-right: max(20px, calc((100% - var(--container)) / 2 + 20px));
}

/* Âncoras de navegação não podem ficar sob o header sticky */
#topo, #conteudo, #funcionalidades, #como-funciona,
#diferenciais, #planos, #contato{ scroll-margin-top: 84px; }

.section-head{ max-width:60ch; margin-bottom:34px; }
.section-head h2{ font-size:28px; line-height:1.18; }

/* Header */
.site-header{
  position: sticky; top:0; z-index:20;
  background: var(--surface); border-bottom:1px solid var(--line);
}
.header-inner{
  max-width: var(--container); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding: 14px 20px;
}

.logo{ display:flex; align-items:center; gap:10px; color:var(--text); }
.logo:hover{ color:var(--text); }
.logo-word{ font-size:20px; font-weight:800; letter-spacing:-.02em; }
.logo-word-accent{ color: var(--primary); }

.logo-mark{
  flex:none; width:30px; height:30px; background: var(--primary);
  clip-path: polygon(50% 0%,93.3% 25%,93.3% 75%,50% 100%,6.7% 75%,6.7% 25%);
  display:flex; align-items:center; justify-content:center;
}
.logo-mark-sm{ width:26px; height:26px; }
.logo-mark-inner{
  width:77%; height:77%; background: var(--surface);
  clip-path: polygon(50% 0%,93.3% 25%,93.3% 75%,50% 100%,6.7% 75%,6.7% 25%);
  display:flex; align-items:center; justify-content:center;
}
.logo-mark-core{
  width:30%; height:30%; background: var(--accent); transform: rotate(45deg);
}

.main-nav{
  display:none;
  align-items:center; gap:28px; font-size:15px; color:var(--muted);
}
.main-nav a{ color: var(--muted); }
.main-nav a:hover{ color: var(--text); }

.header-actions{ display:flex; align-items:center; gap:10px; }
.btn-header-cta{ display:none; padding:10px 16px; font-size:14px; }

.btn-menu{
  display:flex; flex-direction:column; justify-content:center; gap:4px;
  width:34px; height:34px; padding:8px; background:transparent;
  border:1px solid var(--line); border-radius:8px; cursor:pointer;
}
.btn-menu span{ display:block; height:2px; background: var(--text); border-radius:2px; }

.main-nav.is-open{
  display:flex; flex-direction:column; align-items:flex-start; gap:4px;
  position:absolute; top:100%; left:0; right:0;
  background: var(--surface); border-bottom:1px solid var(--line);
  padding: 12px 20px 18px;
}
.main-nav.is-open a{ padding:10px 0; width:100%; }

/* Hero */
.hero{ padding: 48px 20px 40px; max-width: var(--container); margin:0 auto; }
.hero-grid{ display:flex; flex-direction:column; gap:40px; }
.hero-copy{ display:flex; flex-direction:column; gap:20px; }
.hero-copy h1{ font-size:34px; line-height:1.1; text-wrap:balance; }
.lede{ font-size:17px; line-height:1.6; color: var(--muted); max-width:52ch; }
.hero-cta{ display:flex; flex-wrap:wrap; gap:12px; padding-top:2px; }

.hero-stats{
  display:flex; flex-wrap:wrap; gap:28px; margin:8px 0 0;
  padding-top:18px; border-top:1px solid var(--line);
}
.hero-stats > div{ display:flex; flex-direction:column; gap:2px; }
.hero-stats dt{ font-size:26px; font-weight:800; letter-spacing:-.02em; }
.hero-stats dd{ margin:0; font-size:13px; color: var(--muted); }
.stat-highlight{ color: var(--primary); }

.browser-frame{
  border:1px solid var(--line); border-radius:14px; background: var(--surface);
  overflow:hidden;
}
.browser-bar{
  display:flex; align-items:center; gap:7px; padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.browser-bar .dot{ width:9px; height:9px; border-radius:50%; background: var(--ph2); }
.browser-url{ font-family: var(--mono); font-size:11px; color: var(--muted); margin-left:8px; }

/* Modules grid */
.modules-grid{
  display:grid; grid-template-columns: 1fr; gap:16px;
}
.module-card{
  display:flex; flex-direction:column; gap:12px; padding:24px;
  border:1px solid var(--line); border-radius:12px; background: var(--surface);
}
.module-card:hover{ border-color: var(--accent); background: var(--surface2); }
.module-tag{
  width:38px; height:38px; border-radius:9px; background: var(--soft); color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--mono); font-size:13px; font-weight:700;
}
.module-card h3{ font-size:17px; }
.module-card p{ font-size:14px; line-height:1.6; color: var(--muted); }

.cadastros-card{
  margin-top:28px; padding:24px; border:1px solid var(--line); border-radius:12px;
  background: var(--surface); display:flex; flex-direction:column; gap:20px;
}
.cadastros-head h3{ font-size:17px; margin-bottom:6px; }
.cadastros-head p{ font-size:14px; color: var(--muted); }
.cadastros-list{
  list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px;
}
.cadastros-list li{
  font-size:13px; color: var(--text); border:1px solid var(--line);
  background: var(--surface2); padding:7px 12px; border-radius:999px;
}

/* Steps */
.steps-grid{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:1fr; gap:20px;
}
.step-card{
  display:flex; flex-direction:column; gap:10px; padding-top:16px;
  border-top:2px solid var(--accent);
}
.step-n{ font-family: var(--mono); font-size:13px; font-weight:700; color: var(--accent); }
.step-card h3{ font-size:17px; }
.step-card p{ font-size:14px; line-height:1.6; color: var(--muted); }

/* Diffs */
.diffs-grid{
  display:grid; grid-template-columns:1fr; gap:1px; background: var(--line);
  border:1px solid var(--line); border-radius:12px; overflow:hidden;
}
.diff-card{ display:flex; flex-direction:column; gap:8px; padding:24px; background: var(--bg); }
.diff-card h3{ font-size:16px; }
.diff-card p{ font-size:14px; line-height:1.6; color: var(--muted); }

/* Plans */
.plans-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
.plan-card{
  display:flex; flex-direction:column; gap:16px; padding:28px;
  border:1px solid var(--line); border-radius:12px; background: var(--bg);
}
.plan-featured{ border-color: var(--accent); }
.plan-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.plan-head h3{ font-size:19px; }
.plan-badge{
  font-family: var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  color: var(--accent); background: var(--soft); padding:4px 8px; border-radius:999px;
}
.plan-for{ font-size:14px; color: var(--muted); line-height:1.5; }
.plan-items{
  list-style:none; margin:0; padding:16px 0 0; border-top:1px solid var(--line);
  display:flex; flex-direction:column; gap:9px;
}
.plan-items li{
  position:relative; padding-left:16px; font-size:14px; line-height:1.5; color: var(--text);
}
.plan-items li::before{
  content:""; position:absolute; left:0; top:7px; width:5px; height:5px;
  border-radius:50%; background: var(--primary);
}
.plan-cta{ margin-top:auto; }

/* Contact */
.contact-section{ padding-top:56px; padding-bottom:64px; }
.contact-grid{ display:flex; flex-direction:column; gap:36px; }
.contact-copy{ display:flex; flex-direction:column; gap:14px; }
.contact-copy h2{ font-size:28px; line-height:1.15; }
.contact-copy p{ font-size:16px; line-height:1.6; color: var(--muted); max-width:44ch; }

.contact-cards{ display:grid; grid-template-columns:1fr; gap:12px; }
.contact-card{
  display:flex; flex-direction:column; gap:5px; padding:18px; min-width:0;
  border:1px solid var(--line); border-radius:12px; background: var(--surface);
}
.contact-label{
  font-family: var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  color: var(--muted);
}
.contact-card a{
  font-size:14px; font-weight:600; color: var(--text); overflow-wrap:anywhere;
}
.contact-card a:hover{ color: var(--primary); }
.contact-note{ font-size:12px; color: var(--muted); }

/* Footer */
.site-footer{ border-top:1px solid var(--line); background: var(--surface); }
.footer-inner{
  max-width: var(--container); margin:0 auto; padding:36px 20px;
  display:flex; flex-direction:column; gap:36px;
}
.footer-brand{ display:flex; flex-direction:column; gap:12px; max-width:36ch; }
.footer-brand p{ font-size:13px; line-height:1.6; color: var(--muted); }

.footer-links{ display:flex; flex-wrap:wrap; gap:36px; }
.footer-col{ display:flex; flex-direction:column; gap:9px; }
.footer-col-title{
  font-family: var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  color: var(--muted);
}
.footer-col a{ font-size:14px; color: var(--text); }
.footer-col a:hover{ color: var(--primary); }
.footer-copyright{ font-size:13px; color: var(--muted); margin-top:6px; }

/* Cookie banner */
.cookie-banner{
  position: fixed; left:12px; right:12px; bottom:12px; z-index:30;
  display:flex; flex-direction:column; gap:14px;
  padding:18px 20px; border:1px solid var(--line); border-radius:14px;
  background: var(--surface2); box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
/* display:flex acima sobrepõe o [hidden] do UA stylesheet — precisa ser explícito */
.cookie-banner[hidden]{ display:none; }
[data-theme="light"] .cookie-banner{ box-shadow: 0 12px 32px rgba(15,23,42,.12); }
.cookie-banner p{ margin:0; font-size:13px; line-height:1.55; color: var(--muted); }
.cookie-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.cookie-banner .btn{ padding:10px 16px; font-size:13px; }

/* ==========================================================================
   Tablet — 768px
   ========================================================================== */
@media (min-width: 768px){
  .modules-grid{ grid-template-columns: repeat(2, 1fr); }
  .steps-grid{ grid-template-columns: repeat(2, 1fr); }
  .diffs-grid{ grid-template-columns: repeat(2, 1fr); }
  .plans-grid{ grid-template-columns: repeat(3, 1fr); }
  .contact-cards{ grid-template-columns: repeat(2, 1fr); }

  .hero-copy h1{ font-size:44px; }
  .cookie-banner{
    left:auto; right:24px; bottom:24px; max-width:560px;
    flex-direction:row; align-items:center; justify-content:space-between;
  }
}

/* ==========================================================================
   Desktop — 1024px
   ========================================================================== */
@media (min-width: 1024px){
  .main-nav{ display:flex; }
  .btn-header-cta{ display:inline-flex; }
  .btn-menu{ display:none; }

  .section-head h2{ font-size:36px; }

  .hero{ padding-top:64px; padding-bottom:56px; }
  .hero-grid{ flex-direction:row; align-items:center; gap:56px; }
  .hero-copy, .hero-media{ flex:1 1 0; min-width:0; }
  .hero-copy h1{ font-size:52px; }

  .modules-grid{ grid-template-columns: repeat(3, 1fr); }
  .steps-grid{ grid-template-columns: repeat(4, 1fr); }
  .diffs-grid{ grid-template-columns: repeat(3, 1fr); }

  .contact-grid{ flex-direction:row; align-items:center; gap:56px; }
  .contact-copy, .contact-cards{ flex:1 1 0; min-width:0; }
  .contact-copy h2{ font-size:38px; }
}
