/* ============================================
   AYAMI HOSHIORI — TEMA SAZONAL DE HALLOWEEN
   ============================================
   Camada visual adicional, ativa só em outubro (a classe .theme-halloween
   no <body> e este arquivo só são emitidos nesse período — ver
   lib/seasonalTheme.js e views/partials/head.ejs). Em novembro nada daqui
   é carregado e o site volta sozinho ao visual normal.

   Regra: NÃO é uma identidade nova. Os azuis, o dourado, o branco e a prata
   da Ayami seguem mandando; roxo/rosa/laranja entram só como acento.
   Sempre que possível mexemos nos TOKENS de main.css, não nos componentes. */

.theme-halloween {
  /* Paleta complementar sazonal (acentos) */
  --hl-purple:      #9B6DFF; /* roxo mágico */
  --hl-purple-deep: #4A2A72; /* roxo profundo */
  --hl-orange:      #FF9D3D; /* laranja Halloween — só detalhes pequenos */
  --hl-night:       #101329; /* azul-noite */
  --hl-pink:        #FF8FCB; /* rosa mágico */
  --hl-ember:       #FF6B2C; /* laranja-brasa (intermediário laranja → vermelho) */
  --hl-red:         #E5483B; /* vermelho abóbora/brasa — só em acentos e gradientes */
  --hl-blood:       #7A1630; /* vinho profundo, para sombras */

  /* Overrides dos tokens existentes (mesma estrutura, só um tom sazonal) */
  --bg-deep:       #0c0a20;   /* azul-noite com toque roxo */
  --bg-mid:        #120f2c;
  --bg-card:       #171332;
  --bg-card-hover: #1e1942;
  --border-gold:   rgba(255, 120, 50, 0.45);  /* bordas de destaque viram laranja */
  --border:        rgba(176, 160, 255, 0.18);
  --shadow-glow:   0 0 30px rgba(155, 109, 255, 0.2);
  --glow-blue-soft:0 0 14px rgba(155, 109, 255, 0.24);
  --shadow-elevated-hover: 0 1px 0 rgba(255,255,255,0.07) inset, 0 18px 44px rgba(0,0,0,0.44), 0 0 0 1px rgba(155,109,255,0.22);

  /* Brilho de canto discreto usado nos cards */
  --hl-card-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1 L14.2 9.8 L23 12 L14.2 14.2 L12 23 L9.8 14.2 L1 12 L9.8 9.8 Z' fill='%239B6DFF' fill-opacity='.55'/%3E%3C/svg%3E");
}

::selection { background: rgba(155, 109, 255, 0.4); color: var(--white); }

/* ---------- Céu sazonal (fixo, atrás do conteúdo) ---------- */
.hl-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hl-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 85% 0%,    rgba(155, 109, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 70% 32% at 50% 112%,  rgba(255, 107, 44, 0.34),  transparent 72%),
    radial-gradient(ellipse 45% 30% at 100% 100%, rgba(229, 72, 59, 0.22),   transparent 70%),
    radial-gradient(ellipse 50% 38% at 0% 100%,   rgba(122, 22, 48, 0.42),   transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 55%,   rgba(255, 143, 203, 0.05), transparent 70%);
}
/* Teias e aranha no canto superior esquerdo (logo abaixo da navbar) */
.hl-web {
  position: absolute;
  top: 70px;
  left: 0;
  width: 110px;
  height: 110px;
  fill: none;
  stroke: #C6CDD8;
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.32;
}
.hl-spider {
  position: absolute;
  top: 70px;
  left: 22px;
  width: 26px;
  height: 75px;
  transform-origin: 50% 0;
  animation: hl-swing 6s ease-in-out infinite;
}
@keyframes hl-swing { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-5deg); } }
.hl-moon {
  position: absolute;
  top: 92px;
  right: 6%;
  width: 84px;
  height: 84px;
  opacity: 0.95;
  filter: drop-shadow(0 0 22px rgba(255, 107, 44, 0.6)) drop-shadow(0 0 8px rgba(255, 217, 102, 0.5));
  animation: hl-moon-bob 9s ease-in-out infinite;
}
.hl-constellation {
  position: absolute;
  right: 3%;
  bottom: 5%;
  width: 160px;
  opacity: 0.55;
}
.hl-tw { animation: hl-twinkle 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* Partículas mágicas: poucas, lentas, só transform/opacity (GPU-friendly) */
.hl-motes span {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--z);
  height: var(--z);
  border-radius: 50%;
  background: var(--hl-purple);
  box-shadow: 0 0 8px 1px rgba(155, 109, 255, 0.55);
  opacity: 0;
  animation: hl-rise var(--d) linear var(--s) infinite;
}
.hl-motes span:nth-child(3n) { background: var(--gold); box-shadow: 0 0 8px 1px rgba(255, 217, 102, 0.45); }
.hl-motes span:nth-child(7n) { background: var(--hl-red); box-shadow: 0 0 9px 2px rgba(229, 72, 59, 0.6); }
.hl-motes span:nth-child(4n) { background: var(--hl-ember); box-shadow: 0 0 9px 2px rgba(255, 107, 44, 0.6); }
.hl-motes span:nth-child(5n) { background: var(--hair-main); box-shadow: 0 0 8px 1px rgba(169, 214, 255, 0.45); }

