/*
 * PetMall.ai — site theme + static marketing surfaces (Session B2).
 *
 * Loaded AFTER the shared ecosystem token layer (design-tokens.css, copied
 * into dist/ at build time from _shared/styles — imported, never forked).
 * Per petspot-design-system §1.1/§1.5 this file owns ONLY:
 *   - the PetMall brand tokens (--color-primary/-dark/-light, display accent,
 *     cream band pair, --color-brand-50..900) and the heading font;
 *   - PetMall's own component and page styles.
 * Grays, semantics, spacing, transitions, z-index and the body font stay in
 * the shared layer and are consumed, not redefined.
 *
 * Authority: PETMALL-DESIGN.md (alpha.6) + the ratified site reference
 * (docs/petmall.md). Where a hi-fi PNG and PETMALL-DESIGN.md disagree on a
 * value, the .md wins.
 */

/* ==========================================================================
   1. Brand tokens (site layer only)
   ========================================================================== */

:root {
  --color-primary: #2D6BC4;
  --color-primary-dark: #2456A3;
  --color-primary-light: #5B8FD9;

  /* Display accent — decorative and large-type moments ONLY. Never a fill
     behind text of any size or colour; never a button fill. The interactive
     orange tier was retired by ratification 2026-08-17. */
  --color-accent-display: #F97634;

  /* Ecosystem family thread — footer ecosystem stripe + logo mark only. */
  --color-amber-thread: #F5A623;

  --color-cream: #FBF6EE;
  --color-cream-border: #F1E9DC;
  --color-blue-tint: #EAF1FA;

  --color-brand-50: #EAF1FA;
  --color-brand-100: #D5E3F5;
  --color-brand-200: #ABC7EA;
  --color-brand-300: #82ACE0;
  --color-brand-400: #5B8FD9;
  --color-brand-500: #2D6BC4;
  --color-brand-600: #2456A3;
  --color-brand-700: #1C4782;
  --color-brand-800: #143861;
  --color-brand-900: #0D2843;

  --font-family-heading: 'Raleway', system-ui, -apple-system, sans-serif;

  /* Radii, per the ratified mockups — containers never exceed 12px. */
  --pm-radius-button: 6px;
  --pm-radius-input: 8px;
  --pm-radius-card: 12px;

  /* The single permitted functional shadow (hero chat entry). Depth is
     otherwise tonal: band alternation + hairlines, never decorative shadow. */
  --pm-shadow-entry: 0 1px 2px rgba(45, 107, 196, 0.06);

  --pm-container: 1200px;
}

/* ==========================================================================
   2. Base — Raleway headings at 600 throughout, Inter body
   ========================================================================== */

