/* ================================================================
   PORTFÓLIO FUTURISTA — FOLHA DE ESTILO PRINCIPAL
   Paleta escura + neons (ciano, magenta, roxo, verde-limão)
   Fontes: Orbitron (títulos) · Rajdhani (botões/labels) · Space Grotesk (texto)
   ================================================================ */

/* ---------- VARIÁVEIS GLOBAIS ---------- */
:root {
  /* Fundos */
  --bg-0: #020010;
  --bg-1: #06021a;
  --bg-2: #0b0526;
  --vidro: rgba(10, 8, 34, 0.55);
  --vidro-forte: rgba(8, 6, 28, 0.85);

  /* Neons */
  --ciano: #00f0ff;
  --magenta: #ff00e5;
  --roxo: #a855f7;
  --lima: #b6ff00;

  /* Texto */
  --texto: #e9e7ff;
  --texto-suave: #9b97c4;

  /* Bordas / brilhos */
  --borda: rgba(0, 240, 255, 0.14);
  --glow-ciano: 0 0 12px rgba(0, 240, 255, 0.55), 0 0 40px rgba(0, 240, 255, 0.18);
  --glow-magenta: 0 0 12px rgba(255, 0, 229, 0.55), 0 0 40px rgba(255, 0, 229, 0.18);

  /* Fontes */
  --f-titulo: 'Orbitron', sans-serif;
  --f-interface: 'Rajdhani', sans-serif;
  --f-texto: 'Space Grotesk', sans-serif;

  /* Layout */
  --nav-altura: 72px;
  --raio: 14px;
  --largura-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-altura) + 16px);
}

body {
  background: var(--bg-0);
  color: var(--texto);
  font-family: var(--f-texto);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  /* Gradiente de fundo profundo, por trás do canvas de partículas */
  background-image:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 40%, rgba(0, 240, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% 90%, rgba(255, 0, 229, 0.09), transparent 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--magenta); color: #fff; }

/* Barra de rolagem customizada */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ciano), var(--roxo), var(--magenta));
  border-radius: 8px;
}

/* Em desktops com mouse fino, esconde o cursor nativo (usamos o customizado) */
@media (hover: hover) and (pointer: fine) {
  body.cursor-ativo, body.cursor-ativo a, body.cursor-ativo button,
  body.cursor-ativo input, body.cursor-ativo textarea, body.cursor-ativo label,
  body.cursor-ativo .hero-logo { cursor: none; }
}

/* ================================================================
   PRELOADER
   ================================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.preloader.saindo { opacity: 0; visibility: hidden; }

.preloader-nucleo { position: relative; width: 140px; height: 140px; }

.preloader-logo {
  position: absolute; inset: 18px;
  width: calc(100% - 36px); height: calc(100% - 36px);
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.6));
  animation: pulsarLogo 1.6s ease-in-out infinite;
}
@keyframes pulsarLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.preloader-anel {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--ciano);
  border-right-color: var(--magenta);
  animation: girarAnel 1s linear infinite;
}
.preloader-anel::after {
  content: '';
  position: absolute; inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--roxo);
  animation: girarAnel 1.6s linear infinite reverse;
}
@keyframes girarAnel { to { transform: rotate(360deg); } }

.preloader-barra {
  width: min(280px, 70vw); height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px; overflow: hidden;
}
.preloader-barra span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--ciano), var(--magenta));
  box-shadow: var(--glow-ciano);
  transition: width 0.25s ease;
}
.preloader-texto {
  font-family: var(--f-interface);
  font-size: 0.8rem; letter-spacing: 0.35em;
  color: var(--texto-suave);
}

/* ================================================================
   CAMADAS FIXAS — partículas, scanlines, cursor, progresso
   ================================================================ */
#canvasParticulas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

.scanlines {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
  mix-blend-mode: overlay;
}

/* O cursor customizado fica acima de TUDO (nav, lightbox, toast),
   senão ele some atrás do cabeçalho de vidro ao rolar a página */
#canvasRastro {
  position: fixed; inset: 0; z-index: 998;
  pointer-events: none;
  display: none; /* ativado via JS apenas em desktop */
}

.cursor-ponto, .cursor-anel {
  position: fixed; top: 0; left: 0; z-index: 999;
  pointer-events: none;
  border-radius: 50%;
  /* posicionado via transform no JS (compositor, sem re-layout) */
  transform: translate(-50%, -50%);
  will-change: transform;
  display: none; /* ativado via JS apenas em desktop */
}
.cursor-ponto {
  width: 8px; height: 8px;
  background: var(--ciano);
  box-shadow: var(--glow-ciano);
}
.cursor-anel {
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 240, 255, 0.6);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.cursor-anel.interagindo {
  width: 56px; height: 56px;
  border-color: var(--magenta);
  background: rgba(255, 0, 229, 0.08);
}

.progresso-scroll {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--ciano), var(--roxo), var(--magenta));
  box-shadow: var(--glow-ciano);
}

/* ================================================================
   NAVEGAÇÃO
   ================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-altura);
  transition: box-shadow 0.4s ease;
}
/* O vidro fica num pseudo-elemento: backdrop-filter direto na .nav
   criaria um "containing block" e quebraria o menu mobile (fixed) */
