/* ═══════════════════════════════════════════════════════════
   SoulsGuides — Valor Mortis (demo) Guide Hub
   Hoja de estilos dedicada y autocontenida (sin dependencias
   de otras páginas de juego). Prefijo de clases: .vm-
   ═══════════════════════════════════════════════════════════ */

/* ──── Page-level color palette ──── */
.page-valormortis {
  --bg:     #0b0907;
  --bg2:    #14100d;
  --bg3:    #1d1712;

  /* Brasa naranja (acento principal) */
  --gold:   #d97a3c;
  --gold-l: #ec9a5e;
  --gold-d: #9a4f23;

  /* Rojo sangre apagado */
  --crimson:    #7a2a24;
  --crimson-l:  #b8472f;
  --crimson-d:  #4a1813;

  --amber:      #d97a3c;
  --amber-l:    #ec9a5e;

  /* Humo de brasa (cálido) */
  --blue-acc:   #b56a4a;
  --blue-acc-l: #d98a5e;

  --text:   #a39a8f;
  --text-l: #ddd4c9;
  --white:  #f1ece4;

  --purple: #2a1820;

  --cursor-gold: #f07a32;
  --cursor-gold-l: #ff9a5a;
  --cursor-gold-d: #b04e1c;

  overflow-x: hidden;
}

/* ══════════════════════════════════════
   FLOATING EMBERS CANVAS
   ══════════════════════════════════════ */
#vm-embers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════
   HERO — Full-Screen Cinematic Banner
   ══════════════════════════════════════ */
.vm-hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(60px, 10vh, 120px);
  overflow: hidden;
}

.vm-hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
}

.vm-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.45) contrast(1.15) saturate(0.85);
  transform: scale(1.05);
  animation: vmHeroZoom 20s ease-in-out infinite alternate;
}

@keyframes vmHeroZoom {
  0%   { transform: scale(1.05); }
  100% { transform: scale(1.12); filter: brightness(0.42) contrast(1.18) saturate(0.8); }
}

.vm-hero-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    linear-gradient(180deg,
      rgba(11,9,7,0.4) 0%,
      rgba(11,9,7,0.1) 30%,
      rgba(11,9,7,0.55) 65%,
      rgba(11,9,7,0.96) 100%
    ),
    linear-gradient(90deg,
      rgba(11,9,7,0.75) 0%,
      transparent 50%,
      rgba(11,9,7,0.35) 100%
    );
  pointer-events: none;
}

.vm-hero-vignette {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  box-shadow: inset 0 0 200px 60px rgba(11,9,7,0.65);
  pointer-events: none;
}

.vm-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 var(--px);
  width: 100%;
}

/* Breadcrumb */
.vm-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.vm-breadcrumb a {
  color: var(--text);
  transition: color 0.3s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
}
.vm-breadcrumb a:hover { color: var(--gold); }
.vm-bread-sep { color: var(--gold-d); opacity: 0.5; }
.vm-bread-current { color: var(--gold); font-weight: 600; }

/* Badge */
.vm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  padding: 8px 18px;
  border: 1px solid rgba(217,122,60,0.22);
  border-radius: 100px;
  background: rgba(217,122,60,0.07);
  margin-bottom: 24px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.vm-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson-l);
  animation: dotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--crimson-l);
}

