/* ============================================================
   Scruff to Fluff Mobile Grooming — styles.css
   Bright, playful, rounded. Warm cream base + coral/teal/sunflower
   pops. Mobile-first: base styles are for phones; @media blocks
   add desktop layout.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --cream: #fff8f0;
  --ink: #33302c;
  --coral: #ff6b4a;
  --coral-deep: #e04e2e;
  --coral-hover: #ff8062;  /* lightens on hover so the dark label stays readable */
  --teal: #0fa3a3;
  --teal-deep: #0c8484;
  --teal-band: #0a7676;  /* deeper: white body text reaches AA on this */
  --sun: #ffc94d;
  --sun-deep: #e8ab1f;
  --price: #a83a0d;   /* deep rust: passes contrast on every pale card */
  --muted: #6f675e;
  --card: #fffdf9;

  --font-display: "Fredoka", "Arial Rounded MT Bold", sans-serif;
  --font-body: "Nunito", -apple-system, sans-serif;

  --r-lg: 28px;
  --r-md: 18px;
  --r-pill: 999px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 9vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 5.5vw, 2.9rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 60ch; }

a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap { width: min(100% - 2.25rem, 70rem); margin-inline: auto; }
.block { padding-block: 3rem; position: relative; }

/* Coloured pop sections */
.pop-teal { background: var(--teal-band); color: #f2fbfb; }
.pop-teal h2 { color: #fff; }
.pop-teal p { color: #d8f0f0; }
.pop-sun { background: var(--sun); color: var(--ink); }

/* Eyebrow */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-deep);
  background: rgba(255, 107, 74, 0.12);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}
.pop-teal .eyebrow { color: #fff; background: rgba(255,255,255,0.18); }

/* ---------- 3. Squishy buttons (signature micro-interaction) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 0;
  border-radius: var(--r-pill);
  padding: 0.9rem 1.7rem;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
              color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(51, 48, 44, 0.18); }
.btn:active { transform: scale(0.94); } /* the dog-toy squish */

.btn-coral { background: var(--coral); color: var(--ink); }
.btn-coral:hover { background: var(--coral-hover); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.pop-teal .btn-coral { background: var(--sun); color: var(--ink); }
.pop-teal .btn-coral:hover { background: var(--sun-deep); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(51, 48, 44, 0.08);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding-block: 0.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .paw { width: 30px; height: 30px; transition: rotate 0.3s ease; }
.brand:hover .paw { rotate: -16deg; }

.header-call { display: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 44px; height: 44px; padding: 11px;
  background: none; border: 2.5px solid var(--ink); border-radius: 14px; cursor: pointer;
}
.nav-toggle span { display: block; height: 3px; background: var(--ink); border-radius: 3px; }

.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream);
  border-bottom: 2px solid rgba(51,48,44,0.08);
  padding: 0.5rem 1.15rem 1.15rem;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 0.65rem 0.2rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid rgba(51,48,44,0.08);
}
.site-nav a[aria-current="page"] { color: var(--coral-deep); }

/* ---------- 5. Hero ---------- */
.hero { padding-block: 2.5rem 3rem; overflow: hidden; }
.hero-grid { display: grid; gap: 1.75rem; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  height: 58vw;              /* explicit: cannot stretch tall */
  max-height: 320px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 72px;
}
.trust-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; padding: 0; list-style: none; }
.trust-chips li {
  font-size: 0.85rem; font-weight: 700;
  background: var(--card);
  border: 2px solid rgba(51,48,44,0.1);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.85rem;
}

/* ---------- 6. Sticker badges (signature detail) ---------- */
.stick {
  position: absolute;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  background: var(--sun); color: var(--ink);
  border-radius: var(--r-pill);
  padding: 0.4rem 0.95rem;
  rotate: -7deg;
  box-shadow: 0 4px 10px rgba(51, 48, 44, 0.18);
  pointer-events: none;
}
/* Hero/about stickers need explicit offsets or they land outside the photo */
.hero-photo .stick { bottom: 1rem; left: 1rem; }

.stick-teal { background: var(--teal-band); color: #fff; rotate: 5deg; }
.stick-coral { background: var(--coral); color: var(--ink); rotate: -4deg; }

/* ============================================================
   7. BEFORE / AFTER SLIDER (the centrepiece)
   The divider is a real <input type="range"> stretched invisibly
   over the photo: native touch drag, mouse drag, and keyboard
   arrows all work with almost no JS. --pos drives the clip.
   ============================================================ */
.ba-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 1rem;
  -webkit-overflow-scrolling: touch;
}
.ba-row > * { scroll-snap-align: center; }

.ba { margin: 0; }
.ba-frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  touch-action: pan-y; /* vertical page scroll still works over the card */
}
.ba-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ba-before-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 4px; margin-left: -2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  pointer-events: none;
}
.ba-knob {
  position: absolute; top: 50%; left: var(--pos);
  translate: -50% -50%;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  font-weight: 900; color: var(--ink); font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.28);
  pointer-events: none;
}
.ba-range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
/* keep a visible focus ring for keyboard users even though the input is invisible */
.ba-range:focus-visible ~ .ba-knob { outline: 3px solid var(--coral); outline-offset: 3px; }

