/* ============================================================
   CSS RESET — Modern, accessible baseline
   Based on Andy Bell's modern reset with additions for
   accessibility and reduced-motion preferences.
   ============================================================ */

/* Box sizing */
*,
*::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;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: var(--leading-normal, 1.6);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight, 1.2);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

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

/* Maintain intrinsic aspect ratio */
img,
video {
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Reset button styles */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Textarea without resize unless specified */
textarea:not([rows]) {
  min-height: 10em;
}

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

/* Remove all animations and transitions for people who prefer not to see them */
@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 visible — only show focus ring on keyboard navigation */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary, #C9685A);
  outline-offset: 3px;
  border-radius: 2px;
}

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

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

/* Dialog/details reset */
summary {
  cursor: pointer;
}

dialog {
  border: none;
  padding: 0;
}
