/* =========================================================================
   A NEW LEAD ON LIFE — NORTH WEST RESCUE
   Base stylesheet: design tokens, reset, typography, nav, footer, buttons.
   Mobile-first. Page-specific layout lives in css/<page>.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   DESIGN TOKENS
   Palette pulled from the dog's-eye view of the Fylde coast: parchment
   paper, pine-green ink, field green, leash red, dusty sky blue.
   ------------------------------------------------------------------------- */
:root {
  /* colour: surfaces */
  --colour-paper: #f2eee3;
  --colour-paper-raised: #fffdf7;
  --colour-paper-sunken: #e9e3d2;

  /* colour: ink */
  --colour-ink: #24312b;
  --colour-ink-soft: #4b584f;
  --colour-ink-faint: #7c8880;

  /* colour: field green (primary brand) */
  --colour-field: #4b7a4e;
  --colour-field-deep: #2f5233;
  --colour-field-pale: #dce8da;

  /* colour: leash red (accent / signature) */
  --colour-leash: #c0402e;
  --colour-leash-deep: #8f2e20;
  --colour-leash-pale: #f4ddd6;

  /* colour: sky blue (tertiary accent) */
  --colour-sky: #5f8ba0;
  --colour-sky-pale: #e2edf0;

  /* colour: borders */
  --colour-border: #d8d0ba;
  --colour-border-soft: #e5dfcd;

  /* type */
  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* type scale (mobile) */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.75rem;
  --text-xl: 2.25rem;
  --text-2xl: 2.75rem;

  /* spacing (base 8) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 2rem;
  --space-2xl: 6rem;

  /* radius */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* shadow: layered, colour-tinted, never flat */
  --shadow-sm: 0 1px 2px rgba(36, 49, 41, 0.08), 0 2px 6px rgba(36, 49, 41, 0.06);
  --shadow-md: 0 4px 10px rgba(36, 49, 41, 0.1), 0 14px 28px rgba(36, 49, 41, 0.08);
  --shadow-lift: 0 8px 20px rgba(47, 82, 51, 0.2), 0 2px 6px rgba(47, 82, 51, 0.14);

  /* motion */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* layout */
  --bottom-nav-height: 4.25rem;
  --top-nav-height: 4rem;
  --content-max: 74rem;
}

@media (min-width: 48rem) {
  :root {
    --text-base: 1.125rem;
    --text-md: 1.375rem;
    --text-lg: 2.25rem;
    --text-xl: 3rem;
    --text-2xl: 3.75rem;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--colour-paper);
  color: var(--colour-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* room for the fixed mobile bottom nav */
  padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 64rem) {
  body {
    padding-bottom: 0;
  }
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--colour-ink);
  line-height: 1.15;
  margin: 0;
  font-weight: 500;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* visible focus ring everywhere, no exceptions */
:focus-visible {
  outline: 3px solid var(--colour-sky);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--space-sm);
  z-index: 200;
  background: var(--colour-ink);
  color: var(--colour-paper-raised);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  top: var(--space-sm);
}

/* -------------------------------------------------------------------------
   SHARED LAYOUT UTILITIES
   ------------------------------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, var(--content-max));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--colour-field-deep);
}

/* Shared two-zone page-intro layout (eyebrow+heading left / copy right at
   desktop). Reused by dogs.html, adopt.html, get-involved.html instead of
   each page redefining the same grid with different area names. */
.two-zone-intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  grid-template-areas:
    "intro-eyebrow"
    "intro-heading"
    "intro-copy";
}

@media (min-width: 64rem) {
  .two-zone-intro__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow intro-eyebrow"
      "intro-heading intro-heading intro-heading intro-heading intro-heading intro-heading intro-copy intro-copy intro-copy intro-copy intro-copy intro-copy";
    column-gap: var(--space-lg);
    align-items: end;
  }
}

/* Shared CTA-band layout (heading left / button right at desktop).
   Reused by about.html and adopt.html; background/padding/radius stay
   page-specific on each section's own wrapper class. */
.cta-band__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  grid-template-areas:
    "cta-band-heading"
    "cta-band-button";
  align-items: center;
}

.cta-band__grid .btn {
  justify-self: center;
}

@media (min-width: 64rem) {
  .cta-band__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas: "cta-band-heading cta-band-heading cta-band-heading cta-band-heading cta-band-heading cta-band-heading cta-band-heading cta-band-heading . cta-band-button cta-band-button cta-band-button";
  }
}

/* Shared dog photo container, used by dog-card (index.html) and
   dog-listing (dogs.html) so the two look identical instead of each page
   redefining the same media styles. */
.dog-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.dog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dog-media__status {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
}

/* -------------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), background-color 0.2s var(--ease-out);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--colour-leash);
  color: var(--colour-paper-raised);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--colour-leash-deep);
  box-shadow: var(--shadow-lift);
}

.btn--secondary {
  background: var(--colour-field-deep);
  color: var(--colour-paper-raised);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--colour-field);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--colour-ink);
  border: 2px solid var(--colour-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--colour-field);
  color: var(--colour-field-deep);
}

/* -------------------------------------------------------------------------
   SITE HEADER / TOP NAV (desktop) + BURGER (mobile secondary access)
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--colour-paper-raised);
  border-bottom: 1px solid var(--colour-border-soft);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-nav-height);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  text-decoration: none;
  color: var(--colour-ink);
}

.site-header__brand-mark {
  color: var(--colour-leash);
  font-size: 1.4rem;
  transform: rotate(-8deg);
}

.site-header__brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.1;
}

.site-header__brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--colour-field-deep);
}

/* primary nav list: hidden on mobile (bottom nav covers primary journeys),
   revealed inside the burger drawer; shown inline from tablet up */
