/* ============================================================
   DMTráfego: estilo do site
   Títulos: Sora · Corpo: Inter
   Paleta navy/azul elétrico da identidade DMT.
   Mobile-first. Expande no desktop via @media (min-width).
   ============================================================ */

:root {
  --navy:        #0D2447;
  --navy-deep:   #071021;
  --navy-mid:    #14294d;
  --blue:        #4A9EFF;   /* azul elétrico, destaque/CTA */
  --blue-med:    #1A5FD4;   /* divisórias, bordas 2px */
  --white:       #FFFFFF;
  --ink:         #06090F;   /* base quase-preta com leve azul */

  --text:      rgba(255,255,255,0.90);
  --text-soft: rgba(255,255,255,0.58);
  --line:      rgba(74,158,255,0.16);
  --card-bg:   rgba(255,255,255,0.025);

  --radius: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --wa: #25D366;

  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, .cta-title { font-family: var(--font-head); }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.6px;
  color: var(--blue);
  margin-bottom: 18px;
  font-family: var(--font-body);
}

.accent { color: var(--blue); }
.nowrap { white-space: nowrap; }

.section-title {
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.section-lead {
  color: var(--text-soft);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 620px;
  margin-bottom: 46px;
}

.section {
  padding: 88px 0;
  position: relative;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease), border-color .3s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--blue);
  color: var(--navy-deep);
  box-shadow: 0 8px 24px rgba(74,158,255,0.28);
}
.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(74,158,255,0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-color: rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover,
.btn-ghost:active {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

.btn-lg { padding: 17px 38px; font-size: 1.05rem; }

.wa-icon { width: 20px; height: 20px; flex: none; }

/* ============================================================
   FUNDO ANIMADO GLOBAL (grade em perspectiva + glow + ruído)
   ============================================================ */
.hero { position: relative; }

.bg-layers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, #123163 0%, #0b1e3f 42%, var(--ink) 100%);
}

/* Véu de legibilidade: escurece o lado esquerdo (onde fica o texto)
   pra garantir contraste do texto branco mesmo com os raios ativos */
.hero .readability-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(6,9,15,0.72) 0%, rgba(6,9,15,0.32) 42%, transparent 72%);
}

/* SideRays: canvas WebGL de raios de luz saindo do canto (hero) */
.siderays {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.siderays.active { opacity: 1; }
.siderays canvas { width: 100%; height: 100%; display: block; }
/* Com os raios ativos, suaviza grade/glow pra não competir */
.siderays.active ~ .bg-grid { opacity: 0.3; }
.siderays.active ~ .hero-glow { opacity: 0.35; }

/* Grade em perspectiva animada */
.bg-grid {
  position: absolute;
  left: 50%;
  bottom: -20%;
  width: 240%;
  height: 150%;
  transform: translateX(-50%) perspective(520px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(to right, rgba(74,158,255,0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(74,158,255,0.18) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 0%, transparent 78%);
  animation: gridMove 9s linear infinite;
  opacity: 0.55;
}
@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 0 46px; }
}

/* Glow que respira */
.hero-glow {
  position: absolute;
  top: -18%; left: 50%;
  transform: translateX(-50%);
  width: 80vw; height: 70vh;
  background: radial-gradient(circle, rgba(74,158,255,0.35) 0%, transparent 62%);
  filter: blur(30px);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.85; transform: translateX(-50%) scale(1.08); }
}

/* Orbes de luz flutuando sozinhos (roda no celular também) */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.7;
  pointer-events: none;
  will-change: transform;
}
.orb-1 {
  width: 46vw; max-width: 380px; aspect-ratio: 1;
  top: 6%; left: -8%;
  background: radial-gradient(circle, rgba(74,158,255,0.55), transparent 70%);
  animation: floatA 13s ease-in-out infinite;
}
.orb-2 {
  width: 40vw; max-width: 320px; aspect-ratio: 1;
  bottom: 2%; right: -6%;
  background: radial-gradient(circle, rgba(26,95,212,0.5), transparent 70%);
  animation: floatB 16s ease-in-out infinite;
}
.orb-3 {
  width: 30vw; max-width: 240px; aspect-ratio: 1;
  top: 40%; right: 22%;
  background: radial-gradient(circle, rgba(74,158,255,0.4), transparent 72%);
  animation: floatC 11s ease-in-out infinite;
}
@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, 50px) scale(1.15); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, -40px) scale(1.2); }
}
@keyframes floatC {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50%      { transform: translate(-30px, 30px) scale(1.1); opacity: 0.75; }
}

