@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&family=Cinzel:wght@400;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #050505;
  --surface:  #0d0d0d;
  --border:   #1a1a1a;
  --red:      #8b0000;
  --red-glow: #c0000088;
  --bone:     #c8b89a;
  --muted:    #5a5a5a;
  --text:     #d4c9b8;

  /* particle variables — значения устанавливаются через JS */
  --dur:   8s;
  --delay: 0s;
  --dx:    30px;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Cinzel', serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  cursor: url('red.png'), auto;
}

/* ── ФОНОВЫЙ УЗОР ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 60px, #0f0f0f 60px, #0f0f0f 61px),
    repeating-linear-gradient(90deg,  transparent, transparent 60px, #0f0f0f 60px, #0f0f0f 61px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── ЧАСТИЦЫ ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0;
  animation-name: drift;
  animation-duration: var(--dur, 8s);
  animation-delay: var(--delay, 0s);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in;
}

@keyframes drift {
  0%   { transform: translateY(100vh) translateX(0);      opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-10vh) translateX(var(--dx, 30px)); opacity: 0; }
}

/* ── СВЕЧИ ── */
.candles {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 8vw;
  pointer-events: none;
  z-index: 2;
}

.candle {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wax {
  width: 18px;
  height: 90px;
  background: linear-gradient(to bottom, #e8e0d0, #b0a898);
  border-radius: 3px 3px 2px 2px;
  position: relative;
}

.wax::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: #333;
  border-radius: 2px;
}

.flame {
  width: 12px;
  height: 22px;
  background: radial-gradient(ellipse at 50% 80%, #fff 0%, #ffe066 30%, #ff6600 65%, transparent 100%);
  border-radius: 50% 50% 30% 30%;
  filter: blur(1px);
  animation: flicker 1.8s ease-in-out infinite alternate;
  position: relative;
  z-index: 3;
  margin-bottom: -2px;
}

@keyframes flicker {
  0%   { transform: scaleX(1)   scaleY(1)    rotate(-1deg); opacity: 0.95; }
  25%  { transform: scaleX(0.9) scaleY(1.05) rotate(1deg);  opacity: 1;    }
  50%  { transform: scaleX(1.1) scaleY(0.95) rotate(-2deg); opacity: 0.9;  }
  75%  { transform: scaleX(0.95)scaleY(1.02) rotate(1.5deg);opacity: 1;    }
  100% { transform: scaleX(1)   scaleY(1.03) rotate(-0.5deg);opacity: 0.95;}
}

/* ── ОСНОВНОЙ БЛОК ── */
.container {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 640px;
  width: 100%;
}

/* ── ДЕКОРАТИВНЫЕ ЧЕРЕПА ── */
.skull-deco {
  position: absolute;
  font-size: 3rem;
  opacity: 0.4;
  top: 0;
  color: var(--bone);
  animation: sway 6s ease-in-out infinite alternate;
}

.skull-left  { left: -1rem; animation-delay: 0s; }
.skull-right { right: -1rem; animation-delay: 1.5s; transform: scaleX(-1); }

@keyframes sway {
  from { transform: rotate(-8deg); }
  to   { transform: rotate(8deg);  }
}
.skull-right {
  animation-name: swayR;
}
@keyframes swayR {
  from { transform: scaleX(-1) rotate(-8deg); }
  to   { transform: scaleX(-1) rotate(8deg);  }
}

/* ── ГЛАВНЫЙ ЧЕРЕП ── */
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.skull-main {
  font-size: 6rem;
  line-height: 1;
  color: var(--bone);
  text-shadow:
    0 0 20px var(--red-glow),
    0 0 60px var(--red-glow);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 20px var(--red-glow), 0 0 60px var(--red-glow); }
  50%       { text-shadow: 0 0 40px #c00000bb, 0 0 100px #c00000aa; }
}

/* ── ЛОГОТИП ── */
.logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bone);
  text-shadow:
    0 0 10px var(--red-glow),
    0 2px 4px #000;
  line-height: 1;
}

.logo .dot {
  color: var(--red);
  font-size: 0.75em;
}

/* ── РАЗДЕЛИТЕЛЬ ── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.4rem 0;
  color: var(--red);
  font-size: 0.6rem;
  opacity: 0.6;
}

/* ── ТЕКСТ ── */
.tagline {
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 0.6rem;
}

.sub {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-style: italic;
}

/* ── КОНТАКТ ── */
.contact {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.contact a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

.contact a:hover {
  color: #ff3333;
  text-shadow: 0 0 8px #ff000088;
}

/* ── ПОДВАЛ ── */
footer {
  position: relative;
  z-index: 10;
  padding: 1.5rem;
  font-size: 0.7rem;
  color: var(--border);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── ВИНЬЕТКА ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, #000 100%);
  pointer-events: none;
  z-index: 5;
}
