/* =========================================================
   CODEFLAR — design system
   ========================================================= */

:root{
  --bg:#1A1A22;
  --bg-soft:#16161C;
  --bg-elevated:#20202B;
  --card:#20202B;
  --card-hover:#272733;
  --border:#2E2E3B;
  --border-strong:#3B3B4A;
  --text:#F5F4F0;
  --text-muted:#9B99AA;
  --accent:#378ADD;
  --accent-2:#5FA8EC;
  --accent-dim:rgba(55,138,221,0.14);
  --warm:#F2C14E;
  --success:#3ECF8E;
  --danger:#F2564A;
  --shadow-soft:0 40px 80px -30px rgba(0,0,0,0.6);
  --mono:'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --sans:'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --container:1180px;
  --radius-lg:16px;
  --radius-md:12px;
  --radius-sm:8px;
}

/* Tema claro — tons acinzentados/frios em vez de branco puro, pra dar
   profundidade e não cansar a vista (era o problema do "muito branco"). */
[data-theme="light"]{
  --bg:#ECEEF4;
  --bg-soft:#E2E4ED;
  --bg-elevated:#FFFFFF;
  --card:#FFFFFF;
  --card-hover:#F5F6FA;
  --border:#D9DCE6;
  --border-strong:#C2C5D4;
  --text:#181820;
  --text-muted:#5B596B;
  --accent:#2568B8;
  --accent-2:#1B4F8E;
  --accent-dim:rgba(37,104,184,0.09);
  --warm:#A8730E;
  --success:#1F9C68;
  --danger:#D6392F;
  --shadow-soft:0 30px 60px -25px rgba(23,23,31,0.16);
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--sans);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  transition:background-color .35s ease, color .35s ease;
}
img,svg{display:block;max-width:100%;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;}
button{font-family:inherit;cursor:pointer;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
}

:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:4px;}
::selection{background:var(--accent); color:#fff;}

.wrap{max-width:var(--container); margin:0 auto; padding:0 28px;}

.eyebrow{
  font-family:var(--mono);
  font-size:13px;
  color:var(--accent);
  letter-spacing:0.02em;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}
.eyebrow::before{content:'$'; color:var(--text-muted);}

h1,h2,h3{font-weight:800; letter-spacing:-0.02em; line-height:1.12;}

/* ---------- scroll progress ---------- */
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%;
  background:linear-gradient(90deg, var(--accent), var(--warm));
  z-index:1000; transition:width .1s linear;
  box-shadow:0 0 12px 0 var(--accent);
}

/* ---------- background texture ---------- */
.grain-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    radial-gradient(circle at 1.5px 1.5px, currentColor 1px, transparent 0);
  color:var(--border-strong);
  opacity:0.5;
  background-size:34px 34px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* ---------- header ---------- */
