:root {
  --background: 222 47% 7%;
  --surface: 222 40% 10%;
  --foreground: 210 30% 96%;
  --primary: 221 83% 53%;
  --primary-light: 221 83% 66%;
  --primary-dark: 221 83% 43%;
  --webgest-orange: 24 95% 53%;
  --webgest-orange-light: 24 95% 65%;
  --muted-foreground: 215 20% 65%;
  --border: 217 33% 22%;
  --gradient-hero: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--webgest-orange)) 100%);
  --shadow-elegant: 0 10px 30px -10px hsl(var(--primary) / .35);
  --shadow-glow: 0 0 40px hsl(var(--webgest-orange) / .25);
  --radius: 0.85rem;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
}

/* Tema claro — toggle manual (ver theme-toggle.js). Como quase todo o site já
   usa hsl(var(--x)) em vez de cor fixa, só redefinir os tokens aqui já
   recolore a maior parte da página automaticamente. Os poucos lugares com
   cor fixa (code rain no script.js, erro do formulário do WhatsApp) têm
   tratamento específico marcado abaixo. */
:root[data-theme="light"] {
  --background: 210 40% 99%;
  --surface: 210 30% 96%;
  --foreground: 222 30% 16%;
  --primary: 221 83% 53%;
  --primary-light: 221 83% 62%;
  --primary-dark: 221 83% 43%;
  --webgest-orange: 24 95% 53%;
  --webgest-orange-light: 24 90% 60%;
  --muted-foreground: 220 12% 42%;
  --border: 220 16% 88%;
  --shadow-elegant: 0 14px 34px -16px hsl(var(--primary) / .18);
  --shadow-glow: 0 0 40px hsl(var(--webgest-orange) / .18);
}

body, .site-header, .cinematic-footer {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Ambient background: grid + glow, fixed behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(hsl(var(--foreground) / .045) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--foreground) / .045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(600px circle at 8% 8%, hsl(var(--primary) / .22), transparent 60%),
    radial-gradient(600px circle at 92% 28%, hsl(var(--webgest-orange) / .16), transparent 60%);
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--background) / .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid hsl(var(--border));
}

/* Cabeçalho ocupa a largura total da tela (logo numa ponta, ações na outra).
   O menu (.nav) fica centralizado no meio da TELA de verdade — não no meio
   do espaço que resta entre logo e botões (que são assimétricos em largura,
   então "centralizar nesse espaço" não é o centro real da página). Por isso
   o menu é posicionado de forma absoluta, dead-center, independente da
   largura da logo ou dos botões. */
.site-header .container {
  max-width: none;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 76px;
}

.logo img { height: 40px; width: auto; }
/* A logo original tem o texto "Webgest" em branco (pra o fundo escuro).
   No tema claro isso ficaria quase invisível — por isso existe uma segunda
   versão (webgest-logo-dark-text.png, texto recolorido pra preto, ícone
   intocado) e o CSS troca qual das duas é exibida conforme o tema. */
.logo { display: inline-flex; }
.logo-for-light { display: none; }
:root[data-theme="light"] .logo-for-dark { display: none; }
:root[data-theme="light"] .logo-for-light { display: block; }

/* Logo + toggle de tema juntos no canto esquerdo — fica no lado que tinha
   mais espaço de sobra (evita disputar largura com "Área do operador" +
   "Fale no WhatsApp" do lado direito, que já são mais largos). */
.brand-group { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }

.nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}

/* Abaixo de 1400px (largura do próprio container do cabeçalho), a
   centralização absoluta pode colidir com a logo ou com as ações da
   direita — especialmente em telas de notebook comuns (1366-1440px a
   100% de zoom), que é onde a maioria abre o site. Nessa faixa, o menu
   volta a se ajustar ao espaço disponível (nunca colide) em vez de
   ficar cravado no centro exato da tela. */