.nav::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--vidro);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--borda);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.nav.rolado::before { opacity: 1; }
.nav.rolado { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45); }

.nav-conteudo {
  max-width: var(--largura-max);
  margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { position: relative; }
.nav-logo img {
  position: relative; z-index: 1;
  width: 46px; height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.45));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.nav-logo:hover img {
  transform: rotate(-12deg) scale(1.1);
  filter: drop-shadow(0 0 14px rgba(255, 0, 229, 0.7));
}

/* ===== Efeito de "poder" emitido pelos logos ao ativar o modo cyberpunk.
   Reutilizável: fica dentro de um container posicionado (o logo).
   Núcleo que estoura + 2 anéis de choque + raios de luz (estilo sabre). ===== */
.logo-poder {
  position: absolute; inset: 0;
  margin: auto;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.logo-poder.emitindo { animation: poderNucleo 0.85s ease-out forwards; }
.logo-poder.emitindo::before,
.logo-poder.emitindo::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ciano);
}
.logo-poder.emitindo::before { animation: poderAnel 0.85s ease-out forwards; }
.logo-poder.emitindo::after {
  border-color: var(--magenta);
  animation: poderAnel 0.85s 0.12s ease-out forwards;
}

/* Raios de luz que disparam para fora (sunburst tipo sabre de luz) */
.poder-raios {
  position: absolute;
  top: 50%; left: 50%;
  width: 260%; height: 260%;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  opacity: 0;
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 255, 255, 0.95) 0deg 1.6deg,
    rgba(0, 240, 255, 0.5) 1.6deg 3deg,
    transparent 3deg 15deg);
  /* fade radial: raios fortes no centro, somem nas pontas */
  -webkit-mask: radial-gradient(circle, #000 20%, rgba(0,0,0,0.5) 42%, transparent 66%);
  mask: radial-gradient(circle, #000 20%, rgba(0,0,0,0.5) 42%, transparent 66%);
}
.logo-poder.emitindo .poder-raios { animation: poderRaios 0.85s ease-out forwards; }
/* No hero os raios ficam ainda maiores e por trás do logo */
.logo-poder-hero { z-index: 1; }
.logo-poder-hero .poder-raios { width: 300%; height: 300%; }

/* Núcleo: flash central que cresce via glow (sem transform, pra não
   compor escala com os anéis) */
@keyframes poderNucleo {
  0% {
    opacity: 1;
    box-shadow: 0 0 30px 12px rgba(0, 240, 255, 0.9), 0 0 66px 26px rgba(168, 85, 247, 0.55);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(0, 240, 255, 0.35) 45%, transparent 70%);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 90px 46px rgba(255, 0, 229, 0), 0 0 130px 66px rgba(0, 240, 255, 0);
    background: radial-gradient(circle, rgba(255, 255, 255, 0), transparent 70%);
  }
}
/* Anéis de choque que se expandem para fora */
@keyframes poderAnel {
  0% { opacity: 0.9; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(3.6); }
}
/* Raios: disparam, giram levemente e somem */
@keyframes poderRaios {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-10deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7) rotate(24deg); }
}

.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none;
}
.nav-link {
  position: relative;
  font-family: var(--f-interface);
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.12em;
  padding: 8px 14px;
  color: var(--texto-suave);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
/* Indicador de seção ativa */
.nav-link::after {
  content: '';
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--ciano), var(--magenta));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
  box-shadow: var(--glow-ciano);
}
.nav-link:hover { color: var(--texto); }
.nav-link.ativo {
  color: var(--ciano);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}
.nav-link.ativo::after { transform: scaleX(1); }

.nav-link-cta {
  border: 1px solid var(--borda);
  border-radius: 999px;
  margin-left: 8px;
}
.nav-link-cta:hover {
  border-color: var(--ciano);
  box-shadow: var(--glow-ciano);
}

/* Hambúrguer (mobile) */
.nav-hamburguer {
  display: none;
  flex-direction: column; gap: 6px;
  background: none; border: none;
  padding: 8px;
  z-index: 110;
}
.nav-hamburguer span {
  width: 26px; height: 2px;
  background: var(--ciano);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.nav-hamburguer.aberto span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburguer.aberto span:nth-child(2) { opacity: 0; }
.nav-hamburguer.aberto span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-altura) + 24px) 24px 80px;
  overflow: hidden;
}

.hero-conteudo {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  max-width: 900px;
}

/* Logo do hero com halo holográfico */
/* Wrapper do parallax: recebe só transform via JS (roda no compositor,
   sem re-layout — margens aqui causavam travadinhas nas animações) */
.hero-logo-parallax { will-change: transform; }

.hero-logo-wrap {
  position: relative;
  width: clamp(170px, 26vw, 260px);
  aspect-ratio: 1;
  animation: flutuar 5s ease-in-out infinite;
  will-change: transform;
}
@keyframes flutuar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
/* <picture> transparente ao layout: o <img> se comporta como filho direto
   do .hero-logo-wrap (mantém o dimensionamento por 100%/aspect-ratio) */
