/* ==========================================================================
   Modern CSS Reset - Skeleton Crew
   ==========================================================================
   A minimal, modern reset. Sets sensible defaults, removes browser
   inconsistencies, and establishes accessible focus styles.
   ========================================================================== */

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

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

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

/* --- Headings and body text --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

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

/* --- Remove list styles on lists with a role attribute ---
   Lists used for navigation or UI (role="list") should not
   have bullet points. Plain lists keep their defaults. */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* --- Accessible focus styles ---
   Visible focus ring using the accent colour. Only shows on
   keyboard navigation (focus-visible), not on mouse clicks. */
:focus-visible {
  outline: 2px solid var(--color-accent, #2ECC40);
  outline-offset: 3px;
}

/* Remove outline on mouse focus for cleaner visuals */
:focus:not(:focus-visible) {
  outline: none;
}

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

/* --- Remove all animations and transitions for users who prefer
   reduced motion. Smooth scrolling is also disabled. --- */
@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;
  }
}

/* --- Smooth scrolling - only when motion is acceptable --- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
