/* ============================================
   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;
}
.sidebar .card  {
   background: unset;
  border: unset;
  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;
}
/* VALUE SECTION (after Hero) */
.value {
  padding: var(--space-2xl) var(--space-md);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), rgba(0, 0, 0, 0) 55%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

.value__head {
  max-width: var(--max-prose);
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.value__kicker {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: var(--space-sm);
}

.value__title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  color: var(--text);
}

.value__lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.value__quote {
  color: var(--text);
  position: relative;
  padding: 0 0.15rem;
}

.value__quote::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.0), rgba(212, 175, 55, 0.7), rgba(212, 175, 55, 0.0));
  opacity: 0.9;
}

.value__grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .value__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: stretch;
  }
}

.value__card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.value__card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 180%;
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0) 55%);
  pointer-events: none;
}

.value__cardTitle {
  margin: 0 0 var(--space-sm);
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.value__list {
  margin: 0 0 var(--space-sm);
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.value__list li {
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}

.value__list li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.65);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
  position: absolute;
  left: 0;
  top: 0.48rem;
}

.value__note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.value__card--accent {
  border-color: rgba(212, 175, 55, 0.18);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.015));
}

.value__card--accent .value__list li::before {
  background: rgba(244, 209, 96, 0.85);
  box-shadow: 0 0 0 3px rgba(244, 209, 96, 0.14);
}

.value__foot {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.value__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.1rem;
   border-radius: var(--radius);
  text-decoration: none;
  color: #101012;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.25);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 120ms ease, filter 120ms ease;
}

.value__cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.value__cta--ghost {
  background: transparent;
  color: var(--gold2);
  border: 1px solid var(--gold);
  box-shadow: none;
}

.value__cta--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.35);
}
/* =========================
   Mobile Burger Navigation
   ========================= */

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

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  box-shadow: var(--shadow-raised);
  cursor: pointer;
}

.nav__toggle:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}

.nav__toggleBars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  opacity: 0.9;
}

.nav__toggleBars::before,
.nav__toggleBars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 160ms ease, top 160ms ease, opacity 160ms ease;
}

.nav__toggleBars::before { top: -6px; }
.nav__toggleBars::after  { top:  6px; }

/* Backdrop */
.nav__backdrop {
  display: none;
}

/* Mobile behavior */
@media (max-width: 820px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide links by default on mobile */
  .nav__links {
    position: absolute;
    top: calc(100% + 0px);
    right: 0;
    left: 0;
    z-index: 50;

    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    margin: 0;

    list-style: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface2), var(--surface));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-raised);

    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .nav__links a {
    display: block;
    padding: 0.9rem 0.9rem;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
  }

  .nav__links a:hover {
    background: rgba(255,255,255,0.04);
  }

  /* Backdrop shows only when open */
  .nav__backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: none;
  }

  /* OPEN STATE */
  .nav.is-open .nav__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav.is-open .nav__backdrop {
    display: block;
  }

  /* Animate burger into X */
  .nav.is-open .nav__toggleBars {
    background: transparent;
  }

  .nav.is-open .nav__toggleBars::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav.is-open .nav__toggleBars::after {
    top: 0;
    transform: rotate(-45deg);
  }
}
html.nav-open, html.nav-open body { overflow: hidden; }
