/* ===================================================================
   PawSense — shared visual baseline (SINGLE SOURCE OF TRUTH)
   -------------------------------------------------------------------
   Blank-slate baseline: neutral tokens + minimal, unopinionated
   component styles. Every page links this file, so the new design
   direction will be built here and cascade site-wide.
   Purely presentational, reduced-motion-safe, zero layout shift.
   =================================================================== */

:root {
  /* Type — neutral system stack for now (design direction TBD). */
  --font-body:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-display: var(--font-body);

  /* Neutral greyscale palette — a clean slate to design from. */
  --ink: #1a1a1a;
  --ink-soft: #444444;
  --muted: #767676;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --line: #e3e3e3;
  --brand: #1a1a1a;
  --brand-600: #000000;
  --brand-200: #cfcfcf;
  /* Single accent — oxblood red. Applied sparingly (buttons, outlines,
     links, kickers). Swap these three values to re-tint the whole site. */
  --accent: #9b3b32;
  --accent-600: #7a2f27;
  --accent-100: #efdad6;
  --cream: #fafafa;
  --paper-card: #ffffff;

  /* Framing */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

  /* Spacing rhythm */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --maxw: 1200px;
}

/* ---- Base typography (cascades to every linked page) ---- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1,
h2,
h3,
h4,
.display {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
}
h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
}
h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

p {
  color: var(--ink-soft);
}

/* Eyebrow/kicker hook — carries the accent for a subtle pop of colour. */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-600);
  display: block;
  margin-bottom: var(--space-3);
}

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

/* ---- Shared site header / nav (cascades to pages without their own) ---- */
#header-mount header,
body > header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#header-mount h1,
body > header h1 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin: 0;
}
#header-mount nav ul,
body > header nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}
#header-mount nav a,
body > header nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
#header-mount nav a:hover,
body > header nav a:hover {
  color: var(--brand);
}

/* ---- Section heading rhythm ---- */
.section-head {
  margin: var(--space-12) 0 var(--space-6);
}

/* ---- Buttons — minimal, with the accent carrying the colour ---- */
.btn-primary,
.btn-secondary {
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
/* Primary = solid accent fill. */
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
}
/* Secondary = clean white outline with a hint of lift; accent on hover. */
.btn-secondary {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-600);
  box-shadow: var(--shadow);
}

/* ---- Form controls — usable custom dropdowns (kept, neutral) ---- */
select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23444444' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 36px 10px 14px;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
select:hover {
  border-color: var(--brand-200);
}
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  margin: 10px 0 22px;
}
.filter-bar label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 4px 0 10px;
}
.filter-bar label:first-child {
  margin-left: 0;
}

/* ---- Image placeholders (neutral; keeps layout dims to avoid CLS) ---- */
.ph-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
  background: var(--bg-soft);
}
.ph-tile svg {
  width: 46px;
  height: 46px;
  opacity: 0.5;
}
.ph-tile span {
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ph-mini {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--bg-soft);
}
.ph-mini svg {
  width: 46%;
  height: 46%;
  max-width: 34px;
  max-height: 34px;
  opacity: 0.5;
}

/* ---- Cards (product + category) ---- */
.prod-card,
.cat-tile {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.prod-card:hover,
.prod-card:focus-visible,
.cat-tile:hover,
.cat-tile:focus-visible {
  border-color: var(--accent-100);
  box-shadow: var(--shadow-sm);
}

/* ===================================================================
   Motion primitives — scroll reveal (kept, minimal). Reveal only
   activates once JS adds `.js-reveal` to <body>, so content is never
   hidden for no-JS users or crawlers (SEO-safe).
   =================================================================== */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  will-change: opacity, transform;
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===================================================================
   Reusable lazy VIDEO SLOT (apparatus for later clips).
   Hidden by default; a page shows it by adding `data-has-video`.
   =================================================================== */
.media-slot {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.media-slot[data-has-video] {
  display: block;
}
.media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Respect reduced-motion everywhere ---- */
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .prod-card,
  .cat-tile,
  .btn-primary,
  .btn-secondary {
    transition: none;
  }
}
