/* ==========================================================
   Leashes in Motion — Brand Tokens
   Motion Red is an accent only (~10% of the palette).
   Never use it as a section background.
   ========================================================== */
:root {
  --motion-red: #E5242A;
  --primary-black: #111111;
  --charcoal: #343434;
  --light-gray: #F4F4F4;
  --white: #FFFFFF;

  --border: #E2E2E2;

  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --max-width: 1200px;
  --content-width: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--primary-black);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Focus — red reads as an accent here, which is on-brand */
:focus-visible {
  outline: 3px solid var(--motion-red);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-black);
  color: var(--white);
  padding: var(--space-2);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-block;
  min-height: 48px;
  line-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, filter 200ms ease;
}
.btn-primary {
  background: var(--motion-red);
  color: var(--white);
  border: 2px solid var(--motion-red);
}
.btn-primary:hover { filter: brightness(0.9); }
.btn-secondary {
  background: transparent;
  color: var(--primary-black);
  border: 2px solid var(--primary-black);
}
.btn-secondary:hover { background: var(--primary-black); color: var(--white); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--light-gray);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.logo-link { display: flex; line-height: 0; }
/* Stacked lockup (mark over wordmark) — below ~56px the "IN MOTION"
   line stops being legible, so don't shrink this without checking it. */
.logo { height: 56px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-nav a {
  color: var(--primary-black);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:not(.btn):hover { color: var(--motion-red); }

/* Mobile nav toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--primary-black);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: var(--space-6) 0;
  text-align: center;
  background: var(--light-gray);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-2); }
.hero-sub {
  font-size: 1.15rem;
  max-width: var(--content-width);
  margin: 0 auto var(--space-4);
  color: var(--charcoal);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* Credentials ticker */
.ticker {
  background: var(--primary-black);
  color: var(--white);
  overflow: hidden;
  padding: var(--space-2) 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  /* Slow enough to actually read as it passes — roughly 50px/second */
  animation: ticker-scroll 45s linear infinite;
}
/* WCAG 2.2.2: give people a way to stop moving content */
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}
.ticker-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ticker-list li {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 var(--space-4);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
/* Motion Red as a separator dot — accent-sized, per the brand rules */
.ticker-list li::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--motion-red);
  margin-left: var(--space-4);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  /* No movement at all: drop the duplicate and wrap the real list */
  .ticker-track { animation: none; width: 100%; }
  .ticker-list[aria-hidden="true"] { display: none; }
  .ticker-list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--space-1);
  }
  .ticker-list li:last-child::after { display: none; }
}

/* Empathy */
.empathy { padding: var(--space-5) 0; text-align: center; }
.empathy p {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 1.15rem;
}

/* Services */
.services { padding: var(--space-6) 0; }
.services h2 { text-align: center; margin-bottom: var(--space-4); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}
.card {
  background: var(--light-gray);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.card h3 { margin-bottom: var(--space-1); }

/* How it works */
.how-it-works {
  padding: var(--space-6) 0;
  background: var(--light-gray);
  text-align: center;
}
/* Two columns: steps on the left, illustration on the right */
.how-it-works-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
  text-align: left;
}
.how-it-works-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--white);
}
.how-it-works-copy .btn { margin-top: var(--space-3); }

.how-it-works ol {
  margin: var(--space-3) 0 0;
  text-align: left;
  padding-left: var(--space-3);
}
.how-it-works li { margin-bottom: var(--space-2); font-size: 1.1rem; }
.how-it-works li::marker { color: var(--motion-red); font-weight: 900; }

/* About */
.about { padding: var(--space-6) 0; }
.about .container { max-width: var(--content-width); }
.about h2 { margin-bottom: var(--space-3); }

/* Results / testimonials */
.results { padding: var(--space-6) 0; background: var(--light-gray); }
.results h2 { text-align: center; margin-bottom: var(--space-4); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-4);
  border-left: 4px solid var(--motion-red);
}
.testimonial blockquote p { font-size: 1.05rem; margin-bottom: var(--space-2); }
.testimonial figcaption { font-weight: 600; color: var(--primary-black); font-size: 0.95rem; }

/* Booking */
.booking {
  padding: var(--space-6) 0;
  text-align: center;
  background: var(--primary-black);
  color: var(--white);
}
.booking h2 { color: var(--white); margin-bottom: var(--space-2); }
.booking-sub {
  max-width: var(--content-width);
  margin: 0 auto var(--space-4);
  color: var(--light-gray);
}
.booking iframe {
  border-radius: var(--radius);
  background: var(--white);
  display: block;
}
.embed-placeholder {
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-3);
  color: var(--light-gray);
}

/* Square Appointments embed.
   The widget sets the iframe to height:100%, which only resolves against a
   parent with a definite height — otherwise it collapses to its 500px
   min-height mid-flow. Hence the explicit height here. */
.square-embed {
  max-width: 900px;
  height: 760px;
  margin: var(--space-4) auto 0;
  padding: 0 var(--space-2);
}
.square-embed iframe {
  border-radius: var(--radius);
  background: var(--white);
  display: block;
}

.booking-fallback {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  color: var(--light-gray);
  opacity: 0.85;
}
.booking-fallback a { color: var(--white); }

.btn-lg {
  min-height: 56px;
  line-height: 52px;
  padding: 0 var(--space-4);
  font-size: 1.05rem;
}

/* Contact */
.contact { padding: var(--space-6) 0; }
.contact .container { max-width: var(--content-width); }
.contact h2 { margin-bottom: var(--space-2); }
.contact-sub { margin-bottom: var(--space-4); }
.contact-alt {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.contact-alt a {
  color: var(--primary-black);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--motion-red);
}
.contact-alt a:hover { color: var(--motion-red); }

