:root {
  --bg: #0a0c11;
  --surface: #11141c;
  --surface-2: #161a24;
  --glass: rgba(255, 255, 255, .04);
  --ink: #eef1f7;
  --muted: #98a2b3;
  --brand: #6366f1;
  --brand-2: #22d3ee;
  --grad: linear-gradient(135deg, #6366f1, #22d3ee);
  --line: #232838;
  --radius: 16px;
  --shadow: 0 30px 70px -35px rgba(0, 0, 0, .85);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1200px, 92%); margin-inline: auto; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .76rem; font-weight: 600; color: var(--brand-2); margin-bottom: .8rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .95rem; padding: .9rem 1.7rem; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #06080d; box-shadow: 0 10px 30px -10px rgba(99,102,241,.55); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(34,211,238,.6); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: var(--glass); }
.btn-ghost:hover { border-color: var(--brand); color: #fff; }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.logo-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; letter-spacing: .04em; }
.brand-text small { font-size: .58rem; text-transform: uppercase; letter-spacing: .3em; color: var(--muted); margin-top: .12rem; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(10,12,17,.75); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.8rem; }
.nav-links a { font-weight: 500; font-size: .94rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn-primary { color: #06080d; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Hero */
.hero { position: relative; padding: 5.5rem 0 5rem; overflow: hidden; }
.hero-glow { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(50% 50% at 78% 12%, rgba(99,102,241,.32), transparent 60%),
  radial-gradient(45% 45% at 12% 88%, rgba(34,211,238,.22), transparent 60%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.pill-badge { display: inline-block; font-size: .82rem; font-weight: 600; color: var(--ink); background: var(--glass); border: 1px solid var(--line); padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.3rem); margin-bottom: 1.3rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.4rem; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 2.4rem; }
.hero-stats strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: .84rem; color: var(--muted); }

.hero-visual { position: relative; }
.code-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transform: rotate(1.2deg); transition: transform .3s ease; }
.code-card:hover { transform: rotate(0); }
.code-bar { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4150; }
.code-bar span:first-child { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-left: auto; font-style: normal; font-size: .78rem; color: var(--muted); font-family: 'Space Grotesk', monospace; }
.code-card pre { padding: 1.5rem 1.6rem; font-family: 'Space Grotesk', ui-monospace, monospace; font-size: .95rem; line-height: 1.8; overflow-x: auto; }
.code-card code { color: #cdd5e3; }
.c-key { color: #c084fc; }
.c-fn { color: #22d3ee; }
.c-prop { color: #818cf8; }
.c-str { color: #6ee7b7; }
.c-cmt { color: #64748b; }

/* Strip */
.logos-strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.4rem; padding: 1.5rem 0; }
.strip-inner span {
  color: var(--muted); font-weight: 600; font-size: .92rem; font-family: 'Space Grotesk', sans-serif;
  padding: .5rem 1.15rem; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.02); cursor: default;
  transition: color .28s ease, transform .28s ease, box-shadow .28s ease, background .28s ease, border-color .28s ease;
}
.strip-inner span:hover {
  color: var(--ink); border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 26px -12px rgba(34,211,238,.6), 0 0 0 1px rgba(99,102,241,.25);
}

/* Infinito com energia percorrendo o traçado */
.stat-inf { display: inline-flex; align-items: center; }
.hero-stats strong.stat-inf { background: none; }
.inf-svg { width: 3.6rem; height: 1.8rem; overflow: visible; }
.inf-track { fill: none; stroke: rgba(99,102,241,.16); stroke-width: 5; stroke-linecap: round; }
.inf-flow { fill: none; stroke: url(#infGrad); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(34,211,238,.6)); }

section { padding: 5.5rem 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3.2rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.section-sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* Serviços */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 1.5rem; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.1rem; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.service:hover { transform: translateY(-6px); border-color: var(--brand); background: var(--surface-2); }
.service .ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); color: var(--brand-2); margin-bottom: 1.3rem; }
.service .ico svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.service > p { color: var(--muted); font-size: .96rem; margin-bottom: 1rem; }
.service strong { color: var(--ink); }
.svc-list { list-style: none; display: grid; gap: .5rem; }
.svc-list li { font-size: .9rem; color: var(--muted); padding-left: 1.5rem; position: relative; }
.svc-list li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-2); font-weight: 700; }

/* Sistemas completos — carrossel */
.systems-carousel { position: relative; }
.systems-track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.systems-track::-webkit-scrollbar { display: none; }
.system-card { position: relative; flex: 0 0 100%; scroll-snap-align: center; min-height: 470px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.system-bg { position: absolute; inset: 0; z-index: 0; background: var(--surface-2); }
.system-bg iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; pointer-events: none; background: #fff; }
.system-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(9,11,16,.96) 0%, rgba(9,11,16,.86) 40%, rgba(9,11,16,.5) 72%, rgba(9,11,16,.35) 100%); }
.system-content { position: relative; z-index: 2; max-width: 580px; padding: 2.8rem; min-height: 470px; display: flex; flex-direction: column; justify-content: center; }
.system-badge { align-self: flex-start; font-size: .76rem; font-weight: 700; color: #06080d; background: var(--grad); padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem; }
.system-card h3 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: .8rem; }
.system-desc { color: #c7cedb; font-size: 1.02rem; margin-bottom: 1.2rem; }
.system-feats { list-style: none; display: grid; gap: .55rem; margin-bottom: 1.6rem; }
.system-feats li { padding-left: 1.7rem; position: relative; color: #aeb7c6; font-size: .95rem; }
.system-feats li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-2); font-weight: 700; }
.system-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.systems-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(17,20,28,.85); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s ease, border-color .2s ease; }
.systems-btn:hover { border-color: var(--brand); background: var(--surface-2); }
.systems-btn.prev { left: -10px; }
.systems-btn.next { right: -10px; }
.systems-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.6rem; }
.systems-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: background .2s ease, width .2s ease; }
.systems-dots button.active { background: var(--brand); width: 26px; border-radius: 6px; }

/* Portfólio */
.portfolio { background: linear-gradient(180deg, var(--bg), var(--surface)); }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.work:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c, var(--brand)) 70%, var(--line)); }
.work-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.work-preview iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; pointer-events: none; background: #fff; }
.work-preview .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.work-overlay { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; padding: 1rem; opacity: 0; background: linear-gradient(transparent, rgba(6,8,13,.78)); transition: opacity .25s ease; }
.work-overlay span { font-weight: 600; font-size: .9rem; color: #fff; }
.work:hover .work-overlay { opacity: 1; }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; }
.work-meta h3 { font-size: 1.12rem; }
.work-tag { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.work-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.portfolio-note { text-align: center; margin-top: 2rem; color: var(--muted); }
.portfolio-note a { color: var(--brand-2); font-weight: 600; }

/* Paginação */
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 2.2rem; }
.pg-btn { min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-2); }
.pg-btn.active { background: var(--grad); color: #06080d; border-color: transparent; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

.info-lines a { color: var(--ink); }
.info-lines a:hover { color: var(--brand-2); }

/* Processo */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; position: relative; }
.step-n { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { font-size: 1.15rem; margin: .4rem 0 .5rem; }
.steps p { color: var(--muted); font-size: .9rem; }

/* Why */
.why { background: var(--surface); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.why-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem; }
.why-ico { font-size: 1.9rem; display: block; margin-bottom: .8rem; }
.why-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.why-card p { color: var(--muted); font-size: .93rem; }

/* Contato */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.contact-text h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.contact-text p { color: var(--muted); margin-bottom: 1.6rem; }
.info-lines { list-style: none; display: grid; gap: 1.1rem; }
.info-lines li { border-left: 2px solid var(--brand); padding-left: 1rem; }
.info-lines strong { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-2); }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow); }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 1.1rem; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; margin-top: .4rem; padding: .85rem .95rem; font: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; color: var(--ink); resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.contact-form .btn { width: 100%; justify-content: center; margin-top: .5rem; }
.contact-form small { display: block; text-align: center; color: var(--muted); margin-top: .8rem; font-size: .78rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: 1rem; max-width: 36ch; }
.footer-col h4 { font-size: .95rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--muted); font-size: .92rem; margin-bottom: .6rem; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 1.1rem; padding: 1.5rem 6%; background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-160%); transition: transform .3s ease; pointer-events: none; }
  .nav-links.open { transform: translateY(0); pointer-events: auto; }
  .hero-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .system-content { max-width: 100%; padding: 2rem; }
  .system-shade { background: linear-gradient(90deg, rgba(9,11,16,.95) 0%, rgba(9,11,16,.85) 60%, rgba(9,11,16,.62) 100%); }
  .systems-btn.prev { left: 6px; }
  .systems-btn.next { right: 6px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
}