.site-header__nav {
  display: none;
}

.site-header__donate {
  display: none;
}

.site-header__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: transparent;
  color: var(--colour-ink);
  font-size: 1.35rem;
  border-radius: var(--radius-sm);
}

.site-header__burger:hover {
  color: var(--colour-leash);
}

/* mobile burger drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
}

.nav-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(36, 49, 41, 0.45);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(20rem, 85vw);
  background: var(--colour-paper-raised);
  box-shadow: var(--shadow-lift);
  padding: var(--space-md);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.nav-drawer.is-open {
  visibility: visible;
}

.nav-drawer.is-open .nav-drawer__scrim {
  opacity: 1;
}

.nav-drawer.is-open .nav-drawer__panel {
  transform: translateX(0);
}

.nav-drawer__close {
  align-self: flex-end;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: var(--colour-paper-sunken);
  border-radius: var(--radius-pill);
  font-size: 1.1rem;
  color: var(--colour-ink);
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nav-drawer__link {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-md);
  text-decoration: none;
  color: var(--colour-ink);
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--colour-border-soft);
}

.nav-drawer__link.is-current {
  color: var(--colour-leash);
}

.nav-drawer__donate {
  margin-top: auto;
}

@media (min-width: 64rem) {
  .site-header__burger {
    display: none;
  }

  .nav-drawer {
    display: none;
  }

  .site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .site-header__nav-link {
    text-decoration: none;
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--colour-ink-soft);
    padding: var(--space-2xs) 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
  }

  .site-header__nav-link:hover,
  .site-header__nav-link.is-current {
    color: var(--colour-field-deep);
    border-color: var(--colour-leash);
  }

  .site-header__donate {
    display: inline-flex;
  }
}

/* -------------------------------------------------------------------------
   BOTTOM NAV (mobile primary, thumb-friendly)
   ------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  height: var(--bottom-nav-height);
  background: var(--colour-paper-raised);
  border-top: 1px solid var(--colour-border-soft);
  box-shadow: 0 -6px 18px rgba(36, 49, 41, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (min-width: 64rem) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav__list {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--colour-ink-faint);
  font-size: 0.6875rem;
  font-weight: 700;
}

.bottom-nav__link i {
  font-size: 1.15rem;
}

.bottom-nav__link.is-current {
  color: var(--colour-leash);
}

/* -------------------------------------------------------------------------
   SIGNATURE COMPONENT: THE LEAD LINE
   A literal lead (leash) that threads between sections/steps — the "new
   lead" the dog is on, and the unbroken line of RBU/lifetime support.
   ------------------------------------------------------------------------- */
.lead-line {
  display: flex;
  justify-content: center;
  margin-block: var(--space-md);
  color: var(--colour-leash);
}

.lead-line svg {
  width: 6rem;
  height: 2rem;
  overflow: visible;
}

.lead-line path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1 10;
}

.lead-line circle {
  fill: currentColor;
}

/* small inline clip mark used before RBU / lifetime-support badges */
.clip-mark {
  display: inline-flex;
  width: 0.9em;
  height: 0.9em;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   STATUS BADGE (used on dog cards)
   ------------------------------------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0.85em;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge--available {
  background: var(--colour-field-pale);
  color: var(--colour-field-deep);
}

.status-badge--reserved {
  background: var(--colour-leash-pale);
  color: var(--colour-leash-deep);
}

/* -------------------------------------------------------------------------
   SITE FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--colour-field-deep);
  color: var(--colour-field-pale);
  padding-block: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xl);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48rem) {
  .site-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--colour-paper-raised);
}

.site-footer__tagline {
  margin-top: var(--space-2xs);
  color: var(--colour-field-pale);
  opacity: 0.85;
  max-width: 32ch;
}

.site-footer__heading {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-paper-raised);
  margin-bottom: var(--space-sm);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.site-footer__list a {
  text-decoration: none;
  color: var(--colour-field-pale);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.site-footer__list a:hover {
  opacity: 1;
  color: var(--colour-paper-raised);
}

.site-footer__socials {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--colour-paper-raised);
  text-decoration: none;
  transition: background-color 0.2s var(--ease-out), transform 0.25s var(--ease-spring);
}

.site-footer__social-link:hover {
  background: var(--colour-leash);
  transform: translateY(-2px);
}

.site-footer__meta {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  font-size: var(--text-xs);
  color: var(--colour-field-pale);
  opacity: 0.75;
}

.placeholder-note {
  font-size: var(--text-xs);
  color: var(--colour-leash-deep);
  background: var(--colour-leash-pale);
  border-radius: var(--radius-sm);
  padding: 0.2em 0.6em;
  font-weight: 700;
}
