/* =========================================================
   LAYTEN · HALLOWEEN
   Para quitarlo todo: borra las 2 líneas que cargan este
   archivo y halloween.js. No toca tu HTML original.
   ========================================================= */

:root {
  --hw-pumpkin: #ff7a1a;
  --hw-ember: #ffb15c;
  --hw-violet: #a45bff;
  --hw-slime: #8dff3c;
  --hw-blood: #ff2a3d;
  --hw-ink: #0a0414;
}

/* ---------- Detalles generales ---------- */
body.hw-on ::selection { background: var(--hw-pumpkin); color: #1a0b00; }

body.hw-on::-webkit-scrollbar { width: 12px; }
body.hw-on::-webkit-scrollbar-track { background: #12091d; }
body.hw-on::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--hw-pumpkin), #7a2a9e);
  border-radius: 8px;
  border: 2px solid #12091d;
}

/* ---------- Banner con luces ---------- */
.hw-banner {
  position: relative;
  z-index: 5;
  padding: 30px 14px 10px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  background: linear-gradient(90deg, #1a0629, #3b0d5e 35%, #6b2400 50%, #3b0d5e 65%, #1a0629);
  border-bottom: 2px solid var(--hw-pumpkin);
  box-shadow: 0 6px 30px rgba(255, 122, 26, .25);
}

.hw-garland {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 26px;
  display: flex;
  pointer-events: none;
}

.hw-seg {
  position: relative;
  flex: 1;
  height: 14px;
  border-bottom: 2px solid #15090f;
  border-radius: 0 0 50% 50%;
}

.hw-bulb {
  position: absolute;
  left: calc(50% - 5px);
  bottom: -14px;
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 45% 45%;
  background: var(--c);
  box-shadow: 0 0 10px 3px var(--c);
  animation: hw-bulb 2.4s ease-in-out infinite alternate;
}
.hw-bulb::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -4px;
  width: 6px;
  height: 5px;
  background: #15090f;
  border-radius: 1px;
}
.hw-bulb.c0 { --c: #ff7a1a; }
.hw-bulb.c1 { --c: #a45bff; }
.hw-bulb.c2 { --c: #8dff3c; }
.hw-bulb.c3 { --c: #ff2a3d; }

@keyframes hw-bulb {
  from { opacity: 1; filter: brightness(1.25); }
  to   { opacity: .45; filter: brightness(.7); }
}

/* ---------- Linterna (luz que sigue al ratón) ---------- */
.hw-light {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  --hw-x: 50%;
  --hw-y: 50%;
  --hw-r: 240px;
  --hw-a: .8;
}
.hw-dark {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--hw-r) at var(--hw-x) var(--hw-y),
    rgba(10, 4, 20, 0) 0%,
    rgba(10, 4, 20, calc(var(--hw-a) * .14)) 45%,
    rgba(10, 4, 20, calc(var(--hw-a) * .62)) 75%,
    rgba(10, 4, 20, var(--hw-a)) 100%);
}
.hw-glow {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle calc(var(--hw-r) * .8) at var(--hw-x) var(--hw-y),
    rgba(255, 150, 60, .2),
    rgba(255, 110, 20, .07) 55%,
    transparent 75%);
  animation: hw-torch 3.2s ease-in-out infinite;
}
@keyframes hw-torch {
  0%, 100% { opacity: 1; }
  45% { opacity: .86; }
  60% { opacity: .95; }
}
.hw-nolight .hw-light { display: none; }

/* ---------- Relámpago suave ---------- */
.hw-flash {
  position: fixed;
  inset: 0;
  z-index: 9989;
  background: #cdb8ff;
  opacity: 0;
  pointer-events: none;
}
.hw-flash.is-on { animation: hw-flash 1.2s ease-out; }
@keyframes hw-flash {
  0%   { opacity: 0; }
  10%  { opacity: .16; }
  25%  { opacity: 0; }
  40%  { opacity: .1; }
  70%  { opacity: 0; }
}

/* ---------- Niebla ---------- */
.hw-fog {
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 150px;
  z-index: 9981;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 100% at 18% 100%, rgba(180, 150, 255, .22), transparent 70%),
    radial-gradient(ellipse 35% 100% at 55% 100%, rgba(255, 140, 60, .14), transparent 70%),
    radial-gradient(ellipse 40% 100% at 90% 100%, rgba(180, 150, 255, .2), transparent 70%);
  animation: hw-fog 16s ease-in-out infinite alternate;
}
@keyframes hw-fog {
  from { transform: translateX(-4%); }
  to   { transform: translateX(4%); }
}

