/* =========================================================
   N.A Tech — Landing cinematográfica
   Paleta: grafite • branco quente • âmbar/amarelo de ferramenta
   ========================================================= */

:root {
  --bg:        #0e0e11;   /* grafite profundo */
  --bg-2:      #16161b;   /* grafite elevado */
  --bg-3:      #1e1e25;
  --ink:       #f5efe1;   /* branco quente */
  --ink-soft:  rgba(245, 239, 225, 0.66);
  --ink-faint: rgba(245, 239, 225, 0.40);
  --amber:     #ffb703;   /* âmbar / amarelo de ferramenta */
  --amber-2:   #ffd166;
  --amber-deep:#e08a00;
  --teal:      #46c6bd;   /* herança da logo (uso pontual) */
  --line:      rgba(245, 239, 225, 0.12);

  --maxw: 1180px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  /* ritmo vertical único — mesmo respiro entre TODAS as cenas */
  --section-pad: clamp(4.5rem, 10vh, 8rem);

  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--amber); color: #1a1200; }

/* ---------- Background canvas (rede de dados) ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,183,3,0.06), transparent 60%),
    radial-gradient(100% 100% at 50% 100%, rgba(14,14,17,0.9), rgba(14,14,17,0.35) 60%);
}

/* ---------- Layout base ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
main { position: relative; z-index: 2; }

/* Ritmo vertical: toda cena usa o MESMO padding em cima e embaixo.
   Só o hero ocupa a tela inteira; as demais têm altura pelo conteúdo,
   garantindo distância uniforme entre os blocos. */
.scene {
  position: relative;
  display: flex;
  align-items: center;
  padding-block: var(--section-pad);
}
.scene.hero {
  min-height: 100vh;
  min-height: 100svh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--amber);
  opacity: 0.7;
}