header{
  position:sticky; top:0; z-index:100;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.nav{display:flex; align-items:center; justify-content:space-between; height:82px; gap:16px;}
.logo-mark{display:flex; align-items:center; gap:10px; flex-shrink:0;}
.nav-links{display:flex; align-items:center; gap:30px;}
.nav-links a.nav-link{
  font-size:14.5px; color:var(--text-muted); font-weight:600;
  transition:color .2s;
}
.nav-links a.nav-link:hover{color:var(--text);}

.nav-tools{display:flex; align-items:center; gap:10px;}

.icon-btn{
  width:38px; height:38px; border-radius:9px;
  border:1px solid var(--border);
  background:var(--card);
  display:flex; align-items:center; justify-content:center;
  color:var(--text);
  transition:border-color .2s, transform .2s, background .2s;
}
.icon-btn:hover{border-color:var(--accent); transform:translateY(-2px);}
.icon-btn svg{width:17px; height:17px;}
.icon-btn .icon-sun{display:none;}
[data-theme="light"] .icon-btn .icon-moon{display:none;}
[data-theme="light"] .icon-btn .icon-sun{display:block;}

.lang-switch{
  display:flex; align-items:center; gap:4px;
  border:1px solid var(--border); border-radius:9px; padding:4px;
  background:var(--card);
}
.lang-btn{
  width:30px; height:30px; border-radius:6px; border:none; background:transparent;
  display:flex; align-items:center; justify-content:center; opacity:0.45;
  transition:opacity .2s, background .2s;
}
.lang-btn svg{width:18px; height:18px; border-radius:3px;}
.lang-btn.active{opacity:1; background:var(--accent-dim);}
.lang-btn:hover{opacity:1;}

.btn{
  font-family:var(--mono);
  font-size:13.5px;
  font-weight:600;
  padding:11px 20px;
  border-radius:var(--radius-sm);
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
  border:1px solid transparent;
  position:relative;
}
.btn-primary{background:var(--accent); color:#0D0D12;}
[data-theme="light"] .btn-primary{color:#fff;}
.btn-primary:hover{transform:translateY(-2px); box-shadow:0 10px 24px -8px rgba(55,138,221,0.55);}
.btn-ghost{background:transparent; color:var(--text); border-color:var(--border);}
.btn-ghost:hover{border-color:var(--accent); color:var(--accent);}
.menu-toggle{display:none; background:none; border:none; color:var(--text);}

/* ---------- hero ----------
   IMPORTANTE: .hero é full-bleed (não tem max-width), só quem tem
   max-width é o .hero-grid (com a classe .wrap) por dentro. Isso evita
   o bug de layout em que os "blobs" de fundo eram cortados de forma
   feia na largura do container em vez de sumir suavemente na borda
   da tela. */
.hero{
  position:relative; z-index:1;
  padding:110px 0 90px;
  overflow:hidden;
}
.hero-grid{
  position:relative; z-index:1;
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:60px;
  align-items:center;
}
.hero::before,
.hero::after{
  content:''; position:absolute; z-index:0; border-radius:50%;
  filter:blur(70px); pointer-events:none;
  animation:driftBlob 16s ease-in-out infinite;
}
.hero::before{
  width:460px; height:460px; top:-180px; right:-120px;
  background:radial-gradient(circle, rgba(55,138,221,0.30), transparent 70%);
}
.hero::after{
  width:360px; height:360px; bottom:-160px; left:-100px;
  background:radial-gradient(circle, rgba(242,193,78,0.16), transparent 70%);
  animation-delay:-8s;
}
[data-theme="light"] .hero::before{background:radial-gradient(circle, rgba(37,104,184,0.16), transparent 70%);}
[data-theme="light"] .hero::after{background:radial-gradient(circle, rgba(168,115,14,0.12), transparent 70%);}
@keyframes driftBlob{
  0%,100%{transform:translate(0,0) scale(1);}
  50%{transform:translate(30px,-24px) scale(1.08);}
}
.hero h1{
  font-family:var(--mono);
  font-size:clamp(26px, 4vw, 44px);
  color:var(--text);
  min-height:1.3em;
}
.hero h1 .arrow{color:var(--accent);}
.hero h1 .cursor{
  display:inline-block; width:3px; height:0.9em; background:var(--accent);
  margin-left:4px; vertical-align:-2px;
  animation:blink 1s steps(1) infinite;
}
@keyframes blink{50%{opacity:0;}}
.hero p.lead{
  margin-top:22px; font-size:18px; color:var(--text-muted); max-width:480px;
}
.hero .cta-row{display:flex; gap:14px; margin-top:36px; flex-wrap:wrap;}
.hero .btn-primary, .hero .btn-ghost{padding:14px 24px; font-size:14.5px;}

.build-line{
  margin-top:40px; font-family:var(--mono); font-size:13.5px; color:var(--text-muted);
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
}
.build-line .rotator{color:var(--accent); font-weight:600; min-width:150px; display:inline-block;}
.build-line .rotator::after{content:'_'; animation:blink 1s steps(1) infinite;}

.trust-row{display:flex; gap:28px; margin-top:22px; color:var(--text-muted); font-size:13px; font-family:var(--mono); flex-wrap:wrap;}
.trust-row span{display:flex; align-items:center; gap:8px;}
.trust-row .dot{width:6px;height:6px;border-radius:50%;background:var(--accent); box-shadow:0 0 8px 0 var(--accent);}

/* ---------- window mock ---------- */
.window{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  transform-style:preserve-3d;
  will-change:transform;
  transition:transform .2s ease, box-shadow .3s ease;
  position:relative;
}
.window::after{
  content:''; position:absolute; inset:0; z-index:2; pointer-events:none; border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.04);
  background:linear-gradient(160deg, rgba(255,255,255,0.05), transparent 40%);
}
.window-bar{
  display:flex; align-items:center; gap:7px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
}
.window-bar .dot2{width:10px;height:10px;border-radius:50%;}
.window-bar .dot2:nth-child(1){background:var(--danger);}
.window-bar .dot2:nth-child(2){background:var(--warm);}
.window-bar .dot2:nth-child(3){background:var(--success);}
.window-body{position:relative; height:320px; font-family:var(--mono); font-size:13px;}
.layer{position:absolute; inset:0; padding:22px; transition:opacity 1.2s ease;}
.layer-code{color:var(--text-muted); opacity:1; animation:swap 9s infinite;}
.layer-code .kw{color:var(--accent);}
.layer-code .str{color:var(--warm);}
.layer-code p{margin-bottom:4px; white-space:pre;}
.layer-site{opacity:0; animation:swap-site 9s infinite; padding:0;}
@keyframes swap{
  0%,40%{opacity:1;} 50%,90%{opacity:0;} 100%{opacity:1;}
}
@keyframes swap-site{
  0%,40%{opacity:0;} 50%,90%{opacity:1;} 100%{opacity:0;}
}
.mini-nav{display:flex; justify-content:space-between; align-items:center; padding:16px 22px; border-bottom:1px solid var(--border);}
.mini-pill{width:70px; height:8px; border-radius:4px; background:var(--border-strong);}
.mini-pill.accent{background:var(--accent); width:60px;}
.mini-hero{padding:24px 22px 18px; display:flex; gap:16px; align-items:flex-start;}
.mini-hero .mini-text{flex:1; min-width:0;}
.mini-photo{
  width:54px; height:54px; border-radius:12px; flex-shrink:0;
  background:linear-gradient(135deg, var(--accent), var(--warm));
}
.mini-line{height:10px; border-radius:4px; background:var(--border-strong); margin-bottom:10px;}
.mini-line.w60{width:60%;}
.mini-line.w40{width:40%;}
.mini-btn{width:96px; height:28px; border-radius:6px; background:var(--accent); margin-top:14px; position:relative;}
.mini-btn::after{
  content:''; position:absolute; inset:0;
  border-radius:6px; border:1.5px solid var(--accent);
  animation:miniPing 2.4s ease-out infinite;
}
@keyframes miniPing{
  0%{transform:scale(1); opacity:0.6;}
  100%{transform:scale(1.35); opacity:0;}
}
.mini-cards{display:flex; gap:12px; padding:14px 22px 0;}
.mini-cards div{flex:1; height:56px; background:var(--border-strong); border-radius:8px; position:relative; overflow:hidden;}
.mini-cards div::before{
  content:''; position:absolute; top:10px; left:10px; width:14px; height:14px;
  border-radius:4px; background:var(--accent); opacity:0.6;
}

/* ---------- sections generic ---------- */
section{position:relative; z-index:1; padding:100px 0;}
section.alt{background:var(--bg-soft); border-top:1px solid var(--border); border-bottom:1px solid var(--border);}
.sec-head{max-width:640px; margin-bottom:56px;}
.sec-head h2{font-size:clamp(26px,3.4vw,38px);}
.sec-head p{color:var(--text-muted); margin-top:14px; font-size:16px;}

.reveal{opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* ---------- services ---------- */
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.card{
  position:relative;
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:28px 24px; transition:border-color .2s, background .2s, box-shadow .2s;
  transform-style:preserve-3d; will-change:transform;
  overflow:hidden;
}
.card::before{
  content:''; position:absolute; inset:0; z-index:0; opacity:0; pointer-events:none;
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%), var(--accent-dim), transparent 65%);
  transition:opacity .3s ease;
}
.card:hover::before{opacity:1;}
.card:hover{border-color:var(--accent); background:var(--card-hover); box-shadow:var(--shadow-soft);}
.card > *{position:relative; z-index:1;}
.card .icon{
  width:42px; height:42px; border-radius:10px; background:var(--accent-dim);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
  transition:transform .25s ease;
}
.card:hover .icon{transform:scale(1.08) rotate(-4deg);}
.card .icon svg{width:20px; height:20px; stroke:var(--accent);}
.card h3{font-size:17px; margin-bottom:8px; font-weight:700;}
.card p{color:var(--text-muted); font-size:14.5px;}

/* ---------- process ---------- */
.process{display:grid; grid-template-columns:repeat(4,1fr); gap:0; position:relative;}
.process::before{
  content:''; position:absolute; top:20px; left:0; right:0; height:1px; background:var(--border);
}
.step{position:relative; padding-right:24px;}
.step .num{
  font-family:var(--mono); color:#0D0D12; background:var(--accent);
  width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; margin-bottom:22px; position:relative; z-index:2;
  box-shadow:0 0 0 6px var(--bg);
  transition:transform .25s ease, box-shadow .25s ease;
}
section.alt .step .num{box-shadow:0 0 0 6px var(--bg-soft);}
.step:hover .num{transform:scale(1.08); box-shadow:0 0 0 6px var(--bg), 0 0 20px 0 var(--accent);}
[data-theme="light"] .step .num{color:#fff;}
.step h3{font-size:16.5px; margin-bottom:8px;}
.step p{color:var(--text-muted); font-size:14px;}

/* ---------- why ---------- */
.grid-2{display:grid; grid-template-columns:repeat(2,1fr); gap:20px;}
.why-item{
  position:relative; overflow:hidden;
  display:flex; gap:18px; padding:26px; border-radius:var(--radius-lg); border:1px solid var(--border);
  background:var(--card); transition:border-color .2s, transform .2s, box-shadow .2s;
}
.why-item::before{
  content:''; position:absolute; inset:0; z-index:0; opacity:0; pointer-events:none;
  background:radial-gradient(280px circle at var(--mx,50%) var(--my,50%), var(--accent-dim), transparent 65%);
  transition:opacity .3s ease;
}
.why-item:hover::before{opacity:1;}
.why-item > *{position:relative; z-index:1;}
.why-item:hover{border-color:var(--accent); transform:translateY(-3px); box-shadow:var(--shadow-soft);}
.why-item .mark{color:var(--accent); font-family:var(--mono); font-size:15px; flex-shrink:0;}
.why-item h3{font-size:16px; margin-bottom:6px;}
.why-item p{color:var(--text-muted); font-size:14.5px;}

/* ---------- portfolio ---------- */
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
.port-card{
  border:1px dashed var(--border-strong); border-radius:var(--radius-lg); overflow:hidden; background:var(--card);
  transition:transform .2s, border-color .2s, box-shadow .2s;
}
.port-card:hover{transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow-soft);}
.port-top{height:150px; display:flex; align-items:center; justify-content:center; background:var(--bg-soft); border-bottom:1px dashed var(--border-strong); position:relative; overflow:hidden;}
.port-top::before{
  content:''; position:absolute; inset:-40%;
  background:linear-gradient(120deg, transparent 40%, var(--accent-dim) 50%, transparent 60%);
  background-size:220% 220%;
  animation:shimmerSweep 5s linear infinite;
}
@keyframes shimmerSweep{
  0%{background-position:0% 0%;} 100%{background-position:100% 100%;}
}
.port-top span{position:relative; font-family:var(--mono); font-size:12px; color:var(--text-muted); display:flex; align-items:center; gap:8px;}
.blink-dot{width:6px; height:6px; border-radius:50%; background:var(--warm); animation:blink 1.4s infinite;}
.port-bottom{padding:18px 20px;}
.port-bottom h3{font-size:15px; margin-bottom:4px;}
.port-bottom p{color:var(--text-muted); font-size:13.5px;}

/* ---------- stats ---------- */
.stats-bar{display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-top:60px;}
.stat{text-align:center; padding:22px 12px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--card); transition:border-color .2s, transform .2s;}
.stat:hover{border-color:var(--accent); transform:translateY(-2px);}
.stat .num{font-family:var(--mono); font-size:clamp(24px,3vw,32px); color:var(--accent); font-weight:700;}
.stat .label{font-size:12.5px; color:var(--text-muted); margin-top:6px;}