@media (max-width: 1400px) {
  .nav {
    position: static;
    transform: none;
    flex: 1;
    min-width: 0;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

/* Toggle de tema (dark/claro) — porte de componente de referência (React)
   pra CSS puro. Em vez de alternar display:none/block dos ícones (como
   era antes), agora é um switch de verdade: trilho + bolinha deslizante,
   com o sol/lua trocando via opacity+rotate+scale (mesma transição do
   componente original, só que orientada por atributo CSS em vez de
   estado do React — ver theme-toggle.js, que só alterna
   data-theme no <html>, sem mudança na lógica). */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}
.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #2d2a4e;
  background: #1a1838;
  transition: background-color .5s ease, border-color .5s ease;
}
:root[data-theme="light"] .theme-toggle-track {
  border-color: #e8d5b7;
  background: #fef3c7;
}
.theme-toggle:hover .theme-toggle-track { border-color: hsl(var(--primary) / .6); }
.theme-toggle-knob {
  position: absolute;
  top: 50%;
  left: calc(100% - 26px);
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8e6f0;
  color: #1a1838;
  transition: left .5s cubic-bezier(.68,-.55,.265,1.55), background-color .5s ease, color .5s ease;
}
:root[data-theme="light"] .theme-toggle-knob {
  left: 2px;
  background: #ff9500;
  color: #fff;
}
.theme-toggle-knob svg {
  grid-column: 1;
  grid-row: 1;
  width: 14px;
  height: 14px;
  transition: transform .4s cubic-bezier(.68,-.55,.265,1.55), opacity .4s ease;
}
.theme-toggle-knob .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle-knob .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="light"] .theme-toggle-knob .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="light"] .theme-toggle-knob .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color .2s;
}

.nav a::before {
  content: '/';
  font-family: var(--mono);
  color: hsl(var(--webgest-orange) / .7);
  margin-right: 0.3em;
}

.nav a:hover { color: hsl(var(--foreground)); }
.nav a:hover::before { color: hsl(var(--webgest-orange)); }
.nav a.active { color: hsl(var(--foreground)); font-weight: 600; }
.nav a.active::before { color: hsl(var(--webgest-orange)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: hsl(var(--foreground)); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.btn-lg { padding: 0.95rem 2.1rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--gradient-hero);
  background-size: 160% 160%;
  background-position: 0% 50%;
  color: white;
  box-shadow: var(--shadow-elegant);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); background-position: 100% 50%; }

.btn-outline {
  border: 1.5px solid hsl(var(--border));
  color: hsl(var(--foreground));
  background: hsl(var(--surface) / .5);
  font-family: var(--mono);
}
.btn-outline:hover { border-color: hsl(var(--primary) / .6); background: hsl(var(--primary) / .08); }
.btn-outline::before { content: '['; margin-right: 0.55em; color: hsl(var(--webgest-orange) / .8); }
.btn-outline::after { content: ']'; margin-left: 0.55em; color: hsl(var(--webgest-orange) / .8); }

/* Botão "3D" interativo — porte de componente de referência (React, sem CSS
   completo fornecido — só as @keyframes) pra JS puro (ver btn-3d.js), mantendo
   a identidade visual já existente (cores, tamanhos, brackets do outline) —
   isso só adiciona a camada de interação por cima do `.btn` que já existe.
   btn-3d.js monta esta estrutura em cada .btn-3d: bg (glow), splash (linhas
   decorativas), content > texto (letra por letra) + seta animada. */
.btn-3d { position: relative; overflow: visible; isolation: isolate; }
.btn-3d-bg {
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, hsl(var(--webgest-orange) / .45) 0%, transparent 70%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.btn-3d:hover .btn-3d-bg { opacity: 1; }

.btn-3d-splash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 64px);
  height: calc(100% + 20px);
  color: currentColor;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.btn-3d:hover .btn-3d-splash { opacity: .5; }
.btn-3d-splash path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 60;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .6s ease;
}
.btn-3d:hover .btn-3d-splash path { stroke-dashoffset: -60; }

