/* ═══════════════════════════════════════════
   DT Distribuidora — Custom Styles
   Design System: Navy #0B1D30 | Cyan #00BFA5
   Tipografia: Outfit (headings) + DM Sans (body)
   ═══════════════════════════════════════════ */

/* --- Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Navbar ─── */
#navbar {
  background: transparent;
}

#navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 32px rgba(11, 29, 48, 0.07);
}

/* Links da navbar — cor adaptativa */
#navbar .nav-link {
  color: #0B1D30;
}
#navbar .nav-link:hover {
  color: #00BFA5;
}

/* Social label + icons no topo */
#navbar .social-label { color: #0B1D30; }
#navbar .social-icon   { color: #0B1D30; }
#navbar .social-icon:hover { background: rgba(0,191,165,0.1); color: #00BFA5; }

/* Hamburger lines */
.ham-line { background: #0B1D30; }
#navbar.navbar-scrolled .ham-line { background: #0B1D30; }

/* Mobile menu */
#mobile-menu {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(11,29,48,0.06);
}
.mobile-nav-link {
  color: #0B1D30;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-nav-link:hover {
  background: rgba(0,191,165,0.08);
  color: #00BFA5;
}

/* Menu hamburger aberto → X */
#menu-toggle.is-open .ham-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#menu-toggle.is-open .ham-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menu-toggle.is-open .ham-line:nth-child(3) {
  width: 24px;
  transform: translateY(-6px) rotate(-45deg);
}

/* ─── Hero Layer System ─── */
#hero {
  /* Garante que o z-index funcione nos filhos */
  isolation: isolate;
}

/* Background hero */
#hero-bg {
  will-change: transform;
}

/* Barra vertical hero */
#hero-bar {
  will-change: transform, opacity;
}

/* ─── Bar Pulse Animation ─── */
@keyframes bar-pulse-down {
  0%   { top: -10%; opacity: 0; }
  20%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
#bar-pulse {
  animation: bar-pulse-down 3s ease-in-out infinite;
}

/* ─── Garrafa + nuvem combinadas ─── */
#hero-bottle {
  will-change: transform, opacity;
  user-select: none;
}

/* Float contínuo (aplicado via JS após entrada) */
@keyframes bottle-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-14px) rotate(0.5deg); }
  66%       { transform: translateY(-7px) rotate(-0.3deg); }
}

/* ─── Hero Bolhas de Sabão ─── */
.hero-bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: radial-gradient(
    circle at 32% 28%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(0, 191, 165, 0.05) 65%,
    transparent 80%
  );
  pointer-events: none;
  will-change: transform, opacity;
  animation: hero-bubble-rise var(--duration) var(--delay) infinite ease-in;
}

@keyframes hero-bubble-rise {
  0%   { transform: translateY(0)     translateX(0px);   opacity: 0; }
  8%   { opacity: var(--opacity); }
  20%  { transform: translateY(-20vh) translateX(9px); }
  40%  { transform: translateY(-40vh) translateX(-7px); }
  60%  { transform: translateY(-60vh) translateX(11px); }
  80%  { transform: translateY(-80vh) translateX(-5px); }
  92%  { opacity: var(--opacity); }
  100% { transform: translateY(-112vh) translateX(4px);  opacity: 0; }
}

/* ─── Shimmer ─── */
.hero-shimmer-container {
  position: relative;
  overflow: hidden; /* clipar o shimmer aos limites da imagem */
}
.shimmer-overlay {
  position: absolute;
  top: -50%;    /* estende acima para evitar corte diagonal */
  left: -120%;
  width: 55%;
  height: 200%; /* estende abaixo também */
  background: linear-gradient(
    45deg,       /* diagonal: baixo-esquerda → cima-direita */
    transparent 35%,
    rgba(255,255,255,0.06) 50%,
    transparent 65%
  );
  pointer-events: none;
}
@keyframes shimmer-pass {
  0%   { left: -120%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 180%; opacity: 0; }
}
.shimmer-active .shimmer-overlay {
  animation: shimmer-pass 5s cubic-bezier(0.25, 0, 0.75, 1) forwards;
}

/* ─── Sparkles ─── */
.sparkle {
  position: absolute;
  pointer-events: none;
  width: 10px;
  height: 10px;
}
.sparkle::before {
  content: '✦';
  position: absolute;
  font-size: 14px;
  color: rgba(0, 191, 165, 0.9);
  animation: sparkle-blink 2.4s ease-in-out infinite;
  will-change: transform, opacity;
}

.sparkle-1 { top: 12%; right: 18%; }
.sparkle-1::before { animation-delay: 0s; font-size: 16px; }

.sparkle-2 { top: 35%; right: -2%; }
.sparkle-2::before {
  animation-delay: 0.7s;
  font-size: 10px;
  color: rgba(255,255,255,0.95);
}

.sparkle-3 { bottom: 32%; left: 8%; }
.sparkle-3::before { animation-delay: 1.3s; font-size: 12px; }

.sparkle-4 { top: 55%; right: 12%; }
.sparkle-4::before {
  animation-delay: 2s;
  font-size: 8px;
  color: rgba(0,191,165,0.7);
}

@keyframes sparkle-blink {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50%       { opacity: 1; transform: scale(1.3) rotate(25deg); }
}

/* ─── Hero words ─── */
.hero-word {
  display: block;
  will-change: transform, opacity;
}