/* Ruído sutil por cima */
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6,9,15,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.brand-logo {
  height: 82px;
  width: auto;
  transition: height .35s var(--ease), filter .35s var(--ease);
  filter: drop-shadow(0 2px 12px rgba(74,158,255,0.3));
}
.site-header.scrolled .brand-logo { height: 66px; }

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

.nav-link {
  position: relative;
  padding: 8px 15px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 15px; right: 15px; bottom: 2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); }

.btn-nav {
  padding: 10px 20px;
  font-size: 0.9rem;
  background: var(--blue);
  color: var(--navy-deep);
  margin-left: 10px;
}
.btn-nav:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(74,158,255,0.4); }

/* hambúrguer */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 10px;
  z-index: 101;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--white); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 112px;
}
.hero-inner { position: relative; z-index: 2; padding-top: 12px; padding-bottom: 64px; }

.hero-title {
  font-size: clamp(2.2rem, 8.5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.6px;
  margin-bottom: 26px;
}
.hero-title .line,
.section-title .line { display: block; }

/* Nunca partir uma palavra no meio (ex: "cliente", "crescimento") */
.hero-title, .section-title, .cta-title {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.hero-sub {
  color: var(--text-soft);
  font-size: clamp(1rem, 3.2vw, 1.22rem);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   GRIDS
   ============================================================ */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }

/* ---------- Problema (pain cards) ---------- */
.problema { background: var(--navy); position: relative; }

.pain-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
  overflow: hidden;
}
.pain-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  background: rgba(74,158,255,0.05);
}
.pain-num {
  display: block;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.pain-card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.3px; }
.pain-card p { color: var(--text-soft); font-size: 0.95rem; position: relative; z-index: 1; }

/* ---------- Sistema (serviços) ---------- */
.sistema { background: var(--ink); }

.serv-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
.serv-card:hover {
  transform: translateY(-7px);
  border-color: var(--blue);
  box-shadow: 0 22px 48px rgba(0,0,0,0.45);
}
.serv-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(74,158,255,0.1);
  color: var(--blue);
  margin-bottom: 20px;
  transition: transform .35s var(--ease), background .35s var(--ease);
  position: relative; z-index: 1;
}
.serv-icon svg { width: 28px; height: 28px; }
.serv-card:hover .serv-icon { transform: scale(1.1) rotate(-4deg); background: rgba(74,158,255,0.18); }
.serv-card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.4px; position: relative; z-index: 1; }
.serv-card p { color: var(--text-soft); position: relative; z-index: 1; }

.serv-highlight {
  background: linear-gradient(160deg, rgba(74,158,255,0.13), rgba(20,41,77,0.2));
  border-color: rgba(74,158,255,0.4);
}
.serv-tag {
  position: absolute;
  top: 20px; right: 20px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--navy-deep);
  background: var(--blue);
  padding: 5px 11px;
  border-radius: 999px;
  z-index: 2;
}

/* ---------- Método (steps) ---------- */
.metodo { background: var(--navy); }

.steps { display: grid; gap: 8px; max-width: 720px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: border-color .35s var(--ease), padding-left .35s var(--ease);
}
.step:hover { border-color: var(--blue); padding-left: 8px; }
.step-num {
  flex: none;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--blue-med);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--blue);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.step:hover .step-num { background: var(--blue); color: var(--navy-deep); transform: scale(1.08); }
.step h3 { font-size: 1.22rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.3px; }
.step p { color: var(--text-soft); font-size: 0.96rem; }

