/* ─────────────────────────────────────────────────────────────────────────────
   Doggies & Bubbles by PAWMART — "The Bubble Bath"
   Art direction: warm cream spa ground · wet-fur brown ink · ONE aqua accent
   (analogous warm scheme, 60-30-10) · Fraunces display · suds-round radii.
   Laws honored: fluid type (floors ≤2.25rem), interactive pairing, AA both
   modes, reduced-motion everywhere. Built on the design-skills substrate
   (--ds-* contract).
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette — light (the spa) */
  --ds-bg:            #faf6ef;  /* warm towel cream */
  --ds-surface:       #ffffff;
  --ds-surface-2:     #f3ecdf;
  --ds-text:          #2d2218;  /* wet-fur brown — 13.4:1 on bg */
  --ds-muted:         #6b5b49;  /* 5.6:1 on bg */
  --ds-border:        #e7dcc9;
  --ds-border-strong: #8a7a64;
  --ds-accent:        #0e6f78;  /* bath aqua — 5.3:1 on bg as text */
  --ds-accent-strong: #0a525a;
  --ds-on-accent:     #ffffff;
  --ds-ok:            #2e7d4f;
  --ds-warn:          #8a5a16;
  --ds-error:         #b3372f;
  --ds-info:          #0e6f78;

  --ds-radius:        22px;     /* suds */
  --ds-radius-sm:     12px;
  --ds-radius-pill:   999px;
  --ds-shadow:        0 18px 50px -18px rgba(45, 34, 24, 0.18);
  --ds-font:          "Inter", system-ui, sans-serif;
  --ds-font-display:  "Fraunces", Georgia, serif;
  --ds-focus:         0 0 0 3px rgba(14, 111, 120, 0.45);

  /* Fluid type (the law) */
  --ds-display-xl: clamp(2.25rem, 0.9rem + 5.4vw, 5.25rem);
  --ds-display:    clamp(1.9rem, 1rem + 3.6vw, 3.25rem);
  --ds-title-lg:   clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --ds-title:      clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);

  /* Bubble decoration values (decoration only — never text) */
  --bubble-1: rgba(177, 224, 230, 0.55);
  --bubble-2: rgba(244, 214, 222, 0.5);
  --bubble-3: rgba(255, 255, 255, 0.65);

  color-scheme: light;
}

:root[data-ds-theme="dark"] {
  /* The evening bath — deep warm brown, lamplit */
  --ds-bg:            #1b1410;
  --ds-surface:       #251c16;
  --ds-surface-2:     #2e231b;
  --ds-text:          #f4ece0;
  --ds-muted:         #c4b29c;  /* 7.4:1 on bg */
  --ds-border:        #3c2f24;
  --ds-border-strong: #8a7a64;
  --ds-accent:        #5fc4cf;  /* 7.9:1 on bg as text */
  --ds-accent-strong: #8ad8e0;
  --ds-on-accent:     #0c2226;
  --ds-ok:            #6fce96;
  --ds-warn:          #e0a958;
  --ds-error:         #ef8a80;
  --ds-info:          #5fc4cf;
  --ds-shadow:        0 18px 50px -18px rgba(0, 0, 0, 0.55);
  --bubble-1: rgba(95, 196, 207, 0.18);
  --bubble-2: rgba(244, 214, 222, 0.12);
  --bubble-3: rgba(255, 255, 255, 0.10);
  color-scheme: dark;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--ds-font);
  background: var(--ds-bg);
  color: var(--ds-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--ds-focus); border-radius: var(--ds-radius-sm); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.wrap { max-width: 74rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4.5vw, 3rem); }

h1, h2, h3 { font-family: var(--ds-font-display); font-weight: 600; line-height: 1.06; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--ds-display-xl); }
h2 { font-size: var(--ds-display); }
h3 { font-size: var(--ds-title); }
p  { margin: 0; }

.eyebrow {
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--ds-accent); margin-bottom: 1rem;
}
.lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--ds-muted); max-width: 38rem; }