/* Title */
.vm-hero-title {
  font-family: var(--ff-d);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.vm-hero-title--compact {
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
}
.vm-title-main {
  font-family: var(--ff-d);
  font-weight: 900;
  color: var(--white);
  font-size: inherit;
}
.vm-title-sub-name {
  font-family: var(--ff-d);
  font-weight: 700;
  font-size: inherit;
  background: linear-gradient(135deg, var(--crimson-l) 0%, var(--gold) 50%, var(--crimson) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.vm-hero-sub {
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--text-l);
  max-width: 620px;
  margin-bottom: 32px;
  opacity: 0.85;
}

/* Hide hero animated elements until GSAP takes over — prevents FOUC */
.vm-breadcrumb,
.vm-hero-badge,
.vm-hero-sub,
.vm-meta-item,
.vm-meta-sep,
.vm-hero-scroll { visibility: hidden; }

/* Meta strip */
.vm-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.vm-meta-item { display: flex; align-items: center; gap: 10px; }
.vm-meta-icon { color: var(--gold); opacity: 0.7; flex-shrink: 0; }
.vm-meta-text { display: flex; flex-direction: column; gap: 1px; }
.vm-meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  opacity: 0.6;
}
.vm-meta-val {
  font-family: var(--ff);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.vm-meta-sep { width: 1px; height: 32px; background: rgba(217,122,60,0.18); }

/* Buttons */
.vm-btn-primary {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-l));
  color: var(--white);
  border: 1px solid rgba(184,71,47,0.3);
}
.vm-btn-primary:hover {
  background: linear-gradient(135deg, var(--crimson-l), var(--crimson));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(122,42,36,0.35);
}
.vm-btn-ghost { border-color: rgba(217,122,60,0.25); }

/* Scroll indicator */
.vm-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.vm-scroll-arrow {
  color: var(--gold-d);
  opacity: .6;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 768px) {
  .vm-hero { align-items: center; padding-bottom: 80px; padding-top: 100px; }
  .vm-hero-meta { gap: 12px; }
  .vm-meta-sep { display: none; }
  .vm-hero-scroll { display: none; }
}

/* ══════════════════════════════════════
   GUIDE HUB — Section Cards Grid
   ══════════════════════════════════════ */
.vm-hub {
  position: relative;
  z-index: 2;
  padding: var(--sec) 0;
  padding-bottom: 60px;
  background: var(--bg);
  overflow: visible;
}

/* Separator style for this page */
.page-valormortis .sec-sep svg {
  margin-top: -60px;
  margin-bottom: 0;
}
.vm-hub > .sec-sep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  height: 0;
}
.vm-hub > .sec-sep svg {
  margin-top: -60px;
  margin-bottom: 0;
}

.vm-hub-particles {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vm-hub > .wrap { position: relative; z-index: 1; }

.vm-hub-head { text-align: center; margin-bottom: 56px; }
.vm-hub-title {
  font-family: var(--ff-d);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}
.vm-hub-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--white) 0%, var(--blue-acc) 25%, #e0843a 50%, var(--crimson-l) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.vm-hub-sub {
  font-size: 16px;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.vm-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* ── Card Base ── */
.vm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--bg2);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: pointer;
  height: 100%;
}
.vm-card:hover {
  border-color: rgba(217,122,60,0.22);
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px -10px rgba(11,9,7,0.55),
    0 0 40px -10px rgba(122,42,36,0.1);
}
.vm-card--featured { grid-column: span 1; }

/* ── Card Body ── */
.vm-card-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.vm-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 10px;
}
.vm-card-body h3 {
  font-family: var(--ff);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.25;
  transition: color 0.3s;
}
.vm-card:hover .vm-card-body h3 { color: var(--gold-l); }
.vm-card-body p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}
.vm-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: auto;
}
.vm-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff);
  font-weight: 700;
  color: var(--crimson-l);
  letter-spacing: 0.05em;
  transition: all 0.3s;
}
.vm-card:hover .vm-card-arrow {
  letter-spacing: 0.12em;
  color: var(--gold);
}

@media (max-width: 1024px) {
  .vm-hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .vm-hub-grid { grid-template-columns: 1fr; }
  .vm-card--featured { grid-column: span 1; }
}

/* ══════════════════════════════════════
   CTA — Final Call to Action
   ══════════════════════════════════════ */
.vm-cta {
  position: relative;
  z-index: 2;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible;
  background: var(--bg);
}
.vm-cta > .sec-sep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  height: 0;
}
.vm-cta > .sec-sep svg {
  margin-top: -60px;
  margin-bottom: 0;
}
#vm-cta-embers {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.vm-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: var(--sec) var(--px);
}
.vm-cta-title {
  font-family: var(--ff-d);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}
