/**
 * RADEXEL Design System - Modern CSS Reset
 *
 * Normalizes browser defaults for a consistent baseline.
 * - box-sizing: border-box everywhere
 * - Margin / padding removed
 * - Images are block-level
 * - Buttons & inputs inherit font
 * - Smooth scrolling (respects prefers-reduced-motion)
 */

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

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

/* Prevent font-size inflation on mobile */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

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

/* Images, pictures, videos, canvases, and SVGs */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

/* Textarea without inline resize handle (use CSS resize instead) */
textarea {
  resize: vertical;
}

/* Anchors without underline by default - component styles handle decoration */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists - remove default bullets/numbering */
ul,
ol {
  list-style: none;
}

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

/* Remove button native styling */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Fieldset & legend */
fieldset {
  border: none;
}

/* Remove default summary marker */
summary {
  cursor: pointer;
}

/* Avoid text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Headings reset */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

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

/* Root stacking context for #app-root */
#app-root {
  isolation: isolate;
}

/* Respect 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;
  }
}