.hero-logo-pic { display: contents; }
.hero-logo {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 0 24px rgba(0, 240, 255, 0.5)) drop-shadow(0 0 60px rgba(168, 85, 247, 0.35));
}
.hero-logo-halo {
  position: absolute; inset: -18%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ciano), var(--roxo), var(--magenta), var(--lima), var(--ciano));
  filter: blur(34px);
  opacity: 0.4;
  /* promove a um layer próprio: o blur é rasterizado 1x e a rotação vira
     um transform barato no compositor (sem re-rasterizar a cada frame) */
  will-change: transform;
  animation: girarHalo 8s linear infinite;
}
@keyframes girarHalo { to { transform: rotate(360deg); } }

/* Pílula de status */
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-interface);
  font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: var(--lima);
  border: 1px solid rgba(182, 255, 0, 0.35);
  background: rgba(182, 255, 0, 0.06);
  padding: 8px 18px;
  border-radius: 999px;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lima);
  box-shadow: 0 0 10px var(--lima);
  animation: pulsarDot 1.6s ease-in-out infinite;
}
@keyframes pulsarDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}

/* Título com glitch */
.hero-titulo {
  font-family: var(--f-titulo);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.6vw, 3.4rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--ciano), #fff 30%, var(--magenta) 65%, var(--roxo));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: fluirGradiente 6s linear infinite;
}
.e-comercial { -webkit-text-fill-color: var(--lima); color: var(--lima); }
@keyframes fluirGradiente { to { background-position: 220% center; } }

/* Camadas de glitch (usa data-text) */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  overflow: hidden;
  -webkit-background-clip: initial;
  background: none;
  pointer-events: none;
  opacity: 0.75;
}
.glitch::before {
  color: var(--ciano); -webkit-text-fill-color: var(--ciano);
  animation: glitchCima 3.2s infinite steps(1);
}
.glitch::after {
  color: var(--magenta); -webkit-text-fill-color: var(--magenta);
  animation: glitchBaixo 2.7s infinite steps(1);
}
@keyframes glitchCima {
  0%, 91%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  92% { clip-path: inset(0 0 62% 0); transform: translate(-5px, -3px); }
  94% { clip-path: inset(28% 0 48% 0); transform: translate(4px, 2px); }
  96% { clip-path: inset(70% 0 6% 0); transform: translate(-3px, 1px); }
  98% { clip-path: inset(12% 0 80% 0); transform: translate(5px, -2px); }
}
@keyframes glitchBaixo {
  0%, 89%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  90% { clip-path: inset(55% 0 8% 0); transform: translate(5px, 2px); }
  93% { clip-path: inset(10% 0 72% 0); transform: translate(-4px, -1px); }
  95% { clip-path: inset(80% 0 2% 0); transform: translate(3px, 2px); }
  97% { clip-path: inset(34% 0 40% 0); transform: translate(-5px, 1px); }
}

/* Subtítulo com digitação */
.hero-sub {
  font-family: var(--f-interface);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--texto-suave);
}
.texto-digitado {
  color: var(--ciano);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.7);
}
.cursor-digitacao {
  color: var(--magenta);
  animation: piscarCursor 0.8s steps(1) infinite;
}
@keyframes piscarCursor { 50% { opacity: 0; } }

/* Botões */
.hero-botoes { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-interface);
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.2em;
  padding: 14px 34px;
  border-radius: 4px;
  border: 1px solid var(--ciano);
  color: var(--ciano);
  background: rgba(0, 240, 255, 0.05);
  overflow: hidden;
  transition: color 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease, border-color 0.35s ease;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ciano), var(--roxo));
  transform: translateX(-101%);
  transition: transform 0.35s ease;
  z-index: -1;
}
.btn:hover {
  color: var(--bg-0);
  box-shadow: var(--glow-ciano);
  transform: translateY(-2px);
}
.btn:hover::before { transform: translateX(0); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-fantasma {
  border-color: rgba(255, 0, 229, 0.6);
  color: var(--magenta);
  background: rgba(255, 0, 229, 0.05);
}
.btn-fantasma::before { background: linear-gradient(90deg, var(--magenta), var(--roxo)); }
.btn-fantasma:hover { box-shadow: var(--glow-magenta); color: #fff; }

.btn-mini { padding: 10px 22px; font-size: 0.8rem; }
.btn-enviar { width: 100%; }

/* Indicador de scroll */
.scroll-indicador {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--f-interface);
  font-size: 0.7rem; letter-spacing: 0.4em;
  color: var(--texto-suave);
  transition: color 0.3s ease;
}
.scroll-indicador:hover { color: var(--ciano); }
.scroll-mouse {
  width: 24px; height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 14px;
  display: flex; justify-content: center;
  padding-top: 6px;
}
.scroll-roda {
  width: 3px; height: 8px;
  background: var(--ciano);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--ciano);
  animation: rolarRoda 1.6s ease-in-out infinite;
}
@keyframes rolarRoda {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ================================================================
   SEÇÕES — estrutura geral
   ================================================================ */
.secao {
  position: relative; z-index: 1;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 110px 24px 40px;
}

.secao-cabecalho { margin-bottom: 48px; }
.secao-num {
  font-family: var(--f-interface);
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(255, 0, 229, 0.6);
}
.secao-titulo {
  font-family: var(--f-titulo);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: 0.08em;
  margin: 6px 0 10px;
  display: inline-block;
}
.secao-desc { color: var(--texto-suave); max-width: 560px; }

/* Glitch apenas no hover (títulos de seção) */
.glitch-hover::before, .glitch-hover::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitch-hover:hover::before {
  opacity: 0.8; color: var(--ciano);
  animation: glitchCima 0.7s infinite steps(1);
}
.glitch-hover:hover::after {
  opacity: 0.8; color: var(--magenta);
  animation: glitchBaixo 0.6s infinite steps(1);
}
.glitch-hover { position: relative; }

/* ================================================================
   PORTFÓLIO — filtros, masonry e cards
   ================================================================ */
.filtros {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 36px;
}
.filtro {
  font-family: var(--f-interface);
  font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--texto-suave);
  background: transparent;
  border: 1px solid rgba(155, 151, 196, 0.25);
  border-radius: 999px;
  padding: 8px 20px;
  transition: all 0.3s ease;
}
.filtro:hover {
  color: var(--ciano);
  border-color: var(--ciano);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}