/* ---------- Luna ---------- */
.hw-moon {
  position: absolute;
  top: 72px;
  right: 4vw;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  z-index: 9979;
  pointer-events: none;
  opacity: .92;
  background: radial-gradient(circle at 35% 35%, #fff7d6, #ffe9a0 55%, #e8c872);
  box-shadow: 0 0 40px 14px rgba(255, 226, 140, .35), 0 0 120px 40px rgba(255, 200, 90, .18);
}
.hw-moon::before,
.hw-moon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(190, 150, 60, .28);
}
.hw-moon::before { width: 18px; height: 18px; left: 54px; top: 22px; }
.hw-moon::after  { width: 12px; height: 12px; left: 26px; top: 56px; }

/* ---------- Telarañas ---------- */
.hw-web {
  position: fixed;
  top: 0;
  width: clamp(110px, 15vw, 220px);
  color: #e9e3ff;
  opacity: .6;
  z-index: 9979;
  pointer-events: none;
}
.hw-web svg { display: block; width: 100%; height: auto; }
.hw-web-l { left: 0; }
.hw-web-r { right: 0; transform: scaleX(-1); }

/* ---------- Calabazas ---------- */
.hw-pumpkins {
  position: fixed;
  left: 10px;
  bottom: 0;
  z-index: 9992;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}
.hw-pk svg {
  display: block;
  width: 88px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(255, 140, 30, .55));
}
.hw-pk-small svg { width: 54px; }
.hw-face { fill: #ffd24a; animation: hw-candle 2.6s infinite; }
@keyframes hw-candle {
  0%, 100% { opacity: 1; }
  30% { opacity: .82; }
  55% { opacity: .95; }
  75% { opacity: .7; }
}

/* ---------- Murciélagos y fantasma ---------- */
.hw-fly {
  position: fixed;
  left: 0;
  z-index: 9980;
  pointer-events: none;
  will-change: transform;
  animation: hw-fly var(--d, 8s) linear forwards;
}
.hw-fly.is-rtl { animation-direction: reverse; }
@keyframes hw-fly {
  from { transform: translate3d(-140px, 0, 0); }
  to   { transform: translate3d(calc(100vw + 140px), 0, 0); }
}
@keyframes hw-wave {
  from { translate: 0 -14px; }
  to   { translate: 0 14px; }
}
@keyframes hw-flap {
  from { transform: scaleY(1); }
  to   { transform: scaleY(.4); }
}
.hw-bat svg {
  display: block;
  width: 58px;
  height: auto;
  fill: #07030d;
  filter: drop-shadow(0 0 3px rgba(164, 91, 255, .7));
  animation: hw-wave 1.1s ease-in-out infinite alternate;
}
.hw-bat path {
  transform-box: fill-box;
  transform-origin: 50% 40%;
  animation: hw-flap .18s ease-in-out infinite alternate;
}
.hw-ghost svg {
  display: block;
  width: 54px;
  height: auto;
  opacity: .8;
  fill: #f1ecff;
  filter: drop-shadow(0 0 10px rgba(200, 180, 255, .8));
  animation: hw-wave 3s ease-in-out infinite alternate;
}

/* ---------- Botones de control ---------- */
.hw-controls {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9995;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hw-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 122, 26, .6);
  background: rgba(13, 7, 20, .88);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 122, 26, .3);
  transition: box-shadow .2s, opacity .2s, filter .2s;
}
.hw-btn:hover { box-shadow: 0 0 18px rgba(255, 122, 26, .7); }
.hw-btn:focus-visible { outline: 2px solid var(--hw-ember); outline-offset: 2px; }
.hw-btn[aria-pressed="false"] { opacity: .55; filter: grayscale(1); }

/* ---------- Cursor de araña ---------- */
.hw-cursor,
.hw-cursor * { cursor: none !important; }

.hw-thread {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 100vh;
  margin-left: -1px;
  z-index: 100000;
  pointer-events: none;
  background: linear-gradient(#d9d2e6, #ffffff);
  opacity: .85;
  will-change: transform;
  transition: opacity .2s;
}
.hw-spider {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  z-index: 100001;
  pointer-events: none;
  transform-origin: 30px 13px;
  will-change: transform;
  transition: opacity .2s;
}
.hw-spider svg {
  display: block;
  width: 60px;
  height: 60px;
  overflow: visible;
  transform-origin: 50% 22%;
  transition: transform .18s ease, filter .18s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6));
}
.hw-spider .b { fill: #0a0610; stroke: #3a2a52; stroke-width: .8; }
.hw-spider .m { fill: var(--hw-blood); }
.hw-spider .e { fill: var(--hw-blood); }
.hw-spider .hw-legs path {
  fill: none;
  stroke: #0a0610;
  stroke-width: 2.2;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 30px 32px;
}
.hw-spider .hw-bob { animation: hw-bob 2.4s ease-in-out infinite alternate; }
@keyframes hw-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(1.6px); }
}
.hw-spider.is-moving .hw-legs path:nth-child(4n+1),
.hw-spider.is-moving .hw-legs path:nth-child(4n+4) { animation: hw-legA .16s ease-in-out infinite alternate; }
.hw-spider.is-moving .hw-legs path:nth-child(4n+2),
.hw-spider.is-moving .hw-legs path:nth-child(4n+3) { animation: hw-legB .16s ease-in-out infinite alternate; }
@keyframes hw-legA { to { transform: rotate(9deg); } }
@keyframes hw-legB { to { transform: rotate(-9deg); } }

