/* ===========================================================================
   Peaceful Paws NY — base.css
   Modern reset, document defaults, typography baseline, accessibility plumbing
   (skip link, focus-visible, reduced motion). Loaded after tokens.css.
   =========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
  /* A barely-there meadow wash: two soft sage/clay glows fading into cream.
     Fixed so it stays serene as the page scrolls. */
  background-image:
    radial-gradient(70rem 50rem at 110% -10%, rgba(138, 168, 147, 0.18), transparent 60%),
    radial-gradient(55rem 45rem at -10% 5%, rgba(201, 139, 107, 0.10), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

svg { fill: currentColor; }

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--clay-deep); text-decoration-color: currentColor; }

ul, ol { padding-left: 1.25rem; }

/* ---- Headings ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  font-weight: 380;            /* Fraunces light — softer than a bold display */
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 40, 'SOFT' 60, 'WONK' 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

strong, b { font-weight: 600; }

::selection {
  background: color-mix(in srgb, var(--sage) 45%, transparent);
  color: var(--ink);
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
}

/* ---- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--sage-deep);
  color: var(--white);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* ---- Visually-hidden (still read by screen readers) --------------------- */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Focus-visible ------------------------------------------------------ */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ---- Reduced motion ----------------------------------------------------- */
@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;
  }
  /* Reveal-on-scroll elements must never stay hidden when motion is off. */
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