.btn-3d-content { display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-3d-text { display: inline-flex; }
.btn-3d-char {
  display: inline-block;
  white-space: pre;
  transform: translateY(0);
}
.btn-3d:hover .btn-3d-char {
  animation: btn3dCharWave .5s cubic-bezier(.34,1.56,.64,1);
  animation-delay: calc(var(--i) * 22ms);
}
@keyframes btn3dCharWave {
  0% { transform: translateY(0); }
  35% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.btn-3d-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.btn-3d-arrow svg { width: 15px; height: 15px; }
.btn-3d:hover .btn-3d-arrow { transform: translateX(5px); }

@media (prefers-reduced-motion: reduce) {
  .btn-3d-char, .btn-3d:hover .btn-3d-char { animation: none; }
  .btn-3d-arrow, .btn-3d-bg, .btn-3d-splash path { transition: none; }
}

/* Hero */
.hero {
  position: relative;
  padding: 7.5rem 0 6rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(50% 50% at 50% 0%, hsl(var(--primary) / .25), transparent 70%),
    radial-gradient(40% 40% at 85% 30%, hsl(var(--webgest-orange) / .18), transparent 70%);
  filter: blur(10px);
  z-index: -1;
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--primary-light));
  background: hsl(var(--surface) / .8);
  border: 1px solid hsl(var(--border));
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: hsl(var(--webgest-orange));
  box-shadow: 0 0 8px hsl(var(--webgest-orange) / .9);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
}
.cursor {
  color: hsl(var(--webgest-orange));
  font-family: var(--mono);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Code rain: animated matrix-style canvas, colored in brand hues */
.code-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .6;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, transparent 35%, black 82%);
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, transparent 35%, black 82%);
}
.hero-sub {
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 6rem 0; position: relative; }
.section-alt { background: hsl(var(--surface) / .35); border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, hsl(var(--primary-light)), hsl(var(--webgest-orange-light)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.9rem;
}
.section-eyebrow::before { content: '//'; color: hsl(var(--webgest-orange)); -webkit-text-fill-color: hsl(var(--webgest-orange)); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.75rem; }
.section h2::after {
  content: ' </>';
  font-family: var(--mono);
  font-size: 0.65em;
  font-weight: 500;
  color: hsl(var(--webgest-orange) / .45);
  vertical-align: middle;
}
.section-sub { color: hsl(var(--muted-foreground)); max-width: 560px; margin-bottom: 3.25rem; font-size: 1.05rem; }

.about-copy { max-width: 760px; }
.about-copy p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.about-copy p:last-child { margin-bottom: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: hsl(var(--surface) / .55);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.1rem 1.85rem;
  backdrop-filter: blur(6px);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: hsl(var(--primary) / .5);
  box-shadow: 0 16px 40px -14px hsl(var(--primary) / .35);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary) / .18), hsl(var(--webgest-orange) / .18));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
}
.card:hover .card-icon { color: hsl(var(--webgest-orange-light)); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

/* ============================================================
   Serviços — revelação em espiral no scroll (só desktop largo;
   no-JS/mobile/reduced-motion cai no .cards-grid normal, que
   continua sendo a fonte real do conteúdo — os tiles daqui são
   clonados dele via JS, não duplicados no HTML). Ver
   services-spiral.js. Cores usam o gradiente da marca, não o
   roxo/rosa do componente de referência original.
   ============================================================ */
.services-spiral { position: relative; display: none; }
.services-spiral.is-active { display: block; }
.services-spiral-stage { position: relative; height: 260vh; }
.services-spiral-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.services-spiral-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color .6s ease;
  pointer-events: none;
}
.services-spiral-ring--outer { width: 840px; height: 840px; }
.services-spiral-ring--inner { width: 680px; height: 680px; }
.services-spiral-ring--outer.is-visible { border-color: hsl(var(--border)); }
.services-spiral-ring--inner.is-visible { border-color: hsl(var(--primary) / .35); }

.services-spiral-orb {
  position: relative;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--gradient-hero);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.services-spiral-orb::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: hsl(var(--background));
}

.services-spiral-center {
  position: relative;
  z-index: 5;
  max-width: 340px;
  text-align: center;
  opacity: 0;
  transition: opacity .5s ease;
}
.services-spiral-center.is-visible { opacity: 1; }
.services-spiral-center h3 { font-size: 1.75rem; margin-bottom: .75rem; }
.services-spiral-center p { font-size: 1rem; color: hsl(var(--muted-foreground)); }

.services-spiral-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 172px;
  height: 172px;
  margin: -86px 0 0 -86px;
  border-radius: var(--radius);
  background: hsl(var(--surface) / .92);
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-elegant);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: 1rem;
  text-align: center;
  will-change: transform;
}
.services-spiral-tile .card-icon { margin-bottom: 0; width: 50px; height: 50px; }
.services-spiral-tile .card-icon svg { width: 26px; height: 26px; }
.services-spiral-tile span { font-size: .88rem; font-weight: 600; line-height: 1.3; color: hsl(var(--foreground)); }

@media (max-width: 1099px) {
  .services-spiral, .services-spiral.is-active { display: none !important; }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--webgest-orange-light));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature p { color: hsl(var(--muted-foreground)); font-size: 0.92rem; }