/* ---------- FAQ ---------- */
.faq-list{max-width:760px;}
.faq-item{border-bottom:1px solid var(--border);}
.faq-question{
  width:100%; text-align:left; background:none; border:none; padding:22px 4px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  font-family:var(--sans); font-size:16px; font-weight:700; color:var(--text);
}
.faq-question .chev{width:18px; height:18px; flex-shrink:0; color:var(--accent); transition:transform .3s ease;}
.faq-item.open .faq-question .chev{transform:rotate(180deg);}
.faq-answer-wrap{display:grid; grid-template-rows:0fr; transition:grid-template-rows .35s ease;}
.faq-item.open .faq-answer-wrap{grid-template-rows:1fr;}
.faq-answer{overflow:hidden;}
.faq-answer p{color:var(--text-muted); font-size:14.5px; padding-bottom:22px; max-width:620px;}

/* ---------- depoimentos ---------- */
.test-badge{
  display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-size:11px;
  color:var(--warm); border:1px dashed var(--warm); border-radius:20px; padding:4px 10px;
  margin-bottom:16px;
}
.testimonial-card{
  border:1px dashed var(--border-strong); border-radius:var(--radius-lg); padding:26px; background:var(--card);
  transition:transform .2s, border-color .2s, box-shadow .2s;
}
.testimonial-card:hover{transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow-soft);}
.testimonial-stars{display:flex; gap:3px; margin-bottom:14px;}
.testimonial-stars svg{width:15px; height:15px; fill:var(--warm);}
.testimonial-quote{font-size:14.5px; color:var(--text-muted); margin-bottom:20px; min-height:66px;}
.testimonial-foot{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.testimonial-avatar{
  width:42px; height:42px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg, var(--accent), var(--warm));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family:var(--mono); font-weight:700; font-size:13px;
}
.testimonial-name{font-size:14px; font-weight:700;}
.testimonial-role{font-size:12.5px; color:var(--text-muted);}
.testimonial-link{
  margin-left:auto; font-family:var(--mono); font-size:12px; color:var(--accent);
  display:flex; align-items:center; gap:4px; flex-shrink:0;
}

