:root {
  --blue: #1428d9;
  --blue-dark: #0c1a8f;
  --blue-deep: #090f5c;
  --yellow: #ffe817;
  --ink: #10142e;
  --white: #ffffff;
  --gray: #6b7080;
  --radius: 16px;
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-strike: cubic-bezier(.2,1.6,.3,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
}
header.scrolled {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(16,20,46,.08);
  padding: 10px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  transition: color .35s var(--ease);
}
header.scrolled .logo { color: var(--blue); }
.logo-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-badge svg { width: 20px; height: 20px; }
.logo small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .12em; opacity: .75; }
.beta-tag {
  align-self: flex-start;
  margin-top: -2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--yellow);
  padding: 2px 7px;
  border-radius: 999px;
}

nav.links {
  display: flex;
  gap: 32px;
}
nav.links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .02em;
  position: relative;
  transition: color .35s var(--ease);
}
header.scrolled nav.links a { color: var(--ink); }
nav.links a::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width .3s var(--ease);
}
nav.links a:hover::after { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn-yellow {
  background: var(--yellow);
  color: var(--blue-deep);
  box-shadow: 0 0 0 0 rgba(255,232,23,0);
}
.btn-yellow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255,232,23,.4), 0 0 0 6px rgba(255,232,23,.16);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline:hover {
  box-shadow: 0 0 0 6px rgba(255,255,255,.08);
  transform: translateY(-2px);
}
.btn-outline:hover { background: rgba(255,255,255,.12); }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none; background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  height: 2px; background: var(--white);
  transition: background .3s var(--ease);
}
header.scrolled .menu-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: radial-gradient(120% 120% at 20% 0%, var(--blue) 0%, var(--blue-dark) 55%, var(--blue-deep) 100%);
  overflow: hidden;
  padding-top: 96px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 30% 40%, black, transparent 70%);
}
.hero-shape {
  position: absolute;
  right: -8%;
  bottom: -10%;
  width: 60%;
  aspect-ratio: 1;
  background: var(--yellow);
  clip-path: polygon(30% 0%, 100% 15%, 85% 100%, 0% 70%);
  opacity: .95;
  filter: blur(0px);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
}
.hero-copy { max-width: 620px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--yellow); }

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.01em;
}
.hero h1 span { color: var(--yellow); }
.hero p.lead {
  margin-top: 20px;
  font-size: 18px;
  color: rgba(255,255,255,.82);
  max-width: 460px;
  line-height: 1.6;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.scroll-cue {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  transition: opacity .3s var(--ease);
  color: rgba(255,255,255,.6);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  letter-spacing: .1em;
}
.scroll-cue .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: .4; } }

/* entrance transition targets: opacity/transform/filter set inline by JS */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }

/* ---------- Preloader: circuit power-on ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 45%, var(--blue-dark) 0%, var(--blue-deep) 65%, #06092e 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path .9s cubic-bezier(.76,0,.24,1);
}
.preloader.wipe {
  clip-path: polygon(195% 0, 295% 0, 225% 100%, 125% 100%);
}
.preloader-stage {
  position: relative;
  width: min(560px, 86vw);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.preloader-circuit path {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255,232,23,.85)) drop-shadow(0 0 14px rgba(255,232,23,.35));
  opacity: 0;
  transition: stroke-dashoffset .68s var(--ease), opacity .15s linear;
}
.preloader-circuit circle {
  fill: var(--yellow);
  filter: drop-shadow(0 0 6px rgba(255,232,23,.9));
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity .25s var(--ease), transform .35s var(--ease-strike);
}
.preloader-circuit .spark {
  fill: #fff9d6;
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 5px rgba(255,251,204,.9));
}
.preloader-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.preloader-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  transform: translate(-50%,-50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,232,23,.9) 0%, rgba(255,232,23,0) 70%);
  opacity: 0;
  transition: transform .9s var(--ease-strike), opacity .5s var(--ease);
  pointer-events: none;
}
.preloader-badge {
  position: relative;
  z-index: 2;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0 rgba(255,232,23,.5);
  transition: opacity .6s var(--ease), transform .6s var(--ease-strike), filter .6s var(--ease), box-shadow .6s var(--ease);
}
.preloader-badge.lit {
  box-shadow: 0 0 32px 6px rgba(255,232,23,.55);
}
.preloader-badge svg { width: 40px; height: 40px; }
.preloader-word {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .02em;
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease);
}

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

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.section-tag {
  display: inline-block;
  color: var(--blue);
  background: rgba(20,40,217,.08);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  max-width: 640px;
}
.section-sub {
  margin-top: 16px;
  color: var(--gray);
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
}

/* Sobre */
.about {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  position: relative;
  min-width: 0;
}
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
}
.about-photo::before {
  content: '';
  position: absolute; inset: 0;
  border: 6px solid var(--yellow);
  border-radius: var(--radius);
  transform: translate(14px, 14px);
  z-index: -1;
}
.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 28px;
}
.stat { min-width: 0; }
.stat b { display: block; font-size: 26px; color: var(--blue); font-weight: 800; }
.stat span { font-size: 13px; color: var(--gray); white-space: normal; }