/* ── Buttons (pairing law lives here) ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.7rem;
  border-radius: var(--ds-radius-pill);
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 200ms cubic-bezier(.34,1.56,.64,1), background 160ms ease, color 160ms ease;
}
.btn--fill { background: var(--ds-accent); color: var(--ds-on-accent); }
.btn--fill:hover { background: var(--ds-accent-strong); color: var(--ds-on-accent); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ds-text); border-color: var(--ds-border-strong); }
.btn--ghost:hover { border-color: var(--ds-accent); color: var(--ds-accent); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
:root[data-ds-reduced] .btn { transition: none; }

/* ── Header / nav ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ds-bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--ds-border) 60%, transparent);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ds-text); font-family: var(--ds-font-display); font-weight: 650; font-size: 1.18rem; }
.brand__paw { width: 2rem; height: 2rem; color: var(--ds-accent); flex: none; }
.brand small { display: block; font-family: var(--ds-font); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; color: var(--ds-muted); text-transform: uppercase; }

.nav-desktop { display: none; gap: 0.25rem; align-items: center; }
.nav-desktop a {
  padding: 0.55rem 0.9rem; border-radius: var(--ds-radius-pill);
  color: var(--ds-muted); text-decoration: none; font-weight: 550; font-size: 0.95rem;
}
.nav-desktop a:hover, .nav-desktop a:focus-visible { color: var(--ds-text); background: var(--ds-surface-2); }
.nav-desktop a[aria-current="page"] { color: var(--ds-accent); font-weight: 650; }
.nav-desktop .btn { margin-left: 0.6rem; }
/* Pairing law vs cascade: `.nav-desktop a` (0,1,1) beats `.btn--fill` (0,1,0)
   and was putting muted ink on the accent fill (1.1:1 — caught by the gate). */
.nav-desktop a.btn--fill,
.nav-desktop a.btn--fill:hover,
.nav-desktop a.btn--fill:focus-visible { color: var(--ds-on-accent); background: var(--ds-accent); }
.nav-desktop a.btn--fill:hover { background: var(--ds-accent-strong); }

/* Services dropdown */
.nav-group { position: relative; }
.nav-group > button {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 0.9rem; border-radius: var(--ds-radius-pill);
  background: none; border: 0; font: inherit; font-weight: 550; font-size: 0.95rem;
  color: var(--ds-muted); cursor: pointer;
}
.nav-group > button:hover { color: var(--ds-text); background: var(--ds-surface-2); }
.nav-group__menu {
  position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 14.5rem;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm); box-shadow: var(--ds-shadow);
  padding: 0.45rem; display: none; flex-direction: column; gap: 2px;
}
.nav-group[data-open="true"] .nav-group__menu { display: flex; }
.nav-group__menu a {
  padding: 0.55rem 0.8rem; border-radius: 8px; text-decoration: none;
  color: var(--ds-text); font-size: 0.93rem;
}
.nav-group__menu a:hover, .nav-group__menu a:focus-visible { background: var(--ds-surface-2); color: var(--ds-accent); }

/* Mobile nav */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: none; border: 1.5px solid var(--ds-border-strong); border-radius: var(--ds-radius-sm); cursor: pointer;
}
.nav-toggle span { height: 2px; background: var(--ds-text); border-radius: 2px; transition: transform 220ms ease, opacity 220ms ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column; gap: 0.2rem;
  padding: 0.8rem clamp(1.1rem, 4.5vw, 3rem) 1.4rem;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-bg);
}
.nav-mobile[data-open="true"] { display: flex; }
.nav-mobile a {
  padding: 0.8rem 0.9rem; border-radius: var(--ds-radius-sm);
  text-decoration: none; color: var(--ds-text); font-weight: 550; font-size: 1.05rem;
}
.nav-mobile a:hover { background: var(--ds-surface-2); }
.nav-mobile a[aria-current="page"] { color: var(--ds-accent); }
.nav-mobile__label { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ds-muted); margin: 0.8rem 0.9rem 0.2rem; }

@media (min-width: 920px) {
  .nav-desktop { display: flex; }
  .nav-toggle, .nav-mobile { display: none !important; }
}

/* ── Hero (homepage signature) ────────────────────────────────────────────── */
.hero {
  position: relative; overflow: clip;
  min-height: min(92svh, 60rem);
  display: grid; align-content: center;
  padding-block: clamp(5rem, 10vw, 8rem) clamp(7rem, 14vw, 11rem);
}
.hero__bubbles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__bubbles canvas { width: 100%; height: 100%; }
.hero__content { position: relative; z-index: 1; max-width: 46rem; }
.hero h1 .accent { color: var(--ds-accent); font-style: italic; }
.hero .lede { margin-top: 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.3rem; }
.hero__meta { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; color: var(--ds-muted); font-size: 0.9rem; }
.hero__meta strong { color: var(--ds-text); font-weight: 650; }

