/* ==========================================================================
   reset.css — Modern, minimal CSS reset
   --------------------------------------------------------------------------
   Normalizes browser defaults without stripping useful semantics. Tuned for
   an RTL-first, logical-property layout (no directional left/right rules).
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Respect users who prefer reduced motion — disable smooth scroll & animation */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-block-size: 100vh;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
}

/* Media defaults — block-level, never overflow their container */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

/* Inherit fonts on form controls */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* Balance headings and prevent overflow / clipping (per §4 rule 2) */
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Accessible focus ring */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Fully hidden (not rendered). Used to disable a feature in the UI while
   keeping its markup + JS wiring intact for future activation. */
.is-hidden {
  display: none !important;
}

/* Hidden but available to assistive tech */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