/* ─── Hero CTA glow pulse ─── */
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(11,29,48,0.2), 0 0 0 0 rgba(0,191,165,0); }
  50%       { box-shadow: 0 8px 32px rgba(11,29,48,0.3), 0 0 24px rgba(0,191,165,0.25); }
}
#hero-cta {
  will-change: transform, box-shadow;
}

/* ─── Scroll indicator ─── */
@keyframes scroll-line-drop {
  0%   { transform: translateY(-100%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}
#scroll-line {
  animation: scroll-line-drop 2s ease-in-out infinite;
}

/* ─── Scroll Reveal ─── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  /* transição gerenciada pelo anime.js */
}

/* ─── Product Cards ─── */
.product-card {
  will-change: transform;
}

/* Hover no ícone do card: muda stroke do SVG via parent group hover */
.product-card:hover .card-icon {
  background: #00BFA5;
}
.product-card:hover .card-icon svg {
  stroke: white;
}

/* ─── Diferencial Cards ─── */
.diferencial-card {
  will-change: transform, opacity;
}

/* ─── Brand strip ─── */
.brand-item span {
  letter-spacing: 0.08em;
}

/* ─── CTA Seção — Bolhas ─── */
.cta-bubble {
  position: absolute;
  bottom: -120px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1.5px solid rgba(0, 191, 165, 0.2);
  background: radial-gradient(circle at 30% 30%, rgba(0,191,165,0.06), transparent 70%);
  animation: cta-bubble-rise var(--duration) var(--delay) infinite ease-in;
  pointer-events: none;
  will-change: transform, opacity;
}
@keyframes cta-bubble-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-110vh) scale(0.85); opacity: 0; }
}

/* ─── CTA Form inputs ─── */
#cta-form input:focus {
  background: rgba(255, 255, 255, 0.15) !important;
}
#cta-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.1) inset;
  -webkit-text-fill-color: white;
}

/* ─── WhatsApp botão flutuante ─── */
@keyframes wa-pulse {
  0%   { box-shadow: 0 6px 24px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0.5); transform: scale(1); }
  50%  { box-shadow: 0 10px 36px rgba(37,211,102,0.7), 0 0 0 10px rgba(37,211,102,0); transform: scale(1.03); }
  100% { box-shadow: 0 6px 24px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0); transform: scale(1); }
}
@keyframes wa-ring-expand {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.9); opacity: 0; }
}
#wa-float {
  animation: wa-pulse 2.2s ease-in-out infinite;
}
#wa-float:hover {
  animation: none;
  box-shadow: 0 12px 40px rgba(37,211,102,0.7);
  transform: scale(1.04);
}
/* Anel de expansão */
.wa-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(37,211,102,0.6);
  animation: wa-ring-expand 2.2s ease-out infinite;
  pointer-events: none;
}

/* ─── Mobile menu slide down ─── */
@keyframes mobile-menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
#mobile-menu:not(.hidden) {
  animation: mobile-menu-in 0.25s ease-out forwards;
}

/* ─── Hero mobile adjustments ─── */
@media (max-width: 640px) {
  /* No mobile, galão centralizado atrás do texto como fundo decorativo */
  #bottle-wrap {
    width: 75% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 18% !important;
    bottom: auto !important;
    max-width: 320px !important;
    opacity: 0.3 !important;
  }
  #hero-bar {
    display: none;
  }
  #sparkles-wrap {
    display: none;
  }
  #hero-icons-grid {
    display: none;
  }
  #hero .w-full.max-w-7xl.mx-auto.flex.justify-end {
    justify-content: center !important;
  }
  #hero .w-full.lg\\:w-\\[55\\%\\] {
    text-align: center !important;
  }
  #hero-actions {
    justify-content: center !important;
  }
  #hero-badge {
    align-self: center !important;
  }
}

/* Tablet 768px */
@media (max-width: 768px) {
  #bottle-wrap {
    width: 50% !important;
    max-width: 420px !important;
    left: 0% !important;
  }
  #hero-icons-grid {
    top: 20% !important;
    left: 1% !important;
  }
  #hero-icons-grid .icon-grid-item {
    width: 48px !important;
    height: 48px !important;
    padding: 8px !important;
  }
}

/* ═══════════════════════════════════════════
   Acessibilidade
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-bubble {
    animation: none !important;
    display: none;
  }

  .cta-bubble {
    animation: none !important;
    display: none;
  }

  #scroll-line {
    animation: none !important;
  }

  #bar-pulse {
    animation: none !important;
  }

  #wa-float {
    animation: none !important;
  }

  .wa-ring {
    animation: none !important;
    display: none;
  }
}

/* ─── Focus visible ─── */
:focus-visible {
  outline: 2px solid #00BFA5;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Scrollbar personalizada ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F6FAFE; }
::-webkit-scrollbar-thumb { background: #0B1D30; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #00BFA5; }

/* ─── Seleção de texto ─── */
::selection {
  background: rgba(0, 191, 165, 0.25);
  color: #0B1D30;
}

/* ─── Utilitários ─── */
.will-change-transform { will-change: transform; }

/* ─── Hero text gradient acento ─── */
.text-cyan { color: #00BFA5; }

/* ─── Brand tag hover ─── */
.brand-tag {
  transition: background 0.2s ease, color 0.2s ease;
}
.product-card:hover .brand-tag {
  background: rgba(0,191,165,0.12);
  color: #00BFA5;
}
