/* ==========================================================================
   CHAVE DO BICO — EFEITOS INTERATIVOS
   Identidade: Verde Institucional (#004719, #087B18), Verde-Limão (#42D900, #C9FF24)
   Usabilidade: Cursor nativo 100% preservado, pointer-events: none, performance 60fps
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CURSOR PERSONALIZADO (DESKTOP)
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  /* Anel Seguidor Suave */
  .cdb-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(66, 217, 0, 0.55);
    background: rgba(66, 217, 0, 0.03);
    box-shadow: 0 0 14px rgba(66, 217, 0, 0.2);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.28s ease,
                border-color 0.28s ease,
                box-shadow 0.28s ease,
                opacity 0.3s ease;
    will-change: transform;
    opacity: 0;
  }

  /* Ponto Central com Brilho Esmeralda/Limão */
  .cdb-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C9FF24;
    box-shadow: 0 0 8px #42D900, 0 0 16px rgba(66, 217, 0, 0.45);
    pointer-events: none;
    z-index: 100000;
    transform: translate(-50%, -50%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.22s ease,
                box-shadow 0.22s ease,
                opacity 0.25s ease;
    will-change: transform;
    opacity: 0;
  }

  /* Resposta Visual Sutil ao passar sobre botões, links e cards */
  .cdb-cursor-follower.is-hovering {
    width: 50px;
    height: 50px;
    border-color: #C9FF24;
    background: rgba(66, 217, 0, 0.09);
    box-shadow: 0 0 22px rgba(201, 255, 36, 0.4), inset 0 0 14px rgba(66, 217, 0, 0.15);
  }

  .cdb-cursor-dot.is-hovering {
    transform: translate(-50%, -50%) scale(1.4);
    background: #ffffff;
    box-shadow: 0 0 10px #C9FF24, 0 0 18px rgba(66, 217, 0, 0.6);
  }

  /* Contração Elástica ao Clicar */
  .cdb-cursor-follower.is-clicking {
    width: 26px;
    height: 26px;
    border-color: #42D900;
    background: rgba(66, 217, 0, 0.2);
  }

  /* Canvas de Rastro de Partículas */
  #cdb-cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99997;
    display: block;
  }
}

/* Oculta o cursor decorativo em telas de toque puro */
@media (pointer: coarse) {
  .cdb-cursor-follower,
  .cdb-cursor-dot,
  #cdb-cursor-canvas {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   2. EFEITO DE TOQUE (MOBILE / TOUCH RIPPLE)
   -------------------------------------------------------------------------- */
.cdb-touch-ripple {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 255, 36, 0.5) 0%, rgba(66, 217, 0, 0.28) 45%, rgba(0, 71, 25, 0.05) 75%, transparent 100%);
  border: 1px solid rgba(201, 255, 36, 0.65);
  box-shadow: 0 0 16px rgba(66, 217, 0, 0.4);
  transform: translate(-50%, -50%) scale(0.2);
  animation: cdbRippleExpand 0.42s cubic-bezier(0.12, 0.75, 0.25, 1) forwards;
  will-change: transform, opacity;
}

@keyframes cdbRippleExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.95;
  }
  60% {
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   3. EFEITO DE ROLAGEM COM PARALLAX (ELEMENTOS IMOBILIÁRIOS DECORATIVOS)
   -------------------------------------------------------------------------- */
.cdb-scroll-decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  will-change: transform;
  filter: drop-shadow(0 12px 24px rgba(0, 47, 16, 0.12));
  opacity: 0.72;
  transition: opacity 0.4s ease;
}

.cdb-scroll-decor svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Dimensões dos Elementos Decorativos de Scroll */
.cdb-scroll-decor--key {
  width: 52px;
  height: 52px;
}

.cdb-scroll-decor--house {
  width: 60px;
  height: 60px;
}

.cdb-scroll-decor--pin {
  width: 44px;
  height: 52px;
}

/* Orbs de Luz Ambiente nas Margens */
.cdb-scroll-decor--orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 217, 0, 0.22) 0%, rgba(201, 255, 36, 0.08) 45%, transparent 75%);
  filter: blur(12px);
  pointer-events: none;
}

/* Posicionamento Estratégico nas Margens Externas (Gutters) */
.cdb-pos-left-top {
  top: 10%;
  left: 2.5%;
}

.cdb-pos-right-top {
  top: 15%;
  right: 2.5%;
}

.cdb-pos-left-mid {
  top: 50%;
  left: 2%;
}

.cdb-pos-right-mid {
  top: 55%;
  right: 2%;
}

.cdb-pos-left-bottom {
  bottom: 12%;
  left: 3%;
}

.cdb-pos-right-bottom {
  bottom: 10%;
  right: 3%;
}

/* Garantia de isolamento e contexto de posicionamento das seções com decor */
.transparency-section,
.section-showcase,
.contact-section {
  position: relative !important;
  overflow: hidden !important;
}

.transparency-section .container,
.section-showcase .container,
.contact-section .container {
  position: relative;
  z-index: 5;
}

/* --------------------------------------------------------------------------
   4. RESPONSIVIDADE E ACESSIBILIDADE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cdb-scroll-decor {
    opacity: 0.45;
  }
  .cdb-scroll-decor--key { width: 42px; height: 42px; }
  .cdb-scroll-decor--house { width: 48px; height: 48px; }
  .cdb-scroll-decor--pin { width: 36px; height: 44px; }
}

@media (max-width: 768px) {
  /* Em telas menores e dispositivos móveis, oculta cursores e decorativos para evitar estouro de margem */
  .cdb-cursor-follower,
  .cdb-cursor-dot,
  #cdb-cursor-canvas,
  .cdb-scroll-decor {
    display: none !important;
  }
}

/* Respeito Rigoroso ao Prefers-Reduced-Motion */
@media (prefers-reduced-motion: reduce) {
  .cdb-cursor-follower,
  .cdb-cursor-dot,
  #cdb-cursor-canvas,
  .cdb-touch-ripple,
  .cdb-scroll-decor {
    display: none !important;
    animation: none !important;
    transform: none !important;
  }
}
