/* =========================================================
   KING CITY PET CARE — main.css
   ---------------------------------------------------------
   Organized by section. Edit comments to reflect changes.

   1. Design tokens (colors, type, spacing)
   2. Base & reset
   3. Layout helpers
   4. Navigation
   5. Hero
   6. Section base
   7. Services
   8. About
   9. Why us
   10. Testimonials
   11. FAQ
   12. CTA / Booking form
   13. Footer
   14. Gallery (marquee)
   15. Lightbox
   16. Chat widget
   17. Responsive overrides
   ========================================================= */

/* ---------- 0. Self-hosted fonts (replaces Google Fonts CDN) ----------
   Variable woff2, latin subset. Google's css2 endpoint returned ONE variable
   file per style covering all requested weights (400-700), so these use
   weight ranges rather than separate per-weight files. font-display: swap
   renders a fallback immediately and swaps when the font loads. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/fraunces-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/fraunces-italic-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-variable.woff2') format('woff2');
}

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand palette */
  --sage-deep: #4a6b54;
  --sage: #7a9b85;
  --sage-soft: #d8e3da;
  --sage-mist: #eef2ec;
  --cream: #faf6ef;
  --cream-warm: #f4ecdb;
  --gold: #c8a96a;
  --gold-soft: #e8d9b8;
  --gold-bright: #f5e4b8; /* WCAG AA (~4.7:1) on --sage-deep; used in .why for eyebrow + numbers */
  --ink: #2a2e2c;
  --ink-soft: #5a615d;
  --line: #e3ddd0;

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(74, 107, 84, 0.08);
  --shadow-md: 0 8px 24px rgba(74, 107, 84, 0.12);
  --shadow-lg: 0 20px 60px rgba(74, 107, 84, 0.15);
}

/* ---------- 2. Base & reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Accessible focus rings */
:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. Layout helpers ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 4. Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo { display: flex; align-items: center; height: 48px; }
.logo img { height: 100%; width: auto; display: block; }

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--sage-deep);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--sage-deep);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.logo-mark::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  border-top-color: transparent;
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--sage-deep); }

.nav-cta {
  background: var(--sage-deep);
  color: var(--cream) !important;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--ink);
  transform: translateY(-1px);
}

/* ---------- 5. Hero ---------- */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--sage-deep);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 400;
}


.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* Reusable buttons */
.btn-primary {
  background: var(--sage-deep);
  color: var(--cream);
  padding: 16px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 16px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--ink);
  text-align: center;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--cream);
}

.hero-trust {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-item::before {
  content: '✓';
  color: var(--sage-deep);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--sage-mist);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--sage-soft), var(--sage-mist) 60%, var(--cream-warm));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-deep);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  text-align: center;
  padding: 24px;
}

.hero-badge {
  margin-top: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--sage-deep);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-badge-icon {
  width: 38px;
  height: 38px;
  background: var(--sage-deep);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  font-size: 17px;
}

.hero-badge-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.hero-badge-text strong {
  color: var(--ink);
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 1px;
}

/* Hero carousel - crossfading photos */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

/* ---------- 6. Section base ---------- */
.section { padding: 100px 0; }

.section-eyebrow {
  color: var(--sage-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 20px;
  max-width: 720px;
}

.section-title em {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 400;
}

.section-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 56px;
}

/* ---------- 7. Services ---------- */
.services { background: var(--cream-warm); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card p {
  flex: 1;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 40px;
  height: 40px;
  background: var(--sage-mist);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.service-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.service-price {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: var(--sage-deep);
  font-weight: 500;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.service-price strong {
  font-size: 18px;
  font-weight: 600;
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.service-price-unit {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- 8. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.about-visual {
  aspect-ratio: 1 / 1.1;
  background: var(--sage-mist);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-visual-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cream-warm), var(--sage-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-deep);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  text-align: center;
  padding: 24px;
}

/* About carousel - crossfading photos */
.about-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.about-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}

.about-slide.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .about-slide {
    transition: none;
  }
}

.about h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 24px;
}

.about p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 18px;
  max-width: 520px;
}

.about h2 em {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 400;
}

