/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --ink: #1a1a1f;
  --parchment: #f5edd6;
  --parchment-dark: #e8d9b5;
  --gold: #c9922a;
  --gold-light: #e8b84b;
  --gold-pale: #f0d080;
  --crimson: #8b1a1a;
  --crimson-light: #c42828;
  --teal: #1a5c6b;
  --teal-light: #2d8fa6;
  --shadow: rgba(10,10,14,0.7);
  --glow: rgba(201,146,42,0.35);
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Crimson Pro', serif;
  --side-bg-url: url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?w=1200&q=80');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(201,146,42,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(26,92,107,0.08) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--side-bg-url, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-mask-image: linear-gradient(90deg, black 0%, black 12%, transparent 22%, transparent 78%, black 88%, black 100%);
  mask-image: linear-gradient(90deg, black 0%, black 12%, transparent 22%, transparent 78%, black 88%, black 100%);
  opacity: 0.28;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(13,11,14,0.97) 0%, rgba(13,11,14,0.85) 100%);
  border-bottom: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 1px 0 rgba(201,146,42,0.06);
}

.nav-divider {
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  height: 48px;
  z-index: 999;
  pointer-events: none;
  overflow: visible;
}
.nav-divider svg { width: 100%; height: 48px; display: block; overflow: visible; }

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-logo:hover { color: var(--gold-light); }
.nav-logo-svg { width: 38px; height: 38px; flex-shrink: 0; overflow: visible; }

.logo-ring-outer { animation: logo-spin-slow 18s linear infinite; transform-origin: 19px 19px; }
.logo-ring-inner { animation: logo-spin-slow 10s linear infinite reverse; transform-origin: 19px 19px; }
.logo-center-glow { animation: logo-pulse 3s ease-in-out infinite; }
.logo-rune-1 { animation: logo-rune-fade 4s ease-in-out infinite; }
.logo-rune-2 { animation: logo-rune-fade 4s ease-in-out 1.3s infinite; }
.logo-rune-3 { animation: logo-rune-fade 4s ease-in-out 2.6s infinite; }