/* CSS bubble fallback (tier 2 of the ladder) + decorative bubbles anywhere */
.bubble {
  position: absolute; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, var(--bubble-3), transparent 42%),
    radial-gradient(circle at 70% 75%, var(--bubble-2), transparent 52%),
    radial-gradient(circle at 50% 50%, var(--bubble-1), color-mix(in srgb, var(--bubble-1) 16%, transparent) 78%);
  border: 1px solid color-mix(in srgb, var(--ds-accent) 16%, transparent);
  animation: bubble-rise linear infinite;
  will-change: transform;
}
@keyframes bubble-rise {
  from { transform: translateY(16vh) translateX(0) scale(var(--s, 1)); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  to   { transform: translateY(-110vh) translateX(var(--drift, 2vw)) scale(var(--s, 1)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; opacity: 0.5; } }
:root[data-ds-reduced] .bubble { animation: none; opacity: 0.5; }

/* The water-line wipe between hero and the page body */
.waterline { position: relative; z-index: 2; margin-top: -1px; }
.waterline svg { display: block; width: 100%; height: clamp(3rem, 8vw, 6.5rem); color: var(--ds-surface-2); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding-block: clamp(3.8rem, 8vw, 7rem); }
.section--tub { background: var(--ds-surface-2); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4.5vw, 3.4rem); }
.section-head .lede { margin-top: 1rem; }

/* Service cards */
.svc-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.svc-card {
  position: relative; display: flex; flex-direction: column; gap: 0.8rem;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); padding: 1.7rem 1.6rem 1.6rem;
  text-decoration: none; color: inherit;
  transition: transform 260ms cubic-bezier(.34,1.3,.64,1), box-shadow 260ms ease, border-color 200ms ease;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--ds-shadow); border-color: color-mix(in srgb, var(--ds-accent) 35%, var(--ds-border)); }
.svc-card:focus-visible { box-shadow: var(--ds-focus); }
@media (prefers-reduced-motion: reduce) { .svc-card { transition: none; } }
:root[data-ds-reduced] .svc-card { transition: none; }
.svc-card__icon {
  width: 3.1rem; height: 3.1rem; border-radius: var(--ds-radius-pill);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--ds-accent) 12%, var(--ds-surface));
  color: var(--ds-accent);
}
.svc-card__icon svg { width: 1.5rem; height: 1.5rem; }
.svc-card p { color: var(--ds-muted); font-size: 0.95rem; }
.svc-card__go { margin-top: auto; padding-top: 0.6rem; font-weight: 650; color: var(--ds-accent); font-size: 0.92rem; }
.svc-card__go::after { content: " →"; transition: margin 160ms ease; }
.svc-card:hover .svc-card__go::after { margin-left: 0.3rem; }

/* Marquee band */
.marquee { overflow: hidden; padding-block: clamp(1.6rem, 3vw, 2.6rem); border-block: 1px solid var(--ds-border); }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span {
  font-family: var(--ds-font-display); font-size: var(--ds-title-lg); font-weight: 600;
  white-space: nowrap; color: var(--ds-text);
}
.marquee__track span:nth-child(even) { color: var(--ds-accent); font-style: italic; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
:root[data-ds-reduced] .marquee__track { animation: none; }

/* About teaser / quote */
.quote-band blockquote {
  margin: 0; font-family: var(--ds-font-display); font-size: var(--ds-title-lg);
  font-weight: 500; line-height: 1.3; max-width: 50rem;
}
.quote-band figcaption { margin-top: 1.2rem; color: var(--ds-muted); }
.quote-band figcaption strong { color: var(--ds-text); }

/* Two-up split */
.split { display: grid; gap: clamp(1.6rem, 4vw, 3.6rem); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1.05fr 0.95fr; } }
.split__media {
  border-radius: var(--ds-radius); min-height: clamp(16rem, 38vw, 26rem);
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--ds-accent) 18%, transparent), transparent 42%),
    linear-gradient(160deg, var(--ds-surface-2), var(--ds-surface));
  border: 1px solid var(--ds-border);
}