.about-signature {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--sage-deep);
  font-size: 18px;
  margin-top: 24px;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.about-stat-num {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--sage-deep);
  line-height: 1;
}

.about-stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ---------- 9. Why us ---------- */
.why {
  background: var(--sage-deep);
  color: var(--cream);
}

.why h2 { color: var(--cream); }
.why h2 em { color: var(--gold-soft); }
.why .section-eyebrow { color: var(--gold-bright); }
.why .section-sub { color: rgba(250, 246, 239, 0.75); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
  margin-top: 24px;
}

.why-item { display: flex; gap: 20px; }

.why-item-num {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  color: var(--gold-bright);
  font-weight: 500;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 4px;
  font-style: italic;
}

.why-item h3 {
  color: var(--cream);
  font-size: 22px;
  margin-bottom: 8px;
}

.why-item p {
  color: rgba(250, 246, 239, 0.7);
  font-size: 15px;
}

/* ---------- 10. Testimonials ---------- */
#reviews { background: var(--cream-warm); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  color: var(--sage-deep);
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.testimonial-name { font-weight: 600; font-size: 14px; }
.testimonial-meta { font-size: 12px; color: var(--ink-soft); }

/* Reviews carousel — sets of 3 with crossfade */
.reviews-carousel {
  position: relative;
}

.reviews-viewport {
  position: relative;
}

.reviews-set {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 0s linear 1s;
  pointer-events: none;
}

.reviews-set.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease-in-out, visibility 0s linear 0s;
  pointer-events: auto;
}

/* Stack inactive sets behind the active one so they don't add height */
.reviews-set:not(.is-active) {
  position: absolute;
  inset: 0;
}

/* Dot indicators */
.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 40px;
}

.reviews-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reviews-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: background 0.2s;
}

.reviews-dot:hover::before {
  background: var(--sage);
}

.reviews-dot.is-active::before,
.reviews-dot[aria-selected="true"]::before {
  background: var(--sage-deep);
}

.reviews-dot:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .reviews-set {
    transition: opacity 0.01s linear;
  }
}

/* ---------- 11. FAQ ---------- */
.faq { background: var(--cream-warm); }

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
}

.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
}

.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage-deep);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  transition: transform 0.3s;
}

.faq-item.open .faq-toggle { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-top 0.3s ease;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding-top: 16px;
}

/* ---------- 12. CTA / Booking form ---------- */
.form-section { padding: 100px 0; }

.form-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 56px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.form-card h2 {
  font-size: 36px;
  margin-bottom: 12px;
  text-align: center;
}

