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

/* ──── Page-level color palette ──── */
.page-mortalshell2 {
  --bg:     #0a0607;
  --bg2:    #140a0c;
  --bg3:    #1c0e11;

  /* Sangre brillante (acento principal) */
  --gold:   #cf3a3f;
  --gold-l: #e85d61;
  --gold-d: #7c1f22;

  /* Sangre profunda */
  --crimson:    #8b1414;
  --crimson-l:  #c0282a;
  --crimson-d:  #4d0a0a;

  --amber:      #cf3a3f;
  --amber-l:    #e85d61;

  /* Acero frío (figura encapuchada) */
  --blue-acc:   #7e8794;
  --blue-acc-l: #aab2bd;

  --text:   #9a9298;
  --text-l: #d8d0d2;
  --white:  #f2eced;

  --purple: #2a0e12;

  --cursor-gold: #d6353b;
  --cursor-gold-l: #f25a5f;
  --cursor-gold-d: #8a1d22;

  overflow-x: hidden;
}

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

/* ══════════════════════════════════════
   HERO — Full-Screen Cinematic Banner
   ══════════════════════════════════════ */
.ms-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;
}

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

.ms-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: msHeroZoom 20s ease-in-out infinite alternate;
}

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

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

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

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

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

/* Badge */
.ms-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(207,58,63,0.22);
  border-radius: 100px;
  background: rgba(207,58,63,0.07);
  margin-bottom: 24px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.ms-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 */
.ms-hero-title {
  font-family: var(--ff-d);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.ms-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;
}
.ms-title-main {
  font-family: var(--ff-d);
  font-weight: 900;
  color: var(--white);
  font-size: inherit;
}
.ms-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 */
.ms-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 */
.ms-breadcrumb,
.ms-hero-badge,
.ms-hero-sub,
.ms-meta-item,
.ms-meta-sep,
.ms-hero-scroll { visibility: hidden; }

/* CSS fallback: if GSAP fails to run, make elements visible after 1s */
@keyframes ms-hero-fallback-reveal {
  to { visibility: visible; opacity: 1; }
}
.sg-low-power .ms-breadcrumb,
.sg-low-power .ms-hero-badge,
.sg-low-power .ms-hero-sub,
.sg-low-power .ms-meta-item,
.sg-low-power .ms-meta-sep,
.sg-low-power .ms-hero-scroll {
  animation: ms-hero-fallback-reveal 0s 1s forwards;
}

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

/* Buttons */
.ms-btn-primary {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-l));
  color: var(--white);
  border: 1px solid rgba(192,40,42,0.3);
}
.ms-btn-primary:hover {
  background: linear-gradient(135deg, var(--crimson-l), var(--crimson));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139,20,20,0.35);
}
.ms-btn-ghost { border-color: rgba(207,58,63,0.25); }

/* Scroll indicator */
.ms-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.ms-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) {
  .ms-hero { align-items: center; padding-bottom: 80px; padding-top: 100px; }
  .ms-hero-meta { gap: 12px; }
  .ms-meta-sep { display: none; }
  .ms-hero-scroll { display: none; }
}

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

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

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

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

.ms-hub-head { text-align: center; margin-bottom: 56px; }
.ms-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;
}
.ms-hub-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--white) 0%, var(--blue-acc) 25%, #a82a2f 50%, var(--crimson-l) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ms-hub-sub {
  font-size: 16px;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

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

/* ── Card Base ── */
.ms-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%;
}
.ms-card:hover {
  border-color: rgba(207,58,63,0.22);
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px -10px rgba(10,6,7,0.55),
    0 0 40px -10px rgba(139,20,20,0.1);
}
.ms-card--featured { grid-column: span 1; }

/* ── Card Body ── */
.ms-card-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.ms-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 10px;
}
.ms-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;
}
.ms-card:hover .ms-card-body h3 { color: var(--gold-l); }
.ms-card-body p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}
.ms-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;
}
.ms-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;
}
.ms-card:hover .ms-card-arrow {
  letter-spacing: 0.12em;
  color: var(--gold);
}

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

/* ══════════════════════════════════════
   CTA — Final Call to Action
   ══════════════════════════════════════ */
.ms-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);
}
.ms-cta > .sec-sep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  height: 0;
}
.ms-cta > .sec-sep svg {
  margin-top: -60px;
  margin-bottom: 0;
}
#ms-cta-embers {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.ms-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: var(--sec) var(--px);
}
.ms-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;
}
.ms-cta-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--white) 0%, var(--blue-acc) 25%, #a82a2f 50%, var(--crimson-l) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ms-cta-desc {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 36px;
}
.ms-cta-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

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

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