/* Neurazy — site institucional ("Rede viva")
   Cores, fontes, espaços e raios vêm de tokens.css (kit oficial da marca). */

:root {
  /* Resolvidos aqui no :root, então valem o night/branco claros mesmo dentro de [data-theme="dark"] */
  --on-lime: var(--night); /* texto sobre lima é sempre night */
  --white: var(--ink-inverse);
  --night-base: var(--night);
  --violet-base: var(--violet);
  --container: 1240px;
  --gutter: var(--space-4);
  --header-h: 72px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --shadow: 0 1px 2px color-mix(in srgb, var(--night) 6%, transparent),
            0 16px 40px -16px color-mix(in srgb, var(--night) 22%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: var(--radius-sm); }
[data-theme="dark"] :focus-visible, .cta :focus-visible { outline-color: var(--lime); }
/* seções recebem foco ao navegar pelo menu; não precisam de contorno */
section[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 760px) { :root { --gutter: var(--space-6); } }
@media (min-width: 1280px) { :root { --gutter: var(--space-12); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--lime); color: var(--on-lime); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Textura de pontos conectados (padrão neural) */
.texture { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--violet); opacity: .28; pointer-events: none; }
.texture-fade {
  -webkit-mask-image: linear-gradient(to bottom left, var(--night) 0%, transparent 65%);
  mask-image: linear-gradient(to bottom left, var(--night) 0%, transparent 65%);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 12px var(--space-6);
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary { background: var(--violet); color: var(--ink-inverse); }
.btn-primary:hover { background: color-mix(in srgb, var(--violet) 88%, var(--night)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { background: color-mix(in srgb, var(--lime) 85%, var(--white)); }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; }
.btn-xl { min-height: 64px; padding: 16px 36px; font-size: 1.15rem; }
.btn-xl .icon { width: 24px; height: 24px; }
.btn-block { width: 100%; }

/* ---------- Cabeçalho (escuro, transparente sobre o hero) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.site-header.is-scrolled {
  background: var(--surface); /* reserva para navegadores sem color-mix (iOS < 16.2) */
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--space-4); }
.brand { display: inline-flex; padding: 6px 0; border-radius: var(--radius-sm); }
.brand .logo { width: 140px; height: auto; }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 0 12px; margin-right: -12px;
  background: none; border: 0; border-radius: var(--radius-pill); cursor: pointer; color: var(--ink);
}
.menu-toggle span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: none; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4) var(--gutter) var(--space-6);
  max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.nav.is-open { display: flex; }
.nav ul { display: flex; flex-direction: column; }
.nav ul a { display: block; padding: 14px 0; font: 600 1.25rem var(--font-display); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav ul a:hover { color: var(--lime); }

@media (min-width: 1080px) {
  .menu-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: var(--space-6);
    padding: 0; max-height: none; overflow: visible; background: none; border: 0;
  }
  .nav ul { flex-direction: row; gap: 4px; }
  .nav ul a { position: relative; padding: 8px 12px; border: 0; font: 600 .95rem var(--font-sans); }
  .nav ul a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
    background: var(--lime); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease-out);
  }
  .nav ul a:hover { color: var(--ink); }
  .nav ul a:hover::after { transform: scaleX(1); transform-origin: left; }
  .brand .logo { width: 156px; }
}