.form-card p.form-sub {
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-consent { margin-top: 8px; }
.form-consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.form-consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sage-deep);
  cursor: pointer;
}
.form-consent-label a {
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-consent-label a:hover { color: var(--ink); }

.form-submit {
  width: 100%;
  margin-top: 12px;
  padding: 18px;
  font-size: 16px;
  justify-content: center;
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
}

/* GHL embed wrapper — when you paste the iframe here, it inherits the card */
.ghl-embed-wrapper {
  min-height: 600px;
}

/* ---------- 13. Footer ---------- */
footer {
  background: var(--ink);
  color: rgba(250, 246, 239, 0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--cream);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-tag {
  font-size: 14px;
  max-width: 320px;
  margin-bottom: 24px;
}

/* Social icons row (sits under footer-tag) */
.footer-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(250, 246, 239, 0.08);
  border: 1px solid rgba(250, 246, 239, 0.14);
  color: rgba(250, 246, 239, 0.75);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  padding: 0;
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-social:hover {
  background: var(--gold-soft);
  color: var(--ink);
  border-color: var(--gold-soft);
  transform: translateY(-2px);
}

.footer-social:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.footer-col {
  min-width: 0;
}

.footer-col h4 {
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(250, 246, 239, 0.7);
  font-size: 14px;
  padding: 12px 0;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.footer-map {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(250, 246, 239, 0.14);
  /* Make the embed feel like it belongs in the dark footer */
  filter: brightness(0.92) saturate(0.85);
  transition: filter 0.25s ease;
}

.footer-map:hover {
  filter: brightness(1) saturate(1);
}

.footer-map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.footer-bottom {
  border-top: 1px solid rgba(250, 246, 239, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 14. Gallery (marquee) ---------- */
.gallery {
  padding-bottom: 50px;
}

.gallery .section-sub {
  margin-bottom: 48px;
}

/* Full-bleed marquee — escapes the container */
.gallery-marquee {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 8px 0;

  /* Soft fade on left/right edges so photos don't hard-cut */
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
}

.gallery-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: gallery-scroll 60s linear infinite;
}

.gallery-marquee:hover .gallery-track {
  animation-play-state: paused;
}

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

.gallery-tile {
  flex: 0 0 auto;
  width: 320px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--sage-mist);
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-tile:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 4px;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-tile:hover img {
  transform: scale(1.04);
}

/* Reduced motion: stop the scroll, let users see static photos */
@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    animation: none;
  }
  .gallery-marquee {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .gallery-tile {
    scroll-snap-align: start;
  }
}

/* ---------- 15. Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(42, 46, 44, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox-figure {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox-figure {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  background: var(--ink);
}

.lightbox-caption {
  color: rgba(250, 246, 239, 0.85);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  text-align: center;
  max-width: 600px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(250, 246, 239, 0.12);
  color: var(--cream);
  border: 1px solid rgba(250, 246, 239, 0.18);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(250, 246, 239, 0.22);
  transform: scale(1.05);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  font-size: 24px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.05);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.05);
}

/* ============================================================
   16. Chat widget
   ============================================================ */

.kcpc-chat {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
  z-index: 900;
  font-family: 'Inter', sans-serif;
}

/* Bubble (closed state) */
.kcpc-chat-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sage-deep);
  color: var(--cream);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(42, 46, 44, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}
.kcpc-chat-bubble:hover { transform: translateY(-2px); background: #3a5544; }
.kcpc-chat-bubble:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.kcpc-chat[data-state="open"] .kcpc-chat-bubble,
.kcpc-chat[data-state="submitted"] .kcpc-chat-bubble { display: none; }

/* Panel */
.kcpc-chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 340px;
  background: var(--cream);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(42, 46, 44, 0.16);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.kcpc-chat[data-state="open"] .kcpc-chat-panel,
.kcpc-chat[data-state="submitted"] .kcpc-chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Panel header */
.kcpc-chat-header {
  background: var(--sage-deep);
  color: var(--cream);
  padding: 16px;
}
.kcpc-chat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kcpc-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.kcpc-chat-avatars { display: flex; flex-shrink: 0; }
.kcpc-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border: 2px solid var(--sage-deep);
}
.kcpc-chat-avatar--ak { background: var(--sage-soft); }
.kcpc-chat-avatar--jb { background: var(--gold-soft); margin-left: -10px; }
.kcpc-chat-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  color: var(--cream);
  line-height: 1.3;
}
.kcpc-chat-title em {
  color: var(--gold-soft);
  font-style: italic;
}
.kcpc-chat-close {
  background: transparent;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  flex-shrink: 0;
}
.kcpc-chat-close:hover { background: rgba(255,255,255,0.1); }
.kcpc-chat-close:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.kcpc-chat-promise {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--sage-soft);
  line-height: 1.4;
}
/* Submitted state hides promise */
.kcpc-chat[data-state="submitted"] .kcpc-chat-promise { display: none; }

/* Form */
.kcpc-chat-form { padding: 16px; }
.kcpc-chat[data-state="submitted"] .kcpc-chat-form { display: none; }
.kcpc-chat-field { margin-bottom: 12px; }
.kcpc-chat-field label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-weight: 500;
}
.kcpc-chat-field-hint { color: #a8a59a; font-weight: 400; }
.kcpc-chat-field input,
.kcpc-chat-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
}
.kcpc-chat-field textarea { resize: none; min-height: 80px; }
.kcpc-chat-field input:focus,
.kcpc-chat-field textarea:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(74, 107, 84, 0.15);
}

