/* =============================================================================
   СЛЕД Design System — Base Styles
   Deep black foundation, cream text, gold accents, sharp edges
   ============================================================================= */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
}

/* Noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.015;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
* { scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent; }

/* Selection */
::selection { background: rgba(196, 149, 90, 0.25); color: var(--text-primary); }

/* Typography — Bebas Neue headings, wide tracking */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-bright); }

strong, b { font-weight: 600; }

code, pre, kbd, samp { font-family: var(--font-mono); }

code {
  background: var(--bg-panel);
  padding: 0.15em 0.4em;
  border-radius: 0;
  font-size: 0.88em;
  color: var(--accent);
}

pre {
  background: var(--bg-panel);
  padding: var(--space-lg);
  border-radius: 0;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}
pre code { background: none; padding: 0; }

ul, ol { padding-left: var(--space-lg); color: var(--text-secondary); }
li { margin-bottom: var(--space-xs); }

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

table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--space-sm) var(--space-md); text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { font-weight: 500; color: var(--text-dim); font-size: var(--font-size-xs); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
td { color: var(--text-secondary); font-family: var(--font-mono); font-size: var(--font-size-sm); }
tr:hover td { background: var(--accent-subtle); }

hr { border: none; height: 1px; background: var(--border-default); margin: var(--space-xl) 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Font utilities */
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

/* Text color utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-violet { color: var(--accent); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }

/* Monospace labels */
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
