/* ===================================
   CSS Reset - Chinle Planting Hope
   Modern CSS Reset - 2024+ Best Practices
   Based on Josh Comeau & Andy Bell methodologies
   =================================== */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin for common elements */
body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl, dd {
  margin: 0;
}

/* 3. Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

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

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

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

/* 7. SVG handling - keep inline-block for flexibility */
svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

/* 9. Remove default button styles while keeping accessibility */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

/* 10. Ensure buttons can wrap text */
button,
input,
select,
textarea {
  line-height: inherit;
}

/* 11. Remove default textarea resize behavior on iOS */
textarea {
  resize: vertical;
}

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

/* 13. Improve heading and paragraph text wrapping (modern browsers) */
@supports (text-wrap: balance) {
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }
}

@supports (text-wrap: pretty) {
  p {
    text-wrap: pretty;
  }
}

/* 14. Remove underline from links and improve touch targets */
a {
  text-decoration-skip-ink: auto;
  color: inherit;
}

/* 15. Improve table defaults */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* 16. Better focus styles for accessibility */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 17. Remove animations for people who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 18. Remove all animations and transitions for print */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
