/* ============================================================
   BASE STYLES - Reset & Typography
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

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

button:disabled {
  cursor: not-allowed;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

ul, ol {
  list-style: none;
}

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

/* Focus visible */
*:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Utility classes */
.font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.font-mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { 
  position: absolute; 
  width: 1px; height: 1px; 
  padding: 0; overflow: hidden; 
  clip: rect(0, 0, 0, 0); 
  white-space: nowrap; border: 0; 
}

.muted { color: var(--muted); }
.text-positive { color: var(--positive); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }

/* Loading splash */
#loading-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 1000;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--brand-black);
  color: var(--brand-burgundy);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.loading-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(122, 24, 32, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-text {
  color: var(--muted);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
