/* Base Variables and Reset */
:root {
  --color-pink: #FF0080;
  --color-purple: #7928CA;
  --color-cyan: #00D4FF;
  --color-lime: #7AE642;
  --color-gold: #FFD700;
  --bg-black: #000000;
  --text-white: #ffffff;
}

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

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter Tight', sans-serif;
  letter-spacing: -0.05em;
  font-weight: 900;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utilities */
.bg-black { background-color: var(--bg-black); }
.border-b { border-bottom: 1px solid rgba(255,255,255,0.1); }
.border-t { border-top: 1px solid rgba(255,255,255,0.1); }
.border-white-10 { border-color: rgba(255,255,255,0.1); }
.text-center { text-align: center; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.max-w-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .max-w-container {
    padding: 0 3rem;
  }
}

/* Header & Nav */
.header-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

@media (min-width: 768px) {
  .header-container { padding: 1.5rem 3rem; }
}

.logo-link {
  transition: opacity 0.2s ease;
}
.logo-link:hover { opacity: 0.8; }
.logo-img {
  height: 2rem;
  width: auto;
}
@media (min-width: 768px) {
  .logo-img { height: 2.5rem; }
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.lang-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  color: rgba(255,255,255,0.4);
}
.lang-btn:hover { color: rgba(255,255,255,0.6); }
.lang-btn.active { color: #fff; }
.lang-sep { color: rgba(255,255,255,0.4); }

/* Footer */
.footer-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
@media (min-width: 768px) {
  .footer-container { padding: 4rem 3rem; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
.footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-text, .footer-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.footer-link { transition: color 0.2s; display: inline-block; }
.footer-link:hover { color: #fff; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}
.footer-copyright {
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
}
.footer-imprint-link {
  color: rgba(255,255,255,0.4);
  background: none;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer-imprint-link:hover { color: #fff; }

/* Custom Typography & Gradients */
.text-gradient {
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple), var(--color-cyan), var(--color-lime), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-lime));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* Base Sections Layout */
.section-py { padding: 5rem 0; position: relative; }
@media (min-width: 768px) { .section-py { padding: 8rem 0; } }

/* Cards & Buttons */
.btn-gradient-outline {
  position: relative;
  display: inline-block;
  padding: 1.25rem 3rem;
  background: transparent;
  border-radius: 50px;
  overflow: hidden;
  transition: transform 0.3s ease;
  isolation: isolate;
}
.btn-gradient-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple), var(--color-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: 1;
}
.btn-gradient-outline:hover { transform: scale(1.05); }
.btn-gradient-outline .bg-hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-pink), var(--color-purple), var(--color-cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}
.btn-gradient-outline:hover .bg-hover { opacity: 1; }
.btn-gradient-outline .btn-text {
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  font-size: 1.125rem;
}

/* --- Accessibility & WCAG 2.2 --- */
*:focus-visible {
  outline: 3px solid var(--color-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Readability Mode --- */
html[data-theme="readable"] {
  --bg-black: #ffffff;
  --text-white: #111111;
  /* Mute vibrant gradients to grayscale */
  --color-pink: #555555;
  --color-purple: #555555;
  --color-cyan: #555555;
  --color-lime: #555555;
  --color-gold: #555555;
}

html[data-theme="readable"] body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-size: 1.05rem; 
}

/* Newspaper typography */
html[data-theme="readable"] h1, 
html[data-theme="readable"] h2, 
html[data-theme="readable"] h3, 
html[data-theme="readable"] h4, 
html[data-theme="readable"] h5, 
html[data-theme="readable"] h6 {
  font-family: 'Work Sans', sans-serif !important;
  letter-spacing: normal !important;
  font-weight: 800;
  color: #000000 !important;
}

/* Stripping texts of gradients */
html[data-theme="readable"] .text-gradient,
html[data-theme="readable"] .text-gradient-blue,
html[data-theme="readable"] [style*="-webkit-background-clip: text"] {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  text-fill-color: initial !important;
  color: #000000 !important;
}

/* Hiding decorative overlays */
html[data-theme="readable"] .glow,
html[data-theme="readable"] .cglow {
  display: none !important;
  opacity: 0 !important;
}

/* Neutralizing background images and gradients on structural elements */
html[data-theme="readable"] [style*="HintergrundRainbow"],
html[data-theme="readable"] [style*="radial-gradient"],
html[data-theme="readable"] [style*="linear-gradient"],
html[data-theme="readable"] [style*="blur"] {
  background-image: none !important;
  background-color: #ffffff !important;
  filter: none !important;
}

/* Borders and lines */
html[data-theme="readable"] .border-white-10,
html[data-theme="readable"] header,
html[data-theme="readable"] footer {
  border-color: #cccccc !important;
  background-color: #ffffff !important;
}

html[data-theme="readable"] [style*="rgba(255,255,255,0.1)"] {
  border-color: #cccccc !important;
}

/* Content font bump and contrast */
html[data-theme="readable"] p,
html[data-theme="readable"] span,
html[data-theme="readable"] [style*="rgba(255,255,255,0."] {
  color: #333333 !important;
}

html[data-theme="readable"] p {
  font-size: 1.125rem !important;
  line-height: 1.7 !important;
}

/* Specific component fixes for readability mode */
html[data-theme="readable"] .lang-btn, 
html[data-theme="readable"] .lang-sep,
html[data-theme="readable"] .footer-heading,
html[data-theme="readable"] .footer-link {
  color: #333333 !important;
}

html[data-theme="readable"] .lang-btn.active {
  color: #000000 !important;
  text-decoration: underline;
}

html[data-theme="readable"] .card-inner,
html[data-theme="readable"] .ccard-inner,
html[data-theme="readable"] .tl-content,
html[data-theme="readable"] [style*="background: var(--bg-black)"] {
  background-color: #ffffff !important;
  border: 1px solid #bbbbbb !important;
}

html[data-theme="readable"] .btn-gradient-outline::before {
  background: #555555 !important;
}

html[data-theme="readable"] .btn-gradient-outline .bg-hover {
  background: #e0e0e0 !important;
}

html[data-theme="readable"] .btn-gradient-outline:hover .btn-text {
  color: #000000 !important;
}

html[data-theme="readable"] #themeToggleBtn {
  border-color: #aaaaaa !important;
  color: #000000 !important;
}