/* ===== Animações ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: none; }

  /* orbes do hero flutuando suavemente */
  .hero-glow { animation: glowFloat 16s ease-in-out infinite alternate; }
  @keyframes glowFloat {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: .85; }
    100% { transform: translate3d(0, -22px, 0) scale(1.08); opacity: 1; }
  }

  /* brilho que percorre a faixa de tecnologias */
  .logos-strip { position: relative; overflow: hidden; }
  .logos-strip::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 40%;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,.12), transparent);
    animation: sweep 6s linear infinite;
  }
  @keyframes sweep { from { left: -40%; } to { left: 100%; } }

  /* botão primário com leve pulso ao passar o mouse */
  .btn-primary { position: relative; overflow: hidden; }
  .btn-primary::after {
    content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(255,255,255,.35), transparent 60%);
    opacity: 0; transform: scale(.4); transition: opacity .4s ease, transform .5s ease;
  }
  .btn-primary:hover::after { opacity: 1; transform: scale(1); }

  /* ícones de serviço giram de leve no hover do card */
  .service:hover .ico { transform: rotate(-8deg) scale(1.08); transition: transform .3s ease; }

  /* energia percorrendo o símbolo de infinito */
  .inf-flow { stroke-dasharray: 22 78; animation: infFlow 2.4s linear infinite; }
  @keyframes infFlow { to { stroke-dashoffset: -100; } }
}