.kcpc-chat-consent { margin-top: 6px; }
.kcpc-chat-consent-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.kcpc-chat-consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sage-deep);
  cursor: pointer;
}
.kcpc-chat-consent-label a {
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kcpc-chat-consent-label a:hover { color: var(--ink); }

/* Honeypot: visually hidden but accessible to bots */
.kcpc-chat-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Submit button */
.kcpc-chat-submit {
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  background: var(--sage-deep);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}
.kcpc-chat-submit:hover { background: #3a5544; transform: translateY(-1px); }
.kcpc-chat-submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.kcpc-chat-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Error */
.kcpc-chat-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fbe9e7;
  color: #8b2e20;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: none;
}
.kcpc-chat-error.is-visible { display: block; }

/* Success state */
.kcpc-chat-success { padding: 28px 16px; text-align: center; display: none; }
.kcpc-chat[data-state="submitted"] .kcpc-chat-success { display: block; }
.kcpc-chat-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sage-mist);
  color: var(--sage-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.kcpc-chat-success-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}
.kcpc-chat-success-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* =========================================================
   17. RESPONSIVE OVERRIDES
   All breakpoint changes consolidated here. Last one wins,
   so order matters: largest breakpoint first.
   ========================================================= */

/* Safe-area insets (iPhone notch + home indicator) — applied at all sizes;
   max() makes them no-ops on devices/orientations without insets. Paired with
   viewport-fit=cover in the index.html viewport meta. */
.nav-inner {
  padding-top: max(18px, env(safe-area-inset-top));
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

footer {
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

/* Tablets and small laptops */
@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }
  .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Tablets portrait + large phones */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-inner {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: 14px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .nav-links a:not(.nav-cta) { display: none; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-stats { gap: 24px; flex-wrap: wrap; }

  /* Gallery: tighter on tablets/phones */
  .gallery-tile { width: 240px; }
  .gallery-track {
    gap: 12px;
    animation-duration: 45s;
  }
  .gallery-marquee {
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 32px,
      #000 calc(100% - 32px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 32px,
      #000 calc(100% - 32px),
      transparent 100%
    );
  }
  .gallery {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* Small phones */
@media (max-width: 600px) {
  .form-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }

  /* Nav CTA: shrink to fit on small phones, keep tap target >= 44px height */
  .nav-cta {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Hero trust strip: tighten gap and font so all 3 items fit on one line */
  .hero-trust {
    gap: 12px;
    font-size: 12px;
  }

  /* Footer: collapse to single column so the map iframe has room to breathe */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { justify-content: center; }

  /* Photos go edge-to-edge on phones */
  .hero-visual,
  .about-visual {
    max-width: 100%;
  }

  /* Lightbox controls scoot in slightly */
  .lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; }
  .lightbox-prev { left: 12px; width: 40px; height: 40px; }
  .lightbox-next { right: 12px; width: 40px; height: 40px; }

  /* Chat widget on small phones: nearly full-width, smaller bubble margin */
  .kcpc-chat {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
  }
  .kcpc-chat-panel {
    width: calc(100vw - 24px);
    max-width: 360px;
    right: 0;
  }
}

/* Smallest phones */
@media (max-width: 580px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Reduced motion: disable chat widget transitions */
@media (prefers-reduced-motion: reduce) {
  .kcpc-chat-bubble,
  .kcpc-chat-panel,
  .kcpc-chat-submit { transition: none; }
  .kcpc-chat-panel { transform: none; }
}

/* === Pawbook intake form additions === */
.form-error {
  background: #f3d8d2;
  color: #9b3b2e;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin: 16px 0;
  border: 1px solid #e8a89a;
}

.form-success {
  text-align: center;
  padding: 36px 28px;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 100%;
  background: #e3e8d8;
  color: #5a6b48;
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  margin: 0 0 10px;
}

.form-success p {
  font-size: 15px;
  margin: 0 0 6px;
}

.form-success-meta {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  margin-top: 16px;
}

/* Service chips (multi-select pills) */
.form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.form-chip:hover {
  border-color: var(--sage);
  color: var(--ink);
}

.form-chip.is-selected {
  background: var(--sage-deep);
  color: var(--cream);
  border-color: var(--sage-deep);
}

.form-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.form-chip:focus-within {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
}
