/* ================= Azeroth Chronicles — Theme ================= */
:root {
  --night: #05060d;
  --void: #0b0e1c;
  --panel: #10142a;
  --panel-2: #151a34;
  --gold: #d4af37;
  --gold-bright: #f4d97b;
  --silver: #cdd6f4;
  --horde: #c0392b;
  --horde-glow: #e0562f;
  --alliance: #3a86ff;
  --alliance-glow: #5b9dff;
  --arcane: #8b5cf6;
  --ink: #e7e9f5;
  --muted: #9aa2c4;
  --line: rgba(212, 175, 55, 0.18);

  --h: 'Cinzel', serif;
  --sub: 'Marcellus', serif;
  --body: 'Inter', system-ui, sans-serif;

  --maxw: 1180px;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--night);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--h); font-weight: 700; line-height: 1.15; letter-spacing: 0.5px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); color: var(--ink); }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--sub);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.section-lead { color: var(--muted); max-width: 60ch; margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sub); letter-spacing: 1px;
  padding: 0.85rem 1.7rem; border-radius: 999px;
  font-size: 0.95rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #211802; font-weight: 600;
  box-shadow: 0 8px 26px rgba(212, 175, 55, 0.28);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(212, 175, 55, 0.45); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--gold-bright); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(5, 6, 13, 0.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.site-header.scrolled { background: rgba(5, 6, 13, 0.92); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark { filter: drop-shadow(0 0 8px rgba(212,175,55,0.5)); }
.brand-text { font-family: var(--h); font-size: 1.15rem; letter-spacing: 1px; }
.brand-text em { color: var(--gold); font-style: normal; }

.main-nav { display: flex; align-items: center; gap: 1.9rem; }
.main-nav a { font-family: var(--sub); font-size: 0.95rem; color: var(--silver); position: relative; }
.main-nav a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width .3s ease;
}
.main-nav a:not(.nav-cta):hover { color: var(--gold-bright); }
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: 0.5rem 1.15rem; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-bright);
  transition: background .25s ease, color .25s ease;
}
.nav-cta:hover { background: var(--gold); color: #211802; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--gold); transition: transform .3s, opacity .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 50% 12%, rgba(139,92,246,0.18), transparent 60%),
    linear-gradient(180deg, rgba(5,6,13,0.35) 0%, rgba(5,6,13,0.55) 45%, rgba(5,6,13,0.95) 100%);
}
.hero-aurora {
  position: absolute; inset: -20% -20% auto -20%; height: 70%; z-index: -2; opacity: 0.5;
  background: linear-gradient(115deg, transparent, rgba(139,92,246,0.28), rgba(58,134,255,0.22), transparent);
  background-size: 300% 300%;
  animation: aurora 16s ease-in-out infinite;
  filter: blur(30px);
}
@keyframes aurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero-content { text-align: center; padding: 6rem 0; }
.hero-title {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff 0%, var(--gold-bright) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 6px 40px rgba(212,175,55,0.25);
  margin-bottom: 1.2rem;
}
.hero-sub { color: var(--silver); max-width: 62ch; margin: 0 auto 2rem; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(212,175,55,0.55); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px; z-index: 5;
}
.scroll-dot { width: 5px; height: 8px; background: var(--gold); border-radius: 4px; animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section-head { text-align: center; margin-bottom: 3rem; }

.divider { display: flex; justify-content: center; padding: 1rem 0; }
.divider img { opacity: 0.85; }

/* Featured */
.featured { background: linear-gradient(180deg, var(--night), var(--void)); }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.featured-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; transition: transform .6s ease; }
.featured-media:hover img { transform: scale(1.05); }
.media-tag {
  position: absolute; top: 1rem; left: 1rem; background: rgba(5,6,13,0.75);
  border: 1px solid var(--line); color: var(--gold); font-family: var(--sub);
  letter-spacing: 2px; text-transform: uppercase; font-size: 0.72rem; padding: 0.4rem 0.8rem; border-radius: 999px;
}
.featured-body h2 { margin-bottom: 1rem; }
.featured-body p { color: var(--muted); margin-bottom: 1.4rem; }
.lore-dates { list-style: none; margin-bottom: 1.8rem; display: grid; gap: 0.7rem; }
.lore-dates li { padding-left: 1rem; border-left: 2px solid var(--gold); color: var(--silver); font-size: 0.96rem; }
.lore-dates .date { display: inline-block; font-family: var(--sub); color: var(--gold-bright); margin-right: 0.5rem; }