/* ---------- Hero: rede viva ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + var(--space-12)) 0 88px;
  background: var(--night-base); color: var(--ink);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; }
/* N estático: aparece sem JS; com JS a rede no canvas assume */
.hero-static { position: absolute; z-index: -1; right: 6%; top: 14%; width: 38vw; max-width: 460px; opacity: .3; }
.js .hero-static { display: none; }
.hero-inner { position: relative; }
.badge {
  display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-6);
  color: var(--ink-muted);
  font-size: .9375rem; font-weight: 500; letter-spacing: .01em;
}
.badge::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--lime); }
.hero-title {
  font-size: clamp(2.5rem, 5.2vw + .4rem, 5.6rem);
  line-height: 1.02; letter-spacing: -0.04em;
  max-width: 11.5em;
}
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.hero-title .w > span { display: inline-block; }
.lead { margin-top: 28px; font-size: clamp(1.05rem, .5vw + .95rem, 1.25rem); color: var(--ink-muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }


/* No celular o N da rede fica embaixo dos botões: reserva esse espaço */
@media (max-width: 959px) {
  .hero { align-items: flex-start; padding-bottom: 230px; }
  .hero-static { top: auto; bottom: 32px; right: 24px; width: 150px; }
}
@media (min-width: 960px) {
  .hero-static { right: 8%; top: 50%; width: 30vw; transform: translateY(-50%); opacity: .9; }
}

/* ---------- Seções ---------- */
.section { position: relative; padding: 88px 0; }
.section-alt { background: var(--surface-raised); }
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 3.4vw + .9rem, 3.6rem); max-width: 14em; }
.section-head p { margin-top: var(--space-4); color: var(--ink-muted); font-size: 1.0625rem; max-width: 30em; }
@media (min-width: 960px) {
  .section { padding: 128px 0; }
  .section-head.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: end; margin-bottom: 64px; }
  .section-head.split p { margin-top: 0; }
}

/* ---------- Serviços: linhas com preenchimento no hover ---------- */
.services { border-bottom: 1px solid var(--line); }
.service {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: start;
  padding: 28px 0; border-top: 1px solid var(--line);
  transition: color .35s ease;
}
.service::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -20px; border-radius: var(--radius-lg);
  background: var(--violet); transform: scaleY(0); transform-origin: bottom;
  transition: transform .5s var(--ease-in-out);
}
.service-icon {
  grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in srgb, var(--violet) 10%, transparent); color: var(--violet);
  transition: background-color .35s ease, color .35s ease;
}
.service-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: clamp(1.35rem, 1.8vw + .8rem, 2.4rem); }
.service p { color: var(--ink-muted); max-width: 34em; transition: color .35s ease; }
@media (min-width: 960px) {
  .service { grid-template-columns: 64px 1.2fr 1fr; gap: 32px; align-items: center; padding: 36px 0; }
  .service-icon { grid-row: auto; width: 64px; height: 64px; }
}
@media (hover: hover) {
  .service:hover { color: var(--white); }
  .service:hover::before { transform: scaleY(1); transform-origin: top; }
  .service:hover p { color: var(--white); }
  .service:hover .service-icon { background: var(--lime); color: var(--on-lime); }
}

/* ---------- Como funciona: fixo enquanto rola ---------- */
.process { position: relative; background: var(--surface); color: var(--ink); --p: 0; }
.process-sticky { padding: 88px 0; }
.process-grid { display: grid; gap: 48px; }
.process-head h2 { font-size: clamp(2rem, 3.4vw + .9rem, 3.6rem); }
.process-head p { margin-top: var(--space-4); color: var(--ink-muted); font-size: 1.0625rem; max-width: 26em; }
.process-head .process-count { display: none; margin-top: 40px; font: 700 clamp(4rem, 8vw, 7.5rem)/1 var(--font-display); letter-spacing: -0.04em; }
.process-now { color: var(--lime); }
.process-total { color: var(--ink-muted); }

.process-steps { position: relative; display: grid; gap: 40px; }
/* trilho que liga os passos, preenchido conforme a rolagem */
.process-steps::before, .process-steps::after {
  content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px;
}
.process-steps::before { background: var(--line); }
.process-steps::after { background: var(--lime); transform-origin: top; transform: scaleY(var(--p)); }
.pstep { position: relative; padding-left: 56px; transition: opacity .4s ease; }
.pnode {
  position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line); z-index: 1;
  transition: background-color .3s ease, border-color .3s ease, transform .4s var(--ease-out);
}
.pstep.is-on .pnode { background: var(--lime); border-color: var(--lime); transform: scale(1.15); }
.pstep h3 { font-size: clamp(1.4rem, 1.4vw + 1rem, 2.2rem); margin-bottom: 10px; }
.pstep p { color: var(--ink-muted); max-width: 30em; font-size: 1.0625rem; }
.js-motion .pstep:not(.is-on) { opacity: .35; }

