/* === ROOT VARIABLES === */
:root {
  /* === Colors === */
  --color-header: #ffffff;           /* White headers */
  --color-accent: #b1b1b1;           /* Grey to replace gold */
  --color-text: #ffffff;             /* General text */
  --color-bg: #000000;               /* Background black */
  --popup-bg: rgba(0, 0, 0, 0.85);
  --popup-overlay: rgba(0, 0, 0, 0.7);
  --scrollbar-track: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb: var(--color-accent);
  --link-hover-brightness: 1.3;

  /* === Typography === */
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Orbitron', sans-serif;

  /* === Spacing === */
  --spacing-2xs: 0.25rem;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* === Radii === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* === Borders === */
  --border-width: 2px;
  --border-style: solid;
  --border-color: var(--color-accent);

  /* === Transitions === */
  --transition-speed: 0.3s;
  --transition-ease: ease;

  /* === Sizes === */
  --max-content-width: 90%;
  --popup-width: 400px;
  --scrollbar-width: 8px;
  --footer-offset: 20px;
}

/* === FONTS === */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/orbitron-v34-latin/orbitron-v34-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/orbitron-v34-latin/orbitron-v34-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v19-latin/inter-v19-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter-v19-latin/inter-v19-latin-800.woff2') format('woff2');
}

/* === GLOBAL RESET & NORMALIZATION === */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: var(--font-main);
}

/* === TYPOGRAPHY & BASIC ELEMENTS === */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color: var(--color-text);
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: normal;
  color: var(--color-header);
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
#root, #app {
  isolation: isolate;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-bg);
  color: var(--color-text);
  padding: var(--spacing-xs) var(--spacing-md);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* === LAYOUT AND BACKGROUND === */
body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100vh;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: var(--color-bg);
  background-image: url('../webp/sw.webp');
}

/* === VIGNETTE EFFECT === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 100% 70% at center,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.85) 85%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

/* === HIDDEN HEADING === */
h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* === POPUP WINDOWS === */
#kontakt-popup, #impressum-popup {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--popup-overlay);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* === IMPRESSUM POPUP === */
#impressum-popup .popup-content {
  max-height: 80vh;
  overflow-y: auto;
}
.popup-content {
  background-color: var(--popup-bg);
  border: var(--border-width) var(--border-style) var(--border-color);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  max-width: var(--max-content-width);
  width: var(--popup-width);
  text-align: center;
  position: relative;
}
.popup-content h2 {
  margin: 0;
  color: var(--color-header);
}
.popup-content p {
  margin-top: var(--spacing-sm);
}
.popup-content a {
  color: var(--color-accent);
}
.popup-content .hey {
  font-size: 0.85rem;
  text-transform: uppercase;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* === RESPONSIVE POPUPS === */
@media (max-width: 480px) {
  .popup-content {
    width: 90%;
    padding: var(--spacing-sm);
  }
}

/* === DATENSCHUTZ POPUP === */
#datenschutz-popup {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--popup-overlay);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.scrollable {
  max-height: 80vh;
  overflow-y: auto;
}

/* === CUSTOM SCROLLBAR (WEBKIT) === */
.scrollable::-webkit-scrollbar {
  width: var(--scrollbar-width);
}
.scrollable::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
.scrollable::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: var(--radius-sm);
}

/* === CUSTOM SCROLLBAR (FIREFOX) === */
.scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* === FOOTER === */
footer {
  position: absolute;
  bottom: var(--footer-offset);
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links li {
  display: inline;
}
.footer-links a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  position: relative;
  transition: all var(--transition-speed) var(--transition-ease);
  text-transform: uppercase;
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform-origin: center;
  transition: transform var(--transition-speed) var(--transition-ease);
}
.footer-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}
.footer-links a:hover {
  letter-spacing: 0.5px;
  filter: brightness(var(--link-hover-brightness));
}

/* === RIGHT CLICK WARNING === */
#rightclick-warning {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--popup-bg);
  border: var(--border-width) var(--border-style) var(--border-color);
  color: var(--color-accent);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: 1rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.4s var(--transition-ease);
  text-align: center;
}
