:root {
  /* paleta unificada com o GoPilot — ver ../brand/DESIGN.md */
  --deep-space: #060a0f;
  --orbit-navy: #101b26;
  --border-navy: #1a2430;
  --slate: #2c4257;
  --ion-blue: #5bd0e8;
  --thrust-orange: #ffc24b;
  --starlight: #f0f5f8;
  --muted: #7e93a6;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1140px;
  --pad-x: clamp(20px, 5vw, 48px);
}

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

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--deep-space);
  color: var(--starlight);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* vinheta cinematográfica fixa, sutil, atrás do conteúdo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(6, 10, 15, 0.55) 100%);
}

/* textura de grão muito sutil por cima de tudo, exceto a nav */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* scrollbar customizada */
html {
  scrollbar-color: var(--slate) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--slate);
  border-radius: 10px;
  border: 2px solid var(--deep-space);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ion-blue); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ion-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h3 { font-size: 1.3rem; }

p { color: var(--muted); }

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

.accent { color: var(--ion-blue); }

main { position: relative; z-index: 2; }

section { position: relative; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section-emblem {
  display: block;
  margin-bottom: 1.1rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ion-blue);
  display: block;
  margin-bottom: 1.1rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 15px 30px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.btn:hover::after {
  left: 130%;
}

.btn-primary {
  background: var(--thrust-orange);
  color: var(--deep-space);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 194, 75, 0.3);
}

.btn-ghost {
  border-color: var(--border-navy);
  color: var(--starlight);
}

.btn-ghost:hover {
  border-color: var(--ion-blue);
  background: rgba(91, 208, 232, 0.07);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background: var(--orbit-navy);
  border: 1px solid var(--border-navy);
  border-radius: 16px;
  padding: 34px 30px;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  /* .product-card libera overflow (nave sobrevoa pra fora) — o brilho do hover
     precisa da própria borda arredondada, já que não conta mais com o clip do pai */
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(91, 208, 232, 0.12), transparent 70%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: rgba(91, 208, 232, 0.5);
  box-shadow: 0 16px 44px rgba(91, 208, 232, 0.12);
}

::selection { background: rgba(91, 208, 232, 0.35); }

/* ---------- Starfield ---------- */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Bolinha âmbar: sinal contínuo, atravessa hero -> problema -> virada ---------- */

.global-ball {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--thrust-orange);
  box-shadow: 0 0 18px 4px rgba(255, 194, 75, 0.5);
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  will-change: transform;
}

/* nave do GoPilot em voo fixo — escapa do overflow da seção de produtos */
.gopilot-courier {
  position: fixed;
  top: 0;
  left: 0;
  width: 42px;
  height: 70px;
  pointer-events: none;
  z-index: 55;
  opacity: 0;
  will-change: transform;
}

.gopilot-courier svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(91, 208, 232, 0.55));
}

/* ---------- Nav ---------- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 10, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26, 36, 48, 0.6);
  transition: transform 0.4s ease;
}

#nav.nav-hidden { transform: translateY(-100%); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  position: relative;
  font-size: 0.92rem;
  color: var(--muted);
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--ion-blue);
  transition: right 0.3s ease;
}

.nav-links a:hover { color: var(--starlight); }

.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }

.nav-links a.active { color: var(--starlight); }

/* wordmark GoPilot: "Go" claro + "Pilot" ciano, sempre em Space Grotesk */
.gopilot-word { font-family: var(--font-display); font-weight: 500; }
.gopilot-go { color: var(--starlight); }
.gopilot-pilot { color: var(--ion-blue); }

.nav-cta { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Cap. 0 — Hero ---------- */

#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 92px;
  padding-bottom: 140px;
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--sx, 50%) var(--sy, 30%), rgba(91, 208, 232, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#hero:hover .hero-spotlight { opacity: 1; }

.hero-inner { max-width: 820px; position: relative; z-index: 1; }

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-sub {
  margin-top: 1.6rem;
  max-width: 560px;
  font-size: 1.1rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.4rem;
}

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: var(--border-navy);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--ion-blue);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% { top: -50%; }
  100% { top: 110%; }
}

@keyframes signalPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 194, 75, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 194, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 194, 75, 0); }
}

/* ---------- Cap. 1 — Problema ---------- */

#problema { height: 100svh; }

.problem-stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad-x);
  position: relative;
}

.problem-phrase {
  position: absolute;
  max-width: 780px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.5vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--starlight);
}

body.js-anim .problem-phrase { opacity: 0; }

.problem-phrase em {
  font-style: normal;
  color: var(--thrust-orange);
}

/* ---------- Cap. 2 — Virada ---------- */

#virada {
  min-height: 90svh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(91, 208, 232, 0.05) 50%, transparent 100%);
}

.turn-inner {
  text-align: center;
  width: 100%;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.fleet-scene {
  width: min(920px, 92%);
  margin: 0 auto 2rem;
  display: block;
  overflow: visible;
}

.turn-title { margin-bottom: 1.2rem; }

.turn-sub {
  font-size: 1.25rem;
  color: var(--starlight);
}

/* ---------- Cap. 3 — Soluções ---------- */

#solucoes { padding: 9rem 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 3.4rem;
}

@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card h3 { margin: 1.3rem 0 0.6rem; }