body {
  color: var(--color-gray-700);
  background-color: var(--color-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  /* Hierarchy comes from size, not weight variety — 600 everywhere. */
  font-weight: 600;
  color: var(--color-gray-800);
  letter-spacing: normal;
  margin-bottom: 0;
}

h1 { font-size: 2rem;    line-height: 1.2; }   /* 32 → 36 at md */
h2 { font-size: 1.5rem;  line-height: 1.25; }  /* 24 → 30 at md */
h3 { font-size: 1.25rem; line-height: 1.25; }  /* 20 → 24 at md */
h4 { font-size: 1.125rem; line-height: 1.3; }  /* 18 → 20 at md */

p { margin-bottom: 0; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

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

img { max-width: 100%; height: auto; display: block; }

.pm-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   3. Layout primitives — banded page anatomy
   ========================================================================== */

.pm-container {
  width: 100%;
  max-width: var(--pm-container);
  margin-inline: auto;
  padding-inline: 16px;
}

.pm-prose { max-width: 65ch; }
.pm-prose-center { max-width: 65ch; margin-inline: auto; }

/* Bands alternate white and cream; hairlines separate them, never shadows. */
.pm-band { padding-block: 48px; }
.pm-band--white { background-color: var(--color-white); }
.pm-band--cream {
  background-color: var(--color-cream);
  border-block: 1px solid var(--color-cream-border);
}
.pm-band--tight { padding-block: 32px; }

.pm-stack > * + * { margin-top: 16px; }
.pm-stack-sm > * + * { margin-top: 8px; }
.pm-stack-lg > * + * { margin-top: 32px; }

.pm-eyebrow {
  font-family: var(--font-family-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.pm-lead { font-size: 1.125rem; line-height: 1.6; color: var(--color-gray-700); }
.pm-body { font-size: 1rem; line-height: 1.5; color: var(--color-gray-700); }
.pm-supporting { font-size: 0.875rem; line-height: 1.5; color: var(--color-gray-600); }
.pm-caption { font-size: 0.75rem; line-height: 1.4; color: var(--color-gray-500); }

.pm-center { text-align: center; }

/* ==========================================================================
   4. Buttons — blue is the only interactive voice
   ========================================================================== */

.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  border-radius: var(--pm-radius-button);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
}

.pm-btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.pm-btn--primary:hover { background-color: var(--color-primary-dark); color: var(--color-white); }

.pm-btn--secondary {
  background-color: var(--color-white);
  color: var(--color-primary-dark);
  border-color: var(--color-primary-light);
}
.pm-btn--secondary:hover {
  background-color: var(--color-blue-tint);
  color: var(--color-primary-dark);
}

/* Spot engagement carries no unique colour treatment — prominence is
   placement and size only (ratified 2026-08-17). */
.pm-btn--lg { padding: 14px 28px; font-size: 1rem; }

.pm-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
}
.pm-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

.pm-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pm-actions--center { justify-content: center; }

/* ==========================================================================
   5. Header
   ========================================================================== */

.pm-header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  position: relative;
  z-index: var(--z-index-header);
}
.pm-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.pm-header__brand { display: inline-flex; align-items: center; min-width: 0; }
.pm-header__logo { height: 32px; width: auto; }

.pm-header__nav { display: none; }
.pm-header__nav ul { display: flex; align-items: center; gap: 28px; }
.pm-header__nav a {
  font-size: 0.9375rem;
  color: var(--color-gray-700);
  padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.pm-header__nav a:hover { color: var(--color-primary-dark); }
.pm-header__nav a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.pm-header__end { display: flex; align-items: center; gap: 12px; }
.pm-header__signin {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
  white-space: nowrap;
}

.pm-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none;
  border: none;
  cursor: pointer;
}
.pm-header__toggle img { width: 44px; height: 44px; }

/* Mobile drawer — progressive enhancement; :target keeps it script-free. */
.pm-mobile-nav {
  display: none;
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-white);
}
.pm-mobile-nav:target { display: block; }
.pm-mobile-nav ul { padding-block: 8px; }
.pm-mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--color-gray-700);
  border-bottom: 1px solid var(--color-gray-100);
}
.pm-mobile-nav a[aria-current="page"] { color: var(--color-primary); font-weight: 500; }

/* ==========================================================================
   6. Hero + Spot chat entry
   ========================================================================== */

.pm-hero { padding-block: 40px 32px; }
.pm-hero__title { font-size: 1.875rem; line-height: 1.2; }
.pm-hero__subhead { margin-top: 16px; font-size: 1.0625rem; line-height: 1.6; color: var(--color-gray-600); }

.pm-hero__media { margin-top: 32px; }
.pm-hero__media img { width: 100%; border-radius: var(--pm-radius-card); }

/* Mobile leads with the photograph, then the headline — as in the ratified
   mobile hi-fi. From md up the order is headline-first, as on desktop. */
.pm-hero__inner { display: flex; flex-direction: column; }
.pm-hero__inner > .pm-hero__media { order: -1; margin-top: 0; margin-bottom: 28px; }

/* Meet Spot split hero — copy left, square photograph right. */
.pm-meet-hero { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
.pm-meet-hero__img { border-radius: var(--pm-radius-card); width: 100%; }

/* Full-bleed need-page hero band. */
.pm-hero-photo { line-height: 0; background-color: var(--color-gray-100); }
.pm-hero-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

/* The hero chat entry is the homepage Spot presence zone. */
.pm-entry {
  margin-top: 24px;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--pm-radius-card);
  padding: 16px;
  box-shadow: var(--pm-shadow-entry);
}
.pm-entry__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-gray-800);
  margin-bottom: 10px;
}
.pm-entry__row { display: flex; flex-direction: column; gap: 10px; }
.pm-entry__input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family-base);
  font-size: 1rem;
  color: var(--color-gray-800);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--pm-radius-input);
}
/* Placeholder text is gray-500 (#6B7280), ratified 2026-09-01 — the previous
   #9CA3AF measured 2.54:1 on white, below AA. */
.pm-entry__input::placeholder { color: var(--color-gray-500); }
.pm-entry__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 107, 196, 0.12);
}
.pm-entry__note { margin-top: 12px; }
.pm-entry__note p { font-size: 0.8125rem; line-height: 1.5; color: var(--color-gray-500); }
.pm-entry__note p + p { margin-top: 2px; }

/* Suggestion chips — governed per-page chips on need pages. */
.pm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pm-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-primary-dark);
  background-color: var(--color-blue-tint);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  text-align: left;
}
.pm-chip:hover { border-color: var(--color-primary-light); color: var(--color-primary-dark); }

