/* ==========================================
   HORROR ATMOSPHERE - Skulls, Blood, Particles
   ========================================== */

/* ---- Skull Gate Intro ---- */
#skull-gate {
  position: fixed;        /* overlay scos din flux — nu lasă spațiu negru după el */
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 99990;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

/* Spacer transparent care dă distanța de scroll a intro-ului.
   Gate-ul (fixed) stă peste el, așa că nu se vede niciodată ca bandă neagră,
   iar secțiunea „Despre noi" urmează imediat după. */
#skull-gate-spacer {
  width: 100%;
  height: 150vh;
}

.skull-gate-glow {
  display: none;
}

/* skull-gate-svg replaced by img-based approach */
#skull-gate-wrap {
  position: relative;
  z-index: 2;
  width: min(280px, 72vw);
  height: calc(min(280px, 72vw) * 1.532);
  max-height: 70vh;
  flex-shrink: 0;
  filter: drop-shadow(0 0 50px rgba(80,0,0,0.9)) drop-shadow(0 0 100px rgba(50,0,0,0.6));
}

#skull-single,
#skull-gate-top,
#skull-gate-jaw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#skull-single img,
#skull-gate-top img,
#skull-gate-jaw img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  /* SVG fills are blood-red; subtle contrast boost */
  filter: brightness(0.95) contrast(1.15) saturate(1.2);
}

/* Mobil: filtrele (drop-shadow pe wrap + brightness/contrast pe img) forțează
   re-rasterizarea SVG-ului la fiecare frame în timpul scalării -> lag major.
   Le eliminăm pe ecranele mici; animația rămâne fluidă (doar transform GPU). */
body.is-mobile #skull-gate-wrap { filter: none; }
body.is-mobile #skull-single img,
body.is-mobile #skull-gate-top img,
body.is-mobile #skull-gate-jaw img { filter: none; }

#skull-gate-top {
  clip-path: inset(0 0 34% 0);
}

#skull-gate-jaw {
  clip-path: inset(66% 0 0 0);
  opacity: 0;
}

.skull-gate-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.skull-gate-hint span {
  font-family: 'Cinzel Decorative', serif;
  font-size: 11px;
  letter-spacing: 6px;
  color: rgba(180,140,60,0.6);
  text-transform: uppercase;
  animation: candle-text-flicker 4s linear infinite;
}

.skull-gate-hint::before {
  content: '';
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(139,0,0,0.8), transparent);
  animation: scrollDown 1.8s ease-in-out infinite;
}


/* Blood canvas — stilizat complet via JS, fără elemente separate în layout */

/* ---- Horror Canvas (Hero Particles) ---- */
#horror-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---- Skull Elements ---- */
.horror-skull {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  will-change: transform, opacity;
  overflow: visible;
}

.horror-skull svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Pulsing blood glow on skulls */
.horror-skull {
  animation: skull-ambient-glow 5s ease-in-out infinite;
}

@keyframes skull-ambient-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(80,0,0,0.6)) drop-shadow(0 4px 12px rgba(0,0,0,0.9)); }
  50%       { filter: drop-shadow(0 0 22px rgba(100,0,0,0.9)) drop-shadow(0 0 45px rgba(80,0,0,0.4)) drop-shadow(0 4px 12px rgba(0,0,0,0.9)); }
}

/* Eye sockets glow */
.skull-eye-glow {
  animation: eye-pulse 2.2s ease-in-out infinite;
}

.skull-eye-glow:nth-of-type(2) { animation-delay: 0.3s; }
.skull-eye-glow:nth-of-type(4) { animation-delay: 0.15s; }

@keyframes eye-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.9; }
}

/* ---- Bone Decorations ---- */
.horror-bone {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  will-change: transform, opacity;
  overflow: visible;
}

/* ---- Spider Web ---- */
.horror-spider-web {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

/* ---- Candle Light Orbs ---- */
.candle-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

@keyframes candle-waver {
  0%        { transform: scale(1) translateY(0) rotate(0deg);   opacity: 0.5; }
  20%       { transform: scale(1.06) translateY(-3px) rotate(1deg); opacity: 0.7; }
  45%       { transform: scale(0.96) translateY(2px) rotate(-2deg); opacity: 0.45; }
  65%       { transform: scale(1.04) translateY(-2px) rotate(1deg); opacity: 0.65; }
  85%       { transform: scale(0.98) translateY(1px) rotate(-1deg); opacity: 0.55; }
  100%      { transform: scale(1) translateY(0) rotate(0deg);   opacity: 0.5; }
}

/* ---- Blood Splatter Stains ---- */
.blood-stain {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, #6b0000 0%, #4a0000 40%, transparent 75%);
  mix-blend-mode: multiply;
}

/* ---- Atmospheric Mist at section bottoms ---- */
.horror-section-mist {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(to top, rgba(4,4,4,0.7) 0%, transparent 100%);
}

/* ---- Horror section separator skull icon ---- */
.horror-sep {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  margin: 0 auto;
}

.horror-sep::before,
.horror-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,0,0,0.6), rgba(201,168,76,0.4));
}

