/* ============================================
   ChaosCodexX – Dark Neumorphism Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  /* Colors - Anthracite Base */
  --bg: #1a1a1d;
  --bg2: #0f0f11;
  --surface: #202024;
  --surface2: #28282e;

  /* Text */
  --text: #e8e8ea;
  --muted: #9a9aa3;

  /* Gold Accent */
  --gold: #d4af37;
  --gold2: #f4d160;

  /* Neumorphic Shadows */
  --shadow-raised: 6px 6px 12px rgba(0, 0, 0, 0.5), -4px -4px 8px rgba(255, 255, 255, 0.03);
  --shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.5), inset -2px -2px 6px rgba(255, 255, 255, 0.02);

  /* Border Radius */
  --radius: 0.5rem;
  --radius-lg: 1rem;

  /* Layout */
  --max-content: 1200px;
  --max-prose: 720px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg2);
  min-height: 100vh;
  position: relative;
  isolation: isolate; /* wichtig für Layering */
}

/* Das Bild (Fenster) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url(../Picture/d51ee094-a679-4996-839d-a8c58e0bc6cf.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02); /* minimal, damit keine Kanten flackern */
  z-index: -2;
}

/* Abdunklung + edler Glanz + Vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 520px at 55% 22%, rgba(212,175,55,0.12), transparent 60%),
    radial-gradient(900px 520px at 35% 35%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, rgba(10,10,12,0.78), rgba(10,10,12,0.90)),
    radial-gradient(120% 85% at 50% 50%, transparent 40%, rgba(0,0,0,0.65) 100%);
  z-index: -1;
  pointer-events: none;
}


/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  line-height: 1.6;
  color: var(--text);
}

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

a:hover {
  color: var(--gold2);
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 29, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.logo:hover {
  color: var(--gold2);
}

.nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav__links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav__links a:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}

/* Hero Section */
.hero {
  padding: var(--space-2xl) 0;
}

.hero__content {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.hero__title {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: var(--space-lg);
  max-width: 600px;
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__note {
  padding: var(--space-md);
}

.hero__note h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--gold);
}

.note-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.note-list li {
  color: var(--muted);
  font-size: 0.95rem;
}

.note-list strong {
  color: var(--text);
}

@media (min-width: 768px) {
  .hero__content {
    grid-template-columns: 2fr 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-raised);
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.6), -6px -6px 12px rgba(255, 255, 255, 0.04), 0 0 20px
    rgba(212, 175, 55, 0.1);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inset);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  color: var(--bg);
  font-weight: 700;
}

.btn--primary:hover {
  color: var(--bg);
}

.btn--secondary {
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn--secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold2);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Card Component */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.6), -6px -6px 12px rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}

/* Features Section */
.features {
  padding: var(--space-2xl) 0;
}

.features__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card {
  padding: var(--space-lg);
}

.feature-card__title {
  margin-bottom: var(--space-sm);
  color: var(--gold);
}

.feature-card__text {
  color: var(--muted);
  line-height: 1.6;
}

/* Essays Section */
.essays {
  padding: var(--space-2xl) 0;
}

.section-title {
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.essays__list {
  display: grid;
  gap: var(--space-md);
}

.essay-card {
  padding: var(--space-md) var(--space-lg);
}

.essay-card__title {
  font-size: 1.25rem;
}

.essay-card__title a {
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.essay-card__title a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.essay-card__title a:hover {
  color: var(--gold2);
}

.essay-card__title a:hover::after {
  width: 100%;
}

/* Footer */
.footer {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 15, 17, 0.5);
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  color: var(--muted);
  font-size: 0.875rem;
}

.footer__links {
  display: flex;
  gap: var(--space-md);
}

.footer__links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

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

/* Legal Pages (Prose) */
.legal-page {
  padding: var(--space-2xl) 0;
  min-height: 60vh;
}

.prose {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.prose h1 {
  margin-bottom: var(--space-md);
  color: var(--gold);
}

.prose h2 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.prose h3 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.prose p {
  margin-bottom: var(--space-sm);
  color: var(--muted);
}

.prose ul {
  margin-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 404 Error Page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) 0;
}

.error-content {
  text-align: center;
  max-width: 600px;
}

.error-code {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.error-title {
  margin-bottom: var(--space-md);
}

.error-text {
  color: var(--muted);
  margin-bottom: var(--space-lg);
  font-size: 1.125rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.cookie-banner__content {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cookie-banner__content p {
  flex: 1;
  min-width: 250px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.cookie-banner__content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .nav__links {
    gap: var(--space-sm);
  }

  .nav__links a {
    font-size: 0.875rem;
    padding: var(--space-xs);
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.container--narrow {
  max-width: 720px;

}

.section--about {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: linear-gradient(180deg, rgba(15,15,17,0.55), rgba(15,15,17,0.75));
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.section--about .container--narrow {
  max-width: var(--max-prose);
}

.section--about .section-title {
  margin-bottom: 1.25rem;
  text-align: center;
}

.section--about .prose {
  background: rgba(32,32,36,0.75);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-raised);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.section--about .prose p {
  color: rgba(232,232,234,0.9);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
/* ============================================
   ARTICLE PAGE LAYOUT (nur Artikel-Seiten)
   ============================================ */

.article-page .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-lg);
  align-items: start;
  padding: var(--space-2xl) 0;
}

/* Article Box (prose ist schon da, also nur Layout/Spacing) */
.article-page article.prose {
  max-width: 100%;
}

/* Sidebar */
.article-page .sidebar {
  position: sticky;
  top: calc(72px + var(--space-md));
  align-self: start;

  background: rgba(32,32,36,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-raised);
  border-radius: var(--radius-lg);
  padding: var(--space-md);

  backdrop-filter: blur(8px);
}

/* Mobile: Sidebar unter den Artikel */
@media (max-width: 980px) {
  .article-page .article-layout {
    grid-template-columns: 1fr;
  }

  .article-page .sidebar {
    position: relative;
    top: auto;
  }
}

/* ============================================
   Site Intro Overlay (Build-in-Progress)
   ============================================ */

.site-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(800px 400px at 50% 30%, rgba(212,175,55,0.12), transparent 60%),
    linear-gradient(180deg, rgba(10,10,12,0.92), rgba(10,10,12,0.96));

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.site-intro-overlay.is-visible {
  opacity: 1;
}

.site-intro-content {
  max-width: 520px;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);

  background: rgba(32,32,36,0.65);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(8px);
}

.site-intro-content h2 {
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.site-intro-content p {
  color: rgba(232,232,234,0.9);
  line-height: 1.7;
  font-size: 1rem;
}
