/* ============================================
   DAGKnight — Fantasy BlockDAG Theme
   ============================================ */

:root {
  --bg-dark: #0a0a14;
  --bg-deeper: #06060e;
  --bg-card: #12121f;
  --bg-card-hover: #1a1a2e;
  --primary: #70c7ba;
  --primary-glow: rgba(112, 199, 186, 0.4);
  --accent-gold: #d4a847;
  --accent-gold-glow: rgba(212, 168, 71, 0.4);
  --accent-purple: #9b59b6;
  --accent-purple-glow: rgba(155, 89, 182, 0.3);
  --text: #e0e0e8;
  --text-dim: #8888a0;
  --text-bright: #ffffff;
  --border: rgba(112, 199, 186, 0.15);
  --border-gold: rgba(212, 168, 71, 0.2);
  --font-display: 'Cinzel', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background magical particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, var(--accent-purple-glow) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, var(--primary-glow) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(212, 168, 71, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-gold);
  text-shadow: 0 0 12px var(--accent-gold-glow);
  letter-spacing: 0.05em;
}

.nav-brand span {
  color: var(--primary);
  text-shadow: 0 0 12px var(--primary-glow);
}

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

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

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

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 20, 0.95);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-gold);
  }
  .nav-links.open { display: flex; }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
}

.hero-emblem {
  font-size: 5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px var(--accent-gold-glow));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px var(--accent-gold-glow);
}

.hero h1 .highlight {
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow);
}

.hero .subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 15px var(--accent-gold-glow);
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-dim);
  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;
  font-family: var(--font-display);
  font-size: 0.95rem;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #c49530);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

.btn-primary:hover {
  color: var(--bg-dark);
  box-shadow: 0 0 30px var(--accent-gold-glow), 0 0 60px rgba(212, 168, 71, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 0 10px rgba(112, 199, 186, 0.1);
}

.btn-outline:hover {
  color: var(--text-bright);
  background: rgba(112, 199, 186, 0.1);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

/* ============================================
   Sections
   ============================================ */

.section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 1rem;
}

.section-title .gold { color: var(--accent-gold); }
.section-title .teal { color: var(--primary); }

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ============================================
   Lore Cards
   ============================================ */

.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.lore-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.lore-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s;
}

.lore-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  box-shadow: 0 0 30px rgba(212, 168, 71, 0.1);
  transform: translateY(-4px);
}

.lore-card:hover::before {
  opacity: 1;
}

.lore-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.lore-card h3 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.lore-card p {
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================================
   Tweet Feed
   ============================================ */

.tweet-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.tweet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.tweet-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 0 25px rgba(212, 168, 71, 0.08);
}

.tweet-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tweet-body {
  padding: 1.5rem;
}

.tweet-text {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  white-space: pre-line;
}

.tweet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tweet-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.tweet-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  transition: all 0.3s;
}

.tweet-link:hover {
  background: rgba(112, 199, 186, 0.1);
  box-shadow: 0 0 12px var(--primary-glow);
  color: var(--text-bright);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 14, 0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 60px var(--accent-gold-glow);
}

/* ============================================
   Scrolling Rune Divider
   ============================================ */

.rune-divider {
  text-align: center;
  padding: 2rem 0;
  font-size: 1.5rem;
  letter-spacing: 1rem;
  color: var(--accent-gold);
  opacity: 0.3;
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

/* ============================================
   Page Content
   ============================================ */

.page-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

.page-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-bright);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px var(--accent-gold-glow);
}

.page-content h2 {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-gold);
}

.page-content h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

.page-content p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

.page-content ul, .page-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text);
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content blockquote {
  border-left: 3px solid var(--accent-gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(212, 168, 71, 0.05);
  color: var(--text-dim);
  font-style: italic;
}

.page-content code {
  font-family: var(--font-mono);
  background: rgba(112, 199, 186, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-gold);
  background: var(--bg-deeper);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-gold);
  text-shadow: 0 0 15px var(--accent-gold-glow);
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s;
  color: var(--text);
}

.footer-link:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px var(--accent-gold-glow);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.footer-link .link-icon {
  font-size: 1.3rem;
}

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

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

.footer-copy .sigil {
  color: var(--accent-gold);
}

/* ============================================
   Animations
   ============================================ */

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
  .hero-emblem { font-size: 3.5rem; }
  .lore-grid { grid-template-columns: 1fr; }
  .tweet-body { padding: 1rem; }
  .footer-links { flex-direction: column; align-items: center; }
}
