/* ==========================================================================
   eminationHorror — shared site stylesheet
   Dark cinematic horror theme with layered animation.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #05030a;
  --panel: rgba(15, 7, 12, .72);
  --panel-solid: #0d060b;
  --ink: #ece0df;
  --muted: #a68f92;
  --dim: #6f585c;
  --red: #ff2e22;
  --red-soft: #ff6a5e;
  --red-deep: #4a0101;
  --line: #3d1018;
  --line-soft: #260b11;
  --glow: rgba(255, 45, 30, .55);
  --mono: Consolas, "Courier New", ui-monospace, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --maxw: 1060px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 46, 34, .38); color: #fff; }
a { color: var(--red-soft); }
img { max-width: 100%; }

/* --------------------------------------------------------------------------
   Atmosphere layers (fixed behind content)
   -------------------------------------------------------------------------- */
.bg-gradient {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 12%, rgba(130, 10, 12, .20), transparent 62%),
    radial-gradient(55% 45% at 82% 26%, rgba(70, 4, 30, .22), transparent 62%),
    radial-gradient(60% 55% at 55% 92%, rgba(6, 16, 34, .30), transparent 62%),
    linear-gradient(180deg, #05030a 0%, #070310 60%, #04020a 100%);
}
.fog {
  position: fixed; inset: -25%; z-index: -3; pointer-events: none;
  mix-blend-mode: screen; filter: blur(22px);
  background:
    radial-gradient(40% 30% at 25% 25%, rgba(150, 20, 15, .10), transparent 65%),
    radial-gradient(45% 35% at 75% 35%, rgba(80, 5, 40, .12), transparent 65%),
    radial-gradient(40% 30% at 55% 80%, rgba(20, 30, 60, .14), transparent 65%);
  animation: fogA 42s ease-in-out infinite alternate;
}
.fog.b { opacity: .7; animation: fogB 60s ease-in-out infinite alternate; }
@keyframes fogA { from { transform: translate3d(-5%, -3%, 0) scale(1.02); } to { transform: translate3d(5%, 4%, 0) scale(1.12); } }
@keyframes fogB { from { transform: translate3d(4%, 3%, 0) scale(1.10); } to { transform: translate3d(-4%, -4%, 0) scale(1.00); } }

#embers { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 42%, transparent 38%, rgba(2, 0, 4, .86) 100%);
}

.scan {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
  mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 4px);
}
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .07), transparent);
  animation: sweep 7.5s linear infinite;
}
@keyframes sweep { from { top: -40%; } to { top: 100%; } }

.grain {
  position: fixed; inset: 0; z-index: 59; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift .6s steps(2) infinite;
}
@keyframes grainShift { 0% { transform: translate(0, 0); } 50% { transform: translate(-2%, 2%); } 100% { transform: translate(2%, -1%); } }

/* mouse spotlight */
.spotlight {
  position: fixed; z-index: 0; width: 520px; height: 520px; border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle, rgba(255, 70, 40, .10), transparent 62%);
  transform: translate(-50%, -50%);
}
body.pointer .spotlight { opacity: 1; }

/* full-screen glitch flash */
.glitch-flash {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 0, 0, .08), transparent 40%, rgba(0, 200, 255, .06));
}
body.glitching .glitch-flash { animation: glitchFlash .28s steps(2) 1; }
@keyframes glitchFlash { 0%, 100% { opacity: 0; } 30% { opacity: 1; } 60% { opacity: .3; } }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; position: relative; z-index: 2; }
.narrow { max-width: 760px; }

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  z-index: 40; background: linear-gradient(90deg, var(--red), #ff9a3c);
  box-shadow: 0 0 12px var(--glow);
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(6, 3, 10, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(120, 10, 10, .45);
  padding: 12px 22px; display: flex; align-items: center; gap: 14px;
}
.nav .logo {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #ff5544, #5c0000);
  display: grid; place-items: center; font-size: 21px;
  box-shadow: 0 0 18px var(--glow); animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 14px var(--glow); } 50% { box-shadow: 0 0 28px rgba(255, 45, 20, .8); } }
