/* ============================================================
   EDENVERSE — Global Stylesheet
   Eden Philanthropic Foundation Series by Yenshio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=IM+Fell+English:ital@0;1&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --black:       #0a0a0a;
  --deep-black:  #050505;
  --dark-gray:   #111111;
  --mid-gray:    #1e1e1e;
  --light-gray:  #2a2a2a;
  --border:      #2f2f2f;
  --gold:        #c9a84c;
  --gold-light:  #e0c06a;
  --gold-dark:   #8a6c28;
  --red:         #8b1a1a;
  --red-light:   #b02020;
  --red-glow:    rgba(139, 26, 26, 0.3);
  --gold-glow:   rgba(201, 168, 76, 0.15);
  --text-main:   #e8e0d0;
  --text-muted:  #9a9080;
  --text-dim:    #5a5248;
  --font-head:   'Cinzel', serif;
  --font-sub:    'IM Fell English', serif;
  --font-body:   'Raleway', sans-serif;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--deep-black);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--gold-light); }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--gold);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: 1.2em; }

.subheading {
  font-family: var(--font-sub);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.gold-text { color: var(--gold); }
.red-text  { color: var(--red-light); }
.muted     { color: var(--text-muted); }

/* ── DIVIDERS ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dark), transparent);
  margin: 2.5rem 0;
}

.divider-sm {
  width: 80px;
  height: 2px;
  background: var(--gold);
  margin: 1rem auto;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--dark-gray);
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 { margin-bottom: 0.5rem; }

/* ── NAVIGATION ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.97);
  border-bottom: 1px solid var(--gold-dark);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-logo span { color: var(--text-muted); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s;
}

/* ── HERO SECTION ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--deep-black);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(139,26,26,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 70% 60%, rgba(201,168,76,0.05) 0%, transparent 70%),
    linear-gradient(180deg, #050505 0%, #0d0805 50%, #050505 100%);
}

.hero-ornament {
  position: absolute;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(201,168,76,0.08);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-ornament::before {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(201,168,76,0.05);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 2rem 1.5rem;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 60px rgba(201,168,76,0.25);
}

.hero-subtitle {
  font-family: var(--font-sub);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-main);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--deep-black);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--deep-black);
  box-shadow: 0 0 20px rgba(201,168,76,0.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--gold-dark);
  color: var(--gold);
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  color: var(--gold-light);
}

.btn-red {
  background: var(--red);
  border-color: var(--red-light);
  color: var(--text-main);
}

.btn-red:hover {
  background: var(--red-light);
  box-shadow: 0 0 20px var(--red-glow);
  color: white;
}

/* ── BOOK CARDS ── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--mid-gray);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  overflow: hidden;
}

.book-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(201,168,76,0.08);
}

.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--dark-gray) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.book-cover-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(139,26,26,0.06) 0%, transparent 60%);
}

.book-cover-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.placeholder-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 1rem;
}

.book-info { padding: 1.2rem; }
.book-info h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.book-info .book-num {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-light);
  font-family: var(--font-head);
  margin-bottom: 0.6rem;
}

.book-info p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── CHARACTER CARDS ── */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.char-card {
  background: var(--mid-gray);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
}

.char-card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 0 25px rgba(201,168,76,0.08);
}

.char-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #1a1208 0%, #0d0d0d 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-portrait-placeholder {
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--gold-dark);
  opacity: 0.4;
}

.char-affiliation {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.char-info { padding: 1.3rem; }
.char-info h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }

.char-title {
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--red-light);
  margin-bottom: 0.8rem;
}

.char-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-family: var(--font-head);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tag-gold { border-color: var(--gold-dark); color: var(--gold); }
.tag-red  { border-color: var(--red); color: var(--red-light); }

/* ── LORE PANELS ── */
.lore-panel {
  background: var(--mid-gray);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.lore-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.lore-panel.red-accent { border-left-color: var(--red-light); }
.lore-panel.red-accent::before { background: linear-gradient(to right, var(--red-light), transparent); }

.lore-panel h3 { margin-bottom: 1rem; }
.lore-panel p  { color: var(--text-muted); font-size: 0.95rem; }

.lore-quote {
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
  border-left: 3px solid var(--gold-dark);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(201,168,76,0.04);
}

/* ── BLOG / NEWS ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--mid-gray);
  border: 1px solid var(--border);
  padding: 1.8rem;
  transition: border-color 0.25s;
}

.blog-card:hover { border-color: var(--gold-dark); }

.blog-date {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 0.7rem;
}

.blog-card h3 { font-size: 1.1rem; margin-bottom: 0.7rem; }
.blog-card p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── FORM ELEMENTS ── */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  background: var(--mid-gray);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dark);
}

textarea { resize: vertical; min-height: 120px; }

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 3rem 0;
}

.stat-item {
  background: var(--dark-gray);
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* ── FEATURED SECTION ── */
.featured-strip {
  background: linear-gradient(135deg, var(--dark-gray) 0%, var(--mid-gray) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
}

/* ── FACTION GRID ── */
.faction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.faction-card {
  background: var(--mid-gray);
  border: 1px solid var(--border);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
}

.faction-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 3px;
  height: 100%;
  background: var(--gold);
}

.faction-card.red-side::after { background: var(--red-light); }

.faction-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.faction-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.faction-card p  { font-size: 0.875rem; color: var(--text-muted); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(139,26,26,0.08) 0%, transparent 70%),
    var(--deep-black);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { margin-bottom: 0.6rem; }
.page-hero p  { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ── FOOTER ── */
footer {
  background: var(--deep-black);
  border-top: 1px solid var(--gold-dark);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.footer-brand p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-nav a:hover { color: var(--gold); }

.footer-copy {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── AUTHOR PAGE ── */
.author-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.author-portrait {
  aspect-ratio: 3/4;
  background: var(--mid-gray);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

/* ── SCROLL REVEAL (simple class, JS-driven) ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .author-layout {
    grid-template-columns: 1fr;
  }

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

  .footer-copy { text-align: center; }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5,5,5,0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }

  .nav-toggle { display: flex; }

  .navbar { position: relative; }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .section, .section-alt { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .hero { min-height: 80vh; }
  .hero-ornament { width: 300px; height: 300px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .characters-grid { grid-template-columns: 1fr; }
}
