/* ============================================================
   PERCEPTRON LANDING v2 — Estilo Corporativo Premium
   ============================================================ */
:root {
  --bg: #080808;
  --bg-dark: #050505;
  --surface: #0c0c0e;
  --surface-hover: #121216;
  --line: #1c1c21;
  --line-soft: #141416;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-mute: #52525b;
  --accent: #7c3aed;       /* Indigo Principal */
  --accent-soft: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.15);
  
  --sans: "Inter", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --maxw: 1200px;
  --gutter: clamp(24px, 6vw, 64px);
  
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

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

html { scroll-behavior: smooth; background-color: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ============ BARRA DE PROGRESSO E HEADER ============ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

header.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(8, 8, 8, 0.65);
  backdrop-filter: blur(16px);
  transition: border-color .3s ease;
}
header.nav.scrolled {
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -0.02em;
}
.brand .logo-icon { display: block; flex-shrink: 0; }
.brand .py { color: var(--accent-soft); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13.5px; color: var(--text-dim);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

/* Botões do Design System */
.btn {
  font-size: 13px; font-weight: 500; padding: 10px 18px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center;
  gap: 8px; white-space: nowrap; transition: all .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
  background: var(--accent-soft);
  box-shadow: 0 8px 24px -6px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-secondary { background: transparent; color: var(--text-dim); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--text-mute); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-dim); padding-inline: 10px; }
.btn-ghost:hover { color: #fff; }

.btn svg { transition: transform .2s ease; }
.btn:hover svg { transform: translateX(2px); }

/* ============ HERO (Duas colunas) ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 74px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; padding-block: 60px 40px; }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
@media (max-width: 960px) {
  .hero-copy { align-items: center; text-align: center; }
}

/* Badge de status minimalista */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-pill .dot {
  width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 6px 1px var(--accent);
}

h1.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-top: 24px;
  color: #fff;
}
h1.hero-title .hl {
  color: var(--accent-soft);
  text-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  max-width: 540px;
  margin-top: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}
@media (max-width: 960px) {
  .hero-actions { justify-content: center; }
}

/* Logos dos parceiros/clientes */
.hero-logos {
  margin-top: 60px;
  width: 100%;
}
.hero-logos p {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-mute); margin-bottom: 14px;
}
.logos-marquee {
  position: relative;
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
@media (max-width: 960px) {
  .logos-marquee { max-width: none; }
}
.logos-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: logos-scroll 24s linear infinite;
}
.logos-marquee:hover .logos-track { animation-play-state: paused; }
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; flex-wrap: wrap; gap: 28px; }
}
.logo-item {
  font-family: var(--mono); font-size: 13.5px; font-weight: 700;
  color: var(--text-mute); letter-spacing: 0.05em;
  display: inline-flex; align-items: center; gap: 6px;
  margin-right: 44px; white-space: nowrap;
  transition: color 0.25s ease;
}
.logos-marquee:hover .logo-item { color: var(--text-dim); }
.logo-item svg { opacity: 0.5; }

/* Coluna Direita (Canvas + Grafo Overlays) */
.hero-visual {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 960px) {
  .hero-visual { height: 380px; max-width: 540px; margin: 0 auto; }
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Overlay dos rótulos dos nós */
.node-overlay {
  position: absolute;
  z-index: 2;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  background: rgba(8, 8, 8, 0.7);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.node-overlay svg { color: var(--text-mute); transition: color 0.2s ease; }
.node-overlay.active {
  border-color: var(--accent-soft);
  color: #fff;
}
.node-overlay.active svg {
  color: var(--accent-soft);
}

/* Posições relativas dos overlays do Hero no container de 480px */
.overlay-left-top { top: 12%; left: 4%; }
.overlay-left-mid { top: 48%; left: 0%; }
.overlay-left-bot { bottom: 12%; left: 4%; }

.overlay-right-top { top: 12%; right: 4%; }
.overlay-right-mid { top: 48%; right: 0%; }
.overlay-right-bot { bottom: 12%; right: 4%; }

.scroll-indicator {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mute); pointer-events: none;
}
.scroll-indicator .line {
  width: 1px; height: 30px; background: linear-gradient(var(--text-mute), transparent);
}

/* ============ SEÇÕES GERAIS ============ */
section.sec {
  padding-block: clamp(80px, 9vw, 130px);
  position: relative;
  border-bottom: 1px solid var(--line-soft);
}
.sec-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.sec-head p.tagline {
  font-family: var(--mono); font-size: 11.5px; color: var(--accent-soft);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}
.sec-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-top: 12px;
  color: #fff;
}
.sec-head p.desc {
  color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-top: 14px;
}