/* Quiet, non-conversational Spot zone — document-class pages (About,
   Affiliate Disclosure). The zone is mandatory on every page; its treatment
   here is deliberately understated. */
.pm-spot-quiet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background-color: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--pm-radius-card);
}
.pm-spot-quiet p { font-size: 0.9375rem; color: var(--color-gray-600); }

/* ==========================================================================
   7. Entry ("mission") cards — the wayfinding unit
   ========================================================================== */

.pm-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }

.pm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--pm-radius-card);
  padding: 16px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}
/* Cards on cream stay white; only the hairline changes. */
.pm-band--cream .pm-card { border-color: var(--color-cream-border); }
.pm-card:hover { border-color: var(--color-primary-light); }
.pm-card__icon { flex: 0 0 auto; width: 52px; height: 52px; }
.pm-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.pm-card__body { display: block; }
.pm-card__title {
  display: block;
  font-family: var(--font-family-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-gray-800);
}
.pm-card__support {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-gray-500);
}
.pm-card__cta {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* The whole card is the hit target. */
.pm-card__link { display: block; color: inherit; height: 100%; }
.pm-card__link:hover { color: inherit; }
.pm-card { height: 100%; }

/* ==========================================================================
   8. Prose bands
   ========================================================================== */

.pm-section__header { margin-bottom: 20px; }
.pm-section__title { font-size: 1.5rem; line-height: 1.25; }
.pm-section__body > * + * { margin-top: 14px; }
.pm-section__body p { font-size: 1rem; line-height: 1.6; color: var(--color-gray-700); }

/* Standing integrity closer — set apart tonally, not decoratively. */
.pm-closer {
  margin-top: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--color-primary-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-600);
}

.pm-breadcrumb { font-size: 0.8125rem; color: var(--color-gray-500); }
.pm-breadcrumb a:hover { text-decoration: underline; }
.pm-breadcrumb a { color: var(--color-primary); }

/* ==========================================================================
   9. Recommendation cards (component preview only at 7.3 — no live catalog)
   ========================================================================== */

.pm-rec {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  background-color: var(--color-white);
  border: 1px solid var(--color-cream-border);
  border-radius: var(--pm-radius-card);
  padding: 16px;
}
.pm-rec + .pm-rec { margin-top: 12px; }
.pm-rec__media {
  aspect-ratio: 4 / 3;
  background-color: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--pm-radius-input);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.pm-rec__title { font-family: var(--font-family-heading); font-size: 1.0625rem; font-weight: 600; color: var(--color-gray-800); }
.pm-rec__why { margin-top: 6px; font-size: 0.9375rem; line-height: 1.5; color: var(--color-gray-700); }
/* Large price moment — the one place the display accent carries type. */
.pm-rec__price {
  margin-top: 10px;
  font-family: var(--font-family-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent-display);
}
.pm-rec__meta { margin-top: 2px; font-size: 0.8125rem; color: var(--color-gray-500); }
.pm-rec__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  background-color: var(--color-blue-tint);
  border-radius: var(--radius-full);
}
.pm-rec__action { margin-top: 14px; }
.pm-rec__handoff { margin-top: 8px; font-size: 0.8125rem; color: var(--color-gray-600); }
/* Per-recommendation disclosure — quiet, inside the card, never advertising. */
.pm-rec__disclosure {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-gray-200);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-gray-500);
}

/* ==========================================================================
   10. Gap state — designed, not apologetic. Normal palette throughout:
       no warning colour, no error iconography, same dignity as a results state.
   ========================================================================== */

.pm-gap {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: center;
  background-color: var(--color-white);
  border: 1px solid var(--color-cream-border);
  border-radius: var(--pm-radius-card);
  padding: 24px;
}
.pm-gap__body p { font-size: 1rem; line-height: 1.6; color: var(--color-gray-700); }
.pm-gap__actions { margin-top: 20px; }

/* ==========================================================================
   11. Labeled neutral placeholder slot
       Used ONLY where governed copy or a provided asset does not yet exist.
       Never a stand-in glyph, never invented copy.
   ========================================================================== */

.pm-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 16px;
  background-color: var(--color-gray-50);
  border: 1px dashed var(--color-gray-200);
  border-radius: var(--pm-radius-input);
  font-size: 0.75rem;
  line-height: 1.4;
  /* The ratified placeholder colour (gray-500, 2026-09-01). */
  color: var(--color-gray-500);
  text-align: center;
}
.pm-slot--tall { min-height: 200px; }
.pm-slot--inline { display: inline-flex; min-height: 0; padding: 4px 10px; }