.service-card p { font-size: 0.95rem; }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(91, 208, 232, 0.1);
  color: var(--ion-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg { width: 26px; height: 26px; }

/* ---------- Cap. 4 — Produtos ---------- */

/* só esconde o excesso horizontal do scroll-track — as naves precisam sobrevoar
   verticalmente para fora do card, então overflow-y fica livre */
#produtos { overflow-x: hidden; }

.products-pin { padding: 7rem 0; }

.products-head { margin-bottom: 3.4rem; }

.products-track {
  display: flex;
  gap: 24px;
  padding-left: max(var(--pad-x), calc((100vw - var(--container)) / 2 + var(--pad-x)));
  padding-right: var(--pad-x);
  width: max-content;
}

.product-card {
  width: min(420px, 82vw);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 36px;
  /* sobrescreve o overflow:hidden de .card — a nave precisa sobrevoar para fora do card */
  overflow: visible;
}

.rocket-scene {
  width: 100%;
  height: 108px;
  display: block;
  margin-bottom: 6px;
  overflow: visible;
}

.product-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ion-blue);
  background: rgba(91, 208, 232, 0.1);
  padding: 6px 12px;
  border-radius: 100px;
}

.product-card h3 { font-size: 1.7rem; }

.product-card p { font-size: 0.98rem; }

.product-link {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ion-blue);
  display: inline-block;
  transition: color 0.25s ease, transform 0.25s ease;
}

.product-link:hover {
  color: var(--starlight);
  transform: translateX(4px);
}

/* ---------- Cap. 5 — GoPilot ---------- */

#gopilot {
  padding: 9rem 0;
  background: linear-gradient(180deg, transparent, rgba(16, 27, 38, 0.6) 30%, rgba(16, 27, 38, 0.6) 70%, transparent);
}

.gopilot-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.gopilot-copy p { max-width: 520px; }

.gopilot-list {
  list-style: none;
  margin: 1.8rem 0 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.gopilot-list li {
  padding-left: 30px;
  position: relative;
  color: var(--starlight);
  font-size: 0.98rem;
}

.gopilot-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(91, 208, 232, 0.15);
  border: 1.5px solid var(--ion-blue);
}

.chat-mock {
  background: var(--orbit-navy);
  border: 1px solid var(--border-navy);
  border-radius: 20px;
  overflow: hidden;
  max-width: 440px;
  justify-self: center;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(6, 10, 15, 0.55);
  border-bottom: 1px solid var(--border-navy);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5bd0e8;
  color: #06222b;
  font-family: var(--font-display);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-head strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
}

.chat-status {
  font-size: 0.75rem;
  color: #5bd0e8;
}

.chat-body {
  padding: 22px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.msg-in {
  align-self: flex-start;
  background: rgba(240, 245, 248, 0.07);
  border-bottom-left-radius: 4px;
  color: var(--starlight);
}

.msg-out {
  align-self: flex-end;
  background: #134552;
  border-bottom-right-radius: 4px;
  color: #eaf7fa;
}

.chat-note {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: #ffc24b;
  text-align: center;
  padding: 0 10px;
}

.chat-note::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffc24b;
  margin-right: 8px;
  vertical-align: 2px;
}

.chat-note.signal-pulse::before {
  animation: signalPulse 1.4s ease-out 1;
}

/* ---------- Cap. 6 — Sobre ---------- */

#sobre { padding: 9rem 0 7rem; }

.about-inner { text-align: center; }

.about-sub {
  max-width: 620px;
  margin: 1.4rem auto 0;
  font-size: 1.08rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 4rem auto 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--starlight);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.tech-strip {
  margin-top: 4.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Cap. 7 — CTA ---------- */

#contato {
  padding: 10rem 0;
  text-align: center;
}

/* a bolinha âmbar fecha o ciclo: o sinal que nasceu no hero agora é o convite */
#contato .btn-primary {
  animation: ctaBeacon 3.2s ease-in-out infinite;
}

@keyframes ctaBeacon {
  0%, 100% { box-shadow: 0 8px 32px rgba(255, 194, 75, 0.22); }
  50% { box-shadow: 0 8px 46px rgba(255, 194, 75, 0.5); }
}

.cta-inner p {
  max-width: 540px;
  margin: 1.4rem auto 2.6rem;
  font-size: 1.08rem;
}

.cta-hint {
  display: block;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Footer ---------- */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(26, 36, 48, 0.6);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links { display: flex; gap: 24px; }

.footer-links a { transition: color 0.25s ease; }

.footer-links a:hover { color: var(--starlight); }

.footer-legal {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(126, 147, 166, 0.65);
  text-align: center;
}

/* ---------- Reveal (estado inicial p/ GSAP) ----------
   A classe js-anim é adicionada pelo main.js: sem JS, tudo fica visível. */

body.js-anim .reveal,
body.js-anim .hero-anim,
body.js-anim .service-card,
body.js-anim .chat-msg {
  opacity: 0;
}

/* ---------- Responsivo ---------- */

@media (max-width: 900px) {
  .gopilot-inner { grid-template-columns: 1fr; }
  .chat-mock { justify-self: start; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }

  .products-track {
    flex-direction: column;
    width: 100%;
    padding-left: var(--pad-x);
  }

  .product-card { width: 100%; }

  #problema { height: auto; }

  .problem-stage {
    flex-direction: column;
    gap: 3.5rem;
    padding-top: 7rem;
    padding-bottom: 7rem;
  }

  .problem-phrase { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