.ba-tag {
  position: absolute; top: 0.8rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  background: rgba(51, 48, 44, 0.78); color: #fff;
  border-radius: var(--r-pill);
  padding: 0.25rem 0.7rem;
  pointer-events: none;
}
.ba-tag-b { left: 0.8rem; }
.ba-tag-a { right: 0.8rem; }

.ba figcaption {
  font-weight: 700; text-align: center;
  margin-top: 0.7rem; color: var(--muted);
}

.ba-hint {
  text-align: center; color: var(--muted); font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* ---------- 8. Service cards (colour pops) ---------- */
.svc-grid { display: grid; gap: 1rem; margin-top: 1.4rem; }
.svc-card {
  border-radius: var(--r-lg);
  padding: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  display: grid; gap: 0.4rem; align-content: start;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.svc-card:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: 0 10px 22px rgba(51,48,44,0.16); color: var(--ink); }
.svc-card .from { font-weight: 800; font-size: 0.9rem; color: var(--price); }
.svc-card p { margin: 0; color: var(--muted); }

/* Cards sit on their own pale backgrounds, so they must keep dark text even
   inside a coloured section. Without this they inherit the light text meant
   for the teal/sunflower background and vanish into the card. Covers every
   card type that can appear on a coloured band. */
.pop-teal .svc-card, .pop-sun .svc-card,
.pop-teal .step-card, .pop-sun .step-card,
.pop-teal .quote, .pop-sun .quote { color: var(--ink); }

.pop-teal .svc-card h3, .pop-sun .svc-card h3,
.pop-teal .step-card h3, .pop-sun .step-card h3,
.pop-teal .quote h3, .pop-sun .quote h3 { color: var(--ink); }

.pop-teal .svc-card p, .pop-sun .svc-card p,
.pop-teal .step-card p, .pop-sun .step-card p,
.pop-teal .quote p, .pop-sun .quote p { color: var(--muted); }

.pop-teal .svc-card .from, .pop-sun .svc-card .from { color: var(--price); }
.pop-teal .quote cite, .pop-sun .quote cite { color: var(--teal-deep); }
.svc-1 { background: #ffe3da; }
.svc-2 { background: #d9f2f2; }
.svc-3 { background: #ffefc9; }
.svc-4 { background: #ffd9ce; }

/* ---------- 9. Steps (how it works: a real sequence) ---------- */
.steps { display: grid; gap: 1rem; margin-top: 1.4rem; counter-reset: step; }
.step-card {
  background: var(--card);
  border: 2px solid rgba(51,48,44,0.08);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  /* number in column 1, text in column 2: they can never overlap */
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: start;
}
.step-card::before {
  counter-increment: step;
  content: counter(step);
  grid-column: 1;
  grid-row: 1 / span 2;      /* number sits beside both the title and the text */
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  background: var(--teal-band); color: #fff;
}
.step-card h3 { grid-column: 2; margin: 0 0 0.2rem; align-self: center; }
.step-card p  { grid-column: 2; margin: 0; color: var(--muted); }

/* ---------- 10. Gallery grid ---------- */
.g-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.g-item { position: relative; border-radius: var(--r-md); overflow: hidden; }
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 0.5s ease;
}
.g-item:hover img { transform: scale(1.04); }
.g-item .stick { top: 0.7rem; left: 0.7rem; }

/* Full-bleed on the gallery page */
.g-bleed { width: min(100% - 1rem, 100rem); margin-inline: auto; }

/* ---------- 11. Reviews ---------- */
.quote-grid { display: grid; gap: 1rem; margin-top: 1.4rem; }
.quote {
  background: var(--card);
  border: 2px solid rgba(51,48,44,0.08);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}
.quote p { margin: 0 0 0.6rem; }
.quote cite { font-style: normal; font-weight: 800; color: var(--teal-deep); }

/* ---------- 12. Forms ---------- */
.form-grid { display: grid; gap: 1rem; max-width: 34rem; }
label { font-weight: 800; display: block; margin-bottom: 0.3rem; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff;
  border: 2.5px solid rgba(51,48,44,0.2);
  border-radius: var(--r-md);
  padding: 0.75rem 0.9rem;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(15, 163, 163, 0.25);
}
.form-grid button { justify-self: start; }
.hidden-field { position: absolute; left: -9999px; }
.form-duo { display: grid; gap: 1rem; }

.hours { width: 100%; max-width: 26rem; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 0.5rem 0.2rem; border-bottom: 1px solid rgba(51,48,44,0.12); }
.map-frame { width: 100%; height: 340px; border: 0; border-radius: var(--r-lg); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; padding: 0; list-style: none; }
.chips li {
  font-weight: 800; font-size: 0.9rem;
  background: var(--card);
  border: 2px solid rgba(51,48,44,0.1);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.9rem;
}

/* ---------- 13. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d8d2c9;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding-block: 2.5rem 6rem; /* room for the floating call pill */
  font-size: 0.95rem;
  margin-top: 3rem;
}
.footer-grid { display: grid; gap: 1.5rem; }
.site-footer h3 { color: #fff; font-size: 1.15rem; }
.site-footer a { color: var(--sun); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.footer-legal { margin-top: 1.8rem; font-size: 0.85rem; color: #a89f93; }

/* ---------- 14. Floating call pill ---------- */
.fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  background: var(--coral); color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-pill);
  padding: 0.85rem 1.3rem;
  box-shadow: 0 8px 22px rgba(224, 78, 46, 0.4);
  transition: transform 0.12s ease;
}
.fab:hover { background: var(--coral-hover); color: var(--ink); transform: translateY(-2px); }
.fab:active { transform: scale(0.94); }

/* ---------- 15. Scroll reveals (gated behind .js) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ---------- 16. Desktop (820px+) ---------- */
@media (min-width: 820px) {
  .block { padding-block: 4.5rem; }

  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; border: 0; padding: 0; background: none; align-items: center; }
  .site-nav ul { display: flex; gap: 1.5rem; }
  .site-nav li { border: 0; }
  .site-nav a { border: 0; padding: 0.2rem 0; }
  .header-call { display: inline-flex; margin-left: 1.4rem; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

  .hero-grid { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 3rem; }
  .hero-photo img { height: 420px; max-height: none; }

  .ba-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: unset;
    overflow: visible;
    gap: 1.4rem;
  }

  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
  .g-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer { padding-bottom: 2.5rem; }
  .form-duo { grid-template-columns: 1fr 1fr; }
  .contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
  .map-frame { height: 420px; }
}

/* ---------- 17. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .g-item:hover img, .btn:hover, .fab:hover { transform: none; }
}

/* ============================================================
   18. INSTANT QUOTE BUILDER (quote.html)
   Options are real radio/checkbox inputs under the styling, so
   keyboard nav, arrow keys and screen readers work natively.
   ============================================================ */
.q-step { margin-bottom: 2rem; }
.q-step > legend {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.35rem; padding: 0; margin-bottom: 0.15rem;
}
.q-step .q-hint { color: var(--muted); margin: 0 0 0.9rem; font-size: 0.95rem; }
.q-fieldset { border: 0; padding: 0; margin: 0; }

.q-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }

.q-opt { position: relative; display: block; cursor: pointer; }
.q-opt input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.q-card {
  display: grid; gap: 0.15rem; align-content: start;
  background: var(--card);
  border: 2.5px solid rgba(51,48,44,0.12);
  border-radius: var(--r-md);
  padding: 0.9rem 1rem;
  height: 100%;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.q-opt:hover .q-card { transform: translateY(-2px); border-color: rgba(51,48,44,0.28); }
.q-opt input:checked + .q-card {
  border-color: var(--teal);
  background: #e6f6f6;
}
.q-opt input:focus-visible + .q-card {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}
.q-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.q-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.q-plus { font-size: 0.82rem; font-weight: 800; color: var(--teal-deep); }

/* checked tick for add-ons */
.q-opt input[type="checkbox"]:checked + .q-card::after {
  content: "✓";
  position: absolute; top: 0.5rem; right: 0.7rem;
  font-weight: 900; color: var(--teal-deep);
}

/* ---- live total ---- */
.q-total {
  background: var(--ink); color: #fff;
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: grid; gap: 0.3rem;
}
.q-total .q-label {
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #b9b1a6; font-weight: 800;
}
.q-amount {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 12vw, 3.6rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.q-total p { color: #cfc7bc; font-size: 0.9rem; margin: 0.4rem 0 0; max-width: none; }
.q-breakdown { list-style: none; margin: 0.8rem 0 0; padding: 0; font-size: 0.9rem; color: #cfc7bc; }
.q-breakdown li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.q-breakdown li span:last-child { font-variant-numeric: tabular-nums; }

/* ---- sticky mobile total bar ---- */
.q-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--ink); color: #fff;
  padding: 0.7rem 1rem;
  border-top: 2px solid rgba(255,255,255,0.12);
}
.q-bar .q-bar-amt {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.q-bar .q-bar-label { font-size: 0.75rem; color: #b9b1a6; display: block; }
.q-bar .btn { padding: 0.7rem 1.15rem; font-size: 0.98rem; }

/* the floating call pill would collide with the total bar */
body.has-qbar .fab { display: none; }
body.has-qbar .site-footer { padding-bottom: 6.5rem; }

@media (min-width: 820px) {
  .q-layout { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 3rem; align-items: start; }
  .q-total-wrap { position: sticky; top: 6rem; }
  .q-bar { display: none; }
  body.has-qbar .fab { display: inline-flex; }
  body.has-qbar .site-footer { padding-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .q-opt:hover .q-card { transform: none; }
}