/* ---------- Navbar / footer ---------- */
.theme-halloween .navbar { border-bottom-color: rgba(176, 160, 255, 0.18); }
.theme-halloween .navbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hl-purple) 25%, var(--hl-ember) 60%, var(--hl-red) 80%, transparent);
  opacity: 0.75;
  pointer-events: none;
}
.theme-halloween .nav-logo::after {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M46 6 A34 34 0 1 0 46 74 A46 46 0 0 1 46 6 Z' fill='%23A9D6FF'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.9;
}
.theme-halloween .footer {
  border-top-color: rgba(255, 107, 44, 0.45);
  background: linear-gradient(180deg, rgba(122, 22, 48, 0.22), transparent 55%), var(--bg-mid);
  box-shadow: 0 -1px 0 rgba(255, 107, 44, 0.4), 0 -28px 50px -26px rgba(255, 107, 44, 0.3);
}

/* ---------- Botões: roxo mágico (comportamento intacto), brilho laranja no hover ---------- */
.theme-halloween .btn-primary {
  background: linear-gradient(135deg, var(--eye-main) 0%, var(--hl-purple) 42%, #D9431F 100%);
  box-shadow: 0 4px 20px rgba(217, 67, 31, 0.35);
}
.theme-halloween .btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 107, 44, 0.55), 0 0 0 1px rgba(255, 140, 70, 0.6); }
.theme-halloween .btn-primary:active { box-shadow: 0 4px 16px rgba(217, 67, 31, 0.4); }
.theme-halloween .btn-secondary { color: #FFB070; border-color: rgba(255, 120, 50, 0.65); }
.theme-halloween .btn-secondary:hover { background: rgba(255, 107, 44, 0.14); border-color: var(--hl-ember); color: #FFD0A0; }

/* ---------- Destaques: laranja vira o acento de Halloween ---------- */
.theme-halloween .hero-badge,
.theme-halloween .section-eyebrow {
  color: #FFB070;
  background: rgba(255, 107, 44, 0.12);
  box-shadow: 0 0 14px rgba(255, 107, 44, 0.18);
}
.theme-halloween .nav-link:hover,
.theme-halloween .nav-link.active { color: #FFB070; background: rgba(255, 107, 44, 0.12); }
.theme-halloween .logo-text { background: linear-gradient(135deg, var(--hair-main), var(--hl-purple) 45%, var(--hl-orange) 75%, var(--hl-red)); -webkit-background-clip: text; background-clip: text; }
.theme-halloween .hero-title .name-gradient,
.theme-halloween .section-title .highlight {
  background-image: linear-gradient(135deg, var(--hair-main) 0%, var(--hl-purple) 32%, var(--hl-orange) 68%, var(--hl-red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.theme-halloween .footer-col a:hover { color: #FFB070; }
.theme-halloween .stat-value { text-shadow: 0 0 18px rgba(255, 107, 44, 0.35); }
::-webkit-scrollbar-thumb { background: var(--hl-purple-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--hl-ember); }

/* ---------- Cards: brilho roxo discreto + estrelinha no canto ---------- */
.theme-halloween .card {
  background: var(--hl-card-sparkle) no-repeat right 14px top 14px / 12px 12px, var(--bg-card);
}
.theme-halloween .card:hover {
  background: var(--hl-card-sparkle) no-repeat right 14px top 14px / 12px 12px, var(--bg-card-hover);
  border-color: rgba(255, 120, 50, 0.55);
  box-shadow: var(--shadow-card), 0 0 28px rgba(255, 107, 44, 0.16);
}
.theme-halloween .trusted-card,
.theme-halloween .team-card,
.theme-halloween .feature-card,
.theme-halloween .faq-item { border-color: rgba(176, 160, 255, 0.2); }
.theme-halloween .trusted-card:hover,
.theme-halloween .team-card:hover,
.theme-halloween .feature-card:hover { border-color: rgba(255, 120, 50, 0.55); box-shadow: 0 0 28px rgba(255, 107, 44, 0.16); }

/* ---------- Hero da home: transformação mais perceptível ---------- */
.theme-halloween .hero::before {
  background:
    radial-gradient(ellipse 42% 34% at 75% 35%, rgba(155, 109, 255, 0.15) 0%, transparent 100%),
    radial-gradient(ellipse at 75% 35%, rgba(124, 143, 255, 0.1) 0%, transparent 60%);
}
.theme-halloween .hero-image-glow {
  background: radial-gradient(ellipse, rgba(155, 109, 255, 0.28) 0%, rgba(255, 107, 44, 0.16) 48%, transparent 74%);
}
.theme-halloween .hero-avatar-image {
  border-color: rgba(255, 120, 50, 0.6);
  box-shadow: 0 0 50px rgba(155, 109, 255, 0.42), 0 0 100px rgba(255, 107, 44, 0.22);
}

/* Moldura invisível do mesmo tamanho do avatar, flutuando em sincronia */
.hl-hero-decor {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hl-hero-box {
  --hl-avatar: 400px;
  position: relative;
  width: var(--hl-avatar);
  height: var(--hl-avatar);
  animation: float 5s ease-in-out infinite;
}
.hl-hat {
  position: absolute;
  top: -9%;
  left: 14%;
  width: 36%;
  height: auto;
  transform: rotate(-14deg);
  filter: drop-shadow(0 4px 10px rgba(16, 19, 41, 0.55));
}
.hl-pumpkin {
  position: absolute;
  right: 1%;
  bottom: 3%;
  width: 24%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(16, 19, 41, 0.5)) drop-shadow(0 0 12px rgba(255, 107, 44, 0.5));
}
.hl-pumpkin--small { right: auto; left: -3%; bottom: 10%; width: 15%; transform: rotate(-8deg); }
.hl-pumpkin .hl-face { animation: hl-flicker 3.2s ease-in-out infinite; }
.hl-ghost {
  position: absolute;
  top: 4%;
  right: -2%;
  width: 17%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(184, 160, 255, 0.55));
  opacity: 0.92;
  animation: hl-ghost 6s ease-in-out infinite;
}
.hl-spark {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 5px rgba(255, 217, 102, 0.7));
  animation: hl-twinkle 4s ease-in-out infinite;
}
.hl-spark--orange { background: var(--hl-ember); filter: drop-shadow(0 0 6px rgba(255, 107, 44, 0.9)); }
.hl-spark--purple { background: var(--hl-purple); filter: drop-shadow(0 0 5px rgba(155, 109, 255, 0.8)); }

@keyframes hl-flicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.8; } 55% { opacity: 1; } 70% { opacity: 0.88; } }
@keyframes hl-ghost { 0%, 100% { transform: translateY(0) rotate(6deg); } 50% { transform: translateY(-10px) rotate(-4deg); } }

/* ---------- Morcegos estilizados (2, bem discretos) ---------- */
.hl-bat {
  position: absolute;
  top: 22%;
  left: -60px;
  width: 38px;
  height: auto;
  fill: #261650;
  stroke: rgba(255, 140, 70, 0.75);
  stroke-width: 1.2;
  opacity: 0;
  animation: hl-fly 38s linear infinite;
}
.hl-bat--2 { top: 58%; width: 28px; animation-duration: 52s; animation-delay: -22s; }
.hl-bat .hl-wing { transform-box: fill-box; transform-origin: center; animation: hl-flap 0.9s ease-in-out infinite; }

/* ---------- Animações (lentas e suaves) ---------- */
@keyframes hl-fly {
  0%   { transform: translate(0, 0);                   opacity: 0; }
  6%   { opacity: 0.85; }
  50%  { transform: translate(55vw, -40px); }
  94%  { opacity: 0.85; }
  100% { transform: translate(110vw, 20px);            opacity: 0; }
}
@keyframes hl-flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }
@keyframes hl-twinkle {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}
@keyframes hl-moon-bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-8px) rotate(-3deg); }
}
@keyframes hl-rise {
  0%   { transform: translateY(0);        opacity: 0; }
  10%  { opacity: 0.8; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-105vh);   opacity: 0; }
}

/* ---------- Responsividade ---------- */
@media (max-width: 768px) {
  .hl-hero-box { --hl-avatar: 240px; }       /* mesmo tamanho do avatar no mobile */
  .hl-moon { top: 82px; left: auto; right: 4%; width: 44px; height: 44px; opacity: 0.85; }
  .hl-web { width: 80px; height: 80px; }
  .hl-spider { left: 16px; height: 58px; width: 20px; }
  .hl-constellation,
  .hl-motes,
  .hl-bat--2,
  .hl-spark--purple { display: none; }       /* menos elementos no celular */
}

/* ---------- Movimento reduzido: sem efeitos sazonais animados ---------- */
@media (prefers-reduced-motion: reduce) {
  .hl-motes,
  .hl-bat { display: none; }
  .hl-moon,
  .hl-spider,
  .hl-ghost,
  .hl-face,
  .hl-tw,
  .hl-spark,
  .hl-hero-box { animation: none !important; }
}
