/* ════════════════════════════════════════════════════════
   PetCare — Base: reset, body, typography, accessibility
   helpers, scroll reveal, wave dividers.
   Order: layout → typography → visual → animation.
   ════════════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background .35s, color .35s;
}

/* Lazy-loading note: any future <img> added to the site must
   carry loading="lazy" (and width/height to avoid CLS). */
img { max-width: 100%; }

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

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--orange);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Skip-link target — focusable but no outline on the whole page */
main:focus { outline: none; }

/* Visible keyboard focus for every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ── ICON BASE ── */
.icon {
  width: 1em; height: 1em;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── SECTION SHARED TYPOGRAPHY ── */
.section-kicker {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--section-tag);
  margin-bottom: 10px;
}
.section-h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400; line-height: 1.2;
  color: var(--text);
  margin-bottom: 14px;
  transition: color .35s;
}
.section-sub {
  font-size: .97rem;
  color: var(--text-m);
  line-height: 1.75;
  transition: color .35s;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left {
  opacity: 0; transform: translateX(-28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1);
}
.reveal-right {
  opacity: 0; transform: translateX(28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1);
}
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s }
.d2 { transition-delay: .2s }
.d3 { transition-delay: .3s }
.d4 { transition-delay: .4s }

/* ── Accessibility & robustness fallback ──────────────────────────────────────
   The scroll-reveal effect hides content at opacity:0 until JS adds .visible.
   For visitors who prefer reduced motion, force all reveal content visible and
   neutralise animations/transitions so the page is fully usable and never
   stuck blank. (A <noscript> block in index.html covers the JS-disabled case.) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── WAVE DIVIDERS (theme-aware backgrounds, no inline styles) ── */
.wave-wrap { line-height: 0; overflow: hidden; margin-top: -2px; }
.wave-wrap svg { display: block; width: 100%; }

.wave-hero-features    { background: var(--hero-scene-3); transition: background .35s; }
.wave-features-stories { background: var(--bg);           transition: background .35s; }