.horror-sep::after {
  background: linear-gradient(to left, transparent, rgba(139,0,0,0.6), rgba(201,168,76,0.4));
}

/* ---- Floating text flicker (apply to .flicker class) ---- */
@keyframes candle-text-flicker {
  0%, 100% { opacity: 1; }
  4%        { opacity: 0.94; }
  8%        { opacity: 1; }
  16%       { opacity: 0.82; }
  17%       { opacity: 1; }
  26%       { opacity: 0.92; }
  30%       { opacity: 1; }
  72%       { opacity: 1; }
  73%       { opacity: 0.78; }
  75%       { opacity: 1; }
  92%       { opacity: 0.96; }
}

.flicker {
  animation: candle-text-flicker 7s linear infinite;
}

/* ---- Blood drip line (thin red glow at top of simple sections) ---- */
.blood-line-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #4a0000 15%, #7a0000 35%, #5a0000 50%, #7a0000 65%, #4a0000 85%, transparent 100%);
  box-shadow: 0 0 18px rgba(80,0,0,0.9), 0 0 40px rgba(60,0,0,0.5), 0 2px 6px rgba(0,0,0,0.8);
  animation: blood-line-pulse 4s ease-in-out infinite;
}

@keyframes blood-line-pulse {
  0%, 100% { opacity: 0.8; box-shadow: 0 0 12px rgba(80,0,0,0.7), 0 2px 6px rgba(0,0,0,0.8); }
  50%       { opacity: 1;   box-shadow: 0 0 28px rgba(100,0,0,1), 0 0 55px rgba(80,0,0,0.4), 0 2px 6px rgba(0,0,0,0.9); }
}

/* ---- Crow / Bat silhouette (canvas-drawn) ---- */
/* Handled purely in JS canvas */

/* ---- Section overlay for atmosphere ---- */
.horror-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 25% 18% at 4% 85%, rgba(139,0,0,0.07) 0%, transparent 100%),
    radial-gradient(ellipse 20% 25% at 96% 15%, rgba(139,0,0,0.05) 0%, transparent 100%);
}

/* ---- Skull separator icon (inline, înlocuiește –) ---- */
.skull-sep {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin: 0 4px;
  opacity: 0.85;
  filter: brightness(0) invert(1) sepia(1) saturate(8) hue-rotate(330deg) brightness(0.72);
}

/* Skull separator mai mic între coloane (level-row) */
.level-skull-sep {
  display: block;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.45;
  filter: brightness(0) invert(1) sepia(0.6) brightness(0.55);
}

/* ---- Card corner — pânză de păianjen ---- */
.card-web-deco {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  width: 90px;
  height: 90px;
  opacity: 0.3;
  overflow: hidden;
  border-radius: inherit;
}
.card-web-deco.tl { top: 0; left: 0; border-radius: var(--radius) 0 0 0; }
.card-web-deco.tr { top: 0; right: 0; transform: scaleX(-1); border-radius: var(--radius) 0 0 0; }
.card-web-deco.bl { bottom: 0; left: 0; transform: scaleY(-1); border-radius: var(--radius) 0 0 0; }
.card-web-deco.br { bottom: 0; right: 0; transform: scale(-1,-1); border-radius: var(--radius) 0 0 0; }

/* ---- Card corner — craniu mic ---- */
.card-skull-deco {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  width: 26px;
  height: 26px;
  opacity: 0.22;
  filter: brightness(0) invert(1) sepia(0.5) brightness(0.55);
}
.card-skull-deco img { width: 100%; height: 100%; display: block; }
.card-skull-deco.tl { top: 10px; left: 10px; }
.card-skull-deco.tr { top: 10px; right: 10px; }
.card-skull-deco.bl { bottom: 10px; left: 10px; }
.card-skull-deco.br { bottom: 10px; right: 10px; }

