/* ═══════════════════════════════════════════════════════
   MONSTROUS LEGENDS — Blightened Site Styles
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:           #0a0a0c;
  --bg-card:      #111116;
  --bg-nav:       rgba(8, 8, 10, 0.92);
  --accent:       #e02020;
  --accent-dim:   #9e1515;
  --text:         #e8e8ec;
  --text-muted:   #888899;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --shadow:       0 8px 40px rgba(0,0,0,0.7);
  --radius:       6px;
  --font-display: 'Cinzel', serif;
  --font-body:    'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  padding-top: 60px; /* clear fixed nav */
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ═══════════════════════ NAV ═══════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
}

.nav-logo-text-img {
  height: 18px;
  width: auto;
  object-fit: contain;
  /* white logo on dark nav — no filter needed */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active { color: #fff; }

.nav-link.active {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
  position: relative;
  height: 68vh;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.85) saturate(1.2);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.1) 40%,
    rgba(10,10,12,0.85) 80%,
    rgba(10,10,12,1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px 48px;
}

.hero-archives-hint {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(190, 120, 255, 0.75);
  text-transform: uppercase;
}

.hero-archives-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(180, 80, 255, 0.9);
  box-shadow: 0 0 8px rgba(180, 80, 255, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero-brand-logo {
  height: clamp(52px, 7vw, 84px);
  width: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 16px rgba(0,0,0,0.9));
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.6vw, 82px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0b0c4;
  margin-bottom: 20px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
  border: 1px solid rgba(255,255,255,0.7);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Hero CTA Row (button + social icons inline) ─── */
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Ambient Canvas ─── */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ─── Portal Glow Pulse ─── */
.hero-glow-pulse {
  position: absolute;
  top: 5%;
  right: 28%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 40, 230, 0.32) 0%, rgba(100, 20, 180, 0.10) 50%, transparent 72%);
  z-index: 1;
  pointer-events: none;
  animation: hero-glow 5s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { opacity: 0.6; transform: scale(1);    }
  50%       { opacity: 1;   transform: scale(1.22); }
}

/* ─── Fog Wisps ─── */
.hero-fog {
  position: absolute;
  bottom: 0;
  left: -20%;
  width: 140%;
  height: 45%;
  pointer-events: none;
  z-index: 1;
}

.hero-fog--a {
  background: linear-gradient(to top,
    rgba(10, 8, 20, 0.22) 0%,
    rgba(18, 8, 40, 0.06) 50%,
    transparent 100%
  );
  animation: fog-drift-a 22s ease-in-out infinite;
}

.hero-fog--b {
  background: linear-gradient(to top,
    rgba(30, 5, 50, 0.10) 0%,
    rgba(10, 5, 30, 0.04) 60%,
    transparent 100%
  );
  animation: fog-drift-b 30s ease-in-out infinite;
  animation-delay: -10s;
}

@keyframes fog-drift-a {
  0%   { transform: translateX(0)   scaleX(1);    opacity: 0.8; }
  50%  { transform: translateX(4%)  scaleX(1.03); opacity: 1;   }
  100% { transform: translateX(0)   scaleX(1);    opacity: 0.8; }
}

@keyframes fog-drift-b {
  0%   { transform: translateX(0)    scaleX(1);    opacity: 0.6; }
  50%  { transform: translateX(-3%)  scaleX(1.04); opacity: 0.9; }
  100% { transform: translateX(0)    scaleX(1);    opacity: 0.6; }
}

/* ─── Hero Social ─── */
.hero-social {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.hero-social-link {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hero-social-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.08);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  right: 48px;
  z-index: 2;
  opacity: 0.4;
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ═══════════════════════ GALLERY ═══════════════════════ */

/* ─── Library Bar (top-level collection switcher) ─── */
.library-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 48px 0;
  max-width: 1600px;
  margin: 28px auto 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.library-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  padding-right: 12px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
  align-self: center;
  padding-bottom: 14px;
}

