/* ========================================
   GRIMORIO ARCANUM - Estilos Principales
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=IM+Fell+English:ital@0;1&family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&display=swap');

:root {
  --primary: #7b2d8b;
  --secondary: #c9a84c;
  --bg: #0a0a14;
  --card-bg: #12122a;
  --text: #e8d5b7;
  --accent: #ff6b35;
  --glow: rgba(123, 45, 139, 0.6);
  --gold-glow: rgba(201, 168, 76, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'IM Fell English', serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- CANVAS DE ESTRELLAS ---- */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- NAVEGACIÓN ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10,10,20,0.98) 0%, rgba(10,10,20,0.7) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.4rem;
  color: var(--secondary);
  text-decoration: none;
  text-shadow: 0 0 20px var(--gold-glow);
  letter-spacing: 2px;
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav-links a:hover {
  color: var(--secondary);
  text-shadow: 0 0 15px var(--gold-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(123,45,139,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-crest {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: floatCrest 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(201,168,76,0.8));
  line-height: 1;
}

@keyframes floatCrest {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

.hero h1 {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--secondary);
  text-shadow: 0 0 40px var(--gold-glow), 0 0 80px rgba(201,168,76,0.3);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: 3px;
}

.hero h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--primary);
  text-shadow: 0 0 20px var(--glow);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero p {
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.9;
  color: rgba(232,213,183,0.8);
  font-style: italic;
  margin-bottom: 3rem;
}

.hero-divider {
  width: 300px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin: 0 auto 2rem;
  position: relative;
}

.hero-divider::before {
  content: '✦';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: var(--secondary);
  font-size: 1.2rem;
  background: var(--bg);
  padding: 0 0.5rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: rgba(201,168,76,0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---- PARTÍCULAS FLOTANTES ---- */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  animation: floatParticle linear infinite;
  opacity: 0;
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.7; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ---- SECCIONES GENERALES ---- */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--secondary);
  text-shadow: 0 0 30px var(--gold-glow);
  margin-bottom: 1rem;
}

.section-divider {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin: 1rem auto 0;
  position: relative;
}

.section-divider::before {
  content: '⚜';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: var(--secondary);
  font-size: 1rem;
  background: var(--bg);
  padding: 0 0.5rem;
}

/* ---- GALERÍA ---- */
.gallery-section {
  background: linear-gradient(180deg, transparent, rgba(123,45,139,0.05) 50%, transparent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--card-bg);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 60px rgba(123,45,139,0.5), 0 0 20px rgba(201,168,76,0.2);
  border-color: rgba(201,168,76,0.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  font-family: 'Cinzel', serif;
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.gallery-overlay p {
  font-size: 0.8rem;
  color: rgba(232,213,183,0.7);
  font-style: italic;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(201,168,76,0.3);
  font-size: 3rem;
}

.gallery-placeholder span {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: rgba(201,168,76,0.4);
  margin-top: 0.5rem;
  letter-spacing: 2px;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid rgba(201,168,76,0.4);
  box-shadow: 0 0 60px rgba(123,45,139,0.6);
}

.lightbox-title {
  font-family: 'Cinzel', serif;
  color: var(--secondary);
  margin-top: 1rem;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -3rem; right: 0;
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---- VIDEOS ---- */
.videos-section {
  background: linear-gradient(180deg, transparent, rgba(10,10,30,0.5) 50%, transparent);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.video-card:hover {
  box-shadow: 0 10px 40px rgba(123,45,139,0.4);
  border-color: rgba(201,168,76,0.4);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.video-info {
  padding: 1.2rem 1.5rem;
}

.video-info h3 {
  font-family: 'Cinzel', serif;
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.video-info p {
  font-size: 0.85rem;
  color: rgba(232,213,183,0.6);
  font-style: italic;
  line-height: 1.6;
}

/* ---- HECHIZOS / GRIMORIO ---- */
.spells-section {
  background: radial-gradient(ellipse at center, rgba(123,45,139,0.08) 0%, transparent 70%);
}

.spells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.spell-card {
  background: var(--card-bg);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 2px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
  cursor: default;
}

.spell-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,45,139,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.spell-card:hover::before {
  opacity: 1;
}

.spell-card:hover {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 40px rgba(123,45,139,0.3), inset 0 0 20px rgba(123,45,139,0.05);
  transform: translateY(-3px);
}

.spell-category {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255,107,53,0.4);
  padding: 0.2rem 0.8rem;
  margin-bottom: 1rem;
  border-radius: 2px;
}

.spell-word {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.6rem;
  color: var(--secondary);
  text-shadow: 0 0 20px var(--gold-glow);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.spell-description {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(232,213,183,0.75);
  font-style: italic;
}

.spell-rune {
  position: absolute;
  bottom: -10px; right: -10px;
  font-size: 5rem;
  opacity: 0.04;
  color: var(--secondary);
  font-family: 'Cinzel Decorative', cursive;
  pointer-events: none;
  transition: opacity 0.4s;
}

.spell-card:hover .spell-rune {
  opacity: 0.08;
}

/* ---- FOOTER ---- */
footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.5rem;
  color: var(--secondary);
  text-shadow: 0 0 20px var(--gold-glow);
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(232,213,183,0.4);
  font-style: italic;
  letter-spacing: 2px;
}

.footer-runes {
  font-size: 1.5rem;
  margin: 1rem 0;
  opacity: 0.5;
  letter-spacing: 1rem;
}

/* ---- VACIO (sin contenido) ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(201,168,76,0.4);
  grid-column: 1 / -1;
}

.empty-state .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 3px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(10,10,20,0.98);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(201,168,76,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .spells-grid { grid-template-columns: 1fr; }
}
