/* CSS Reset & Base Styles */

/* Box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margin & padding */
* {
  margin: 0;
  padding: 0;
}

/* HTML & Body */
html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  line-height: var(--leading-normal);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Images & Media */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form Elements */
input, button, textarea, select {
  font: inherit;
}

/* Remove button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
}

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

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  font-weight: var(--font-semibold);
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

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

*:focus:not(:focus-visible) {
  outline: none;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-sm);
}

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

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