.process { list-style: none; display: flex; flex-direction: column; gap: 0; max-width: 640px; }
.process li { display: flex; gap: 1.5rem; align-items: flex-start; position: relative; padding-bottom: 2.5rem; }
.process li:last-child { padding-bottom: 0; }
.process li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, hsl(var(--border)), transparent);
}
.process-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: white;
  font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  box-shadow: 0 0 0 4px hsl(var(--background)), 0 0 20px hsl(var(--primary) / .4);
  position: relative;
  z-index: 1;
}
.process h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.process p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

.cta-section { text-align: center; }
.cta-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .5);
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(50% 50% at 50% 100%, hsl(var(--primary) / .2), transparent 70%);
  z-index: -1;
}
.cta-inner h2 { margin-bottom: 0.75rem; }
.cta-inner p { color: hsl(var(--muted-foreground)); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-inner--wide { max-width: 900px; padding: 3.5rem 3rem; }

/* Canais de contato: cada card já É a ação (clicável), sem duplicar com um
   botão grande separado — evita repetir a mesma chamada de duas formas. */
.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.25rem 0 0;
  text-align: left;
}
.contact-channel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background) / .5);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.contact-channel:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--primary) / .5);
  box-shadow: 0 14px 32px -14px hsl(var(--primary) / .3);
}
.contact-channel--primary {
  border-color: hsl(var(--webgest-orange) / .55);
  background: linear-gradient(160deg, hsl(var(--webgest-orange) / .12), hsl(var(--surface) / .5));
}
.contact-channel-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary) / .18), hsl(var(--webgest-orange) / .18));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary-light));
  display: flex; align-items: center; justify-content: center;
}
.contact-channel--primary .contact-channel-icon { color: hsl(var(--webgest-orange-light)); }
.contact-channel-icon svg { width: 22px; height: 22px; }
.contact-channel-label { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: hsl(var(--muted-foreground)); }
.contact-channel-value { font-weight: 600; color: hsl(var(--foreground)); word-break: break-word; }

@media (max-width: 720px) {
  .contact-channels { grid-template-columns: 1fr; }
  .cta-inner--wide { padding: 2.5rem 1.5rem; }
}

/* Case / prova social */
.case-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .5);
}
.case-card::before {
  content: '';
  position: absolute;
  inset: -30% -10%;
  background: radial-gradient(45% 55% at 0% 30%, hsl(var(--primary) / .16), transparent 70%);
  z-index: -1;
}
.case-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 1.5rem;
  background: hsl(var(--background) / .6);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.2rem);
}
.case-logo { width: 100%; height: auto; filter: drop-shadow(0 0 20px hsl(0 90% 50% / .3)); }
.case-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--webgest-orange-light));
  margin-bottom: 0.5rem;
}
.case-body h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.case-sub { color: hsl(var(--muted-foreground)); margin-bottom: 1.25rem; font-size: 1rem; }
.case-body > p:not(.case-tag):not(.case-sub) { margin-bottom: 1.5rem; color: hsl(var(--foreground) / .9); }
.case-highlights { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.75rem; }
.case-highlights span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  background: hsl(var(--background) / .4);
}

@media (max-width: 720px) {
  .case-card { grid-template-columns: 1fr; }
  .case-media { max-width: 160px; margin: 0 auto; }
}

.case-footnote {
  margin-top: 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
}
.case-footnote a { color: hsl(var(--webgest-orange-light)); text-decoration: underline; text-decoration-color: hsl(var(--webgest-orange) / .4); }

/* Carrossel coverflow — porte em JS puro (sem React/Tailwind/shadcn) do componente
   de referência, pra caber no stack estático do site. Ver coverflow-carousel.js. */
.cf-carousel { position: relative; margin: 0 0 2.5rem; --cf-card: clamp(120px, 22vw, 168px); }
.cf-frame {
  cursor: grab;
  overflow: hidden;
  padding: 1.5rem 0 2rem;
  outline: none;
  touch-action: pan-y;
}
.cf-frame:active { cursor: grabbing; }
.cf-frame:focus-visible { box-shadow: inset 0 0 0 2px hsl(var(--primary) / .5); }
.cf-track {
  position: relative;
  height: var(--cf-card);
  transform-style: preserve-3d;
  user-select: none;
}
.cf-tile {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--cf-card);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(var(--radius) - 0.2rem);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background) / .6);
  box-shadow: var(--shadow-elegant);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.cf-tile img { width: 100%; height: auto; filter: drop-shadow(0 0 20px hsl(0 90% 50% / .3)); }
