/* ==========================================================================
   Garden Pet Sitting — styles
   These variables mirror the Figma design tokens one-to-one.
   Change a value here and it updates everywhere on the site.
   ========================================================================== */

:root {
  /* Primitive colors (named after the pets) */
  --white: #FFFFFF;
  --cream-50: #FDFBF6;
  --cream-100: #F9F2E7;
  --cream-200: #F0E4D0;
  --honey-100: #F8E9C9;
  --honey-500: #D9952B;
  --honey-600: #B37A1E;
  --brown-500: #8A6B4F;
  --brown-700: #5E4732;
  --charcoal-800: #2E2925;
  --charcoal-900: #1E1A16;
  --sage-100: #E7ECDF;
  --sage-500: #7B8C6E;
  --sage-700: #54634A;

  /* Semantic colors (the "job" each color does) */
  --color-bg-page: var(--cream-50);
  --color-bg-section: var(--cream-100);
  --color-bg-card: var(--white);
  --color-bg-accent-soft: var(--honey-100);
  --color-bg-sage-soft: var(--sage-100);
  --color-text-heading: var(--charcoal-900);
  --color-text-body: var(--charcoal-800);
  --color-text-secondary: var(--brown-700);
  --color-text-on-accent: var(--charcoal-900);
  --color-text-on-dark: var(--cream-50);
  --color-accent: var(--honey-500);
  --color-accent-hover: var(--honey-600);
  --color-secondary: var(--sage-500);
  --color-secondary-deep: var(--sage-700);
  --color-border: var(--cream-200);
  --color-footer-bg: var(--charcoal-900);

  /* Spacing (4px rhythm) */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* Corners */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(46, 36, 23, 0.10);
  --shadow-modal: 0 16px 48px rgba(31, 26, 18, 0.25);

  /* Type */
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;

  --content-width: 1200px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Typography — matches the Figma text styles */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; color: var(--color-text-heading); margin: 0; }
.display { font-size: clamp(36px, 4.5vw, 56px); line-height: 1.15; letter-spacing: -0.5px; }
h1 { font-size: clamp(32px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.25px; }
h2 { font-size: clamp(26px, 2.8vw, 32px); line-height: 1.25; }
h3 { font-size: 24px; line-height: 32px; }
h4, .h4 { font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 28px; color: var(--color-text-heading); margin: 0; }
p { margin: 0; }
.body-large { font-size: 18px; line-height: 28px; }
.body-small { font-size: 14px; line-height: 22px; }
.caption {
  font-size: 13px; line-height: 18px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--color-text-secondary);
}

/* Layout helpers */
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 clamp(24px, 5vw, 64px); }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section--tinted { background: var(--color-bg-section); }
.section--sage { background: var(--color-bg-sage-soft); }
.section-title { text-align: center; margin-bottom: var(--spacing-xl); }

/* --------------------------------------------------------------------------
   Buttons (Primary, Secondary, Link)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-sm);
  padding: 12px var(--spacing-lg);
  border-radius: var(--radius-full);
  font-weight: 700; font-size: 16px; line-height: 24px; letter-spacing: 0.2px;
  text-decoration: none; border: 1.5px solid transparent; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--color-accent); color: var(--color-text-on-accent); }
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--secondary { background: var(--color-bg-card); border-color: var(--color-accent); color: var(--color-text-heading); }
.btn--secondary:hover { background: var(--color-bg-accent-soft); }
.btn--link { padding: 0; border: 0; background: none; text-decoration: underline; color: var(--color-text-heading); }
.btn--link:hover { color: var(--color-accent-hover); }
.btn--block { width: 100%; }

/* Icons (inline SVG sprite) */
.icon { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; }
.icon--sm { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 20;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(20px, 5vw, 64px); max-width: var(--content-width); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-text-heading); }
.brand img { width: clamp(44px, 5vw, 64px); height: auto; transition: width .2s ease; }
.brand span { font-family: var(--font-heading); font-weight: 600; font-size: clamp(20px, 2vw, 24px); line-height: 1.3; white-space: nowrap; transition: font-size .2s ease; }
.nav { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 32px); }
.nav a { font-weight: 700; text-decoration: none; color: var(--color-text-body); white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--color-accent-hover); }
.nav .btn { padding: 8px 20px; font-size: 15px; line-height: 22px; } /* a size smaller in the header */
.nav__toggle { display: none; background: none; border: 0; padding: 10px; color: var(--color-text-body); }