.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--primary-black);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  padding: 12px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--motion-red); }

.btn:disabled,
.btn[disabled] {
  background: var(--light-gray);
  border-color: var(--border);
  color: var(--charcoal);
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}

.form-notice {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  color: var(--charcoal);
  border-left: 3px solid var(--motion-red);
  padding-left: var(--space-2);
}

/* Honeypot — visually hidden, still reachable by bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Homepage gallery teaser */
.gallery-preview { padding: var(--space-6) 0; }
.gallery-preview h2 { text-align: center; margin-bottom: var(--space-2); }
.gallery-preview-sub {
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto var(--space-4);
}

.gallery-strip {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: var(--space-3);
  /* Matches .container's gutter so the strip lines up with the text above
     while still running to the screen edge as you scroll. */
  padding: var(--space-1) var(--space-3) var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.gallery-strip::-webkit-scrollbar { height: 8px; }
.gallery-strip::-webkit-scrollbar-track { background: transparent; }
.gallery-strip::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.strip-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: block;
  line-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-gray);
}
.strip-item img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  /* Same reasoning as the gallery grid: dogs sit above centre in these
     shots, so a centred crop fills the tile with foreground. */
  object-position: center 32%;
  display: block;
  transition: transform 300ms ease;
}
.strip-item:hover img { transform: scale(1.04); }

.gallery-preview-cta { text-align: center; margin-top: var(--space-2); }

/* Client hub */
.hub { padding: var(--space-5) 0 var(--space-6); }
/* Fixed 2 columns rather than auto-fit: there are exactly four cards, and
   auto-fit produced a 3+1 layout that left the last card stranded alone. */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .hub-grid { grid-template-columns: 1fr; }
}
.hub-card {
  background: var(--light-gray);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hub-card h2 { font-size: 1.35rem; margin-bottom: var(--space-2); }
.hub-card p { margin-bottom: var(--space-3); }
.hub-card .btn { margin-top: auto; }
.hub-note { font-size: 0.9rem; color: var(--charcoal); opacity: 0.85; }

/* Interior page header */
.page-head { padding: var(--space-6) 0 var(--space-4); text-align: center; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-2); }
.page-sub {
  font-size: 1.15rem;
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Gallery */
.gallery { padding: 0 0 var(--space-6); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.gallery-item { margin: 0; }

/* The image itself is the button, so keyboard users get a real focus target */
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--light-gray);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}
.gallery-open img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  /* Bias the crop above centre. In these pack shots the dogs sit in the upper
     half and the lower half is foreground pavement — a centred crop fills the
     tile with ground and cuts the dogs off. */
  object-position: center 32%;
  display: block;
  transition: transform 300ms ease;
}

/* Landscape shots span two columns instead of being cropped to a square,
   which would chop the ends off a wide group shot. */
.gallery-item--wide { grid-column: span 2; }
.gallery-item--wide .gallery-open img {
  aspect-ratio: 2 / 1;
  object-position: center 45%;
}
.gallery-open:hover img { transform: scale(1.04); }

/* Videos sit in the same grid. object-fit: contain rather than cover, since
   these are phone clips of unknown orientation and cropping could cut the
   dogs out of frame entirely. */
.gallery-item--video video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: var(--primary-black);
  border-radius: var(--radius);
}


.gallery-empty {
  text-align: center;
  padding: var(--space-6) var(--space-3);
  background: var(--light-gray);
  border-radius: var(--radius);
  color: var(--charcoal);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: rgba(17, 17, 17, 0.94);
}
.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  text-align: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-btn {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 200ms ease;
}
.lightbox-btn:hover { background: var(--motion-red); }
.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 1.75rem;
}

/* Footer */
.site-footer {
  padding: var(--space-5) 0;
  text-align: center;
  background: var(--light-gray);
  color: var(--charcoal);
  font-size: 0.9rem;
}
/* Social links — icon inherits currentColor, so it recolours with the text */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--primary-black);
  text-decoration: none;
  font-weight: 600;
}
.social-link:hover { color: var(--motion-red); }
.social-link svg { flex: 0 0 auto; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  line-height: 1;
}

.footer-social { margin-bottom: var(--space-1); }
.page-head-cta { margin-top: var(--space-3); }

.footer-logo { height: 72px; width: auto; margin-bottom: var(--space-2); }
.footer-meta { margin-bottom: var(--space-1); }
.footer-legal { color: var(--charcoal); opacity: 0.75; }

/* Mobile */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .header-inner { position: relative; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: var(--space-2) var(--space-3) var(--space-3);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--light-gray);
  }
  .site-nav .nav-cta {
    margin-top: var(--space-2);
    border: 2px solid var(--motion-red);
    text-align: center;
  }

  .hero-cta .btn { width: 100%; text-align: center; }

  /* Stack: steps first, illustration below — keeps the heading and the
     three steps above the fold rather than pushing them down behind art */
  .how-it-works-inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Lightbox arrows overlay the image on narrow screens rather than
     squeezing it between them */
  .lightbox { padding: var(--space-2); }
  .lightbox-prev, .lightbox-next {
    position: absolute;
    bottom: var(--space-4);
    z-index: 1;
  }
  .lightbox-prev { left: var(--space-3); }
  .lightbox-next { right: var(--space-3); }
  .lightbox-figure img { max-height: 66vh; }

  /* Single column on mobile — a 2-column span would create a phantom
     second track and overflow the grid */
  .gallery-item--wide { grid-column: span 1; }

  /* Keep the Square widget's container above its 280px threshold. Below that
     it renders a hardcoded blue Square button instead of the calendar, which
     is off-brand. A 320px phone minus generous padding would trip it. */
  .square-embed {
    padding: 0 var(--space-1);
    height: 700px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