.hw-spider.is-link svg { transform: scale(1.3); filter: drop-shadow(0 0 8px var(--hw-blood)); }
.hw-spider.is-down svg { transform: scale(.82); }
.hw-spider.is-hidden,
.hw-thread.is-hidden { opacity: 0; }
.hw-nospider .hw-spider,
.hw-nospider .hw-thread { display: none; }

/* ---------- Tu web, en modo Halloween ---------- */
body.hw-on .main-header {
  box-shadow: inset 0 -90px 130px -50px rgba(255, 106, 0, .28);
}
body.hw-on .main-header .title-1 {
  color: var(--hw-ember);
  text-shadow: 0 0 8px rgba(255, 122, 26, .9), 0 0 26px rgba(255, 90, 0, .6);
  animation: hw-neon 3.4s ease-in-out infinite;
}
@keyframes hw-neon {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 122, 26, .9), 0 0 26px rgba(255, 90, 0, .6); }
  50%      { text-shadow: 0 0 4px rgba(255, 122, 26, .7), 0 0 14px rgba(255, 90, 0, .4); }
}

body.hw-on .se-title-1,
body.hw-on .se-title-2 { text-shadow: 0 0 14px rgba(255, 122, 26, .45); }

body.hw-on .se-iv.bg-2 { box-shadow: inset 0 0 160px rgba(120, 40, 170, .35); }

body.hw-on .plan {
  border: 1px solid rgba(255, 122, 26, .28);
  box-shadow: 0 0 0 1px rgba(91, 26, 138, .35), 0 12px 40px rgba(0, 0, 0, .35);
  transition: box-shadow .3s, transform .3s, border-color .3s;
}
body.hw-on .plan:hover {
  border-color: rgba(255, 122, 26, .85);
  box-shadow: 0 0 28px rgba(255, 122, 26, .38), 0 12px 40px rgba(0, 0, 0, .4);
  transform: translateY(-4px);
}
body.hw-on .plan.popular-plan { border-color: rgba(164, 91, 255, .7); }
body.hw-on .plan-name::after { content: " 🎃"; }

body.hw-on .btn-fill-primary {
  background: linear-gradient(135deg, #ff7a1a, #e8480c) !important;
  border-color: #ff7a1a !important;
  color: #1a0b00 !important;
  transition: box-shadow .25s, transform .25s;
}
body.hw-on .btn-fill-primary:hover {
  box-shadow: 0 0 22px rgba(255, 122, 26, .75);
  transform: translateY(-2px);
}

body.hw-on .box { transition: box-shadow .3s, transform .3s; }
body.hw-on .box:hover { box-shadow: 0 0 26px rgba(255, 122, 26, .45); transform: translateY(-3px); }

body.hw-on .lh-review-card { border-top: 3px solid var(--hw-pumpkin); }
body.hw-on .lh-review-card:hover { box-shadow: 0 0 22px rgba(255, 122, 26, .45); }

body.hw-on .faq-question:hover { color: var(--hw-ember); }
body.hw-on .faq-question.active { box-shadow: inset 4px 0 0 var(--hw-pumpkin); }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .hw-moon { display: none; }
}
@media (max-width: 700px) {
  .hw-pk-small { display: none; }
  .hw-pk svg { width: 60px; }
  .hw-banner { font-size: 14px; }
}

/* ---------- Accesibilidad e impresión ---------- */
@media (prefers-reduced-motion: reduce) {
  .hw-glow, .hw-fog, .hw-bulb, .hw-face, .hw-spider .hw-bob,
  body.hw-on .main-header .title-1 { animation: none !important; }
}
@media print {
  .hw-light, .hw-flash, .hw-fog, .hw-moon, .hw-web, .hw-pumpkins,
  .hw-fly, .hw-controls, .hw-spider, .hw-thread, .hw-banner { display: none !important; }
}