/* ---------- A DMT ---------- */
.dmt { background: var(--ink); }
.dmt-inner { display: grid; gap: 40px; align-items: center; }
.dmt-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.dmt-photo img { width: 100%; transition: transform .6s var(--ease); }
.dmt-photo:hover img { transform: scale(1.04); }
.dmt-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,36,71,0.45), transparent 55%);
}
.dmt-text p { color: var(--text-soft); margin-bottom: 16px; }
.dmt-text strong { color: var(--white); }
.dmt-text .btn { margin-top: 8px; }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 120%, #123163 0%, #0b1e3f 45%, var(--ink) 100%);
}
.cta-glow {
  position: absolute;
  bottom: -40%; left: 50%;
  transform: translateX(-50%);
  width: 90vw; height: 70vh;
  background: radial-gradient(circle, rgba(74,158,255,0.22) 0%, transparent 62%);
  filter: blur(24px);
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}
.cta-inner { position: relative; z-index: 2; max-width: 700px; }
.cta-title {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
}
.cta-sub { color: var(--text-soft); font-size: 1.12rem; margin-bottom: 34px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); border-top: 1px solid rgba(255,255,255,0.07); }
.footer-inner {
  display: grid;
  gap: 28px;
  padding: 52px 24px 32px;
}
.footer-logo { height: 72px; margin-bottom: 18px; }
.footer-brand p { color: var(--text-soft); font-size: 0.95rem; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a, .footer-links span { color: var(--text-soft); font-size: 0.95rem; transition: color .25s var(--ease); }
.footer-links a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 90;
  width: 58px; height: 58px;
  background: var(--wa);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  animation: waPulse 2.6s infinite;
}
.wa-float svg { width: 31px; height: 31px; }
.wa-float:hover { transform: scale(1.1); box-shadow: 0 12px 30px rgba(37,211,102,0.55); }
@keyframes waPulse {
  0% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
}

/* ============================================================
   REVEAL AO ROLAR
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Títulos em cascata (letras sobem em sequência, 1x) ---------- */
.sfloat { padding-bottom: 0.1em; }         /* respiro pra descidas (g, p, q) */
.sfloat .cword {
  display: inline-block;                    /* palavra nunca parte no meio da linha */
  white-space: nowrap;
}
.sfloat .cchar {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.9em) rotate(4deg);
  will-change: transform, opacity;
}
/* Quando a seção entra na tela, as letras sobem uma após a outra */
.sfloat.in .cchar {
  animation: charRise 0.55s var(--ease) forwards;
  animation-delay: calc(var(--i) * 28ms);
}
@keyframes charRise {
  from { opacity: 0; transform: translateY(0.9em) rotate(4deg); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ============================================================
   MENU MOBILE (drawer)
   ============================================================ */
@media (max-width: 860px) {
  .header-inner { height: 84px; }
  .brand-logo { height: 66px; }
  .site-header.scrolled .brand-logo { height: 56px; }
  .footer-logo { height: 60px; }

  /* Fundo mais VIVO no celular (sem mouse, as animações autônomas puxam a atenção) */
  .bg-grid { opacity: 0.75; background-size: 40px 40px; }
  .hero-glow {
    width: 130vw; height: 60vh;
    background: radial-gradient(circle, rgba(74,158,255,0.5) 0%, transparent 62%);
  }
  .orb { opacity: 0.85; filter: blur(38px); }
  .orb-1 { width: 70vw; }
  .orb-2 { width: 65vw; }
  .orb-3 { width: 55vw; }

  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(80vw, 340px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 40px 34px;
    background: rgba(6,9,15,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 99;
  }
  .nav.open { transform: translateX(0); }
  .nav-link { font-size: 1.2rem; padding: 12px 0; }
  .nav-link::after { left: 0; right: 0; bottom: 6px; }
  .btn-nav { margin: 18px 0 0; width: 100%; }

  /* Reveal mais marcante no toque: entra com leve escala + sobe mais */
  .reveal { transform: translateY(38px) scale(0.96); }
  .reveal.visible { transform: none; }

  /* Cards ganham um brilho ao aparecer */
  .pain-card.visible, .serv-card.visible { animation: cardPop .7s var(--ease); }
}
@keyframes cardPop {
  0%   { box-shadow: 0 0 0 0 rgba(74,158,255,0); }
  40%  { box-shadow: 0 0 32px 2px rgba(74,158,255,0.35); }
  100% { box-shadow: 0 0 0 0 rgba(74,158,255,0); }
}

/* ============================================================
   DESKTOP (min-width)
   ============================================================ */
@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

@media (min-width: 720px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .dmt-inner { grid-template-columns: 0.8fr 1.2fr; gap: 52px; }
  .section { padding: 104px 0; }
}

@media (min-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   Acessibilidade: respeita quem desativou animação
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
