/* ═══════════════════════════════════════════════════════════
   IRENACER — Modern CSS Reset
   Based on Josh Comeau's + Andy Bell's resets, adapted for a11y.
   ═══════════════════════════════════════════════════════════ */

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

/* Remove default margin & 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;
}

/* Smooth scroll — respect user preference */
@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;
  }
}

/* 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;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Paragraphs */
p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Anchors — inherit color by default, accessible underlines */
a {
  color: inherit;
  text-decoration-skip-ink: auto;
}

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

/* Form elements — inherit typography */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Textarea — only vertical resize */
textarea {
  resize: vertical;
}

/* Button reset */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove built-in form typography */
input::placeholder,
textarea::placeholder {
  opacity: 1;
}

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

/* Focus styles — accessible & visible */
:focus-visible {
  outline: 3px solid var(--color-primary-400, #4aad4a);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content (a11y) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: var(--z-top, 9999);
  padding: 0.75rem 1.5rem;
  background: var(--color-primary-500, #2d8a2d);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s;
}

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

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