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

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  font-feature-settings: "ss01", "ss03", "cv11";
  letter-spacing: -0.005em;
  min-height: 100%;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  transition: background-color var(--duration-normal) var(--ease-default),
              color var(--duration-normal) var(--ease-default);
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Global selection + focus */
::selection {
  background: var(--color-primary-light);
  color: var(--color-text-primary);
}

/* Scrollbar — slightly wider, warmer thumb */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-bg-primary);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-border-strong); }
* { scrollbar-width: thin; scrollbar-color: var(--color-border-default) transparent; }

/* Typography — editorial hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}
h1 { font-size: var(--text-3xl); font-weight: var(--font-weight-medium); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); font-weight: var(--font-weight-medium); letter-spacing: -0.015em; }
h3 { font-size: var(--text-xl);  font-weight: var(--font-weight-medium); letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg);  font-weight: var(--font-weight-medium); letter-spacing: -0.005em; }
h5 { font-size: var(--text-base);font-weight: var(--font-weight-semibold); }
h6 {
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

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

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.75em;
  font-weight: var(--font-weight-medium);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}
a:hover {
  color: var(--color-primary-hover);
}

/* Honor prefers-reduced-motion globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility classes */
