/* public/assets/css/reset.css
 *
 * Modern CSS reset. Removes browser defaults that interfere with design;
 * preserves user-agent semantics that matter for accessibility.
 * Spec 13 §7.1 conventions.
 */

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

/* === Remove default margins === */
* {
  margin: 0;
}

/* === Document === */
html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

/* === Headings get sensible defaults; weight tokens not defined in spec 11,
 *    so use raw numeric per Phase 2 plan. === */
h1 { font-size: var(--text-3xl); font-weight: 600; }
h2 { font-size: var(--text-2xl); font-weight: 600; }
h3 { font-size: var(--text-xl);  font-weight: 600; }
h4 { font-size: var(--text-lg);  font-weight: 500; }
h5 { font-size: var(--text-md);  font-weight: 500; }
h6 { font-size: var(--text-sm);  font-weight: 500; }

/* === Buttons reset to plain text; components add their own treatment === */
button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* === Links === */
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

/* === Focus — visible outline for keyboard users === */
*:focus {
  outline: none;
}
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* === Selection === */
::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* === Reduced motion — disable non-essential animation per spec 11 §2.3 + §7 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