/* --------------------------------------------------------------------------
   Hero (with photo carousel)
   -------------------------------------------------------------------------- */
.hero { padding: clamp(40px, 6vw, 72px) 0; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 64px); align-items: stretch; }
/* The photo stretches to exactly the height of the text column (headline through buttons) */
.hero .carousel { aspect-ratio: auto; height: 100%; min-height: 300px; width: 100%; max-width: 520px; justify-self: end; }
.hero__text { display: grid; gap: var(--spacing-lg); }
.hero__actions { display: flex; gap: var(--spacing-md); flex-wrap: wrap; }

.carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 480 / 380; background: var(--color-bg-section); }
.carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__slide.is-active { opacity: 1; }
.carousel__dots {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px 8px; border-radius: var(--radius-full);
  background: rgba(30, 26, 22, .35);
}
.carousel__dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(253, 251, 246, .8); }
.carousel__dot.is-active { background: var(--color-accent); }
.carousel__arrow {
  position: absolute; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(30, 26, 22, .55); color: var(--cream-50); display: grid; place-items: center;
}
.carousel__arrow .icon { width: 16px; height: 16px; }
.carousel__arrow--prev { right: 46px; }
.carousel__arrow--next { right: 12px; }

/* --------------------------------------------------------------------------
   Trust bar
   -------------------------------------------------------------------------- */
.trust { background: var(--color-bg-section); padding: 28px 0; }
.trust__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: var(--spacing-xl); flex-wrap: wrap; }
.trust__list li { display: flex; align-items: center; gap: 10px; font-weight: 700; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
.service-card {
  background: var(--color-bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: var(--spacing-lg); display: grid; gap: var(--spacing-md); align-content: start;
}
.service-card h3 { font-size: 20px; line-height: 28px; }
.icon-chip {
  width: 48px; height: 48px; border-radius: 50%; background: var(--color-bg-accent-soft);
  display: grid; place-items: center; color: var(--color-text-body);
}

.pet-grid { display: flex; justify-content: center; gap: var(--spacing-lg); flex-wrap: wrap; }
.pet-card {
  flex: 1 1 260px; max-width: 340px; background: var(--color-bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden; text-decoration: none; color: inherit;
}
.pet-card__photo { aspect-ratio: 340 / 220; object-fit: cover; object-position: 50% 15%; width: 100%; }
.pet-card__body { padding: 20px var(--spacing-lg) var(--spacing-lg); display: grid; gap: var(--spacing-sm); }

/* --------------------------------------------------------------------------
   Photo break
   -------------------------------------------------------------------------- */
.photo-break { position: relative; height: clamp(240px, 28vw, 360px); overflow: hidden; background: var(--cream-200); }
.photo-break img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.photo-break::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(30,26,22,0) 45%, rgba(30,26,22,.55) 100%);
}
.photo-break__caption { position: absolute; left: var(--spacing-3xl); bottom: var(--spacing-3xl); z-index: 1; color: var(--cream-50); }
.photo-break__caption h2 { color: inherit; }
.photo-break__caption .caption { color: inherit; opacity: .85; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Inner pages: intro + alternating feature sections (Services, Foster dogs)
   -------------------------------------------------------------------------- */
.page-intro { padding: clamp(40px, 6vw, 64px) 0 8px; }
.page-intro .container { display: grid; gap: var(--spacing-md); }
.feature { padding: clamp(32px, 4vw, 48px) 0; }
.feature__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.feature--flip .feature__text { order: 2; }
.feature--flip .feature__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.feature__text { display: grid; gap: var(--spacing-md); justify-items: start; }
.feature__title { display: flex; align-items: center; gap: var(--spacing-md); }
.feature__note { display: inline-flex; align-items: center; gap: 6px; }
.feature__photo { width: 100%; max-width: 440px; aspect-ratio: 440 / 400; object-fit: cover; border-radius: var(--radius-lg); justify-self: end; }
.feature--flip .feature__photo { justify-self: start; }
.feature__photo--map { aspect-ratio: 3 / 2; object-fit: cover; max-width: 560px; }
.bullets { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.bullets li { padding-left: 4px; }
.bullets li::marker { color: var(--color-text-secondary); }
[aria-current="page"] { color: var(--color-accent-hover) !important; }

/* Inner-page extras: About, Foster dogs, dog detail pages */
.feature__inner--top { align-items: start; }
.feature__inner--photo-first { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.feature__text--prose { gap: 20px; justify-items: stretch; }
.feature__photo--tall { aspect-ratio: 440 / 480; justify-self: start; }
.carousel--story { width: 100%; aspect-ratio: 400 / 460; max-width: 400px; justify-self: end; }
.org-links { display: grid; gap: 12px; justify-items: start; }
.org-links a, .org-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--color-text-heading); }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-lg); }
.photo-strip img { width: 100%; aspect-ratio: 341 / 320; object-fit: cover; object-position: 50% 12%; border-radius: var(--radius-lg); }
.featured { background: var(--color-bg-accent-soft); padding: clamp(40px, 5vw, 56px) 0; }