/* ---- Skull centrat pe linia separator din card header ---- */
.price-card-header { position: relative; }
.faq-item          { position: relative; }

.header-skull-divider {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 22px;
  height: 22px;
  background: #0e0e0e;
  border-radius: 50%;
  border: 1px solid var(--border, #1e1a14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  box-sizing: border-box;
}
.header-skull-divider img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(330deg) brightness(0.65);
  opacity: 0.75;
}

/* ---- Responsive: hide subtle decorations on small screens ---- */
@media (max-width: 768px) {
  .horror-skull  { opacity: 0.18 !important; }
  .horror-bone   { opacity: 0.12 !important; }
  .horror-spider-web { opacity: 0.28 !important; }
  .card-web-deco { opacity: 0.15 !important; }
  .card-skull-deco { opacity: 0.12 !important; }
}

/* ============================================================
   HORROR EXTRAS: Cursor, Blood Bar, Click, Fog, Ravens etc.
   ============================================================ */

/* ── 1. Custom cursor ──────────────────────────────────────── */
#horror-cursor {
  position: fixed;
  width: 24px; height: 24px;
  pointer-events: none;
  z-index: 999999;
  left: 0; top: 0;
  background: url('assets/skull.svg') center/contain no-repeat;
  filter: brightness(0) invert(1) sepia(1) saturate(8) hue-rotate(330deg) brightness(0.75);
  transition: opacity 0.15s;
  will-change: transform;
}
.cursor-blood-drop {
  position: fixed;
  width: 6px; height: 8px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(ellipse at 38% 30%, #cc1100 0%, #7a0000 70%);
  pointer-events: none;
  z-index: 999997;
  left: 0; top: 0;
  opacity: 0;
  box-shadow: 0 0 5px rgba(139,0,0,0.7);
  will-change: transform, opacity;
}

/* ── 7. Blood scroll progress bar ─────────────────────────── */
#blood-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #3a0000, #8b0000 40%, #cc0000 80%, #ff2200);
  z-index: 99994;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(139,0,0,0.9), 0 0 22px rgba(80,0,0,0.5);
  transition: width 0.06s linear;
}
#blood-progress::after {
  content: '';
  position: absolute;
  right: -1px; top: 3px;
  width: 3px; height: 0;
  background: linear-gradient(to bottom, #cc0000, transparent);
  border-radius: 0 0 3px 3px;
  animation: blood-drip-tip 2.2s ease-in-out infinite;
}
@keyframes blood-drip-tip {
  0%        { height: 0;   opacity: 1; }
  55%       { height: 20px; opacity: 1; }
  85%       { height: 28px; opacity: 0.4; }
  100%      { height: 32px; opacity: 0; }
}

/* ── 11. Section occult dividers ───────────────────────────── */
.horror-occult-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 24px;
  position: relative;
  z-index: 5;
  pointer-events: none;
  background: transparent;
}
.horror-occult-divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,0,0,0.55), rgba(80,0,0,0.25));
}
.horror-occult-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(139,0,0,0.55), rgba(80,0,0,0.25));
}

/* ── 12. FAQ blood number drop ─────────────────────────────── */
.faq-num { overflow: visible !important; position: relative; }
.faq-blood-drop-el {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 0;
  background: #8b0000;
  border-radius: 0 0 50% 50%;
  pointer-events: none;
  animation: faq-drop-anim 4.5s ease-in infinite;
}
@keyframes faq-drop-anim {
  0%,18%   { height: 0;   opacity: 0; }
  45%      { height: 13px; opacity: 0.85; }
  72%      { height: 17px; opacity: 0.5; }
  88%,100% { height: 0;   opacity: 0; }
}

/* ── 4. Fog canvas ─────────────────────────────────────────── */
.section-fog-cv {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.75;
}

/* ── 3. Sticky buttons skull pe mobil ─────────────────────── */
@media (max-width: 768px) {
  .sticky-btn i { display: none; }
  .sticky-btn::after {
    content: '';
    display: block;
    width: 26px;
    height: 26px;
    background: url('../skull.svg') center/contain no-repeat;
    filter: brightness(0) invert(1);
  }
}

/* ── 6. Calendar skull pe zile ─────────────────────────────── */
.cal-day { position: relative; }
.cal-skull-icon {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  opacity: 0.18;
  filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(330deg) brightness(0.65);
  pointer-events: none;
  display: block;
}
.cal-day.selected .cal-skull-icon,
.cal-day:hover .cal-skull-icon {
  opacity: 0.45;
}