.nav .brand { font-family: var(--mono); letter-spacing: 2px; font-size: 15px; color: #f5ecec; }
.nav .brand span { color: var(--red); }
.nav .sp { flex: 1; }
.nav a.pg {
  position: relative; color: #9d8f8f; font-size: 13px; margin: 0 8px;
  text-decoration: none; letter-spacing: .4px; transition: color .2s;
}
.nav a.pg::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--red-soft); transition: width .25s var(--ease);
}
.nav a.pg:hover { color: var(--red-soft); }
.nav a.pg:hover::after { width: 100%; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-block; overflow: hidden;
  background: linear-gradient(160deg, #a01212, #4a0101); color: #ffe;
  font-weight: 700; font-size: 15px; padding: 13px 30px; border-radius: 6px;
  text-decoration: none; letter-spacing: 1px; border: 1px solid rgba(255, 80, 60, .55);
  box-shadow: 0 0 22px rgba(200, 20, 10, .35), inset 0 0 14px rgba(255, 60, 40, .18);
  transition: transform .2s var(--ease), box-shadow .25s;
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-18deg); transition: left .55s var(--ease);
}
.btn:hover::before { left: 140%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(255, 40, 20, .75), inset 0 0 22px rgba(255, 60, 40, .3); }
.btn.ghost { background: transparent; border: 1px solid #4a2430; color: #c9b8b8; box-shadow: none; }
.btn.ghost:hover { border-color: #a03a3a; box-shadow: 0 0 18px rgba(160, 20, 20, .35); }
.btn .arw { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; text-align: center; padding: 92px 20px 52px; }
.hero .kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 4px; color: var(--red-soft);
  text-transform: uppercase; opacity: 0; animation: fadeUp .8s .1s var(--ease) forwards;
}
.hero .title {
  position: relative; margin: 12px 0 0; font-family: var(--mono);
  font-size: clamp(34px, 8vw, 58px); letter-spacing: 6px; color: #e8dcdc;
  text-shadow: 0 0 6px rgba(255, 40, 30, .9), 0 0 24px rgba(255, 20, 10, .55), 0 0 60px rgba(160, 0, 0, .5);
  animation: flick 5s linear infinite;
}
.hero .title span { color: var(--red); }
/* glitch clones */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  overflow: hidden; clip-path: inset(0 0 0 0);
}
.glitch::before { color: #00e5ff; transform: translate(-2px, 0); animation: glitchTop 3.4s steps(2) infinite; opacity: .8; }
.glitch::after { color: var(--red); transform: translate(2px, 0); animation: glitchBot 2.8s steps(2) infinite; opacity: .85; }
@keyframes glitchTop { 0%, 92%, 100% { clip-path: inset(0 0 100% 0); } 93% { clip-path: inset(0 0 62% 0); } 95% { clip-path: inset(12% 0 40% 0); } 97% { clip-path: inset(0 0 78% 0); } }
@keyframes glitchBot { 0%, 90%, 100% { clip-path: inset(100% 0 0 0); } 91% { clip-path: inset(58% 0 0 0); } 94% { clip-path: inset(30% 0 10% 0); } 96% { clip-path: inset(80% 0 0 0); } }
@keyframes flick { 0%, 7%, 9%, 100% { opacity: 1; } 8% { opacity: .55; } 46% { opacity: 1; } 47% { opacity: .68; } 48% { opacity: 1; } }

.hero .sub { color: #b59f9f; font-size: 17px; max-width: 660px; margin: 16px auto 0; }
.hero .sub b { color: var(--red-soft); }
.hero .sub .dark { color: var(--red); }

.chip {
  display: inline-block; margin: 18px 5px 0; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; background: rgba(20, 5, 12, .75); border: 1px solid #5c1620;
  color: #d9b7b3; letter-spacing: .4px;
}
.chip b { color: var(--red-soft); }

.stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 30px 0 6px; }
.stat {
  background: rgba(16, 6, 10, .7); border: 1px solid #47121c; border-radius: 8px;
  padding: 12px 22px; min-width: 132px; transition: transform .25s var(--ease), border-color .25s;
}
.stat:hover { transform: translateY(-3px); border-color: #8a1b24; }
.stat .n { font-size: 20px; font-weight: 800; color: #f0e2e0; text-shadow: 0 0 10px rgba(255, 40, 25, .4); }
.stat .l { font-size: 10px; color: var(--dim); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }

.cta { margin: 28px 0 8px; }
.fine { font-size: 12px; color: #5c4a4a; margin-top: 12px; font-family: var(--mono); letter-spacing: .4px; }

/* animated whisper ticker */
.ticker {
  position: relative; overflow: hidden; margin: 30px 0 0; padding: 9px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker .track { display: inline-flex; gap: 48px; white-space: nowrap; animation: marquee 38s linear infinite; }
.ticker span { font-family: var(--mono); font-size: 12px; color: #6b5256; letter-spacing: 2px; }
.ticker span i { color: var(--red-soft); font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 30px; margin: 24px 0;
  box-shadow: 0 10px 44px rgba(0, 0, 0, .5); backdrop-filter: blur(6px);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 50, 30, .07) 0%, transparent 32%);
}
.card:hover { border-color: #58161f; box-shadow: 0 16px 60px rgba(60, 0, 0, .35); }
.card h2 {
  margin: 0 0 8px; color: #efe3e1; font-family: var(--mono); letter-spacing: 2px;
  font-size: 21px; position: relative; display: inline-block;
}
.card h2::before { content: "\25B8 "; color: var(--red); }
.card h2::after {
  content: ""; display: block; height: 2px; width: 0; margin-top: 6px;
  background: linear-gradient(90deg, var(--red), transparent); transition: width .6s var(--ease);
}
.card:hover h2::after { width: 100%; }
.card .lead { color: #a68f92; font-size: 14px; margin: 0 0 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.feat {
  position: relative; background: rgba(10, 5, 9, .8); border: 1px solid #33101a;
  border-radius: 9px; padding: 18px; transform-style: preserve-3d;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.feat:hover { border-color: #8a1b24; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(80, 0, 0, .3); }
.feat .ic { font-size: 22px; margin-bottom: 8px; filter: drop-shadow(0 0 8px rgba(255, 40, 20, .5)); }
.feat b { color: #efe0dd; letter-spacing: .4px; }
.feat p { margin: 8px 0 0; font-size: 13px; color: #967f82; }

.tag {
  background: rgba(20, 6, 12, .85); color: #d8b5b0; border: 1px solid #571522;
  border-radius: 5px; padding: 5px 12px; font-size: 12px; display: inline-block;
  margin: 5px 4px 0 0; transition: transform .2s var(--ease), border-color .2s, color .2s;
}
.tag:hover { transform: translateY(-2px); border-color: var(--red); color: #ffd9d3; }

pre {
  background: #0a0409; border: 1px solid #3a0f16; border-radius: 8px; padding: 15px;
  overflow: auto; font-size: 13px; color: #d9c0be; font-family: var(--mono);
}
code {
  background: rgba(30, 8, 12, .9); border-radius: 4px; padding: 1px 7px;
  font-size: 12px; border: 1px solid #4a1420; color: #ffb3a6;
}

ol.steps { padding-left: 0; counter-reset: si; list-style: none; }
ol.steps li {
  margin: 14px 0; font-size: 14px; position: relative; padding-left: 40px; color: #cbb8b4;
}
ol.steps li::before {
  counter-increment: si; content: counter(si, decimal-leading-zero);
  position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 5px;
  display: grid; place-items: center; font-size: 11px; font-family: var(--mono);
  color: var(--red-soft); border: 1px solid #6e1621; background: rgba(60, 5, 10, .6);
  transition: transform .25s var(--ease), box-shadow .25s;
}
ol.steps li:hover::before { transform: scale(1.12); box-shadow: 0 0 14px var(--glow); }
ol.steps b { color: #f3e7e5; }

.warn {
  background: linear-gradient(90deg, rgba(90, 8, 8, .55), rgba(30, 4, 12, .55));
  border: 1px solid #7a1a10; border-radius: 8px; padding: 14px 18px;
  color: #ffd9c9; font-size: 13px; margin-top: 18px;
  position: relative; overflow: hidden;
}
.warn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 120, 80, .10), transparent 60%);
  transform: translateX(-100%); animation: warnSweep 4.5s ease-in-out infinite;
}
@keyframes warnSweep { 0%, 100% { transform: translateX(-100%); } 55% { transform: translateX(100%); } }
.warn b { color: #ff6a4a; }

.faq b { color: #f0e2e0; display: block; margin-top: 4px; }
.faq p { margin: 6px 0 16px; font-size: 13.5px; color: #a1878a; }

/* download list */
.dl {
  display: block; width: 100%; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #a01212, #4a0101); color: #ffe; font-weight: 700;
  padding: 15px; border-radius: 8px; text-decoration: none;
  border: 1px solid rgba(255, 80, 60, .55); margin: 10px 0;
  transition: transform .2s var(--ease), box-shadow .25s;
}
.dl:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(255, 40, 20, .6); }
.dl .sz { color: #ffcdc4; font-weight: 500; }

.vid { position: relative; padding-top: 56.25%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid #2c0e12; margin-top: 40px; padding: 30px 22px 40px;
  text-align: center; color: #5a4747; font-size: 12px; position: relative; z-index: 2;
}
.footer a { color: #7a5a55; text-decoration: none; transition: color .2s; }
.footer a:hover { color: #b33c32; }
.footer b { color: var(--red); animation: flick 6s linear infinite; }

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Responsive + reduced motion
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .nav { gap: 8px; padding: 10px 14px; }
  .nav a.pg { display: none; }
  .hero { padding: 64px 16px 40px; }
  .card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  #embers, .scan, .grain { display: none; }
}