/* Factions */
.factions { background: var(--void); }
.faction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.faction-card {
  padding: 2.4rem 2rem; border-radius: var(--radius); text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--night));
  border: 1px solid var(--line); position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.faction-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0.5; z-index: 0;
  background: radial-gradient(120% 80% at 50% -10%, var(--accent, transparent), transparent 60%);
}
.faction-card > * { position: relative; z-index: 1; }
.faction-card.horde { --accent: rgba(192,57,43,0.28); }
.faction-card.alliance { --accent: rgba(58,134,255,0.25); }
.faction-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.faction-card.horde:hover { border-color: var(--horde-glow); }
.faction-card.alliance:hover { border-color: var(--alliance-glow); }
.faction-crest { margin: 0 auto 1.2rem; filter: drop-shadow(0 0 14px rgba(0,0,0,0.6)); }
.faction-card.horde h3 { color: var(--horde-glow); }
.faction-card.alliance h3 { color: var(--alliance-glow); }
.faction-card .motto { font-family: var(--sub); font-style: italic; color: var(--gold); margin: 0.6rem 0 1rem; }
.faction-card p { color: var(--muted); }
.faction-facts { list-style: none; margin-top: 1.3rem; display: grid; gap: 0.4rem; font-size: 0.9rem; color: var(--silver); }
.faction-facts li::before { content: '\2726'; color: var(--gold); margin-right: 0.5rem; }

/* Timeline */
.timeline-section { background: linear-gradient(180deg, var(--void), var(--night)); }
.timeline { list-style: none; position: relative; max-width: 860px; margin-inline: auto; padding-left: 0; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), var(--arcane), transparent);
  transform: translateX(-50%);
}
.tl-item { position: relative; width: 50%; padding: 0.6rem 2.4rem; margin-bottom: 1.6rem; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }
.tl-item::after {
  content: ''; position: absolute; top: 1rem; width: 15px; height: 15px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--night); box-shadow: 0 0 12px rgba(212,175,55,0.7);
}
.tl-item:nth-child(odd)::after { right: -8px; }
.tl-item:nth-child(even)::after { left: -8px; }
.tl-year { font-family: var(--h); font-weight: 800; color: var(--gold-bright); font-size: 1.15rem; }
.tl-body h3 { margin: 0.2rem 0 0.35rem; }
.tl-body p { color: var(--muted); font-size: 0.94rem; }

/* Characters */
.characters { background: var(--night); }
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.6rem;
}
.char-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.char-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s ease; }
.char-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); border-color: var(--gold); }
.char-card:hover img { transform: scale(1.06); }
.char-meta {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.1rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(5,6,13,0.95));
}
.char-meta h3 { font-size: 1.1rem; }
.char-meta p { font-family: var(--sub); color: var(--gold); font-size: 0.85rem; letter-spacing: 1px; }

/* Community */
.community { text-align: center; background: var(--void); position: relative; overflow: hidden; }
.community-glow {
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 30%, rgba(139,92,246,0.22), transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.community-inner { position: relative; z-index: 1; max-width: 720px; margin-inline: auto; }
.community-inner h2 { margin-bottom: 1rem; }
.community-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.social-btn {
  display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--sub); letter-spacing: 1px;
  padding: 0.75rem 1.4rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.02); transition: transform .25s ease, border-color .25s, color .25s;
}
.social-btn:hover { transform: translateY(-4px); }
.social-btn.discord:hover { border-color: #5865f2; color: #8b93ff; }
.social-btn.youtube:hover { border-color: #ff0000; color: #ff6b6b; }
.social-btn.twitch:hover { border-color: #9146ff; color: #b48bff; }

.subscribe { display: flex; gap: 0.6rem; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 220px; padding: 0.85rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(5,6,13,0.6); color: var(--ink); font-family: var(--body); font-size: 0.95rem;
}
.subscribe input:focus { outline: none; border-color: var(--gold); }
.form-note { margin-top: 0.9rem; min-height: 1.2rem; color: var(--gold-bright); font-size: 0.9rem; }

/* Footer */
.site-footer { background: var(--night); border-top: 1px solid var(--line); padding-top: 3.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-brand > div, .footer-brand img { }
.footer-brand .brand-text { font-size: 1.2rem; }
.footer-brand p { color: var(--muted); max-width: 40ch; font-size: 0.92rem; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-cols h4 { color: var(--gold); font-size: 0.95rem; letter-spacing: 1px; margin-bottom: 0.9rem; }
.footer-cols a { display: block; color: var(--muted); font-size: 0.92rem; padding: 0.28rem 0; transition: color .2s; }
.footer-cols a:hover { color: var(--gold-bright); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem;
  display: flex; flex-direction: column; gap: 0.6rem; text-align: center;
}
.footer-bottom p { color: var(--muted); font-size: 0.82rem; }
.disclaimer { max-width: 70ch; margin-inline: auto; opacity: 0.8; }

/* Hover glow util */
.glow-hover { transition: text-shadow .3s ease, color .3s ease; }
.glow-hover:hover { color: var(--gold-bright); text-shadow: 0 0 22px rgba(244,217,123,0.55); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .faction-grid { grid-template-columns: 1fr; }
  .main-nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(5,6,13,0.98); border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 1.5rem; transform: translateY(-140%); transition: transform .35s ease; align-items: stretch;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-cta { text-align: center; margin-top: 0.7rem; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* single-column timeline */
  .timeline::before { left: 8px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding-left: 2.4rem; padding-right: 0; }
  .tl-item::after { left: 1px !important; right: auto !important; }

  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
