/**
 * Reset CSS
 * 
 * Minimal reset/normalize for consistent cross-browser rendering.
 * Collekton UI System
 */

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

/* Remove default margins and padding */
html,
body,
h1, h2, h3, h4, h5, h6,
p,
blockquote,
pre,
figure,
figcaption,
dl, dd,
ol, ul {
  margin: 0;
  padding: 0;
}

/* Set core root defaults */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove list styles */
ul[role='list'],
ol[role='list'],
ul[class],
ol[class] {
  list-style: none;
}

/* Anchor elements */
a {
  text-decoration-skip-ink: auto;
  color: inherit;
}

a:not([class]) {
  text-decoration-color: currentColor;
}

/* Images and media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for form elements */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove default button styles */
button {
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

/* Textarea resize */
textarea {
  resize: vertical;
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove animations for 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;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-focus, #2563eb);
  outline-offset: 2px;
}

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

/* Remove default fieldset styles */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  padding: 0;
}

/* Hidden attribute support */
[hidden] {
  display: none !important;
}

/* Screen reader only utility */
.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;
}