/* Steps (service pages) */
.steps { display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.step {
  counter-increment: step;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); padding: 1.5rem 1.4rem;
}
.step::before {
  content: "0" counter(step);
  display: block; font-family: var(--ds-font-display); font-style: italic;
  font-size: 1.5rem; color: var(--ds-accent); margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.step p { color: var(--ds-muted); font-size: 0.94rem; }

/* Benefits checklist */
.benefits { display: grid; gap: 0.9rem; padding: 0; margin: 0; list-style: none; }
@media (min-width: 720px) { .benefits { grid-template-columns: 1fr 1fr; } }
.benefits li {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm); padding: 1.05rem 1.1rem;
}
.benefits li svg { width: 1.35rem; height: 1.35rem; color: var(--ds-ok); flex: none; margin-top: 0.15rem; }
.benefits strong { display: block; margin-bottom: 0.15rem; }
.benefits span { color: var(--ds-muted); font-size: 0.93rem; }

/* Category bento (pet supplies) */
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.bento article {
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); padding: 1.5rem 1.4rem;
}
.bento h3 { margin-bottom: 0.45rem; }
.bento p { color: var(--ds-muted); font-size: 0.94rem; }

/* FAQ */
.faq { display: grid; gap: 0.8rem; max-width: 50rem; }
.faq details {
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm); padding: 0;
}
.faq summary {
  cursor: pointer; font-weight: 650; padding: 1.05rem 1.2rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--ds-font-display); font-size: 1.4rem; color: var(--ds-accent); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 1.2rem 1.15rem; color: var(--ds-muted); }

/* CTA band */
.cta-band {
  background: var(--ds-accent); color: var(--ds-on-accent);
  border-radius: var(--ds-radius);
  padding: clamp(2.4rem, 6vw, 4.2rem) clamp(1.4rem, 5vw, 3.5rem);
  position: relative; overflow: hidden;
}
.cta-band h2, .cta-band p { color: var(--ds-on-accent); }
.cta-band .eyebrow { color: var(--ds-on-accent); } /* pairing law: no accent-on-accent */
.cta-band .lede { color: color-mix(in srgb, var(--ds-on-accent) 82%, transparent); max-width: 34rem; }
.cta-band .btn--fill { background: var(--ds-on-accent); color: var(--ds-accent-strong); }
.cta-band .btn--fill:hover { background: var(--ds-on-accent); color: var(--ds-accent-strong); transform: translateY(-2px); }
.cta-band .bubble { opacity: 0.5; }

/* Page hero (inner pages) */
.page-hero { position: relative; overflow: clip; padding-block: clamp(4.2rem, 9vw, 7rem) clamp(2.6rem, 6vw, 4.4rem); }
.page-hero .lede { margin-top: 1.2rem; }
.page-hero .bubble { opacity: 0.55; }

/* Contact */
.contact-cards { display: grid; gap: 1rem; }
@media (min-width: 880px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--ds-surface); border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius); padding: 1.9rem 1.7rem;
}
.contact-card h3 { margin-bottom: 0.7rem; }
.contact-card p { color: var(--ds-muted); }
.contact-card .big {
  display: inline-block; font-family: var(--ds-font-display); font-size: var(--ds-title-lg);
  color: var(--ds-accent); text-decoration: none; margin-top: 0.6rem; font-weight: 600;
}
.contact-card .big:hover { color: var(--ds-accent-strong); text-decoration: underline; text-underline-offset: 6px; }

/* Footer */
.site-footer { background: var(--ds-surface-2); border-top: 1px solid var(--ds-border); margin-top: clamp(3rem, 7vw, 5rem); }
.site-footer__grid { display: grid; gap: 2rem; padding-block: clamp(2.6rem, 6vw, 4rem); }
@media (min-width: 880px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { font-size: 0.8rem; font-family: var(--ds-font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ds-muted); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--ds-text); text-decoration: none; }
.site-footer a:hover { color: var(--ds-accent); }
.site-footer__legal { border-top: 1px solid var(--ds-border); padding-block: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: space-between; color: var(--ds-muted); font-size: 0.85rem; }

/* Theme + motion toggle (header utilities) */
.util-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--ds-radius-pill); border: 1.5px solid var(--ds-border);
  background: none; color: var(--ds-muted); cursor: pointer; font-size: 1rem;
}
.util-btn:hover { color: var(--ds-text); border-color: var(--ds-border-strong); }
