/* ============================================================
   Roni's Health Tracker — Base
   Reset, typography, global element behavior.
   ============================================================ */

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background var(--t-med), color var(--t-med);
}

h1, h2, h3, h4 { color: var(--heading); font-weight: 500; }

a { color: var(--accent); }

img, svg { display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}

::selection { background: var(--pink-soft); color: var(--text); }

/* Text helpers */
.soft { color: var(--text-soft); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* Screen-reader-only text */
.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;
}

/* Reduced motion: collapse all animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