.lead { color: var(--ink-soft); max-width: 52ch; font-size: 1.075rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(14,14,17,0.72);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand .mark { width: 34px; height: 34px; }
.brand .name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand .name b { color: var(--ink); }
.brand .name span { color: var(--amber); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a.link { font-size: 0.92rem; color: var(--ink-soft); transition: color 0.25s; }
.nav a.link:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72em 1.35em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--amber); color: #1a1200; }
.btn-amber:hover { background: var(--amber-2); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { flex-direction: column; justify-content: center; text-align: left; overflow: hidden; }
.hero .wrap { width: 100%; position: relative; z-index: 2; }
/* mídia cinematográfica de fundo do hero (vídeo, com imagem de poster) */
.hero-media {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  mask-image: radial-gradient(130% 105% at 72% 42%, #000 32%, transparent 88%);
  -webkit-mask-image: radial-gradient(130% 105% at 72% 42%, #000 32%, transparent 88%);
}
.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 6%, transparent 55%), linear-gradient(0deg, var(--bg) 4%, transparent 42%); }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  max-width: 15ch;
  margin-top: 1.1rem;
}
.hero h1 em { font-style: italic; color: var(--amber); }
.hero .lead { margin-top: 1.6rem; font-size: clamp(1.05rem, 1.4vw, 1.3rem); max-width: 46ch; }
.hero-cta { display: flex; gap: 0.9rem; margin-top: 2.2rem; flex-wrap: wrap; }
.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.scroll-hint .dot { width: 1px; height: 42px; background: linear-gradient(var(--amber), transparent); animation: fall 2s var(--ease) infinite; }
@keyframes fall { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Section headings ---------- */
.scene-head { max-width: 62ch; }
.scene-head h2 { font-size: clamp(2rem, 5vw, 3.6rem); margin-top: 1rem; }
.scene-head .lead { margin-top: 1.2rem; }

/* ---------- Serviços grid ---------- */
.services-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.service {
  background: var(--bg-2);
  padding: 1.9rem 1.7rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: background 0.35s var(--ease);
}
.service:hover { background: var(--bg-3); }
.service .num { font-family: var(--font-mono); color: var(--amber); font-size: 0.82rem; letter-spacing: 0.08em; }
.service h3 { font-size: 1.35rem; }
.service p { color: var(--ink-soft); font-size: 0.98rem; margin-top: auto; }

/* ---------- Feature scenes (pipeline, etl, modelagem, automacao, ia) ---------- */
.feature .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature .visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-2), var(--bg));
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.85);
}
.feature .visual::after { /* brilho âmbar sutil na moldura */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,183,3,0.10), inset 0 -60px 80px -60px rgba(255,183,3,0.18);
  pointer-events: none;
}
.feature .visual canvas,
.feature .visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature .visual .tag {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(14,14,17,0.66);
  border: 1px solid var(--line);
  padding: 0.4em 0.8em; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.feature.reverse .wrap { grid-template-columns: 0.95fr 1.05fr; }
.feature.reverse .text { order: 2; }
.feature.reverse .visual { order: 1; }

.pill-list { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.6rem; }
.pill { font-size: 0.85rem; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.45em 0.9em; }
.pill b { color: var(--amber); font-weight: 600; }

/* ---------- IA logos (grid limpo, logos oficiais em SVG) ---------- */
.feature .visual.logos {
  background: var(--bg-2);
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr;
}
.feature .visual.logos::after { box-shadow: inset 0 0 0 1px rgba(255,183,3,0.08); }
.ai-cell { border-right: 1px solid var(--line); }
.ai-cell:last-child { border-right: 0; }
.ai-link {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; text-decoration: none;
}
.ai-logo {
  width: clamp(52px, 46%, 96px); height: auto;
  fill: var(--ink); opacity: 0.85;
  transition: fill 0.25s var(--ease), opacity 0.25s, transform 0.3s var(--ease);
}
.ai-link:hover .ai-logo,
.ai-link:focus-visible .ai-logo { fill: var(--amber); opacity: 1; transform: scale(1.1); }
.ai-link:focus-visible { outline: 2px solid var(--amber); outline-offset: -4px; border-radius: 8px; }

/* ---------- Faixa de tecnologias ---------- */
.stack {
  margin-top: 2.4rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 0.7rem; align-items: center;
}
.stack .t {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.5em 0.85em;
  background: var(--bg-2);
}

/* ---------- Cases / Portfólio ---------- */
.cases-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}
.case {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--bg-2);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.case:hover { transform: translateY(-4px); border-color: rgba(255,183,3,0.35); }
.case .shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
.case .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.case:hover .shot img { transform: scale(1.04); }
.case .shot .sector {
  position: absolute; top: 0.8rem; left: 0.8rem;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); background: rgba(14,14,17,0.72); border: 1px solid var(--line);
  padding: 0.35em 0.7em; border-radius: 999px; backdrop-filter: blur(6px);
}
.case .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.case .body h3 { font-size: 1.25rem; }
.case .body p { color: var(--ink-soft); font-size: 0.95rem; }
.case .metric { font-family: var(--font-mono); color: var(--amber); font-size: 0.9rem; margin-top: 0.2rem; }
.case .view { margin-top: auto; padding-top: 0.9rem; font-size: 0.9rem; color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 0.4em; }
.case .view::after { content: "→"; transition: transform 0.25s var(--ease); }
.case:hover .view::after { transform: translateX(4px); }
.case .view { color: var(--amber); }
/* card "seu case aqui" */
.case.placeholder { border-style: dashed; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 260px; padding: 2rem; }
.case.placeholder .body { align-items: center; }

/* ---------- Blog ---------- */
.blog-hero { padding-top: calc(var(--section-pad) + 3rem); }
.posts-grid {
  margin-top: 3rem; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}
.post {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1.7rem 1.6rem 1.5rem;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2);
  position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.post::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--amber), transparent 70%); opacity: 0.7; }