.cf-tile.is-selected { border-color: hsl(var(--primary) / .6); }
/* Placeholder de logo pra cliente fictício de teste — sem imagem, só iniciais */
.cf-tile-placeholder {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - 0.4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: hsl(var(--foreground) / .9);
  background: linear-gradient(135deg, hsl(var(--primary) / .35), hsl(var(--webgest-orange) / .35));
  border: 1px dashed hsl(var(--border));
}
.cf-nav {
  position: absolute;
  top: 50%;
  z-index: 50;
  transform: translateY(-65%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .8);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.cf-nav:hover { border-color: hsl(var(--primary) / .6); background: hsl(var(--primary) / .12); }
.cf-nav svg { width: 1.1rem; height: 1.1rem; }
.cf-nav-prev { left: -0.5rem; }
.cf-nav-next { right: -0.5rem; }

.cf-panel { transition: opacity .25s ease; }
.cf-panel.is-fading { opacity: 0; }
.cf-test-flag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  border: 1px dashed hsl(var(--border));
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-left: 0.5rem;
}

.cf-dots { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1.5rem 0 0; }
.cf-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: hsl(var(--foreground));
  opacity: .3;
  cursor: pointer;
  transition: opacity .2s;
}
.cf-dot[aria-current="true"] { opacity: 1; background: hsl(var(--webgest-orange)); }

@media (max-width: 720px) {
  .cf-nav-prev { left: 0.25rem; }
  .cf-nav-next { right: 0.25rem; }
}

/* Widget: botão flutuante de WhatsApp */
#wg-wa-button {
  position: fixed;
  bottom: 96px; /* mais alto que 24px — no final da página, o "voltar ao topo"
                   do footer cinematográfico fica no mesmo canto e colidia */
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: transform .15s ease;
}
#wg-wa-button:hover { transform: scale(1.06); }

#wg-wa-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 25, .65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#wg-wa-overlay.wg-wa-open { display: flex; }

#wg-wa-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 28px 24px 24px;
  color: hsl(var(--foreground));
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

#wg-wa-modal h3 { margin: 0 0 8px; font-size: 19px; }
#wg-wa-modal .wg-wa-sub { margin: 0 0 18px; font-size: 14px; color: hsl(var(--muted-foreground)); }

#wg-wa-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#wg-wa-name {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 15px;
  margin-bottom: 6px;
  font-family: inherit;
}
#wg-wa-name:focus { outline: none; border-color: hsl(var(--webgest-orange)); }

