/* ==========================================================================
   Base — Reset + Typography (from LF, adapted for PetLife)
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3, h4 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-main);
}
h1 { font-size: var(--font-size-2xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--font-size-xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-md); }
h4 { font-size: var(--font-size-md); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); color: var(--color-text-sub); }
small { font-size: var(--font-size-xs); color: var(--color-text-sub); }

a { color: var(--color-accent); transition: color var(--timing-fast) ease; }
a:hover { opacity: 0.85; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }
::selection { background-color: var(--color-accent); color: #fff; }