.post:hover { transform: translateY(-4px); border-color: rgba(255,183,3,0.35); }
.post .meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-faint); text-transform: uppercase; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.post .meta .cat { color: var(--amber); }
.post h3 { font-size: 1.3rem; line-height: 1.15; }
.post p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.post .read { margin-top: 0.4rem; font-weight: 600; color: var(--amber); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4em; }
.post .read::after { content: "→"; transition: transform 0.25s var(--ease); }
.post:hover .read::after { transform: translateX(4px); }
.post .soon { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.post.is-soon { opacity: 0.72; }
.post.is-soon:hover { transform: none; border-color: var(--line); }

/* artigo individual */
.article { max-width: 760px; margin-inline: auto; }
.article .kicker { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.article h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 1rem 0; }
.article .meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 2.4rem; }
.article .prose > * { margin-bottom: 1.25rem; }
.article .prose h2 { font-size: 1.7rem; margin-top: 2.4rem; }
.article .prose p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.7; }
.article .prose ul { color: var(--ink-soft); padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.article .prose strong { color: var(--ink); }
.article .back { display: inline-flex; align-items: center; gap: 0.4em; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1rem; }
.article .back:hover { color: var(--amber); }

/* ---------- Modal de relatório (Power BI) ---------- */
.report-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: clamp(0.6rem, 3vw, 2.5rem);
  background: rgba(6,6,8,0.82); backdrop-filter: blur(8px);
}
.report-modal.open { display: flex; }
.report-modal .dialog {
  width: min(1200px, 100%); height: min(80vh, 760px);
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.9);
}
.report-modal .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--bg-3);
}
.report-modal .bar h4 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }
.report-modal .bar .tools { display: flex; align-items: center; gap: 0.6rem; }
.report-modal .bar .x {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
.report-modal .bar .x:hover { border-color: var(--amber); color: var(--amber); }
.report-modal .frame { flex: 1; position: relative; background: var(--bg); }
.report-modal .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.report-modal .empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 1rem; padding: 2rem;
}
.report-modal .empty p { color: var(--ink-soft); max-width: 40ch; }

/* ---------- Trilho de pipeline (assinatura) ---------- */
.rail {
  position: fixed; left: max(1.1rem, 2.2vw); top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 0;
  pointer-events: none;
}
.rail .track { position: relative; width: 2px; height: 42vh; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail .track .fill { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(var(--amber), var(--amber-2)); box-shadow: 0 0 10px rgba(255,183,3,0.6); }
.rail .stations { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.rail .stations a {
  pointer-events: auto; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--ink-faint); margin-left: -4px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.rail .stations a.active { background: var(--amber); border-color: var(--amber); transform: scale(1.35); }
@media (max-width: 1080px) { .rail { display: none; } }

/* ---------- CTA final ---------- */
.final { text-align: center; }
.final .wrap { display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: clamp(2.4rem, 7vw, 5rem); max-width: 16ch; }
.final .lead { margin-inline: auto; margin-top: 1.5rem; text-align: center; }
.final-cta { display: flex; gap: 0.9rem; margin-top: 2.4rem; flex-wrap: wrap; justify-content: center; }
.btn-lg { font-size: 1.05rem; padding: 0.95em 1.8em; }
.btn-wa { background: #25d366; color: #04310f; }
.btn-wa:hover { background: #38e07b; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: #25d366;
  color: #04310f;
  font-weight: 700;
  padding: 0.85em 1.25em;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(37,211,102,0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.wa-float:hover { transform: translateY(-3px) scale(1.03); }
.wa-float svg { width: 22px; height: 22px; }
.wa-float .txt { font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 3rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.site-footer .col h4 { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.9rem; font-family: var(--font-sans); font-weight: 600; }
.site-footer a.fl { display: block; color: var(--ink-soft); font-size: 0.95rem; padding: 0.2rem 0; transition: color 0.2s; }
.site-footer a.fl:hover { color: var(--amber); }
.site-footer .fine { width: 100%; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1.4rem; color: var(--ink-faint); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Reveal (GSAP toggles) ----------
   Sem JS, o conteúdo aparece normalmente. Só escondemos
   quando a classe .js está presente (JS ativo). */
.js .reveal { opacity: 0; transform: translateY(34px); }
.is-in .reveal, .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .nav .link, .nav .btn-blog { display: none; }
  .feature .wrap, .feature.reverse .wrap { grid-template-columns: 1fr; }
  .feature.reverse .text { order: 1; }
  .feature.reverse .visual { order: 2; }
  .wa-float .txt { display: none; }
  .wa-float { padding: 0.9em; }
}

/* ---------- Acessibilidade: reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .scroll-hint .dot { animation: none; }
  html { scroll-behavior: auto; }
}