@media (min-width: 960px) {
  .process-grid { grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
  .process-head .process-count { display: block; }
  .process-steps { gap: 64px; }
  /* Com movimento ativo, a seção fica alta e o conteúdo gruda na tela */
  .js-motion .process { height: 260vh; }
  .js-motion .process-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding: var(--header-h) 0 0; }
}

/* ---------- Clientes: vitrines com o site real ---------- */
.work-grid { display: grid; gap: 32px; }
.work { display: block; text-decoration: none; color: var(--ink); }
.work-browser {
  display: block; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s ease;
}
.work-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.work-dots { display: flex; gap: 6px; }
.work-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.work-url {
  flex: 1; max-width: 300px; margin-inline: auto; padding: 4px 14px; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-muted); font-size: .8rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A captura do site rola dentro da "tela": top 0→100% com translate 0→-100% alinha o fim da imagem ao fim da tela */
.work-screen { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface); }
.work-screen img { position: absolute; top: 0; left: 0; width: 100%; height: auto; max-width: none; transform: translateY(0); }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 4px 0; }
.work-logo { height: 44px; width: auto; max-width: 60%; object-fit: contain; }
.work-go {
  flex: none; padding: 10px 18px; border-radius: var(--radius-pill); border: 2px solid var(--line);
  font-weight: 600; font-size: .95rem; transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.work:hover .work-browser, .work:focus-visible .work-browser { border-color: var(--violet); }
.work:hover .work-go, .work:focus-visible .work-go { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.work:focus-visible { outline: none; }
.work:focus-visible .work-browser { outline: 3px solid var(--violet); outline-offset: 4px; }
@media (min-width: 860px) { .work-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }

/* ---------- Planos ---------- */
.plans { display: grid; gap: var(--space-6); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: var(--space-4);
  padding: 32px 28px; border-radius: var(--radius-lg);
  background: var(--surface-raised); border: 1px solid var(--line); color: var(--ink);
}
.plan h3 { font-size: 1.6rem; }
.plan-desc { color: var(--ink-muted); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.checklist { display: grid; gap: 12px; align-content: start; flex: 1; margin-bottom: var(--space-2); }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--violet) 12%, transparent);
}
.checklist li::after {
  content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 5px;
  border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet); transform: rotate(-45deg);
}
.plan-featured { background: var(--surface); border: 2px solid var(--violet); box-shadow: var(--shadow); }
.plan-featured .checklist li::before { background: var(--lime); }
.plan-featured .checklist li::after { border-color: var(--on-lime); }
.plan-tag {
  position: absolute; top: -14px; left: 28px;
  padding: 4px 14px; border-radius: var(--radius-pill);
  background: var(--lime); color: var(--on-lime); font-size: .8rem; font-weight: 600;
}
@media (min-width: 960px) { .plans { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Sobre ---------- */
.name-big {
  display: flex; flex-wrap: wrap; align-items: center; gap: .05em .25em;
  font: 700 clamp(2.8rem, 9vw, 8.5rem)/1 var(--font-display); letter-spacing: -0.045em;
  margin-bottom: 80px;
}
.nb-result .nb-op { margin-right: .25em; }
.nb-op { color: var(--ink-muted); font-weight: 600; }
.nb-easy { background: var(--lime); color: var(--on-lime); padding: 0 .22em .06em; border-radius: var(--radius-pill); }
.nb-result { color: var(--violet); }
.about { display: grid; gap: 32px; }
.about h2 { font-size: clamp(1.8rem, 2.6vw + .9rem, 3rem); max-width: 14em; }
.about-text p { color: var(--ink-muted); font-size: 1.0625rem; }
.about-text p + p { margin-top: var(--space-4); }
.about-text .name-say { color: var(--ink); font-weight: 600; }
@media (min-width: 960px) { .about { grid-template-columns: 1fr 1fr; gap: 80px; } }

/* ---------- Contato (CTA em tela cheia) ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: 104px 0; background: var(--violet-base); color: var(--white); }
.cta .texture { color: var(--white); opacity: .18; z-index: -1; }
.cta h2 { font-size: clamp(2.4rem, 5.6vw + .5rem, 5.8rem); line-height: 1; letter-spacing: -0.04em; max-width: 12em; }
.cta-inner > p { margin-top: 24px; font-size: 1.125rem; max-width: 32em; }
.cta-actions { margin-top: 40px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 56px; padding-top: 32px; border-top: 1px solid color-mix(in srgb, var(--white) 30%, transparent); }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list a { font-weight: 600; font-size: 1.0625rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 960px) { .cta { padding: 160px 0; } }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--surface); color: var(--ink); padding: 56px 0 32px; }
.footer-inner { display: grid; gap: 32px; }
.footer-brand .logo { width: 156px; height: auto; }
.slogan { margin-top: 12px; font: 600 1.125rem var(--font-display); color: var(--lime); }
.footer-contacts { display: grid; gap: 10px; }
.footer-contacts a { color: var(--ink-muted); text-decoration: none; }
.footer-contacts a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.copy { padding-top: var(--space-6); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .875rem; }
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .copy { grid-column: 1 / -1; }
}

/* ---------- Movimento (só para quem não pediu menos movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* título do hero entra palavra por palavra */
  .hero-title .w > span { transform: translateY(110%); animation: word-up .9s var(--ease-out) forwards; }
  .hero-title .w:nth-of-type(1) > span { animation-delay: .15s; }
  .hero-title .w:nth-of-type(2) > span { animation-delay: .23s; }
  .hero-title .w:nth-of-type(3) > span { animation-delay: .31s; }
  .hero-title .w:nth-of-type(4) > span { animation-delay: .39s; }
  .hero-title .w:nth-of-type(5) > span { animation-delay: .55s; }
  .hero-title .w:nth-of-type(6) > span { animation-delay: .63s; }
  .hero .badge, .hero .lead, .hero .actions { opacity: 0; animation: fade-up .8s var(--ease-out) forwards; }
  .hero .badge { animation-delay: .05s; }
  .hero .lead { animation-delay: .8s; }
  .hero .actions { animation-delay: .95s; }

  .work-screen img { transition: top 7s cubic-bezier(.45, 0, .25, 1), transform 7s cubic-bezier(.45, 0, .25, 1); }
  .work:hover .work-screen img, .work:focus-visible .work-screen img, .work.is-play .work-screen img { top: 100%; transform: translateY(-100%); }
  .work:hover .work-browser { transform: translateY(-6px); box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--violet) 45%, transparent); }

  /* aparição ao rolar (classe .js-motion vem do main.js) */
  .js-motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
  .js-motion h2[data-reveal] { opacity: 1; transform: translateY(.35em); clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease-out), transform .9s var(--ease-out); }
  .js-motion [data-reveal].is-in { opacity: 1; transform: none; }
  /* o recorte é só dos títulos; em cards ele cortaria o que passa da borda (ex.: selo "Mais completo") */
  .js-motion h2[data-reveal].is-in { clip-path: inset(-10% -5% -15% -5%); }
  .js-motion .nb[data-reveal] { transform: translateY(.4em); }

  .magnetic { transition: transform .35s var(--ease-out), background-color .2s ease; }
}
@keyframes word-up { to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .process-steps::after { transform: scaleY(1); }
}
