/* App ConectaAI — página de lançamento em rolagem.
   Segue o Manual de Marca (docs/manual-marca): Geist Medium + JetBrains Mono,
   Tinta/Papel como regra, Sinal só em dado ao vivo, wordmark conecta/ai. */
:root {
  --ink: #0A0A0A;
  --ink90: #1F1F1F;
  --paper: #F5F4EE;
  --gray: #7A7A75;
  --gray-2: #A9A8A2;
  --signal: #3B5BFF;
  --line: rgba(245, 244, 238, 0.12);
  --sans: "Geist", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color-scheme: dark; }
body {
  background: var(--ink); color: var(--paper); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }

#grade { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, .nav, .foot { position: relative; z-index: 1; }

.dim { color: var(--gray); }
.live { display: inline-block; width: 0.5em; height: 0.5em; background: var(--signal); flex: none; }
.kicker, .eyebrow, .label {
  font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 13px; color: var(--gray-2);
}
.eyebrow, .label { display: inline-flex; align-items: center; gap: 12px; }

/* ---------- marca ---------- */
.mark { width: 1em; height: 1em; display: block; }
.wordmark { font-weight: 500; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.wordmark .ai { font-family: var(--mono); font-size: 0.85em; color: var(--signal); margin-left: 0.04em; letter-spacing: 0; }
.lockup { display: inline-flex; align-items: center; gap: 0.32em; text-decoration: none; }
.lockup .wordmark { font-size: 0.58em; }

/* ---------- navegação ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: linear-gradient(rgba(10,10,10,0.85), rgba(10,10,10,0));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.nav .lockup { font-size: 30px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--gray-2); }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--paper); }
.nav-cta {
  font-size: 14px; font-weight: 500; text-decoration: none; padding: 9px 16px; border-radius: 99px;
  background: var(--paper); color: var(--ink);
}
.nav-cta:hover { background: #fff; }

/* ---------- aparelhos ---------- */
.device-slot { position: relative; }
.device { position: relative; aspect-ratio: 1470 / 3000; height: 100%; }
.device.pixel { aspect-ratio: 1410 / 2968; }
.device .bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.device .screen { position: absolute; overflow: hidden; background: var(--ink); container-type: size; }
.device.iphone .screen { left: 5.102%; top: 2.2%; width: 89.796%; height: 95.6%; border-radius: 14.4% / 6.62%; }
.device.pixel .screen { left: 4.184%; top: 2.022%; width: 90.78%; height: 96.23%; border-radius: 7.73% / 3.47%; }
.scr { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.scr.on { opacity: 1; }
.scr .sb {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  background: var(--top, #0a0a0a); color: #fff; font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; font-weight: 600;
}
.scr .web { position: absolute; left: 0; right: 0; overflow: hidden; background: var(--top, #0a0a0a); }
.scr .web img { width: 100%; }
.scr .inset { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bottom, #0b0b0b); }
.scr .pill { position: absolute; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 99px; }
.iphone .scr .sb { height: 6.49cqh; padding: 0.6cqh 11.4cqw 0 12.9cqw; font-size: 4.1cqw; }
.iphone .scr .web { top: 6.49cqh; bottom: 3.56cqh; }
.iphone .scr .inset { height: 3.56cqh; }
.iphone .scr .pill { width: 32cqw; height: 0.56cqh; bottom: 0.9cqh; }
.pixel .scr .sb { height: 4.8cqh; padding: 0.3cqh 6.6cqw 0 6.7cqw; font-size: 3.3cqw; font-family: var(--sans); font-weight: 500; }
.pixel .scr .web { top: 4.8cqh; bottom: 2.63cqh; }
.pixel .scr .inset { height: 2.63cqh; }
.pixel .scr .pill { width: 17cqw; height: 0.4cqh; bottom: 1.05cqh; opacity: 0.6; }
.sb svg { height: 1em; width: auto; }
.scr.cheia .web { inset: 0; }
.scr.cheia .web img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- ícone de módulo: o tratamento da capa do Conecta Agents ----------
   nó em Sinal, um pulso de luz percorrendo cada ramo, halo azul como sombra. */
.modulo { position: relative; width: 128px; height: 128px; margin-bottom: 30px; isolation: isolate; }
.modulo::before {
  content: ""; position: absolute; inset: -26px; z-index: -1; border-radius: 40px;
  background: radial-gradient(circle at 50% 60%, rgba(59,91,255,0.75), rgba(59,91,255,0) 68%);
  filter: blur(20px); opacity: 1;
}
.modulo svg { width: 100%; height: 100%; display: block; overflow: visible;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.7)) drop-shadow(0 0 1px rgba(245,244,238,0.25)); }
.modulo .base { fill: #1A1A1A; stroke: rgba(245,244,238,0.18); stroke-width: 6; }
.modulo .ramo { fill: none; stroke: var(--paper); stroke-width: 20; stroke-linecap: square; stroke-linejoin: miter; }
.modulo .no { fill: var(--signal); }
.modulo .fluxo {
  fill: none; stroke: #8EA2FF; stroke-width: 20; stroke-linecap: square; stroke-linejoin: miter;
  stroke-dasharray: 120 1400; stroke-dashoffset: 120; opacity: 0;
  animation: modulo-fluxo 6.3s linear infinite;
}
.modulo .fluxo.f1 { animation-delay: 3.15s; }
@keyframes modulo-fluxo {
  0% { stroke-dashoffset: 120; opacity: 0; }
  8% { opacity: 0.95; }
  45% { opacity: 0.95; }
  55% { stroke-dashoffset: -1000; opacity: 0; }
  100% { stroke-dashoffset: -1000; opacity: 0; }
}

/* ---------- 1. abertura ---------- */
.hero { height: 230vh; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.hero-copy { position: absolute; top: 18vh; left: 0; right: 0; text-align: center; padding: 0 var(--gutter); z-index: 3; }
.hero-title {
  margin-top: 22px; font-weight: 500; letter-spacing: -0.045em; line-height: 0.92;
  font-size: clamp(56px, 10.5vw, 176px);
}
.hero-title .ln { display: block; }
.hero-lede { margin: 26px auto 0; max-width: 34ch; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.45; color: var(--gray-2); }
.hero-devices {
  position: absolute; left: 50%; top: 100%;
  display: flex; gap: 2vw; height: min(78vh, 760px); z-index: 2;
}
.hero-devices .device-slot { height: 100%; }

/* ---------- 2. capítulos ---------- */
.story { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 0 var(--gutter); }
.story-stage { position: sticky; top: 0; height: 100vh; grid-column: 2; grid-row: 1; display: grid; place-items: center; }
.story-device { position: absolute; height: min(80vh, 780px); }
.chapters { grid-column: 1; grid-row: 1; }
.chapter { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 560px; padding: 10vh 0; }
.chapter h2, .maps-copy h2, .stats-title, .duo-title {
  font-weight: 500; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(40px, 5.6vw, 88px);
}
.chapter h2 { margin-top: 18px; }
.body { margin-top: 22px; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5; color: var(--gray-2); max-width: 40ch; }
.stat { margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.num {
  font-weight: 500; letter-spacing: -0.05em; line-height: 0.85; font-variant-numeric: tabular-nums;
  font-size: clamp(88px, 11vw, 196px);
}
.num .unit { font-size: 0.42em; letter-spacing: -0.02em; margin-left: 0.04em; }
.chapter { opacity: 0.25; transition: opacity 0.5s ease; }
.chapter.on { opacity: 1; }

/* ---------- módulos: o celular nasce de dentro do ícone ---------- */
.agents { height: 330vh; }
.modulo-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.modulo.portal {
  position: absolute; left: 50%; top: 50%; margin: 0; z-index: 1;
  width: clamp(150px, 15vw, 220px); height: clamp(150px, 15vw, 220px);
}
.modulo.portal::before { inset: -34%; filter: blur(30px); }
.modulo-device { height: min(80vh, 780px); z-index: 2; }
.modulo-copy-wrap { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; padding: 0 var(--gutter); pointer-events: none; }
.modulo-copy { max-width: 560px; pointer-events: auto; }
.modulo-copy h2 { font-weight: 500; letter-spacing: -0.035em; line-height: 0.98; font-size: clamp(40px, 5.6vw, 88px); margin-top: 18px; }

/* ---------- Conecta Maps ---------- */
.maps { height: 400vh; }
.maps-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.maps-device { height: min(80vh, 780px); z-index: 1; }
.maps-shade {
  position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,10,0.96) 0%, rgba(10,10,10,0.9) 36%, rgba(10,10,10,0.4) 60%, rgba(10,10,10,0) 80%);
}
.maps-copy { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 3; max-width: 640px; opacity: 0; }
.maps-copy h2 { margin-top: 18px; }

/* ---------- 4. números ---------- */
.stats { padding: 22vh var(--gutter) 16vh; }
.stats-title { max-width: 14ch; }
.stats-grid { margin-top: 10vh; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.tile { padding: 40px 28px 8px 0; display: flex; flex-direction: column; gap: 18px; }
.tile + .tile { padding-left: 28px; border-left: 1px solid var(--line); }
.tile .num { font-size: clamp(64px, 7.2vw, 128px); }

/* ---------- 5. dois sistemas ---------- */
.duo { padding: 16vh var(--gutter) 10vh; text-align: center; overflow: hidden; }
.duo-devices { margin: 10vh auto 0; height: min(76vh, 740px); display: flex; justify-content: center; gap: 4vw; }
.duo-devices .device-slot { height: 100%; }

/* ---------- 6. baixar ---------- */
.cta { min-height: 100vh; padding: 16vh var(--gutter); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cta-lockup { display: inline-flex; align-items: center; gap: 0.32em; font-size: clamp(88px, 10vw, 150px); }
.cta-lockup .wordmark { font-size: 0.58em; }
.cta-lockup .sq { fill: var(--signal); }
.cta-line { margin-top: 40px; font-weight: 500; letter-spacing: -0.03em; font-size: clamp(30px, 3.6vw, 56px); }
.badges { margin-top: 56px; display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.badges a { display: block; transition: transform 0.2s ease; }
.badges a:hover { transform: translateY(-2px); }
.badges img { height: 56px; width: auto; }
.badges .gp img { height: 82px; margin: -13px 0; }
.cta-note { margin-top: 36px; max-width: 44ch; font-size: 15px; line-height: 1.5; color: var(--gray); }

.foot { padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.demo-note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--gray); }
.foot nav { display: flex; gap: 24px; font-size: 14px; }
.foot nav a { color: var(--gray-2); text-decoration: none; }
.foot nav a:hover { color: var(--paper); }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .lockup { font-size: 26px; }
  .hero-copy { top: 13vh; }
  .hero-devices { height: 58vh; gap: 3vw; }
  .story { grid-template-columns: 1fr; }
  /* aparelho fixo na metade de cima; o texto assenta na metade de baixo */
  .story-stage { grid-column: 1; height: 54vh; top: 52px; z-index: 0; }
  .story-device { height: 50vh; }
  .chapters { grid-row: 2; margin-top: -54vh; position: relative; z-index: 1; }
  .chapter {
    min-height: 100vh; padding: 0 0 5vh; justify-content: flex-end;
    background: linear-gradient(rgba(10,10,10,0) 52%, rgba(10,10,10,0.92) 62%);
  }
  .chapter h2 { font-size: clamp(32px, 8.4vw, 44px); margin-top: 10px; }
  .chapter .body { font-size: 15px; margin-top: 12px; }
  .stat { margin-top: 18px; gap: 8px; }
  .chapter .num { font-size: clamp(64px, 18vw, 88px); }
  .maps-device, .modulo-device { height: 62vh; }
  .modulo-copy-wrap { align-items: flex-end; padding-bottom: 5vh;
    background: linear-gradient(rgba(10,10,10,0) 45%, rgba(10,10,10,0.94) 66%); }
  .modulo-copy .modulo { display: none; }
  .modulo-copy h2 { font-size: clamp(32px, 8.4vw, 44px); }
  .modulo-copy .body { font-size: 15px; margin-top: 12px; }
  .modulo-copy .stat { margin-top: 16px; gap: 8px; }
  .modulo-copy .num { font-size: clamp(64px, 18vw, 88px); }
  .maps-copy { top: auto; bottom: 8vh; transform: none; right: var(--gutter); }
  .maps-shade { background: linear-gradient(0deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 45%, rgba(10,10,10,0.05) 80%); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tile:nth-child(3) { padding-left: 0; border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .duo-devices { height: 56vh; }
  .foot { flex-direction: column; }
}

/* ---------- movimento reduzido: tudo legível sem animação ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-sticky { position: relative; height: auto; padding: 18vh 0 8vh; display: block; }
  .hero-copy { position: relative; top: 0; }
  .hero-devices { position: relative; top: 0; left: 0; transform: none !important; justify-content: center; margin: 8vh auto 0; }
  .maps, .agents { height: auto; }
  .modulo-sticky { position: relative; height: auto; padding: 12vh var(--gutter); display: grid; gap: 40px; }
  .modulo.portal { display: none; }
  .modulo-copy-wrap { position: relative; }
  .maps-sticky { position: relative; height: auto; padding: 12vh var(--gutter); display: grid; gap: 40px; }
  .maps-copy { position: relative; opacity: 1; transform: none; inset: auto; }
  .modulo .fluxo { animation: none; }
  .scr, .chapter { transition: none; }
}