.about-steps {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid #ecedf3;
}
.step { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.step > div { min-width: 0; }
.step-n {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(20,40,217,.08);
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.step b { display: block; font-size: 15px; margin-bottom: 2px; }
.step p { font-size: 13.5px; color: var(--gray); line-height: 1.55; }

/* Trabalhos */
.work-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.work-card {
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ecedf3;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(16,20,46,.1); }
.work-thumb {
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,.75);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, var(--blue-dark), var(--blue-deep));
}
.work-thumb svg { width: 34px; height: 34px; stroke: currentColor; opacity: .8; }
.work-thumb span { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.work-info {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.work-info b { font-size: 14.5px; min-width: 0; }
.work-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(20,40,217,.08);
  padding: 4px 9px;
  border-radius: 999px;
}

/* Serviços */
.services-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  position: relative;
  min-width: 0;
  background: var(--white);
  border: 1px solid #ecedf3;
  border-radius: var(--radius);
  padding: 32px 28px;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(20,40,217,.08), transparent 70%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.service-card::after {
  content: '';
  position: absolute; top: 0; left: 28px; right: 28px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(16,20,46,.1);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: transform .35s var(--ease-strike), box-shadow .35s var(--ease);
}
.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 20px rgba(20,40,217,.35);
}
.service-icon svg { width: 28px; height: 28px; stroke: var(--yellow); }
.service-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.service-card p { font-size: 14.5px; color: var(--gray); line-height: 1.65; }

/* Orçamento CTA */
.cta {
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  border-radius: 28px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: var(--yellow);
  opacity: .15;
  border-radius: 50%;
}
.cta h2 { color: var(--white); font-size: clamp(26px,3.2vw,36px); font-weight: 800; }
.cta p { color: rgba(255,255,255,.8); margin-top: 14px; font-size: 16px; }
.cta .btn { margin-top: 28px; }

/* Contato / Footer */
footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h4 { color: var(--white); font-size: 15px; margin-bottom: 18px; }
.footer-grid p, .footer-grid a { font-size: 14px; line-height: 2; display: block; }
.footer-grid a:hover { color: var(--yellow); }
.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  text-align: center;
  color: rgba(255,255,255,.4);
}

/* WhatsApp floating button */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37,211,102,.45);
  transition: transform .3s var(--ease-strike), box-shadow .3s var(--ease);
}
.wa-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 16px 34px rgba(37,211,102,.55), 0 0 0 8px rgba(37,211,102,.14);
}
.wa-float svg { width: 28px; height: 28px; fill: var(--white); }

/* Responsive */
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 120px; padding-bottom: 72px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-figure { order: -1; margin-bottom: 12px; }
  .hero-figure img { max-width: 280px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; margin: 0 auto; }
  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  nav.links { display: none; }
  .menu-toggle { display: flex; }
  .nav-inner > a.btn { display: none; }
  .logo { font-size: 16px; }
  .logo small { display: none; }
  .beta-tag { display: none; }
}
@media (max-width: 480px) {
  section { padding: 72px 0; }
  .cta { padding: 44px 24px; }
}
