/* Base Styles and Resets */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

p {
  line-height: var(--line-height-normal);
}

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

/* 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-width: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

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

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

/* Error Field Styles */
input.error-field,
textarea.error-field,
select.error-field {
  border-color: var(--color-error) !important;
  background-color: rgba(239, 68, 68, 0.05) !important;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Utility Classes */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.group:hover .group-hover\:text-primary {
  color: var(--color-primary);
}

/* Backdrop Blur Support */
.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

/* Smooth Scrolling */
html.scroll-smooth {
  scroll-behavior: smooth;
}

/* Print Styles */
@media print {
  .no-print {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  body {
    border: 1px solid var(--color-text-primary);
  }
}

/* Touch Device Adjustments */
@media (hover: none) and (pointer: coarse) {
  button,
  a {
    padding: 0.5rem;
  }
  
  button:hover,
  a:hover {
    background-color: transparent;
  }
}