.filtro.ativo {
  color: var(--bg-0);
  background: linear-gradient(90deg, var(--ciano), var(--roxo));
  border-color: transparent;
  box-shadow: var(--glow-ciano);
}

/* Masonry com CSS columns — as proporções diferentes se encaixam naturalmente */
.galeria {
  columns: 3;
  column-gap: 22px;
  transition: opacity 0.3s ease;
}
.galeria.filtrando { opacity: 0; }

.item {
  break-inside: avoid;
  margin-bottom: 22px;
  border-radius: var(--raio);
  overflow: hidden;
  background: var(--vidro);
  border: 1px solid var(--borda);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}
.item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), var(--glow-ciano);
}
.item.oculto { display: none; }
.item.entrando { animation: entrarItem 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes entrarItem {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.item-midia { position: relative; overflow: hidden; }
.item-midia img, .item-midia video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.item:hover .item-midia img, .item:hover .item-midia video { transform: scale(1.06); }

/* Proporções dos formatos */
.prop-16-9 { aspect-ratio: 16 / 9; }
.prop-9-16 { aspect-ratio: 9 / 16; }
.prop-1-1  { aspect-ratio: 1 / 1; }
.prop-4-5  { aspect-ratio: 4 / 5; }
.prop-3-2  { aspect-ratio: 3 / 2; }
.prop-3-1  { aspect-ratio: 3 / 1; }

/* Placeholder visual (remova ao inserir a mídia real) */
.midia-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--f-interface);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.75);
}
.midia-placeholder::after {
  /* textura sutil de "ruído" com gradiente */
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 6px);
}
.icone-midia {
  width: 44px; height: 44px;
  fill: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

/* Gradientes dos placeholders */
.grad-a { background: linear-gradient(135deg, #0e0836, #0a2a4a, #06818e); }
.grad-b { background: linear-gradient(160deg, #2a0845, #7b1fa2, #c2185b); }
.grad-c { background: linear-gradient(135deg, #051937, #004d7a, #008793); }
.grad-d { background: linear-gradient(160deg, #200122, #6f0000, #a4508b); }
.grad-e { background: linear-gradient(135deg, #1a2a6c, #2a2a72, #009ffd); }
.grad-f { background: linear-gradient(160deg, #0f2027, #203a43, #2c5364); }

.item-info {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.item-cat {
  font-family: var(--f-interface);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--ciano);
}
.item-info h3 {
  font-family: var(--f-texto);
  font-weight: 500; font-size: 1rem;
}

/* Botão "ver todos" abaixo da galeria compacta */
.galeria-acoes {
  display: flex; justify-content: center;
  margin-top: 36px;
}
/* Utilitário: esconde qualquer elemento (usado pelo JS) */
.escondido { display: none !important; }

/* Overlay de hover com "ver projeto" */
.item-midia::before {
  content: '⊕ AMPLIAR';
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-interface);
  font-weight: 700; letter-spacing: 0.3em; font-size: 0.85rem;
  color: #fff;
  background: rgba(2, 0, 16, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.item:hover .item-midia::before { opacity: 1; }

/* ================================================================
   SITES & APPS — mockups
   ================================================================ */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.projeto {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
  transition: transform 0.3s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
  position: relative;
}
.projeto::before {
  /* borda animada em gradiente que aparece no hover */
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--raio);
  padding: 1px;
  background: linear-gradient(120deg, var(--ciano), var(--roxo), var(--magenta), var(--ciano));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: bordaFluindo 4s linear infinite;
  pointer-events: none;
}
@keyframes bordaFluindo { to { background-position: 300% 0; } }
.projeto:hover::before { opacity: 1; }
.projeto:hover { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }

/* Mockup navegador */
.mockup-navegador {
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d0a22;
}
.mockup-topo {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
}
.dot-vermelho, .dot-amarelo, .dot-verde {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-vermelho { background: #ff5f57; }
.dot-amarelo { background: #febc2e; }
.dot-verde { background: #28c840; }
.mockup-url {
  flex: 1;
  margin-left: 10px;
  font-family: var(--f-interface);
  font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--texto-suave);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 4px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mockup-tela { position: relative; aspect-ratio: 16 / 10; }

/* Mockup celular */
.mockup-celular {
  position: relative;
  width: min(200px, 60%);
  margin: 0 auto;
  border-radius: 26px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: #0d0a22;
  padding: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.mockup-notch {
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 40%; height: 14px;
  background: #05030f;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.mockup-tela-cel {
  position: relative;
  aspect-ratio: 9 / 19;
  border-radius: 16px;
  overflow: hidden;
}

.projeto-info { display: flex; flex-direction: column; gap: 10px; }
.projeto-info h3 {
  font-family: var(--f-titulo);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.05em;
}
.projeto-info p { color: var(--texto-suave); font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--f-interface);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--roxo);
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
}
.projeto .btn { align-self: flex-start; margin-top: 4px; }

/* ================================================================
   SOBRE
   ================================================================ */
.sobre-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 56px;
  align-items: center;
}

.sobre-foto-wrap { position: relative; }
.sobre-foto-moldura {
  position: relative;
  border-radius: var(--raio);
  overflow: hidden;
  border: 1px solid var(--borda);
  z-index: 2;
}
.sobre-foto-placeholder { position: relative !important; aspect-ratio: 4 / 5; }
.sobre-foto-moldura img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.sobre-foto-borda {
  position: absolute; inset: 18px -18px -18px 18px;
  border: 1px solid var(--magenta);
  border-radius: var(--raio);
  box-shadow: inset 0 0 24px rgba(255, 0, 229, 0.25);
  z-index: 1;
  animation: pulsarBorda 3s ease-in-out infinite;
}
@keyframes pulsarBorda {
  0%, 100% { box-shadow: inset 0 0 24px rgba(255, 0, 229, 0.25); }
  50% { box-shadow: inset 0 0 40px rgba(255, 0, 229, 0.5), 0 0 30px rgba(255, 0, 229, 0.3); }
}

.sobre-saudacao {
  font-family: var(--f-titulo);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.35;
}
.texto-grad {
  background: linear-gradient(90deg, var(--ciano), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.sobre-texto p { color: var(--texto-suave); margin-bottom: 14px; }

/* Contadores */
.contadores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.contador {
  text-align: center;
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: rgba(0, 240, 255, 0.03);
  padding: 18px 10px 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.contador:hover {
  border-color: var(--ciano);
  box-shadow: var(--glow-ciano);
  transform: translateY(-4px);
}
.contador-num, .contador-mais {
  font-family: var(--f-titulo);
  font-size: 1.9rem; font-weight: 900;
  color: var(--ciano);
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}
.contador-mais { color: var(--magenta); text-shadow: 0 0 16px rgba(255, 0, 229, 0.6); }
.contador p {
  font-family: var(--f-interface);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--texto-suave);
  margin-top: 4px;
}

/* ================================================================
   SERVIÇOS
   ================================================================ */
.servicos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.servico {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 30px 26px;
  transition: transform 0.3s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
}
.servico:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(0, 240, 255, 0.12);
}

.servico-icone {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.servico:hover .servico-icone { transform: scale(1.12) rotate(-6deg); }
.servico-icone svg { width: 30px; height: 30px; }

.servico-icone.ciano { background: rgba(0, 240, 255, 0.1); box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.25); }
.servico-icone.ciano svg { fill: var(--ciano); filter: drop-shadow(0 0 8px var(--ciano)); }
.servico-icone.magenta { background: rgba(255, 0, 229, 0.1); box-shadow: inset 0 0 18px rgba(255, 0, 229, 0.25); }
.servico-icone.magenta svg { fill: var(--magenta); filter: drop-shadow(0 0 8px var(--magenta)); }
.servico-icone.roxo { background: rgba(168, 85, 247, 0.12); box-shadow: inset 0 0 18px rgba(168, 85, 247, 0.3); }
.servico-icone.roxo svg { fill: var(--roxo); filter: drop-shadow(0 0 8px var(--roxo)); }
.servico-icone.lima { background: rgba(182, 255, 0, 0.08); box-shadow: inset 0 0 18px rgba(182, 255, 0, 0.2); }
.servico-icone.lima svg { fill: var(--lima); filter: drop-shadow(0 0 8px var(--lima)); }

.servico h3 {
  font-family: var(--f-titulo);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.servico p { color: var(--texto-suave); font-size: 0.92rem; }

/* ================================================================
   HABILIDADES — grupos de skills com barras neon animadas
   ================================================================ */
.habilidades-grid {
  display: grid;
  /* 2 colunas no desktop, 1 no mobile */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 24px;
}

.grupo-habilidades {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color 0.3s ease, box-shadow 0.35s ease, transform 0.3s ease;
}
.grupo-habilidades:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 26px rgba(0, 240, 255, 0.1);
}

.grupo-topo {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 4px;
}
.grupo-topo .servico-icone {
  margin-bottom: 0;
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.grupo-topo h3 {
  font-family: var(--f-titulo);
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.06em;
}

.habilidade { display: flex; flex-direction: column; gap: 8px; }
.habilidade-topo {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-interface);
  font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.08em;
}
.habilidade-pct {
  color: var(--texto-suave);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.habilidade-barra {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
/* A largura começa em 0 e é definida via JS (data-nivel) ao entrar na tela */
.habilidade-preenchimento {
  display: block;
  height: 100%; width: 0;
  border-radius: 99px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.grupo-ciano .habilidade-preenchimento {
  background: linear-gradient(90deg, var(--ciano), var(--roxo));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.55);
}
.grupo-magenta .habilidade-preenchimento {
  background: linear-gradient(90deg, var(--magenta), var(--roxo));
  box-shadow: 0 0 12px rgba(255, 0, 229, 0.55);
}
.grupo-roxo .habilidade-preenchimento {
  background: linear-gradient(90deg, var(--roxo), var(--ciano));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}
.grupo-lima .habilidade-preenchimento {
  background: linear-gradient(90deg, var(--lima), var(--ciano));
  box-shadow: 0 0 12px rgba(182, 255, 0, 0.5);
}

/* ================================================================
   CONTATO
   ================================================================ */
.contato-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

.formulario {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 34px 30px;
  display: flex; flex-direction: column; gap: 24px;
}

.campo { position: relative; }
.campo input, .campo textarea {
  width: 100%;
  background: rgba(2, 0, 16, 0.5);
  border: 1px solid rgba(155, 151, 196, 0.25);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
}
.campo input:focus, .campo textarea:focus {
  outline: none;
  border-color: var(--ciano);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.18), 0 0 20px rgba(0, 240, 255, 0.2);
}
.campo label {
  position: absolute; left: 14px; top: 15px;
  font-family: var(--f-interface);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--texto-suave);
  pointer-events: none;
  transition: all 0.25s ease;
  background: transparent;
  padding: 0 6px;
}
/* Label flutuante quando focado ou preenchido */
.campo input:focus + label, .campo textarea:focus + label,
.campo input:not(:placeholder-shown) + label, .campo textarea:not(:placeholder-shown) + label {
  top: -9px;
  font-size: 0.65rem;
  color: var(--ciano);
  background: linear-gradient(180deg, transparent 45%, rgba(6,4,24,1) 45%);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.contato-lateral { display: flex; flex-direction: column; gap: 24px; }

.contato-card {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 18px;
}
.contato-card h3 {
  font-family: var(--f-interface);
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--magenta);
}
.contato-email {
  font-family: var(--f-texto);
  font-size: 1.02rem;
  color: var(--ciano);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transition: text-shadow 0.3s ease;
  word-break: break-all;
}
.contato-email:hover { text-shadow: 0 0 20px rgba(0, 240, 255, 0.9); }

.redes { display: flex; flex-wrap: wrap; gap: 12px; }
.rede {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(155, 151, 196, 0.3);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.rede svg { width: 21px; height: 21px; fill: var(--texto-suave); transition: fill 0.3s ease, filter 0.3s ease; }
.rede:hover {
  border-color: var(--ciano);
  box-shadow: var(--glow-ciano);
  transform: translateY(-4px);
}
.rede:hover svg { fill: var(--ciano); filter: drop-shadow(0 0 6px var(--ciano)); }

/* Widget relógio */
.relogio {
  font-family: var(--f-titulo);
  font-size: 2.1rem; font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--lima);
  text-shadow: 0 0 18px rgba(182, 255, 0, 0.55);
  font-variant-numeric: tabular-nums;
}
.relogio-data {
  font-family: var(--f-interface);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--texto-suave);
  text-transform: uppercase;
}

/* ================================================================
   RODAPÉ
   ================================================================ */
.rodape {
  position: relative; z-index: 1;
  margin-top: 80px;
  padding: 48px 24px 90px;
  text-align: center;
  border-top: 1px solid var(--borda);
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.03));
}
.rodape-logo {
  width: 54px; margin: 0 auto 16px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
  transition: transform 0.5s ease;
}
.rodape-logo:hover { transform: rotate(360deg); }
.rodape-texto { color: var(--texto-suave); font-size: 0.9rem; }
/* Quebra de linha do rodapé (depois de "com") só no mobile */
.quebra-mobile { display: none; }
.rodape-dica {
  margin-top: 10px;
  font-family: var(--f-interface);
  font-size: 0.7rem; letter-spacing: 0.3em;
  color: rgba(155, 151, 196, 0.4);
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(2, 0, 16, 0.92);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox.aberto { opacity: 1; visibility: visible; }

.lightbox-conteudo {
  max-width: min(86vw, 1000px);
  max-height: 78vh;
  border-radius: var(--raio);
  overflow: hidden;
  border: 1px solid var(--borda);
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.2), 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: entrarLightbox 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes entrarLightbox {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.lightbox-conteudo .midia-placeholder {
  position: relative;
  width: min(80vw, 760px);
}
.lightbox-conteudo .prop-9-16 { width: min(42vh, 70vw); }
.lightbox-conteudo img, .lightbox-conteudo video {
  max-width: 86vw; max-height: 78vh;
  object-fit: contain;
}

.lightbox-fechar {
  position: absolute; top: 24px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: rgba(255, 255, 255, 0.04);
  color: var(--texto);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.lightbox-fechar:hover {
  border-color: var(--magenta);
  color: var(--magenta);
  box-shadow: var(--glow-magenta);
  transform: rotate(90deg);
}

.lightbox-seta {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ciano);
  font-size: 1.6rem; line-height: 1;
  transition: all 0.3s ease;
  z-index: 2;
}
.lightbox-seta:hover { border-color: var(--ciano); box-shadow: var(--glow-ciano); }
.lightbox-ant { left: 26px; }
.lightbox-prox { right: 26px; }

.lightbox-legenda {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-interface);
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--texto);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
  white-space: nowrap;
}

/* ================================================================
   WIDGETS FLUTUANTES — voltar ao topo, toast
   ================================================================ */
/* Botão flutuante do WhatsApp — acima do voltar ao topo.
   Verde neon pulsante; no hover expande revelando o rótulo. */
.btn-whatsapp {
  position: fixed; right: 26px; bottom: 88px; z-index: 150;
  display: flex; align-items: center;
  gap: 10px;
  width: 50px; height: 50px;
  padding-left: 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 211, 102, 0.55);
  background: rgba(37, 211, 102, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, background 0.3s ease;
  animation: brilhoWhatsapp 2.2s ease-in-out infinite;
}
.btn-whatsapp svg {
  width: 24px; height: 24px; flex-shrink: 0;
  fill: #25d366;
  filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.8));
}
.whatsapp-rotulo {
  font-family: var(--f-interface);
  font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #b6ffd0;
  text-shadow: 0 0 10px rgba(37, 211, 102, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease 0.12s;
}
.btn-whatsapp:hover {
  width: 236px;
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.16);
}
.btn-whatsapp:hover .whatsapp-rotulo { opacity: 1; }
/* Brilho pulsante para chamar atenção (efeito "radar") */
@keyframes brilhoWhatsapp {
  0%, 100% { box-shadow: 0 0 10px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 0 24px rgba(37, 211, 102, 0.65), 0 0 46px rgba(37, 211, 102, 0.2); }
}

.voltar-topo {
  position: fixed; right: 26px; bottom: 26px; z-index: 150;
  width: 50px; height: 50px;
  border-radius: 12px;
  border: 1px solid var(--borda);
  background: var(--vidro);
  backdrop-filter: blur(10px);
  color: var(--ciano);
  font-size: 1rem;
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: all 0.35s ease;
}
.voltar-topo.visivel { opacity: 1; visibility: visible; transform: none; }
.voltar-topo:hover { box-shadow: var(--glow-ciano); border-color: var(--ciano); }

.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 400;
  transform: translate(-50%, 20px);
  background: var(--vidro-forte);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ciano);
  border-radius: 10px;
  box-shadow: var(--glow-ciano);
  color: var(--texto);
  font-family: var(--f-interface);
  font-weight: 600; letter-spacing: 0.12em;
  padding: 14px 26px;
  opacity: 0; visibility: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90vw; text-align: center;
}
.toast.visivel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Toast "épico" — usado na ATIVAÇÃO do modo cyberpunk: glow pulsante forte,
   tremor e glitch RGB (cópias ciano/magenta desalinhadas do texto) */
.toast.epico {
  border-color: var(--magenta);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  padding: 18px 34px; /* MESMO padding usado nas cópias do glitch (alinhamento) */
  background: rgba(8, 6, 28, 0.92);
  animation: toastPulso 0.5s ease-in-out infinite alternate;
}
/* Fase de glitch: só nos primeiros ~1s (classe .glitchando removida
   via JS) — tremor + cópias RGB. Depois o toast fica estável e legível,
   mantendo só o glow. */
.toast.epico.glitchando {
  animation: toastPulso 0.5s ease-in-out infinite alternate,
             toastTremor 0.26s steps(2, end) infinite;
}
/* As cópias usam o MESMO padding e text-align do texto real, então
   quebram nas mesmas linhas — sem desalinhar quando o texto ocupa
   várias linhas no mobile. */
.toast.epico.glitchando::before,
.toast.epico.glitchando::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  padding: 18px 34px; /* idêntico ao .toast.epico → mesma quebra de linha */
  text-align: center;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.85;
}
.toast.epico.glitchando::before { color: var(--ciano); animation: toastGlitchA 0.42s infinite steps(2, end); }
.toast.epico.glitchando::after  { color: var(--magenta); animation: toastGlitchB 0.36s infinite steps(2, end); }

@keyframes toastPulso {
  from { box-shadow: 0 0 22px rgba(0,240,255,0.55), 0 0 54px rgba(255,0,229,0.35), inset 0 0 18px rgba(168,85,247,0.22); }
  to   { box-shadow: 0 0 44px rgba(0,240,255,0.95), 0 0 96px rgba(255,0,229,0.65), inset 0 0 26px rgba(168,85,247,0.4); }
}
@keyframes toastTremor {
  0%   { transform: translate(-50%, 0); }
  33%  { transform: translate(calc(-50% - 2px), 1px); }
  66%  { transform: translate(calc(-50% + 2px), -1px); }
  100% { transform: translate(-50%, 0); }
}
@keyframes toastGlitchA {
  0%, 100% { clip-path: inset(0 0 62% 0); transform: translateX(-3px); }
  50%      { clip-path: inset(48% 0 18% 0); transform: translateX(3px); }
}
@keyframes toastGlitchB {
  0%, 100% { clip-path: inset(62% 0 0 0); transform: translateX(3px); }
  50%      { clip-path: inset(18% 0 50% 0); transform: translateX(-3px); }
}

/* ================================================================
   ANIMAÇÕES DE SCROLL (reveal)
   ================================================================ */
.revelar {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.revelar.visivel { opacity: 1; transform: none; }
/* Atrasos em cascata via data-atraso */
.revelar[data-atraso="1"] { transition-delay: 0.1s; }
.revelar[data-atraso="2"] { transition-delay: 0.22s; }
.revelar[data-atraso="3"] { transition-delay: 0.34s; }
.revelar[data-atraso="4"] { transition-delay: 0.46s; }

/* ================================================================
   EASTER EGG — modo cyberpunk extremo (código Konami)
   ================================================================ */
/* O filtro é aplicado ao main e às camadas de fundo — nunca ao body,
   pois filter no body quebraria todos os elementos position: fixed */
body.modo-extremo main,
body.modo-extremo #canvasParticulas,
body.modo-extremo .rodape {
  animation: cicloNeon 4s linear infinite;
}
@keyframes cicloNeon {
  0% { filter: hue-rotate(0deg) saturate(1.2); }
  100% { filter: hue-rotate(360deg) saturate(1.2); }
}
body.modo-extremo .scanlines { opacity: 0.6; }

@keyframes girarLogoEgg {
  from { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  to { transform: rotate(360deg) scale(1); }
}
.girando-egg { animation: girarLogoEgg 1s cubic-bezier(0.34, 1.56, 0.64, 1) !important; }

/* ================================================================
   RESPONSIVO
   ================================================================ */
@media (max-width: 1024px) {
  .galeria { columns: 2; }
  .contato-grid { grid-template-columns: 1fr; }
  .sobre-grid { grid-template-columns: 1fr; gap: 40px; }
  .sobre-foto-wrap { max-width: 340px; }
}

@media (max-width: 768px) {
  :root { --nav-altura: 64px; }

  /* Menu mobile: painel deslizante em tela cheia */
  .nav-hamburguer { display: flex; }
  .nav-links {
    position: fixed; inset: 0;
    background: rgba(4, 2, 20, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 105;
  }
  .nav-links.aberto { transform: translateX(0); }
  .nav-link { font-size: 1.4rem; padding: 14px 22px; }
  .nav-link-cta { margin-left: 0; }

  .secao { padding: 80px 18px 30px; }
  .hero { padding-top: calc(var(--nav-altura) + 12px); }
  .hero-botoes { flex-direction: column; width: 100%; max-width: 320px; }
  .scroll-indicador { display: none; }

  .lightbox-seta { width: 44px; height: 44px; }
  .lightbox-ant { left: 10px; }
  .lightbox-prox { right: 10px; }
  .lightbox-fechar { top: 14px; right: 14px; }

  .voltar-topo { right: 16px; bottom: 16px; }
  .btn-whatsapp { right: 16px; bottom: 76px; }

  /* Toasts do cyberpunk (ativado E desativado) no mobile: fonte/espaçamento
     menores + largura fixa para lerem em 2 linhas (não 3). O padding fixo
     de 18px 34px do épico mantém texto e cópias do glitch alinhados. */
  .toast.cyber { font-size: 0.85rem; letter-spacing: 0.08em; width: min(84vw, 300px); }

  /* Rodapé: quebra depois de "com" só no mobile */
  .quebra-mobile { display: inline; }

  /* Sobre no mobile: foto pequena à esquerda com o texto ao lado
     (em vez de a foto ocupar a tela inteira) */
  .sobre-grid { display: block; }
  .sobre-foto-wrap {
    float: left;
    width: 132px;
    margin: 6px 18px 10px 0;
  }
  .sobre-foto-borda { inset: 8px -8px -8px 8px; }
  .sobre-foto-placeholder span { font-size: 0.5rem; letter-spacing: 0.18em; }
  .sobre-foto-placeholder .icone-midia { width: 28px; height: 28px; }
  .contadores { clear: both; padding-top: 8px; }
}

@media (max-width: 560px) {
  .galeria { columns: 1; }
  .projetos-grid { grid-template-columns: 1fr; }
  .contadores { grid-template-columns: repeat(2, 1fr); }
}

/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
