/**
 * Modern CSS Reset
 *
 * Based on Josh Comeau's CSS Reset with Lemonal customizations.
 * Removes browser inconsistencies while preserving useful defaults.
 */

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

/* Set smooth scrolling with reduced motion respect */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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

/* 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, h5, h6 {
  line-height: var(--leading-tight, 1.25);
  text-wrap: balance;
}

/* 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%;
  height: auto;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

/* Textarea default without horizontal resize */
textarea {
  resize: vertical;
}

/* Remove button styling */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove fieldset styling */
fieldset {
  border: none;
}

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

/* Anchor defaults */
a {
  text-decoration: none;
  color: inherit;
}

/* Remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--ocean, #0891B2);
  outline-offset: 3px;
}

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

/* Hidden utility for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--midnight, #164E63);
  color: var(--white, #FFFEF9);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 9999;
  transition: top 0.2s ease;
}

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