.wg-wa-error {
  display: none;
  color: #ff8a8a; /* bom contraste no tema escuro */
  font-size: 13px;
  margin: 4px 0 14px;
}
:root[data-theme="light"] .wg-wa-error { color: #c0392b; } /* vermelho mais escuro pra contraste em fundo claro */
.wg-wa-error.wg-wa-show { display: block; }

.wg-wa-btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: var(--gradient-hero);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.wg-wa-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wg-wa-option-btn {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.wg-wa-option-btn:hover { border-color: hsl(var(--webgest-orange)); background: hsl(var(--surface)); }

.wg-wa-link-btn {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}

/* ============================================================
   Footer cinematográfico — porte em JS puro (GSAP via CDN) do
   componente de referência. "Cortina": o wrapper tem clip-path,
   o que (por spec do CSS) o transforma em containing block do
   footer position:fixed lá dentro — o footer fica "grudado" no
   viewport enquanto o wrapper (mesma altura, 100vh) passa pela
   tela, revelando-o como uma cortina subindo. Conteúdo 100% real
   da Webgest — nada do texto/links fictícios do componente
   original. Ver cinematic-footer.js.
   ============================================================ */
.footer-curtain {
  position: relative;
  height: 100vh;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.cinematic-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
}

.footer-aurora {
  position: absolute;
  top: 50%; left: 50%;
  width: 80vw; height: 60vh;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle at 50% 50%, hsl(var(--primary) / .18) 0%, hsl(var(--webgest-orange) / .14) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: footer-breathe 8s ease-in-out infinite alternate;
}
@keyframes footer-breathe {
  0% { transform: translate(-50%, -50%) scale(1); opacity: .6; }
  100% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.footer-bg-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, hsl(var(--foreground) / .04) 1px, transparent 1px),
    linear-gradient(to bottom, hsl(var(--foreground) / .04) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

.footer-giant-text {
  position: absolute;
  bottom: -4vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 15vw;
  line-height: .75;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px hsl(var(--foreground) / .07);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.footer-marquee {
  position: relative;
  z-index: 10;
  overflow: hidden;
  border-top: 1px solid hsl(var(--border) / .6);
  border-bottom: 1px solid hsl(var(--border) / .6);
  background: hsl(var(--surface) / .6);
  backdrop-filter: blur(10px);
  padding: 0.85rem 0;
  transform: rotate(-1.1deg) scale(1.04);
}
.footer-marquee-track {
  display: flex;
  width: max-content;
  animation: footer-marquee 32s linear infinite;
}
.footer-marquee-item {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.footer-marquee-item .dot { color: hsl(var(--webgest-orange) / .7); }
@keyframes footer-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.footer-cta {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 1.5rem 1.5rem 0.5rem;
  text-align: center;
}
.footer-cta h2 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  background: linear-gradient(180deg, hsl(var(--foreground)), hsl(var(--foreground) / .55));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: hsl(var(--foreground));
  background: linear-gradient(145deg, hsl(var(--foreground) / .05), hsl(var(--foreground) / .015));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 30px -12px hsl(var(--background) / .5), inset 0 1px 1px hsl(var(--foreground) / .1);
  backdrop-filter: blur(14px);
  transition: border-color .3s, box-shadow .3s;
  will-change: transform;
}
.footer-pill:hover {
  border-color: hsl(var(--primary) / .5);
  box-shadow: 0 18px 38px -12px hsl(var(--primary) / .3), inset 0 1px 1px hsl(var(--foreground) / .16);
}
.footer-pill svg { width: 20px; height: 20px; flex-shrink: 0; }
.footer-pill--primary { border-color: hsl(var(--webgest-orange) / .55); background: linear-gradient(145deg, hsl(var(--webgest-orange) / .14), hsl(var(--foreground) / .02)); }
.footer-pill--secondary { font-size: 0.85rem; padding: 0.75rem 1.4rem; color: hsl(var(--muted-foreground)); }

.footer-columns {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 4rem;
  justify-content: center;
  padding: 0.5rem 1.5rem 1rem;
}
.footer-columns h4 { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; color: hsl(var(--muted-foreground)); margin-bottom: .85rem; }
.footer-columns ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-columns a { color: hsl(var(--muted-foreground)); font-size: .88rem; transition: color .2s; }
.footer-columns a:hover { color: hsl(var(--webgest-orange-light)); }

.footer-bottom-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid hsl(var(--border) / .6);
}
.footer-copy { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.footer-credit {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / .7);
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: hsl(var(--muted-foreground));
}
.footer-heart { color: hsl(var(--webgest-orange)); display: inline-block; animation: footer-heartbeat 1.8s cubic-bezier(.25,1,.5,1) infinite; }
@keyframes footer-heartbeat {
  0%, 100% { transform: scale(1); }
  15%, 45% { transform: scale(1.25); }
  30% { transform: scale(1); }
}
.footer-back-to-top {
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .7);
  color: hsl(var(--muted-foreground));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.footer-back-to-top:hover { color: hsl(var(--foreground)); border-color: hsl(var(--primary) / .5); }
.footer-back-to-top svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .footer-marquee-track, .footer-heart, .footer-aurora { animation: none; }
}

@media (max-width: 860px) {
  .footer-curtain { height: auto; clip-path: none; }
  .cinematic-footer { position: relative; height: auto; }
  .footer-columns { flex-direction: column; gap: 1.75rem; text-align: center; align-items: center; }
  .footer-giant-text { font-size: 22vw; }
  .footer-bottom-bar { flex-direction: column; text-align: center; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (max-width: 1099px) and (min-width: 641px) {
  .cards-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards-grid, .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    transform: none; /* anula o centering absoluto do desktop */
    background: hsl(var(--background) / .97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid hsl(var(--border));
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    margin: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid hsl(var(--border) / .6); }
  .nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-inner .btn { display: none; }
  .cta-inner { padding: 2.5rem 1.5rem; }
}
