/* CanSys — landing pública (fundo 3D infinito + navbar transparente) */

:root {
  --violet: #6A2DFF;
  --purple: #8B5CF6;
  --lilac: #C4B5FD;
  --mist: #E9D5FF;
  --canvas: #F5F3FF;
  --white: #FFFFFF;
  --text: #1e1633;
  --muted: #5b5270;
  --line: rgba(106, 45, 255, 0.14);
  --card: rgba(255, 255, 255, 0.72);
  --radius: 20px;
  --shadow: 0 28px 70px rgba(106, 45, 255, 0.18);
  --primary: var(--violet);
  --primary-soft: var(--purple);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Cena 3D infinita (atrás de tudo, inclusive navbar) ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(106, 45, 255, 0.28), transparent 62%),
    radial-gradient(900px 520px at 6% 12%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(800px 480px at 50% 100%, rgba(196, 181, 253, 0.35), transparent 70%),
    linear-gradient(180deg, #F5F3FF 0%, #E9D5FF 42%, #F5F3FF 100%);
  perspective: 1000px;
}

.scene-grid {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -22%;
  height: 110%;
  background-image:
    linear-gradient(rgba(106, 45, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 45, 255, 0.12) 1px, transparent 1px);
  background-size: 68px 68px;
  transform: rotateX(72deg) translateZ(-120px);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 8%, transparent 74%);
  -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 74%);
  animation: gridflow 22s linear infinite;
}

@keyframes gridflow {
  to { background-position: 0 68px, 68px 0; }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.orb-1 { width: 520px; height: 520px; top: -140px; right: -80px; background: rgba(106, 45, 255, 0.45); }
.orb-2 { width: 460px; height: 460px; top: 42%; left: -160px; background: rgba(139, 92, 246, 0.38); }
.orb-3 { width: 380px; height: 380px; bottom: -120px; right: 22%; background: rgba(196, 181, 253, 0.55); }

.scene-icon {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0.22;
  filter: drop-shadow(0 30px 50px rgba(106, 45, 255, 0.35));
  transform-style: preserve-3d;
  will-change: left, top, transform;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  transition:
    left 0.85s cubic-bezier(0.22, 0.8, 0.25, 1),
    top 0.85s cubic-bezier(0.22, 0.8, 0.25, 1),
    transform 0.85s cubic-bezier(0.22, 0.8, 0.25, 1),
    opacity 0.25s ease;
}
.scene-icon:hover,
.scene-icon:focus-visible {
  opacity: 0.42;
  outline: none;
}
.scene-icon img {
  width: 100%;
  height: auto;
  border-radius: 0;
  background: transparent !important;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.scene-icon-a {
  width: min(300px, 38vw);
  top: 10%;
  left: 68%;
  animation: float3dIdle 18s ease-in-out infinite;
}
.scene-icon-b {
  width: min(200px, 26vw);
  top: 62%;
  left: 8%;
  animation: float3dIdle 22s ease-in-out infinite reverse;
}
.scene-icon-c {
  width: min(150px, 20vw);
  top: 42%;
  left: 44%;
  opacity: 0.16;
  animation: float3dIdle 26s ease-in-out infinite;
}
.scene-icon.is-moving {
  animation: none;
}

@keyframes float3dIdle {
  0%, 100% { transform: translate3d(0, 0, 0) rotateY(-14deg) rotateX(8deg) scale(1); }
  50% { transform: translate3d(0, -18px, 12px) rotateY(10deg) rotateX(-6deg) scale(1.04); }
}

.scene-noise {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: radial-gradient(rgba(106, 45, 255, 0.08) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* Conteúdo acima da cena; ícones 3D tocáveis (z-index 5) acima do conteúdo */
main, footer { position: relative; z-index: 2; }

/* ---------- Topbar transparente (mesmo “chão” da cena) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr minmax(160px, auto);
  align-items: center;
  column-gap: clamp(1rem, 3vw, 2.5rem);
  height: 84px;
  min-height: 84px;
  max-height: 84px;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  overflow: visible;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(245, 243, 255, 0.38);
  border-bottom: 1px solid rgba(106, 45, 255, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  justify-self: start;
}
.topbar .brand img {
  height: 78px;
  width: auto;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  display: block;
  object-fit: contain;
  margin: -8px 0;
}
.brand-footer img { height: 40px; }
.brand b { color: var(--violet); font-weight: 800; }

.topnav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 2.8vw, 2.4rem);
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  font-weight: 700;
}
.topnav a:hover { color: var(--violet); }

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  justify-self: end;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #fff;
  box-shadow: 0 14px 34px rgba(106, 45, 255, 0.35);
}
.btn-outline {
  border-color: rgba(106, 45, 255, 0.28);
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}
.btn-ghost {
  color: var(--text);
  border-color: rgba(106, 45, 255, 0.18);
  padding: 0.55rem 1.15rem;
  background: rgba(255, 255, 255, 0.35);
}
.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; }

/* ---------- Hero + slides ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem);
  max-width: 1360px;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(106, 45, 255, 0.35);
  background: rgba(233, 213, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--violet);
}
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.hero-slides { min-height: 7.2rem; margin: 1rem 0 0.6rem; position: relative; }
.hero-slide {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.2,.7,.3,1);
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}
.hero-slide .step-num {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.hero h1, .hero-slide h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.4vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--text);
}

.lead { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: 34rem; font-weight: 500; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 0; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  list-style: none;
  padding: 0;
  margin: 2.6rem 0 0;
}
.stats strong { display: block; font-size: 1.7rem; font-weight: 800; color: var(--violet); }
.stats span { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.hero-stage {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1400px;
}
.stage-glow {
  position: absolute;
  inset: 12% 6% 6%;
  background: radial-gradient(circle at 60% 40%, rgba(106, 45, 255, 0.4), transparent 68%);
  filter: blur(60px);
}
.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.shot-main {
  transform: rotateY(-13deg) rotateX(6deg) translateZ(0);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.shot-main img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #E9D5FF;
}
.shot-float {
  position: absolute;
  right: -2%;
  bottom: -10%;
  width: 30%;
  min-width: 130px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: rotateY(-13deg) rotateX(6deg) translateZ(70px);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.shot-float img {
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 18px 28px rgba(106, 45, 255, 0.28));
}
.hero-stage:hover .shot-main { transform: rotateY(-7deg) rotateX(3deg); }
.hero-stage:hover .shot-float { transform: rotateY(-7deg) rotateX(3deg) translateZ(90px); }

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.4rem;
  position: relative;
  z-index: 2;
}
.slide-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(106, 45, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}
.slide-dots button.is-active {
  width: 26px;
  background: linear-gradient(90deg, var(--violet), var(--purple));
}

/* ---------- Seções ---------- */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3.5rem);
}

.section-head { max-width: 44rem; margin-bottom: 2.8rem; }
.section-head p { color: var(--muted); font-weight: 500; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 800;
  margin-bottom: 0.7rem;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.card-3d {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.3s ease;
  transform-style: preserve-3d;
}
.card-3d:hover { border-color: rgba(106, 45, 255, 0.35); }

.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
  counter-reset: step;
}
.step-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.step-card:hover { transform: translateY(-8px); }
.step-card-media {
  background: linear-gradient(160deg, #E9D5FF, #F5F3FF);
  border-bottom: 1px solid var(--line);
}
.step-card-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
}
.step-card-body { padding: 1.15rem 1.25rem 1.4rem; }
.step-card-body .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
}
.step-card-body h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 800; }
.step-card-body p { margin: 0; color: var(--muted); font-size: 0.92rem; font-weight: 500; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-copy p { color: var(--muted); font-size: 1.05rem; font-weight: 500; }
.split-media { margin: 0; overflow: hidden; }
.split-media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  color: var(--violet);
  font-weight: 800;
}
.link-arrow span:last-child { transition: transform 0.2s ease; }
.link-arrow:hover span:last-child { transform: translateX(4px); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.3rem;
}
.feature:hover { transform: translateY(-6px) rotateX(4deg); }
.feature-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(106, 45, 255, 0.15), rgba(196, 181, 253, 0.45));
  color: var(--violet);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.feature-label { font-weight: 700; }

