/* ── Megumin Theme ────────────────────────────────────── */

:root {
  --bg: #0a0608;
  --crimson: #b91c1c;
  --crimson-light: #dc2626;
  --crimson-glow: rgba(185, 28, 28, 0.4);
  --gold: #b45309;
  --amber: #d97706;
  --text: #fef2e8;
  --text-dim: #a8968a;
  --text-kana: rgba(185, 28, 28, 0.15);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ── Page layout ─────────────────────────────────────── */

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(1.5rem, 6vh, 4rem);
}

/* atmospheric radial glows */
.page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(185, 28, 28, 0.1) 0%, transparent 100%),
    radial-gradient(ellipse 50% 40% at 15% 15%, rgba(180, 83, 9, 0.05) 0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 85% 30%, rgba(185, 28, 28, 0.04) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Hero section ────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
}

.hero__kana {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--text-kana);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  margin-bottom: 0.25rem;
  user-select: none;
}

.hero__title {
  font-family: 'Cinzel', serif;
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  padding-left: 0.1em;
  line-height: 1;
  color: var(--text);
  text-shadow:
    0 0 40px var(--crimson-glow),
    0 0 80px rgba(185, 28, 28, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.6);
  animation: title-pulse 5s ease-in-out infinite alternate;
}

@keyframes title-pulse {
  from {
    text-shadow:
      0 0 30px rgba(185, 28, 28, 0.3),
      0 0 60px rgba(185, 28, 28, 0.12),
      0 4px 12px rgba(0, 0, 0, 0.6);
  }
  to {
    text-shadow:
      0 0 50px rgba(185, 28, 28, 0.5),
      0 0 100px rgba(185, 28, 28, 0.2),
      0 4px 12px rgba(0, 0, 0, 0.6);
  }
}

.hero__subtitle {
  font-size: clamp(0.7rem, 2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 1rem;
}

.hero__divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
  margin: 1.75rem auto;
  opacity: 0.5;
}

.hero__quote {
  font-style: italic;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  color: var(--text-dim);
  opacity: 0.55;
  line-height: 1.7;
  border: none;
  padding: 0;
}

.hero__quote a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(180, 83, 9, 0.5);
}

.hero__quote a:visited {
  color: #d08a3d;
}

.hero__quote a:hover,
.hero__quote a:focus-visible {
  color: var(--amber);
  text-decoration-color: var(--amber);
}

/* ── Floating embers ─────────────────────────────────── */

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ember {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  bottom: -10px;
  opacity: 0;
  animation: rise linear infinite;
}

.ember:nth-child(1) { left: 8%;  animation-duration: 11s; animation-delay: 0s;   background: rgba(220, 38, 38, 0.6); }
.ember:nth-child(2) { left: 25%; animation-duration: 14s; animation-delay: 2s;   background: rgba(217, 119, 6, 0.4); width: 2px; height: 2px; }
.ember:nth-child(3) { left: 45%; animation-duration: 12s; animation-delay: 5s;   background: rgba(220, 38, 38, 0.5); }
.ember:nth-child(4) { left: 62%; animation-duration: 15s; animation-delay: 1.5s; background: rgba(217, 119, 6, 0.35); width: 2px; height: 2px; }
.ember:nth-child(5) { left: 78%; animation-duration: 13s; animation-delay: 3.5s; background: rgba(220, 38, 38, 0.45); }
.ember:nth-child(6) { left: 92%; animation-duration: 16s; animation-delay: 7s;   background: rgba(217, 119, 6, 0.3); width: 2px; height: 2px; }

@keyframes rise {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(1); }
  8%   { opacity: 0.7; }
  50%  { transform: translateY(-50vh) translateX(15px) scale(0.8); }
  85%  { opacity: 0.15; }
  100% { opacity: 0; transform: translateY(-105vh) translateX(-10px) scale(0.2); }
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem;
  }

  .hero__kana {
    letter-spacing: 0.3em;
  }
}
