/*
 * ==============================================================================
 * CSS Reset Stylesheet
 * ==============================================================================
 * A minimal, modern CSS reset based on LittleLink
 * Normalizes browser defaults to ensure consistent rendering across browsers
 * ==============================================================================
 */

/* ==============================================================================
 * Box Sizing Rules
 * ==============================================================================
 * Ensures consistent box model across all elements
 * ------------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==============================================================================
 * Default Margin Reset
 * ==============================================================================
 * Removes default margins from common elements
 * Creates consistent spacing starting point
 * ------------------------------------------------------------------------------ */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* ==============================================================================
 * List Style Reset
 * ==============================================================================
 * Removes default list styles and spacing
 * Provides clean slate for custom list styling
 * ------------------------------------------------------------------------------ */
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==============================================================================
 * Core Root Defaults
 * ==============================================================================
 * Enables smooth scrolling for better user experience
 * ------------------------------------------------------------------------------ */
html:focus-within {
  scroll-behavior: smooth;
}

/* ==============================================================================
 * Core Body Defaults
 * ==============================================================================
 * Sets minimum height to fill viewport
 * Optimizes text rendering for readability
 * Applies font smoothing for crisp text on all platforms
 * ------------------------------------------------------------------------------ */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==============================================================================
 * Image Handling
 * ==============================================================================
 * Makes images responsive by default
 * Ensures images never overflow their containers
 * ------------------------------------------------------------------------------ */
img,
picture {
  max-width: 100%;
  display: block;
}

/* ==============================================================================
 * Form Element Font Inheritance
 * ==============================================================================
 * Ensures form elements inherit font settings from parent
 * Maintains consistent typography throughout the site
 * ------------------------------------------------------------------------------ */
input,
button,
textarea,
select {
  font: inherit;
}

/* ==============================================================================
 * Reduced Motion Support
 * ==============================================================================
 * Respects user preference for reduced motion
 * Essential for accessibility (WCAG 2.1)
 * Removes animations and transitions for users who prefer minimal 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;
  }
}

/* ==============================================================================
 * Modern Focus Styles
 * ==============================================================================
 * Provides clear visual feedback for keyboard navigation
 * Only shows focus outline when element is focused via keyboard
 * Hides focus outline for mouse users (better aesthetics)
 * ------------------------------------------------------------------------------ */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid #2457F5;
  outline-offset: 2px;
}

/* ==============================================================================
 * iOS Touch Callout Removal
 * ==============================================================================
 * Prevents iOS long-press menu on links
 * Provides cleaner touch interaction on mobile devices
 * ------------------------------------------------------------------------------ */
a {
  -webkit-touch-callout: none;
}