/* Contato */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.contact-copy p { color: var(--muted); font-weight: 500; }
.contact-meta {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.contact-meta li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.contact-meta strong { color: var(--text); min-width: 4.5rem; }
.contact-meta a { color: var(--violet); font-weight: 700; }

.contact-form {
  display: grid;
  gap: 0.85rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(106, 45, 255, 0.2);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}
.form-status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--purple);
}
.form-status.is-error { color: #b42318; }
.form-status.is-ok { color: #027a48; }

/* Footer */
.footer {
  border-top: 1px solid rgba(106, 45, 255, 0.12);
  padding: 2rem clamp(1rem, 4vw, 3.5rem) 5.5rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.75rem;
  align-items: center;
}
.footer-meta {
  min-width: 0;
}
.footer-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.footer-legal {
  margin-top: 0.2rem !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.footer-links { display: flex; gap: 1.2rem; font-weight: 700; color: var(--violet); }

/* Chat flutuante — paleta CanSys */
.chat-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #fff;
  box-shadow: 0 16px 38px rgba(106, 45, 255, 0.42);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-float:hover { transform: translateY(-3px) scale(1.04); }

.chat-dialog {
  border: none;
  border-radius: 1.15rem;
  padding: 0;
  max-width: 22rem;
  width: calc(100% - 2rem);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 70;
}
.chat-dialog::backdrop {
  background: rgba(30, 22, 51, 0.35);
  backdrop-filter: blur(4px);
}
.chat-dialog-inner { padding: 1.35rem 1.35rem 1.25rem; position: relative; }
.chat-dialog-close {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.chat-dialog h3 { margin: 0 1.5rem 0.35rem 0; font-size: 1.15rem; font-weight: 800; }
.chat-dialog-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.1rem; font-weight: 500; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }

@media (max-width: 900px) {
  .hero, .split, .contact { grid-template-columns: 1fr; }
  .hero {
    gap: 1.35rem;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }
  .hero-stage {
    width: min(100%, 18rem);
    max-width: 18rem;
    margin: 0.25rem auto 0;
  }
  .topbar {
    grid-template-columns: 1fr auto;
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    row-gap: 0.35rem;
  }
  .topnav { display: none; }
  .topbar .brand img { height: 64px; margin: -6px 0; }
  .brand { font-size: 1.28rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .footer-legal { white-space: normal; }
  .shot-main, .shot-float { transform: none !important; }
  .shot-float {
    right: 3%;
    bottom: -8%;
    width: 30%;
    min-width: 4.5rem;
  }
  .scene-icon-c { display: none; }
}

@media (max-width: 480px) {
  .hero h1, .hero-slide h1 { font-size: clamp(1.55rem, 7.2vw, 2rem); }
  .hero-stage { width: min(100%, 14.5rem); max-width: 14.5rem; }
  .btn-ghost { display: none; }
  .stats { gap: 1.15rem 1.5rem; margin-top: 1.6rem; }
  .stats strong { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
