/* =========================================
   DOMINIA — Lore Pages Stylesheet
   Shared across all 5 lore pages
   ========================================= */

/* === RESET & ROOT === */
*{margin:0;padding:0;box-sizing:border-box}

:root {
  /* Lore Palette - Deeper, more atmospheric, hints of aged leather/parchment shadows */
  --bg-deep: #050406;
  --bg-surface: #0f0d14;
  --bg-card: #14121a;
  --bg-parchment-shadow: #1b1720;
  --gold: #c9a84c;
  --gold-dim: #7a6027;
  --gold-light: #dac06a;
  --text: #d4cfc1;
  --text-dim: #8f8a7d;
  --text-muted: #545045;
  --text-accent: #a33b3b;
  --border: #24202a;
  --border-hover: rgba(201,168,76,.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
  /* Cinematic vignette effect */
  background-image: radial-gradient(circle at center, rgba(30,25,40,.2) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

::selection { background: rgba(201,168,76,.2); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,.3); }

/* === NAVIGATION === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px,4vw,48px);
  background: rgba(5,4,6,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all .4s;
}
.nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.9); border-bottom-color: rgba(201,168,76,.1); }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { height: 32px; border-radius: 4px; filter: sepia(0.5); }
.nav-brand span {
  font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700;
  color: var(--gold); letter-spacing: 4px;
}
.nav-links {
  display: flex; gap: clamp(12px,1.5vw,20px); list-style: none; align-items: center;
}
.nav-links a {
  text-decoration: none; font-family: 'Cinzel', serif;
  font-size: 10px; font-weight: 600; color: var(--text-dim);
  letter-spacing: 2px; text-transform: uppercase;
  transition: color .3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.mob-tog { display: none; background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; }

/* === LORE HERO SECTION === */
.lore-hero {
  min-height: 50vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; padding: 120px 20px 60px;
  background: linear-gradient(to bottom, rgba(5,4,6,0.3) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
}
.lore-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1.5" fill="%23c9a84c" opacity="0.1"/></svg>');
  background-size: 60px; pointer-events: none;
}
.lore-hero-content { max-width: 800px; margin: 0 auto; }
.lore-icon {
  font-size: 48px; margin-bottom: 24px; opacity: 0.9;
  filter: drop-shadow(0 0 15px rgba(201,168,76,0.4));
}
.lore-hero h1 {
  font-family: 'Cinzel', serif; font-size: clamp(40px, 6vw, 72px);
  font-weight: 400; color: var(--gold-light); letter-spacing: 8px;
  text-transform: uppercase; margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
.lore-subtitle {
  font-family: 'Cinzel', serif; font-size: 14px; font-weight: 700;
  color: var(--text-accent); letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 32px;
}
.lore-hero p {
  font-size: 22px; color: var(--text-dim); font-style: italic;
  line-height: 1.6;
}

/* === LORE NAVIGATION (SUB-MENU) === */
.lore-nav-bar {
  display: flex; justify-content: center; gap: 32px;
  padding: 24px 20px; border-bottom: 1px solid var(--border);
  background: rgba(15,13,20,0.8); backdrop-filter: blur(8px);
  position: sticky; top: 64px; z-index: 90;
}
.lore-nav-bar a {
  color: var(--text-dim); text-decoration: none; font-family: 'Cinzel', serif;
  font-size: 12px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; transition: all .3s;
}
.lore-nav-bar a:hover, .lore-nav-bar a.active { color: var(--gold); }

/* === MAIN CONTAINER === */
.lore-container {
  max-width: 1000px; margin: 0 auto; padding: 80px 20px;
}
.lore-section { margin-bottom: 100px; }

/* === TYPOGRAPHY (Cinematic Reading) === */
.lore-heading {
  font-family: 'Cinzel', serif; font-size: 36px; font-weight: 400;
  color: var(--gold); letter-spacing: 3px; text-align: center;
  margin-bottom: 40px; position: relative;
}
.lore-heading::after {
  content: '· ✧ ·'; display: block; font-size: 14px;
  color: var(--gold-dim); margin-top: 16px; letter-spacing: 8px;
}
.lore-text {
  font-size: 21px; line-height: 2; color: var(--text);
  margin-bottom: 32px; text-align: justify;
}
.lore-quote {
  font-size: 24px; font-style: italic; color: var(--gold-light);
  text-align: center; padding: 40px; margin: 60px 0;
  position: relative; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.03) 0%, transparent 80%);
}

/* === FORUM ROMANUM (CHAPTERS) === */
.chapter-list { display: flex; flex-direction: column; gap: 24px; }
.chapter-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; padding: 32px; transition: all .4s;
  position: relative; overflow: hidden;
}
.chapter-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim), transparent);
  opacity: 0; transition: opacity .4s;
}
.chapter-card:hover {
  transform: translateY(-4px); border-color: var(--border-hover);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); background: var(--bg-parchment-shadow);
}
.chapter-card:hover::before { opacity: 1; }
.chapter-number {
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 700;
  color: var(--text-accent); letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.chapter-title {
  font-family: 'Cinzel', serif; font-size: 28px; color: var(--gold);
  margin-bottom: 16px;
}
.chapter-desc { font-size: 18px; color: var(--text-dim); margin-bottom: 24px; }
.chapter-sibyla {
  font-style: italic; color: var(--text-muted); padding-left: 20px;
  border-left: 1px solid var(--border-hover); font-size: 17px;
}

/* === TIMELINE ELEMENTS === */
.timeline-path {
  position: relative; padding: 40px 0;
}
.timeline-path::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
.timeline-epoch {
  display: flex; justify-content: center; margin: 60px 0;
  position: relative; z-index: 2;
}
.epoch-badge {
  background: var(--bg-surface); border: 1px solid var(--gold-dim);
  padding: 8px 32px; font-family: 'Cinzel', serif; color: var(--gold-light);
  font-size: 16px; letter-spacing: 4px; text-transform: uppercase; border-radius: 40px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
}
.timeline-node {
  display: flex; justify-content: center; align-items: center; gap: 40px;
  margin: 40px 0; position: relative;
}
.timeline-content {
  width: calc(50% - 40px); background: var(--bg-card);
  padding: 24px; border: 1px solid var(--border); border-radius: 4px;
}
.timeline-node:nth-child(even) .timeline-content { text-align: right; }
.timeline-node:nth-child(odd) .timeline-content { margin-left: auto; }
.timeline-node:nth-child(even) .timeline-content { margin-right: auto; }
.timeline-point {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; background: var(--gold-dim); border-radius: 50%;
  border: 4px solid var(--bg-deep); z-index: 2;
}
.node-year {
  font-family: 'Cinzel', serif; font-size: 18px; color: var(--gold);
  font-weight: 700; margin-bottom: 8px;
}
.node-title { font-size: 20px; color: #fff; margin-bottom: 12px; }
.node-desc { font-size: 16px; color: var(--text-dim); line-height: 1.5; }

/* === CARDS (BUILDINGS/TECHS) === */
.lore-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.encyclopedia-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; padding: 40px 32px; text-align: center;
  transition: all .4s;
}
.encyclopedia-card:hover {
  transform: translateY(-8px); border-color: var(--gold-dim);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.ec-icon { font-size: 40px; margin-bottom: 24px; filter: grayscale(50%); transition: all .4s; }
.encyclopedia-card:hover .ec-icon { filter: grayscale(0%); transform: scale(1.1); }
.ec-title {
  font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold);
  margin-bottom: 16px;
}
.ec-desc { font-size: 17px; color: var(--text-dim); line-height: 1.6; }

/* === FOOTER === */
.footer {
  padding: 60px clamp(16px,4vw,48px); border-top: 1px solid var(--border);
  background: var(--bg-deep); text-align: center;
}
.footer-logo { font-size: 24px; margin-bottom: 20px; opacity: 0.5; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; letter-spacing: 1px; transition: color .3s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links {
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(5,4,6,.98); flex-direction: column; padding: 20px;
  }
  .nav-links.open { display: flex; }
  .mob-tog { display: block; }
  .lore-nav-bar { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .lore-hero h1 { font-size: 32px; }
  .timeline-path::before { left: 20px; }
  .timeline-node { flex-direction: column; align-items: flex-start; gap: 20px; }
  .timeline-content { width: calc(100% - 60px); margin-left: 60px !important; text-align: left !important; }
  .timeline-point { left: 20px; }
  .epoch-badge { margin-left: 60px; }
}
