/* Template 26 - Midnight Library / Scholarly Dark */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Spectral:wght@300;400;500;600&display=swap');

:root {
  --midnight: #0d1117;
  --charcoal: #161b22;
  --slate: #21262d;
  --steel: #30363d;
  --silver: #8b949e;
  --text-light: #c9d1d9;
  --text-bright: #f0f6fc;
  --gold: #d4a855;
  --gold-dim: #a68a3f;
  --burgundy: #8b2942;
  --parchment: #f5e6d3;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Spectral', serif;
  line-height: 1.8;
  color: var(--text-light);
  background: var(--midnight);
  font-weight: 400;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(212, 168, 85, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139, 41, 66, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header - Library Entrance */
.site-header {
  background: var(--charcoal);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--steel);
}

.site-header::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.site-logo a {
  font-family: 'Cinzel', serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s ease;
  text-shadow: 0 0 30px rgba(212, 168, 85, 0.2);
}

.site-logo a:hover {
  text-shadow: 0 0 40px rgba(212, 168, 85, 0.4);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--silver);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
}

.site-nav a::before,
.site-nav a::after {
  content: '\2022';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.4rem;
  color: var(--gold);
  opacity: 0;
  transition: all 0.3s ease;
}

.site-nav a::before { left: -12px; }
.site-nav a::after { right: -12px; }

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

.site-nav a:hover::before,
.site-nav a:hover::after {
  opacity: 1;
}

/* Hero Section - Grand Hall */
.section.head {
  padding: 7rem 0 6rem;
  text-align: center;
  position: relative;
}

.section.head::before {
  content: '\2756';
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--gold-dim);
  opacity: 0.5;
}

.section.head h1 {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.section.head h1::first-letter {
  font-size: 4.5rem;
  color: var(--gold);
}

.section.head p {
  font-size: 1.15rem;
  color: var(--silver);
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.9;
}

/* Section Styling */
.section {
  padding: 5rem 0;
  position: relative;
}

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

.section header::before {
  content: '\2014\00a0\00a0\2726\00a0\00a0\2014';
  display: block;
  font-size: 1rem;
  color: var(--gold-dim);
  margin-bottom: 1.25rem;
  letter-spacing: 0.5em;
}

.section header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.section header p {
  font-size: 1rem;
  color: var(--silver);
  max-width: 500px;
  margin: 0 auto;
  font-style: italic;
}

/* Footer - Archive */
.footer {
  background: var(--charcoal);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--steel);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--gold);
}

.footer-columns {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.footer-about {
  flex: 0 0 45%;
}

.footer-about .site-logo a {
  font-size: 1.35rem;
}

.footer-tagline {
  color: var(--silver);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-top: 1.25rem;
  font-style: italic;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--silver);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-links a::before {
  content: '\2192';
  color: var(--gold-dim);
  font-size: 0.7rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 0.5rem;
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--steel);
}

.copyright, .copyright a {
  color: var(--silver);
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes candleFlicker {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.15s; }
.fade-in:nth-child(2) { animation-delay: 0.3s; }
.fade-in:nth-child(3) { animation-delay: 0.45s; }

/* Selection */
::selection {
  background: var(--gold);
  color: var(--midnight);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

body:not(.faq) h3,
:not(section.faq) h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
  letter-spacing: 0.03em;
}