/* ---------- contato ---------- */
.contact-grid{display:grid; grid-template-columns:0.9fr 1.1fr; gap:60px; align-items:start;}
.contact-grid h2{font-size:clamp(26px,3.4vw,36px); margin-bottom:16px;}
.contact-grid p.lead{color:var(--text-muted); font-size:16px; margin-bottom:28px;}


form{background:var(--card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px;}
.field{margin-bottom:18px;}
.field label{display:block; font-size:13px; color:var(--text-muted); margin-bottom:8px; font-family:var(--mono);}
.field input, .field textarea{
  width:100%; background:var(--bg-soft); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:12px 14px; color:var(--text); font-family:var(--sans); font-size:14.5px; resize:vertical;
  transition:border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus{border-color:var(--accent); outline:none; box-shadow:0 0 0 3px var(--accent-dim);}
.field textarea{min-height:110px;}
form .btn-primary{width:100%; justify-content:center; padding:14px; font-size:14.5px;}
.form-note{font-size:12px; color:var(--text-muted); margin-top:12px; text-align:center;}
.form-privacy{
  display:flex; align-items:flex-start; gap:8px; font-size:12px; color:var(--text-muted);
  margin-top:16px; padding-top:16px; border-top:1px solid var(--border);
}
.form-privacy svg{width:14px; height:14px; flex-shrink:0; margin-top:1px; color:var(--accent);}
.form-success{
  display:none; text-align:center; padding:14px; border-radius:var(--radius-sm);
  background:rgba(62,207,142,0.12); color:var(--success); font-size:13.5px; margin-top:14px; font-family:var(--mono);
}
.form-success.show{display:block;}

/* ---------- footer ---------- */
footer{padding:48px 0 36px; border-top:1px solid var(--border);}
.foot-row{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px;}
.foot-links{display:flex; gap:24px;}
.foot-links a{color:var(--text-muted); font-size:13.5px; transition:color .2s;}
.foot-links a:hover{color:var(--accent);}
.foot-copy{color:var(--text-muted); font-size:13px; font-family:var(--mono); margin-top:20px;}

/* ---------- logo (imagem) ---------- */
.logo-img{
  height:52px; width:auto; border-radius:10px; background:transparent;
  filter:drop-shadow(0 4px 14px rgba(55,138,221,0.25));
  transition:transform .25s ease, filter .25s ease;
}
.logo-mark:hover .logo-img{transform:translateY(-1px) scale(1.03);}
@media (max-width:720px){ .logo-img{height:42px;} }

/* ---------- cursor customizado ---------- */
html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor input,
html.has-custom-cursor textarea{cursor:none;}

/* O ponto (dot) NÃO tem transition de transform — ele precisa ser 100%
   instantâneo (é isso que corrige o "delay" que você sentiu). Só o anel
   e o glow têm o lag suave, de propósito, pra dar sensação de trilha. */
.cursor-dot{
  position:fixed; top:0; left:0; z-index:9999; pointer-events:none;
  border-radius:50%; opacity:0;
  width:8px; height:8px; background:var(--accent);
  mix-blend-mode:difference;
  transition:opacity .2s ease, width .2s ease, height .2s ease;
}
.cursor-ring{
  position:fixed; top:0; left:0; z-index:9999; pointer-events:none;
  border-radius:50%; opacity:0;
  width:38px; height:38px; border:1.5px solid var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:11px; font-weight:700; letter-spacing:0.02em;
  color:transparent;
  transition:opacity .2s ease, width .2s ease, height .2s ease, background .2s ease, border-color .2s ease;
}
html.cursor-ready .cursor-dot{opacity:1;}
html.cursor-ready .cursor-ring{opacity:0.55;}

.cursor-dot.is-active{width:6px; height:6px;}
.cursor-dot.is-hidden{opacity:0 !important;}
.cursor-ring.is-active{width:64px; height:64px; background:var(--accent-dim); opacity:0.9 !important;}
.cursor-ring.is-pressed{width:30px; height:30px;}
.cursor-ring.has-label{
  width:88px; height:88px; border-radius:50%;
  background:var(--accent); border-color:var(--accent);
  color:#0D0D12; opacity:1 !important;
}
[data-theme="light"] .cursor-ring.has-label{color:#fff;}

.cursor-glow{
  position:fixed; top:0; left:0; z-index:1; pointer-events:none;
  width:560px; height:560px; border-radius:50%;
  background:radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  mix-blend-mode:plus-lighter;
  opacity:0.6;
  transition:opacity .4s ease;
}
[data-theme="light"] .cursor-glow{opacity:0.3; mix-blend-mode:multiply;}

/* ---------- preloader ---------- */
.preloader{
  position:fixed; inset:0; z-index:2000;
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
  transition:opacity .6s ease, visibility .6s ease;
}
.preloader svg{animation:preloader-pulse 1.1s ease-in-out infinite;}
@keyframes preloader-pulse{
  0%,100%{transform:scale(1); opacity:1;}
  50%{transform:scale(0.92); opacity:0.7;}
}
.preloader.is-hidden{opacity:0; visibility:hidden; pointer-events:none;}

/* ---------- botão voltar ao topo ---------- */
.scroll-top{
  position:fixed; right:24px; bottom:24px; z-index:90;
  width:46px; height:46px; border-radius:50%;
  background:var(--card); border:1px solid var(--border); color:var(--text);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(12px); pointer-events:none;
  transition:opacity .3s ease, transform .3s ease, border-color .2s ease;
  box-shadow:var(--shadow-soft);
}
.scroll-top svg{width:18px; height:18px;}
.scroll-top.is-visible{opacity:1; transform:translateY(0); pointer-events:auto;}
.scroll-top:hover{border-color:var(--accent); color:var(--accent);}



/* ---------- nav link com sublinhado animado ---------- */
.nav-link{position:relative;}
.nav-link::after{
  content:''; position:absolute; left:0; right:100%; bottom:-4px; height:1.5px;
  background:var(--accent); transition:right .25s ease;
}
.nav-link:hover::after{right:0;}

/* ---------- brilho ao passar o mouse nos botões primários ---------- */
.btn-primary{overflow:hidden;}
.btn-primary::before{
  content:''; position:absolute; top:0; left:-60%; width:40%; height:100%;
  background:linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform:skewX(-20deg); transition:left .55s ease;
}
.btn-primary:hover::before{left:120%;}

/* ---------- offset de âncora sob o header fixo ---------- */
section, main > section{scroll-margin-top:88px;}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .grid-4{grid-template-columns:repeat(2,1fr);}
  .stats-bar{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:980px){
  .hero{padding-top:70px;}
  .hero-grid{grid-template-columns:1fr; gap:48px;}
  .process{grid-template-columns:repeat(2,1fr); row-gap:36px;}
  .process::before{display:none;}
  .grid-2{grid-template-columns:1fr;}
  .grid-3{grid-template-columns:1fr;}
  .contact-grid{grid-template-columns:1fr;}
}
@media (max-width:860px){
  .menu-toggle{display:flex; align-items:center; justify-content:center; width:38px; height:38px;}
  .nav-tools{gap:6px;}
  .nav-links{
    position:absolute; 
    top:100%; 
    left:0; 
    right:0; 
    bottom:auto; 
    height:calc(100vh - 83px); 
    z-index:99;
    background:var(--bg); 
    flex-direction:column; 
    align-items:flex-start; 
    padding:28px;
    gap:22px; 
    transform:translateX(100%); 
    transition:transform .3s ease; 
    overflow-y:auto;
  }
  .nav-links.open{transform:translateX(0);}
  .nav-links .nav-link{font-size:18px;}
  .nav-links .btn-primary{margin-top:8px;}
}
@media (max-width:720px){
  .grid-4{grid-template-columns:1fr;}
  .stats-bar{grid-template-columns:1fr 1fr;}
  section{padding:64px 0;}
  .hero{padding-top:56px; padding-bottom:60px;}
  .window-body{height:320px;}
  form{padding:24px;}
  .scroll-top{right:16px; bottom:16px;}
}
@media (max-width:420px){
  .wrap{padding:0 18px;}
  .hero h1{font-size:22px;}
  .btn{padding:12px 16px; font-size:13px;}
}

/* ---------- cursor nativo em telas touch / preferência por menos movimento ---------- */
@media (hover:none), (pointer:coarse){
  .cursor-dot, .cursor-ring, .cursor-glow{display:none;}
}