.row-head { display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.row-head h2 { margin-bottom: 6px; }
.row-head__controls { display: flex; gap: 12px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--color-border); background: var(--color-bg-card);
  display: grid; place-items: center; color: var(--color-text-body);
}
.round-btn:hover { border-color: var(--color-accent); }
.card-row { display: flex; gap: var(--spacing-lg); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 20px; margin: -4px -4px 0; scrollbar-width: none; }
.card-row::-webkit-scrollbar { display: none; }
.pet-card--carousel { flex: 0 0 250px; scroll-snap-align: start; max-width: none; }
.pet-card--carousel .pet-card__photo { aspect-ratio: 250 / 250; }

/* Dog detail page */
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--color-text-body); text-decoration: none; margin-bottom: var(--spacing-lg); }
.back-link:hover { color: var(--color-accent-hover); }
.detail__inner {
  display: grid; grid-template-columns: 440px minmax(0, 1fr); column-gap: clamp(24px, 4vw, 48px); row-gap: var(--spacing-md); align-items: start;
  grid-template-areas: "gallery head" "gallery story";
}
.detail__head { grid-area: head; display: grid; gap: var(--spacing-md); }
.detail__head .caption { display: flex; align-items: center; gap: 8px; }
.back-arrow { display: none; color: inherit; line-height: 0; }
.back-arrow .icon { width: 18px; height: 18px; }
.detail__story { grid-area: story; }
.gallery { grid-area: gallery; }
.detail__story { display: grid; gap: var(--spacing-md); }
.outcome { border-top: 1px solid var(--color-border); padding-top: 20px; display: grid; gap: 10px; }
.outcome__row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.outcome__photo { width: 200px; aspect-ratio: 200 / 260; object-fit: cover; object-position: top; border-radius: var(--radius-lg); }

.gallery { display: grid; gap: 16px; }
.gallery__main { position: relative; aspect-ratio: 440 / 400; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg-section); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.gallery__controls { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; }
.gallery__arrow { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(30, 26, 22, .55); color: var(--cream-50); display: grid; place-items: center; }
.gallery__arrow .icon { width: 16px; height: 16px; }
.gallery__counter { padding: 5px 10px; border-radius: var(--radius-full); background: rgba(30, 26, 22, .55); color: var(--cream-50); font-size: 12px; font-weight: 700; line-height: 18px; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: 0 0 78px; width: 78px; height: 78px; padding: 0; border: 2.5px solid transparent; border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-section); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.gallery__thumb.is-active { border-color: var(--color-accent); }

