/* === ROOT VARIABLES === */
:root {
  --color-header: #ffffff;
  --color-accent: #b1b1b1;
  --color-text: #ffffff;
  --color-bg: #000000;
  --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;

  --font-main: 'Inter', sans-serif;
  --font-heading: 'Orbitron', sans-serif;

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

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --border-width: 2px;
  --border-style: solid;
  --border-color: var(--color-accent);

  --transition-speed: 0.3s;
  --transition-ease: ease;

  --max-content-width: 90%;
  --popup-width: 400px;
  --scrollbar-width: 8px;
  --footer-offset: 2vh;
}

/* === 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');
}

/* === RESET & GLOBAL STYLES === */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: var(--font-main);
  overflow-x: hidden;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color: var(--color-text);
  background-image: url('../webp/sw-hd.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center -5%;
  background-color: var(--color-bg);
}

/* === TYPOGRAPHY === */
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;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
#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;
}

/* === VIGNETTE === */
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%
  );
}

/* === HEADER (RESPONSIVE) === */
header {
  position: absolute;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 0 1rem;
  width: 100%;
  max-width: 95vw;
  box-sizing: border-box;
}

header h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

header h2 {
  font-size: clamp(1.1rem, 3vw, 2rem);
  margin: 0.5rem 0 0;
  white-space: nowrap;
}


/* === MOBILE ADJUSTMENTS === */
@media (max-width: 768px) {
  header {
    top: 5vh;
    padding: 0 1.5rem;
  }

  header h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  header h2 {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }
}

/* === SCROLLABLE ELEMENTS === */
.scrollable {
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.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);
}

/* === FOOTER === */
footer {
  position: absolute;
  bottom: var(--footer-offset);
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
  padding: var(--spacing-sm);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  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: clamp(0.9rem, 2vw, 1rem);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.4s var(--transition-ease);
  text-align: center;
}
