/* static/css/base.css — Global reset and base styles */

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

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

ul, ol {
  list-style: none;
}

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

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: all var(--duration-base) var(--ease-standard);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-text-primary);
  color: var(--color-bg);
}

.btn--primary:hover {
  background: var(--color-accent);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: var(--border);
}

.btn--secondary:hover {
  border-color: var(--color-text-primary);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn--accent:hover {
  background: var(--color-accent-hover);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: 16px;
}

/* Typography utility classes */
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 10px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 24px; }

/* HTMX indicators */
.htmx-indicator {
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}
.htmx-request .htmx-indicator,
.htmx-indicator.htmx-request {
  opacity: 1;
}

/* Skeleton loading for HTMX */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-border) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
