/**
 * Design System Base
 * Foundation styles - must load FIRST
 * 
 * This file contains the base design system that all other CSS should build upon.
 * Load this BEFORE any component or page-specific CSS.
 */

/* Import design tokens */
@import url("./tokens.css");

/* Base resets and typography */
* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 100%;
  min-height: 100vh;
  font-family: var(--font-body, "Atkinson Hyperlegible", sans-serif);
  font-size: var(--font-size-base, 16px);
  line-height: var(--line-height-base, 24px);
  color: var(--text-primary, #ededed);
  background-color: var(--surface-0, #121418);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
}

/* Typography hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display, "Orbitron", sans-serif);
  letter-spacing: 0.05em;
  margin: 0;
}

.stat-value,
.roll-result,
code,
pre {
  font-family: var(--font-mono, "Roboto Mono", monospace);
}

.chat-message,
.narrative-text,
p,
li,
span {
  font-family: var(--font-body, "Atkinson Hyperlegible", sans-serif);
  line-height: 1.6;
}

/* Utility classes - no !important needed with proper cascade */
.hidden {
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.active {
  display: flex;
}

/* Screen visibility - use classes, not !important */
.screen-visible {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.screen-hidden {
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