.vm-cta-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--white) 0%, var(--blue-acc) 25%, #e0843a 50%, var(--crimson-l) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.vm-cta-desc {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 36px;
}
.vm-cta-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════
   MICRO-ANIMATIONS & POLISH
   ══════════════════════════════════════ */
.vm-hub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 2px;
  background: radial-gradient(ellipse, rgba(122,42,36,0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.vm-hub::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(122,42,36,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 70%, rgba(217,122,60,0.03) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 90%, rgba(181,106,74,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.vm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(217,122,60,0.04), transparent);
  transition: left 0.8s;
  z-index: 1;
  pointer-events: none;
}
.vm-card:hover::before { left: 100%; }

.vm-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 500px) {
  .vm-hero-badge { font-size: 10px; padding: 6px 14px; }
  .vm-card-body { padding: 20px 20px 24px; }
}

/* ════════════════════════════════════════════════════════
   BOSS EDIT MODE — Card edit button & Modal
   ════════════════════════════════════════════════════════ */

.boss-card-edit-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(217,122,60,.25);
  background: rgba(11,9,7,.85);
  color: var(--gold);
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity .2s, background .2s, border-color .2s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.boss-card:hover .boss-card-edit-btn,
.boss-card-edit-btn:focus-visible { opacity: 1; }
.boss-card-edit-btn:hover {
  background: rgba(217,122,60,.15);
  border-color: var(--gold);
}

/* Catalizadores bar color */
.boss-card-hp-fill--cat {
  background: var(--gold) !important;
}

/* Boss card visual — image fills area */
.boss-card-visual {
  position: relative;
  overflow: hidden;
}
.boss-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Beta badge overlay */
.boss-card-chapter-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(11,9,7,.75);
  border: 1px solid rgba(217,122,60,.3);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 2;
  pointer-events: none;
}

/* Edit Modal */
.boss-edit-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.boss-edit-modal.is-open { opacity: 1; visibility: visible; }

.boss-edit-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.boss-edit-container {
  position: relative;
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(145deg, var(--bg3, #1d1712), var(--bg, #0b0907));
  border: 1px solid rgba(217,122,60,.18);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  transform: translateY(20px);
  transition: transform .3s ease;
}
.boss-edit-modal.is-open .boss-edit-container { transform: translateY(0); }

.boss-edit-close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(217,122,60,.1);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all .2s ease;
}
.boss-edit-close:hover { color: var(--white); border-color: rgba(217,122,60,.3); }

.boss-edit-title {
  font-size: 20px; font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
}
.boss-edit-section-title {
  font-size: 14px; font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(217,122,60,.1);
}

.boss-edit-field {
  flex: 1;
  margin-bottom: 16px;
}
.boss-edit-field label {
  display: block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 6px;
}
.boss-edit-field input,
.boss-edit-field textarea,
.boss-edit-field select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(17,24,39,.5);
  border: 1px solid rgba(217,122,60,.12);
  border-radius: 8px;
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  transition: border-color .2s ease;
}
.boss-edit-field input:focus,
.boss-edit-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217,122,60,.1);
}
.boss-edit-field textarea { resize: vertical; }

.boss-edit-row {
  display: flex; gap: 12px;
}

.boss-edit-actions {
  display: flex; gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(217,122,60,.08);
}
.boss-edit-btn {
  padding: 10px 24px;
  border: 1px solid rgba(217,122,60,.15);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
}
.boss-edit-btn--cancel {
  background: transparent;
  color: var(--text);
}
.boss-edit-btn--cancel:hover { color: var(--white); border-color: rgba(217,122,60,.3); }
.boss-edit-btn--save {
  background: linear-gradient(135deg, var(--crimson-d), var(--crimson));
  color: #fff;
  border-color: var(--gold);
}
.boss-edit-btn--save:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Toast */
.boss-edit-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.boss-edit-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.boss-edit-toast--success {
  background: rgba(46,204,113,.15);
  border: 1px solid rgba(46,204,113,.4);
  color: #2ecc71;
}
.boss-edit-toast--error {
  background: rgba(231,76,60,.15);
  border: 1px solid rgba(231,76,60,.4);
  color: #e74c3c;
}