/* ==========================================================================
   12. Footer — three-part shared structure
       site section #2456A3 (ratified 2026-08-31 §6 amendment),
       ecosystem stripe #1F2937, legal stripe #111827.
   ========================================================================== */

.pm-footer__site {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  padding-block: 40px;
  text-align: center;
}
.pm-footer__logo { height: 34px; width: auto; margin-inline: auto; }
.pm-footer__tagline { margin-top: 14px; font-family: var(--font-family-heading); font-size: 1.0625rem; font-weight: 600; color: var(--color-white); }
.pm-footer__powered { margin-top: 6px; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.82); }
.pm-footer__powered a { color: var(--color-white); text-decoration: underline; }
.pm-footer__nav { margin-top: 22px; }
.pm-footer__nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; }
.pm-footer__nav a { font-size: 0.9375rem; font-weight: 500; color: var(--color-white); }
/* Row 1 of the governed nav column is a collective label, not a destination. */
.pm-footer__nav-label {
  width: 100%;
  font-family: var(--font-family-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.pm-footer__nav a:hover { color: var(--color-white); text-decoration: underline; }

/* Standing PetMall lines — present on every page. */
.pm-footer__standing {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 70ch;
  margin-inline: auto;
}
.pm-footer__standing p { font-size: 0.8125rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.pm-footer__standing p + p { margin-top: 8px; }
.pm-footer__standing a { color: var(--color-white); text-decoration: underline; }

.pm-footer__ecosystem {
  background-color: var(--color-gray-800);
  color: var(--color-gray-200);
  padding-block: 40px;
}
.pm-footer__ecosystem-title { font-size: 1.375rem; color: var(--color-white); text-align: center; }
.pm-footer__ecosystem-sub {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-gray-200);
  text-align: center;
  max-width: 60ch;
  margin-inline: auto;
}
.pm-footer__cols {
  margin-top: 28px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pm-footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
}
.pm-footer__col ul { margin-top: 10px; }
.pm-footer__col li + li { margin-top: 8px; }
/* Amber is the family thread; it is text-coloured here, never a fill. */
.pm-footer__col a { font-size: 0.875rem; font-weight: 500; color: var(--color-amber-thread); }
.pm-footer__col a:hover { color: var(--color-amber-thread); text-decoration: underline; }

.pm-footer__legal {
  background-color: var(--color-gray-900);
  color: var(--color-gray-400);
  padding-block: 18px;
}
.pm-footer__legal p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-gray-400);
  text-align: center;
}
.pm-footer__legal a { color: var(--color-gray-400); }
.pm-footer__legal a:hover { color: var(--color-gray-200); text-decoration: underline; }

/* ==========================================================================
   13. Responsive — mobile-first; hero type scales up, grid density increases
   ========================================================================== */

@media (min-width: 640px) {
  .pm-entry__row { flex-direction: row; align-items: center; }
  .pm-entry__row .pm-btn { flex: 0 0 auto; }
  .pm-rec { grid-template-columns: 220px 1fr; align-items: start; }
  .pm-gap { grid-template-columns: 240px 1fr; gap: 28px; }
  .pm-hero-photo img { height: 240px; }
}

@media (min-width: 768px) {
  .pm-container { padding-inline: 24px; }
  .pm-band { padding-block: 64px; }
  .pm-band--tight { padding-block: 40px; }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }

  .pm-hero { padding-block: 56px 40px; }
  .pm-hero__inner { display: block; }
  .pm-hero__inner > .pm-hero__media { order: 0; margin-top: 32px; margin-bottom: 0; }
  .pm-hero__title { font-size: 2.25rem; }
  .pm-hero__subhead { font-size: 1.125rem; }
  .pm-section__title { font-size: 1.875rem; }

  .pm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .pm-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pm-hero-photo img { height: 300px; }
}

@media (min-width: 1024px) {
  .pm-header__nav { display: block; }
  .pm-header__toggle { display: none; }
  .pm-mobile-nav { display: none !important; }

  .pm-hero__title { font-size: 3rem; line-height: 1.15; }
  .pm-meet-hero { grid-template-columns: 1fr minmax(0, 420px); gap: 48px; }
  .pm-cards--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pm-cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Four-up entry cards stack icon above title, as in the ratified hi-fi. */
  .pm-cards--four .pm-card,
  .pm-cards--three .pm-card {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 14px;
    padding: 24px 20px;
  }
  .pm-cards--four .pm-card__icon,
  .pm-cards--three .pm-card__icon { width: 60px; height: 60px; }
  .pm-hero-photo img { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