.library-btn {
  position: relative;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 4px 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.library-btn:hover:not(:disabled) {
  color: #fff;
}

.library-btn.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.library-btn.locked {
  opacity: 0.45;
  cursor: default;
}

.library-coming {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 2px 7px;
  border: 1px solid rgba(180, 80, 255, 0.5);
  color: rgba(190, 120, 255, 0.8);
  border-radius: 2px;
  background: rgba(120, 30, 180, 0.15);
  vertical-align: middle;
}

.gallery-section {
  padding: 0 48px 60px;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 8px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
  align-self: center;
}

.filter-btn {
  padding: 7px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: #fff;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.monster-count {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ─── GRID ─── */
.monster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* ─── CARD ─── */
.monster-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.monster-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.monster-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
}

.monster-card:hover .monster-card-img {
  filter: brightness(0.55);
}

.monster-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.monster-card:hover .monster-card-overlay {
  opacity: 1;
}

.monster-card-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.monster-card-category {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ═══════════════════════ MODAL ═══════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 420px;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  background: #111116;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-hover);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ─── Image Pane ─── */
.modal-image-pane {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-category-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  background: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 2px;
}

/* ─── Lore Pane ─── */
.modal-lore-pane {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 28px;
  background: #111116;
}

.modal-publisher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.publisher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a22;
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.publisher-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.publisher-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.publisher-date {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-monster-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
}

.modal-lore-text {
  font-size: 14px;
  color: #bbbbc8;
  line-height: 1.8;
  white-space: pre-line;
}

/* ═══════════════════════ ARCHIVES TEASER ═══════════════════════ */
.archives-teaser {
  position: relative;
  padding: 100px 48px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(120, 20, 180, 0.18) 0%, transparent 70%),
              linear-gradient(to bottom, var(--bg) 0%, #0d0a14 50%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.archives-teaser::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 80px,
    rgba(255,255,255,0.015) 80px,
    rgba(255,255,255,0.015) 81px
  );
  pointer-events: none;
}

.archives-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.archives-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.archives-brand {
  height: 36px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(150, 50, 220, 0.5));
}

.archives-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow:
    0 0 60px rgba(140, 40, 200, 0.6),
    0 2px 20px rgba(0,0,0,0.9);
  line-height: 1;
  margin-bottom: 4px;
}

.archives-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 8px;
}

.archives-badge {
  margin-top: 24px;
  display: inline-block;
  padding: 8px 28px;
  border: 1px solid rgba(150, 50, 220, 0.6);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(190, 120, 255, 0.9);
  border-radius: 2px;
  background: rgba(120, 30, 180, 0.12);
}

/* ═══════════════════════ FOOTER ═══════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.footer-social-link:hover {
  color: #fff;
  border-color: var(--border-hover);
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 768px) {
  .hero-content { padding: 0 24px 64px; }

  .modal {
    grid-template-columns: 1fr;
    grid-template-rows: 280px 1fr;
  }

  .site-nav { padding: 0 20px; }
  .gallery-section { padding: 32px 24px 60px; }

  .monster-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .nav-logo-text { display: none; }
  .hero-title { font-size: 42px; }
}

/* ═══════════════════════ DEV BLOG PAGE ═══════════════════════ */
.page-header {
  padding: 120px 48px 48px;
  max-width: 900px;
}

.page-header-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
}

.page-header-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
}

.blog-section {
  padding: 0 48px 80px;
  max-width: 900px;
}

.blog-post {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.blog-post:last-child { border-bottom: 1px solid var(--border); }

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.blog-post-date {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.blog-post-tag {
  padding: 2px 10px;
  background: rgba(224,32,32,0.12);
  border: 1px solid rgba(224,32,32,0.3);
  border-radius: 2px;
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-post-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-post-body {
  font-size: 14px;
  color: #bbbbc8;
  line-height: 1.8;
}

.blog-post-read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent-dim);
  transition: color 0.2s;
}

.blog-post-read-more:hover { color: #ff4040; }