@keyframes logo-spin-slow { to { transform: rotate(360deg); } }
@keyframes logo-pulse { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes logo-rune-fade { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

.nav-links { display: flex; gap: 0.2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; right: 50%;
  height: 1px;
  background: var(--gold);
  transition: left 0.3s, right 0.3s;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { left: 0.9rem; right: 0.9rem; }

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(245,237,214,0.05);
  border: 1px solid rgba(201,146,42,0.25);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.nav-search:focus-within { border-color: var(--gold); }
.nav-search-btn {
  background: rgba(201,146,42,0.12);
  border: none;
  border-right: 1px solid rgba(201,146,42,0.2);
  color: var(--gold);
  cursor: pointer;
  width: 36px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.nav-search-btn:hover { background: rgba(201,146,42,0.25); color: var(--gold-light); }
.nav-search-btn svg { width: 15px; height: 15px; }
.nav-search input {
  background: transparent;
  border: none;
  padding: 0.35rem 0.8rem;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  width: 150px;
  transition: width 0.4s;
}
.nav-search input::placeholder { color: rgba(245,237,214,0.4); }
.nav-search input:focus { width: 200px; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gold); transition: transform 0.3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 112px 2rem 4rem;
}
.hero-bg { position: absolute; inset: 0; background: transparent; }
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars span {
  position: absolute; width: 2px; height: 2px;
  background: var(--gold-pale); border-radius: 50%;
  animation: twinkle var(--dur, 3s) var(--delay, 0s) infinite;
  opacity: 0;
}
@keyframes twinkle {
  0%,100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: var(--max-op, 0.6); transform: scale(1); }
}

.hero-rune-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: min(80vw,700px); height: min(80vw,700px);
  border-radius: 50%;
  border: 1px solid rgba(201,146,42,0.12);
  animation: rotate-slow 80s linear infinite;
}
.hero-rune-ring::before {
  content: ''; position: absolute; inset: 20px; border-radius: 50%;
  border: 1px solid rgba(201,146,42,0.08);
  animation: rotate-slow 50s linear infinite reverse;
}
.hero-rune-ring::after {
  content: ''; position: absolute; inset: 50px; border-radius: 50%;
  border: 1px dashed rgba(201,146,42,0.06);
  animation: rotate-slow 30s linear infinite;
}
@keyframes rotate-slow { to { transform: translate(-50%,-50%) rotate(360deg); } }

.hero-emblem {
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite, fade-in 2s ease forwards;
  filter: drop-shadow(0 0 40px rgba(201,146,42,0.5));
  position: relative; z-index: 2;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ============================================================
   HERO LOGO SVG ANIMATIONS
   ============================================================ */
.hero-ring-outer {
  animation: logo-spin-slow 30s linear infinite;
  transform-origin: 60px 60px;
  transform-box: fill-box;
}
.hero-ring-mid {
  animation: logo-spin-slow 18s linear infinite reverse;
  transform-origin: 60px 60px;
  transform-box: fill-box;
}
.hero-ring-inner {
  animation: logo-spin-slow 10s linear infinite;
  transform-origin: 60px 60px;
  transform-box: fill-box;
}
.hero-logo-corona {
  animation: hero-corona-pulse 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.hero-center-pulse {
  animation: hero-center-pulse 2.8s ease-in-out infinite;
  transform-origin: 60px 60px;
  transform-box: fill-box;
}
@keyframes hero-corona-pulse {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
@keyframes hero-center-pulse {
  0%,100% { opacity: 0.6;  transform: scale(1); }
  50%     { opacity: 0.95; transform: scale(1.18); }
}
.hero-rune-a { animation: logo-rune-fade 3.5s ease-in-out infinite; }
.hero-rune-b { animation: logo-rune-fade 3.5s ease-in-out 1.2s infinite; }
.hero-rune-c { animation: logo-rune-fade 3.5s ease-in-out 2.4s infinite; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  color: var(--gold);
  text-shadow: 0 0 60px rgba(201,146,42,0.5), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  position: relative; z-index: 2;
  animation: fade-in-up 1.2s ease forwards;
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin-bottom: 2rem;
  opacity: 0.8;
  position: relative; z-index: 2;
  animation: fade-in-up 1.4s ease forwards;
}
.hero-divider {
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2.5rem;
  position: relative; z-index: 2;
}
.hero-divider::before, .hero-divider::after {
  content: '✦'; position: absolute;
  top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 0.7rem;
}
.hero-divider::before { left: -16px; }
.hero-divider::after  { right: -16px; }
.hero-desc {
  max-width: 600px; font-size: 1.1rem;
  font-style: italic; color: rgba(245,237,214,0.75);
  margin-bottom: 3rem; position: relative; z-index: 2;
  animation: fade-in-up 1.6s ease forwards;
}
.hero-cta {
  display: flex; gap: 1rem; justify-content: center;
  flex-wrap: wrap; position: relative; z-index: 2;
  animation: fade-in-up 1.8s ease forwards;
}
@keyframes fade-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in    { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  opacity: 0.5; animation: bounce 2s ease-in-out infinite;
  z-index: 2; cursor: pointer; color: var(--gold-pale);
  font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-indicator svg { width: 20px; height: 20px; }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  background: var(--gold); color: var(--ink);
  border: 1px solid var(--gold); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  box-shadow: 0 0 24px rgba(201,146,42,0.5); transform: translateY(-2px);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.btn-ghost:hover {
  background: rgba(201,146,42,0.12);
  box-shadow: 0 0 16px rgba(201,146,42,0.2); transform: translateY(-2px);
}
.btn-ghost.btn-sm { font-size: 0.65rem; padding: 0.4rem 0.9rem; }
.btn-danger {
  display: inline-flex; align-items: center;
  font-family: var(--font-heading); font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  background: transparent; color: var(--crimson-light);
  border: 1px solid var(--crimson-light); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-danger:hover { background: var(--crimson-light); color: var(--parchment); }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   LORE-CARD
   ============================================================ */
.lore-card {
  background: linear-gradient(160deg, rgba(245,237,214,0.05) 0%, rgba(245,237,214,0.02) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 0 0 3px rgba(201,146,42,0.04), 0 4px 24px rgba(201,146,42,0.08);
}
.lore-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: 6px;
  pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 20px rgba(201,146,42,0.03);
}
.lore-card-corner { position: absolute; z-index: 2; pointer-events: none; width: 36px; height: 36px; }
.lore-card-corner-tl { top: -1px; left: -1px; }
.lore-card-corner-tr { top: -1px; right: -1px; transform: scaleX(-1); }
.lore-card-corner-bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.lore-card-corner-br { bottom: -1px; right: -1px; transform: scale(-1,-1); }

/* ============================================================
   SECTIONS / CONTAINER
   ============================================================ */
.section { padding: 5rem 2rem; position: relative; z-index: 1; }
.section-dark { background: linear-gradient(180deg, rgba(201,146,42,0.03) 0%, transparent 100%); }
.container { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--parchment);
  text-shadow: 0 0 30px rgba(201,146,42,0.2);
  margin-bottom: 1rem;
}
.ornament-line { display: flex; align-items: center; gap: 1rem; justify-content: center; }
.ornament-line-bar { flex: 1; max-width: 120px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,146,42,0.5)); }
.ornament-line-bar:last-child { background: linear-gradient(90deg, rgba(201,146,42,0.5), transparent); }
.ornament-line span { color: var(--gold); font-size: 0.9rem; }

/* ============================================================
   CATEGORIES GRID
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  background: linear-gradient(145deg, rgba(201,146,42,0.07), rgba(245,237,214,0.02));
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 0 1px rgba(201,146,42,0.08) inset, 0 4px 24px rgba(201,146,42,0.08);
}
.cat-card::before, .cat-card::after {
  content: ''; position: absolute;
  width: 12px; height: 12px;
  border-color: var(--gold-light); border-style: solid;
  opacity: 0.7; transition: opacity 0.3s, width 0.3s, height 0.3s;
}
.cat-card::before { top: 6px; left: 6px; border-width: 1.5px 0 0 1.5px; }
.cat-card::after  { bottom: 6px; right: 6px; border-width: 0 1.5px 1.5px 0; }
.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-light);
  box-shadow: 0 0 0 1px rgba(232,184,75,0.15) inset, 0 12px 40px rgba(201,146,42,0.25);
}
.cat-card:hover::before, .cat-card:hover::after { opacity: 1; width: 16px; height: 16px; }
.card-corner { position: absolute; width: 12px; height: 12px; border-color: var(--gold-light); border-style: solid; opacity: 0.7; transition: opacity 0.3s, width 0.3s, height 0.3s; pointer-events: none; }
.card-corner-tr { top: 6px; right: 6px; border-width: 1.5px 1.5px 0 0; }
.card-corner-bl { bottom: 6px; left: 6px; border-width: 0 0 1.5px 1.5px; }
.cat-card:hover .card-corner { opacity: 1; width: 16px; height: 16px; }
.cat-card-icon { font-size: 2.4rem; margin-bottom: 0.8rem; display: block; filter: drop-shadow(0 0 8px rgba(201,146,42,0.4)); transition: transform 0.3s; }
.cat-card:hover .cat-card-icon { transform: scale(1.15); }
.cat-card-title { font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.4rem; }
.cat-card-desc  { font-size: 0.82rem; color: rgba(245,237,214,0.5); font-style: italic; }
.cat-card-count { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.1em; color: rgba(201,146,42,0.5); margin-top: 0.6rem; display: block; }

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel-section { padding: 5rem 2rem; position: relative; z-index: 1; }

.carousel-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0.5rem;
}
.carousel-card {
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
  width: 100%;
  background: linear-gradient(160deg, rgba(245,237,214,0.05) 0%, rgba(245,237,214,0.02) 100%);
  box-shadow: 0 8px 40px rgba(201,146,42,0.1);
}
.carousel-card-image {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}
.carousel-card-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(26,26,31,0.85) 100%);
}
.carousel-card-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.carousel-card-tag {
  font-family: var(--font-heading);
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.carousel-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--parchment); margin-bottom: 1.2rem; line-height: 1.2;
}
.carousel-card-text {
  font-size: 1rem; color: rgba(245,237,214,0.7);
  font-style: italic; margin-bottom: 2rem; line-height: 1.75;
}
.carousel-controls {
  display: flex; align-items: center;
  justify-content: center; gap: 1rem; margin-top: 1.5rem;
}
.carousel-btn {
  background: rgba(201,146,42,0.1); border: 1px solid rgba(201,146,42,0.3);
  color: var(--gold); width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: background 0.2s, border-color 0.2s;
}
.carousel-btn:hover { background: rgba(201,146,42,0.25); border-color: var(--gold); }
.carousel-dots { display: flex; gap: 0.5rem; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(201,146,42,0.25);
  cursor: pointer; transition: background 0.3s, transform 0.3s; border: none;
}
.carousel-dot.active { background: var(--gold); transform: scale(1.3); }

/* ============================================================
   ARTICLES GRID
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card { padding: 1.8rem; transition: transform 0.3s, box-shadow 0.3s; text-decoration: none; color: inherit; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(201,146,42,0.15); }
.article-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.article-card-cat { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.article-card-date { font-size: 0.78rem; color: rgba(245,237,214,0.35); font-style: italic; }
.article-card-title { font-family: var(--font-heading); font-size: 1.05rem; color: var(--parchment); margin-bottom: 0.7rem; line-height: 1.4; }
.article-card-title a { text-decoration: none; color: inherit; transition: color 0.2s; }
.article-card-title a:hover { color: var(--gold-light); }
.article-card-excerpt { font-size: 0.9rem; color: rgba(245,237,214,0.6); font-style: italic; margin-bottom: 1.2rem; line-height: 1.6; }
.article-card-footer { display: flex; justify-content: space-between; align-items: center; }
.article-card-author { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.1em; color: rgba(245,237,214,0.35); }
.article-card-link { font-family: var(--font-heading); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--gold); text-decoration: none; transition: color 0.2s; }
.article-card-link:hover { color: var(--gold-light); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 9rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid rgba(201,146,42,0.12);
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(201,146,42,0.05) 0%, transparent 70%);
}
.page-header-article { text-align: left; }
.page-eyebrow { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem,6vw,4rem); color: var(--gold); text-shadow: 0 0 40px rgba(201,146,42,0.4); margin-bottom: 0.5rem; }
.page-subtitle { font-style: italic; color: rgba(245,237,214,0.6); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-breadcrumb { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(245,237,214,0.4); margin-bottom: 1rem; }
.article-breadcrumb a { color: var(--gold); text-decoration: none; }
.article-breadcrumb span { margin: 0 0.4rem; }
.article-title { font-family: var(--font-display); font-size: clamp(1.8rem,5vw,3.2rem); color: var(--parchment); margin-bottom: 1rem; line-height: 1.2; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-family: var(--font-heading); font-size: 0.68rem; letter-spacing: 0.1em; color: rgba(245,237,214,0.45); }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: start; padding: 3rem 2rem; }
.article-body { padding: 2.5rem; }

.prose h1,.prose h2,.prose h3,.prose h4 { font-family: var(--font-heading); color: var(--gold-light); margin: 2rem 0 0.8rem; }
.prose h1 { font-size: 1.8rem; border-bottom: 1px solid rgba(201,146,42,0.2); padding-bottom: 0.4rem; }
.prose h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid rgba(201,146,42,0.15); padding-bottom: 0.3rem; }
.prose h3 { font-size: 1.05rem; color: var(--parchment); }
.prose p  { color: rgba(245,237,214,0.8); margin-bottom: 1rem; text-align: justify; }
.prose p:first-of-type::first-letter { font-family: var(--font-display); font-size: 3.5rem; float: left; line-height: 0.8; margin: 0.1em 0.1em 0 0; color: var(--gold); text-shadow: 0 0 20px rgba(201,146,42,0.5); }
.prose ul,.prose ol { color: rgba(245,237,214,0.75); padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.3rem; }
.prose blockquote { border-left: 3px solid var(--gold); padding: 1rem 1.5rem; margin: 1.5rem 0; background: rgba(201,146,42,0.04); font-style: italic; color: rgba(245,237,214,0.7); }
.prose strong { color: var(--parchment); }
.prose a { color: var(--gold-light); text-decoration: underline; text-decoration-color: rgba(201,146,42,0.4); }
.prose hr { border: none; border-top: 1px solid rgba(201,146,42,0.2); margin: 2rem 0; }

.article-sidebar { position: sticky; top: 130px; }
.sidebar-widget { padding: 1.5rem; margin-bottom: 1rem; }
.sidebar-widget-title { font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(201,146,42,0.15); }
.sidebar-cat-link { font-family: var(--font-heading); font-size: 0.82rem; color: var(--parchment); text-decoration: none; transition: color 0.2s; }
.sidebar-cat-link:hover { color: var(--gold-light); }
.tags-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-family: var(--font-heading); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2rem 0.6rem; border: 1px solid rgba(201,146,42,0.35); border-radius: 2px; color: var(--gold); background: rgba(201,146,42,0.06); }

/* ============================================================
   SEARCH
   ============================================================ */
.search-form { margin-bottom: 2rem; }
.search-input-wrap { display: flex; gap: 0.8rem; }
.search-input { flex: 1; background: rgba(245,237,214,0.05); border: 1px solid rgba(201,146,42,0.25); border-radius: 2px; padding: 0.8rem 1.2rem; color: var(--parchment); font-family: var(--font-body); font-size: 1rem; outline: none; transition: border-color 0.3s; }
.search-input:focus { border-color: var(--gold); }
.search-count { font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.1em; color: rgba(245,237,214,0.4); margin-bottom: 1.5rem; }
.search-results { display: flex; flex-direction: column; gap: 1rem; }
.search-result { padding: 1.5rem; transition: transform 0.2s; }
.search-result:hover { transform: translateX(4px); }
.search-result-cat { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.search-result-title { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.5rem; }
.search-result-title a { color: var(--parchment); text-decoration: none; transition: color 0.2s; }
.search-result-title a:hover { color: var(--gold-light); }
.search-result-snippet { font-size: 0.88rem; color: rgba(245,237,214,0.55); font-style: italic; }
.empty-state { text-align: center; color: rgba(245,237,214,0.35); font-style: italic; padding: 3rem; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 8rem 2rem 4rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2.5rem; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-rune { font-size: 2rem; color: var(--gold); margin-bottom: 0.5rem; }
.auth-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--parchment); margin-bottom: 0.4rem; }
.auth-subtitle { font-style: italic; color: rgba(245,237,214,0.5); font-size: 0.9rem; }
.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: rgba(245,237,214,0.45); }
.auth-switch a { color: var(--gold); text-decoration: none; }
.auth-switch a:hover { color: var(--gold-light); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-family: var(--font-heading); font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.form-input, .form-select, .form-textarea { width: 100%; background: rgba(245,237,214,0.05); border: 1px solid rgba(201,146,42,0.25); border-radius: 2px; padding: 0.7rem 1rem; color: var(--parchment); font-family: var(--font-body); font-size: 0.95rem; outline: none; transition: border-color 0.3s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--gold); }
.form-input-sm, .form-textarea-sm { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--ink); }
.form-hint { font-size: 0.75rem; color: rgba(245,237,214,0.35); margin-top: 0.3rem; display: block; }
.form-error   { background: rgba(196,40,40,0.1); border: 1px solid rgba(196,40,40,0.4); border-radius: 3px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: 0.88rem; color: #f87171; }
.form-success { background: rgba(201,146,42,0.1); border: 1px solid rgba(201,146,42,0.4); border-radius: 3px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: 0.88rem; color: var(--gold-light); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { padding: 1.5rem; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2rem; color: var(--gold); }
.stat-label { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(245,237,214,0.4); margin-top: 0.3rem; }
.admin-actions { margin-bottom: 2rem; }
.admin-section-title { font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 2rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(201,146,42,0.15); }
.admin-table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid rgba(201,146,42,0.2); }
.admin-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid rgba(245,237,214,0.04); color: rgba(245,237,214,0.75); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(201,146,42,0.03); }
.admin-table td a { color: var(--parchment); text-decoration: none; }
.admin-table td a:hover { color: var(--gold-light); }

.editor-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.editor-sidebar { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 1rem; }
.editor-widget { padding: 1.5rem; }
.editor-widget-title { font-family: var(--font-heading); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(201,146,42,0.15); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.editor-toolbar button { font-family: var(--font-heading); font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0.6rem; background: rgba(201,146,42,0.1); border: 1px solid rgba(201,146,42,0.25); border-radius: 2px; color: var(--gold); cursor: pointer; transition: background 0.2s; }
.editor-toolbar button:hover { background: rgba(201,146,42,0.22); }
.editor-textarea { font-family: 'Courier New',monospace; font-size: 0.88rem; min-height: 500px; line-height: 1.6; }
.editor-preview { padding: 1.5rem; background: rgba(245,237,214,0.02); border: 1px solid rgba(201,146,42,0.15); border-radius: 2px; min-height: 200px; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { width: 100%; background: #0a0a0d; border-top: 1px solid rgba(201,146,42,0.25); position: relative; z-index: 10; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 2.5rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 3rem; align-items: start; }
.footer-brand .footer-logo { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-brand .footer-tagline { font-style: italic; color: rgba(245,237,214,0.35); font-size: 0.88rem; line-height: 1.5; max-width: 260px; }
.footer-nav { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.footer-nav-title { font-family: var(--font-heading); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.footer-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 0.8rem; list-style: none; }
.footer-nav-links a { font-family: var(--font-heading); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(245,237,214,0.45); text-decoration: none; transition: color 0.2s; }
.footer-nav-links a:hover { color: var(--gold-light); }
.footer-quote { text-align: right; }
.footer-quote blockquote { font-style: italic; color: rgba(245,237,214,0.3); font-size: 0.88rem; line-height: 1.6; border-right: 2px solid rgba(201,146,42,0.25); padding-right: 1rem; margin: 0; }
.footer-quote cite { display: block; margin-top: 0.5rem; font-family: var(--font-heading); font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(201,146,42,0.4); font-style: normal; }
.footer-bottom { border-top: 1px solid rgba(201,146,42,0.08); padding: 1.2rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-copy { font-size: 0.72rem; color: rgba(245,237,214,0.18); font-family: var(--font-heading); letter-spacing: 0.08em; }
.footer-ornament { display: flex; align-items: center; gap: 0.6rem; color: rgba(201,146,42,0.2); font-size: 0.7rem; }
.footer-ornament-line { width: 60px; height: 1px; background: rgba(201,146,42,0.15); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links, .nav-search { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(13,11,14,0.98);
    padding: 1rem; border-bottom: 1px solid rgba(201,146,42,0.2); gap: 0;
  }
  .nav-links.open a { padding: 0.8rem 1rem; }
  .hero { padding: 100px 1.5rem 4rem; }
  .carousel-card { grid-template-columns: 1fr; }
  .carousel-card-image { min-height: 200px; }
  .carousel-card-content { padding: 1.5rem; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-brand .footer-tagline { max-width: 100%; }
  .footer-quote { text-align: center; }
  .footer-quote blockquote { border-right: none; padding-right: 0; border-left: 2px solid rgba(201,146,42,0.25); padding-left: 1rem; text-align: left; }
  .footer-bottom { justify-content: center; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
}
