/* ==========================================================================
   CSS Reset & Accessibility Foundation - MINGAnet
   ========================================================================== */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.65;
  font-family: var(--font-ui);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-clay);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-sun);
  outline-offset: 2px;
}

/* Accessible focus visible */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

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