/* ============ CARDS DO "O QUE FAZEMOS" ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.service-card:hover {
  border-color: var(--accent-soft);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.service-card .icon {
  width: 40px; height: 40px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--accent-soft); margin-bottom: 22px; transition: border-color 0.25s ease;
}
.service-card:hover .icon { border-color: var(--accent-soft); }
.service-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #fff; }
.service-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ============ CARROSSEL "SOFTWARE EM PRODUÇÃO" ============ */
.carousel-header-row {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 44px;
}
@media (max-width: 560px) {
  .carousel-header-row { flex-direction: column; align-items: flex-start; gap: 20px; }
}
.carousel-nav { display: flex; gap: 10px; }
.carousel-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text-dim); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all 0.2s ease;
}
.carousel-btn:hover { border-color: var(--accent-soft); color: #fff; }

.carousel-container {
  overflow: hidden; width: 100%; position: relative;
}
.carousel-track {
  display: flex; gap: 20px; transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}
.carousel-card {
  width: calc(33.333% - 13.3px); flex-shrink: 0;
  border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column;
}
@media (max-width: 960px) {
  .carousel-card { width: calc(50% - 10px); }
}
@media (max-width: 560px) {
  .carousel-card { width: 100%; }
}

.video-container {
  position: relative; width: 100%; aspect-ratio: 16/9; background: var(--surface);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.video-container video {
  width: 100%; height: 100%; object-fit: cover;
}
.video-container img.shot {
  width: 100%; height: 100%; object-fit: contain; padding: 10px;
  display: block;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.carousel-card:hover .video-container img.shot { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .carousel-card:hover .video-container img.shot { transform: none; }
}
.video-container .play-overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.3s ease;
}
.video-container:hover .play-overlay { opacity: 0.15; }
.video-container .play-btn {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 16px;
}
/* cantos "visor" no espaço reservado do vídeo (combina com a referência) */
.video-container::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 3;
  pointer-events: none;
  --cc: rgba(255, 255, 255, 0.22);
  --ca: 16px;  /* comprimento do canto */
  --cw: 1.5px; /* espessura do traço */
  background:
    linear-gradient(var(--cc), var(--cc)) 0 0 / var(--ca) var(--cw) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 0 0 / var(--cw) var(--ca) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 100% 0 / var(--ca) var(--cw) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 100% 0 / var(--cw) var(--ca) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 0 100% / var(--ca) var(--cw) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 0 100% / var(--cw) var(--ca) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 100% 100% / var(--ca) var(--cw) no-repeat,
    linear-gradient(var(--cc), var(--cc)) 100% 100% / var(--cw) var(--ca) no-repeat;
}

.carousel-card-body { padding: 22px 20px; text-align: left; }
.carousel-card-body h3 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.carousel-card-body p.desc { font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.carousel-card-body p.problem { font-size: 11.5px; color: var(--text-mute); font-family: var(--mono); margin-top: 10px; }

/* Controles de dots de paginação */
.carousel-dots {
  display: flex; justify-content: center; gap: 8px; margin-top: 36px;
}
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line);
  cursor: pointer; transition: all 0.25s ease;
}
.carousel-dot.active { background: var(--accent-soft); width: 20px; border-radius: 3px; }

.carousel-link-note {
  text-align: center; font-size: 13.5px; color: var(--text-dim); margin-top: 28px;
}
.carousel-link-note a { color: var(--accent-soft); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.carousel-link-note a:hover { text-decoration: underline; }

/* ============ COMO FUNCIONA (Timeline Horizontal) ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
}
.step-card {
  background: transparent; border-radius: var(--radius-lg); text-align: left; position: relative;
}
.step-card .step-num {
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent-soft);
  margin-bottom: 12px; display: inline-block;
}
.step-card h3 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.step-card h3::after {
  content: "→"; font-size: 16px; color: var(--text-mute); margin-right: 14px;
}
@media (max-width: 768px) {
  .step-card h3::after { display: none; }
}
.step-card:last-child h3::after { display: none; }
.step-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ============ DIFERENCIAL (Cards Grandes) ============ */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) {
  .diff-grid { grid-template-columns: 1fr; }
}
.diff-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 32px; text-align: left;
}
.diff-card .tag {
  font-family: var(--mono); font-size: 9.5px; color: var(--accent-soft); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 20px; display: inline-block;
}
.diff-card h3 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.diff-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ============ SEÇÃO FINAL / CTA E FOOTER ============ */
.cta-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 960px) {
  .cta-container { grid-template-columns: 1fr; gap: 40px; }
}

.cta-left {
  text-align: left;
  position: relative;
}
.cta-left .bg-mark {
  position: absolute; top: -140px; left: -80px; z-index: -1;
  color: rgba(124, 58, 237, 0.02); opacity: 0.6; pointer-events: none;
}
.cta-left h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 750; line-height: 1.1; color: #fff; }
.cta-left p { color: var(--text-dim); font-size: 15px; margin-top: 18px; line-height: 1.6; max-width: 480px; }

.cta-right-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 36px; text-align: left;
}
.cta-right-box h3 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 24px; }
.cta-bullets {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px;
}
.cta-bullet {
  display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-dim);
}
.cta-bullet svg { color: var(--accent-soft); flex-shrink: 0; }

.cta-right-box .btn { width: 100%; justify-content: center; padding-block: 13px; font-size: 14px; }

/* FOOTER */
footer.foot {
  background: var(--bg-dark);
  border-top: 1px solid var(--line);
  padding-block: 56px 40px;
}
.foot-content {
  display: flex; flex-direction: column; gap: 36px;
}
.foot-top-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.foot-links {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.foot-links a { font-size: 13px; color: var(--text-mute); transition: color 0.2s ease; }
.foot-links a:hover { color: var(--text-dim); }

.foot-bottom-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 24px;
  font-family: var(--mono); font-size: 11px; color: var(--text-mute);
}
.foot-bottom-row .heart { color: var(--accent); }
