/* ═══════════════════════════════════════════════════════════════════════════════
 * Cookie AI — CSS Reset
 * ═══════════════════════════════════════════════════════════════════════════════
 * Work Unit: WU-02 — CSS Design System
 * A modern CSS reset for consistent cross-browser styling
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Box sizing rules */
* {
  box-sizing: border-box;
}

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

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

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

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

/* Remove list styles on ul, ol with role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* A elements inherit color */
a {
  color: inherit;
  text-decoration: none;
}

/* Make images easier to work with */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font: inherit;
}

/* Make textarea behave like input */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored should have scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Remove animations for people who prefer reduced motion */
@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;
  }
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* Skip link styles (hidden until focused) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--copper);
  color: var(--text-dark);
  z-index: 9999;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
}