/* Share pills */
.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--color-text-secondary); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 14px;
  border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: var(--color-bg-card);
  font-weight: 700; color: var(--color-text-heading);
}
.pill.is-done { background: var(--color-bg-sage-soft); border-color: var(--color-secondary-deep); color: var(--color-secondary-deep); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--spacing-md); max-width: 656px; margin: 0 auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }
.field { display: grid; gap: var(--spacing-sm); min-width: 0; }
.form__row > * { min-width: 0; } /* Safari: stop inputs overflowing their grid column */
.field label { font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--color-text-secondary); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--color-text-body); width: 100%; min-width: 0;
  padding: 14px var(--spacing-md); border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg-card);
}
.field textarea { min-height: 140px; resize: vertical; }
/* Custom dropdown (Select) */
.select { position: relative; }
.select__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-sm);
  width: 100%; min-width: 0; font: inherit; color: var(--color-text-secondary); text-align: left;
  padding: 14px var(--spacing-md); border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg-card); cursor: pointer;
}
.select__trigger:focus-visible, .select.is-open .select__trigger { outline: none; border-color: var(--color-accent); border-width: 2px; padding: 13.5px 15.5px; }
.select__trigger .icon { transition: transform .15s ease; }
.select.is-open .select__trigger .icon { transform: rotate(180deg); }
.select.has-value .select__trigger { color: var(--color-text-body); }
.select__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10;
  margin: 0; padding: 6px; list-style: none;
  background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
}
.select__option {
  display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-sm);
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--color-text-body);
}
.select__option:hover, .select__option.is-active { background: var(--color-bg-accent-soft); }
.select__option[aria-selected="true"] { font-weight: 700; color: var(--color-text-heading); }
.select__option[aria-selected="true"]::after {
  content: ""; width: 18px; height: 18px; flex: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B37A1E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5 9-10'/></svg>") center / contain no-repeat;
}
.form__actions { display: flex; justify-content: flex-end; }
.section-intro { text-align: center; display: grid; gap: var(--spacing-md); margin-bottom: var(--spacing-lg); }

/* --------------------------------------------------------------------------
   Modal (confirmation)
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: var(--spacing-lg); z-index: 100; }
.modal.is-open { display: flex; }
.modal__scrim { position: absolute; inset: 0; background: rgba(30, 26, 22, .55); }
.modal__card {
  position: relative; width: 440px; max-width: 100%; background: var(--color-bg-card);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); padding: 28px var(--spacing-xl); display: grid; gap: var(--spacing-md);
}
.modal__header { display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-md); }
.modal__close { background: none; border: 0; padding: 0; color: var(--color-text-body); }
.modal__actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--spacing-lg); }
.modal__card--wide { width: 720px; max-height: calc(100vh - 48px); overflow-y: auto; }
.form--modal { max-width: none; margin: 0; width: 100%; }
.modal__card--wide .modal__actions { margin-top: var(--spacing-sm); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--color-footer-bg); color: var(--color-text-on-dark); padding: 40px 0; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-lg); }
.site-footer__brand { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.site-footer__brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 14px; line-height: 22px; margin-top: 6px; }
.site-footer a { color: inherit; display: inline-flex; }

/* --------------------------------------------------------------------------
   Header at tablet and phone widths
   -------------------------------------------------------------------------- */
/* Tablet: keep the full nav but tighten it so nothing needs to wrap */
@media (max-width: 1100px) {
  .nav .btn { padding: 8px 16px; }
}
/* Below 900px the nav becomes a menu button + a drawer that slides in from the right */
@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 110;
    width: min(320px, 85vw);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg-card); box-shadow: var(--shadow-modal);
    padding: 76px 24px 24px;
    transform: translateX(100%); transition: transform .25s ease, visibility 0s .25s;
    visibility: hidden; display: flex;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; transition: transform .25s ease; }
  .nav a:not(.btn) {
    font-size: 18px; line-height: 26px; padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav a:not(.btn):last-of-type, .nav a:has(+ .btn) { border-bottom: 0; } /* no divider under the last link */
  .nav .btn { margin-top: var(--spacing-lg); width: 100%; padding: 12px var(--spacing-lg); }
  /* Dimmed page behind the drawer */
  .nav-scrim { position: fixed; inset: 0; background: rgba(30, 26, 22, .45); z-index: 105; display: none; }
  .nav-scrim.is-open { display: block; }
  /* Keep the menu/close button above the drawer */
  .nav__toggle.is-open { position: fixed; top: 14px; right: 16px; z-index: 120; }
}

/* --------------------------------------------------------------------------
   Mobile (matches the mobile Figma designs)
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {

  .hero__inner { grid-template-columns: 1fr; gap: 20px; }
  .hero .carousel { max-width: none; justify-self: stretch; height: auto; aspect-ratio: 342 / 260; min-height: 0; }
  .carousel { aspect-ratio: 342 / 260; }
  .carousel__arrow { display: none; }

  .trust__list { flex-direction: column; gap: 14px; }

  .service-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .service-card {
    grid-template-columns: 40px 1fr; align-items: center; column-gap: 14px; row-gap: 2px;
    padding: 12px 14px; box-shadow: none; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  }
  .service-card .icon-chip { width: 40px; height: 40px; grid-row: 1 / span 2; }
  .service-card h3, .service-card p { grid-column: 2; min-width: 0; }
  .service-card .icon-chip .icon { width: 20px; height: 20px; }
  .service-card h3 { font-family: var(--font-body); font-size: 16px; line-height: 24px; }
  .service-card p { font-size: 14px; line-height: 22px; }

  .photo-break__caption { left: var(--spacing-lg); bottom: var(--spacing-lg); }
  .photo-break__caption h2 { font-size: 24px; line-height: 32px; }

  .pet-card { max-width: none; }
  .form__row { grid-template-columns: 1fr; }
  .form__actions .btn { width: 100%; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }

  /* On phones the inquiry form slides up as a bottom sheet instead of a centered modal */
  .modal { padding: 0; align-items: flex-end; }
  .modal__card--wide {
    width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 12px var(--spacing-lg) var(--spacing-lg);
  }
  .modal__card--wide::before {
    content: ""; display: block; width: 36px; height: 5px; border-radius: 3px;
    background: var(--color-border); margin: 0 auto 12px;
  }
  .modal__card--wide .modal__actions { flex-direction: column-reverse; align-items: stretch; gap: var(--spacing-md); }
  .modal__card--wide .btn--primary { width: 100%; }
}

/* Phones only: stack the hero buttons full width */
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

@media (max-width: 760px) {
  .feature__inner, .feature--flip .feature__inner, .feature__inner--photo-first { grid-template-columns: 1fr; }
  .feature--flip .feature__text { order: 0; }
  .feature__photo, .feature--flip .feature__photo { order: -1; max-width: none; aspect-ratio: 342 / 220; justify-self: stretch; }
  .feature__photo--map { aspect-ratio: 3 / 2; }
  .feature__text .btn { width: 100%; justify-self: stretch; }
  /* Service area: heading first, then the map, then the text */
  .feature--map .feature__text { display: contents; }
  .feature--map .feature__inner { gap: var(--spacing-md); }
  .feature--map .feature__title { order: -2; }
  .feature--map .feature__photo { order: -1; }
}

@media (max-width: 900px) {
  .detail__inner { grid-template-columns: 1fr; grid-template-areas: "head" "gallery" "story"; }
}
@media (max-width: 760px) {
  .carousel--story { max-width: none; justify-self: stretch; aspect-ratio: 342 / 400; order: -1; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip img:first-child { grid-column: 1 / -1; aspect-ratio: 342 / 240; }
  .row-head__controls { display: none; }
  .pet-card--carousel { flex-basis: 280px; }
  .outcome__row { grid-template-columns: 140px 1fr; }
  .outcome__photo { width: 140px; aspect-ratio: 140 / 180; }
  .feature__photo--tall { aspect-ratio: 342 / 300; }
}

/* Phones: share pills become round icon buttons so the row never wraps */
@media (max-width: 480px) {
  .pill { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .share { flex-wrap: nowrap; }
}

/* Phones: the menu becomes a sheet that drops down from under the header */
@media (max-width: 480px) {
  .nav {
    top: 68px; bottom: auto; left: 0; right: 0; width: 100%;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 8px 24px 24px;
    /* Unrolls downward from the header edge instead of sliding over it */
    transform: none;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .3s ease, visibility 0s .3s;
  }
  .nav.is-open { transform: none; clip-path: inset(0 0 0 0); transition: clip-path .3s ease; }
  .nav-scrim { top: 68px; }
}

/* Phones: section headings align left like the rest of the content */
@media (max-width: 480px) {
  .section-title, .section-intro { text-align: left; }
  .section-title { margin-bottom: var(--spacing-md); }
}

/* Phones: the back link becomes a small arrow at the start of the "Past foster" line */
@media (max-width: 480px) {
  .detail .back-link { display: none; }
  .back-arrow { display: inline-flex; }
  .detail { padding-top: var(--spacing-lg); }
}
