/* ==========================================================================
   Animal Help Point — cinematic scroll layer (homepage only)
   Loaded after style.css. Everything here is progressive enhancement:
   the base styles below are a calm, stacked layout that works without JS,
   on phones, and with "reduce motion". assets/js/cinematic.js adds the
   .film--pinned / .furry--pinned classes on large screens to switch on the
   pinned, scroll-scrubbed versions.
   ========================================================================== */

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 500;
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
  background: linear-gradient(90deg, var(--orange), var(--blue));
}

/* ---------- Film: "Care, one moment at a time" ---------- */
.film { background: var(--paper); padding: clamp(64px, 8vw, 110px) 0; position: relative; }
.film-head { margin-bottom: 38px; }
.film-eyebrow { display: none; }
.film-chaps { display: grid; gap: 22px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.film-chap {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr;
}
.film-slide { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sky-100); }
.film-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.12); }
.film-text { padding: 24px 24px 30px; }
.film-num {
  display: block; font-family: var(--font-head); font-weight: 900; font-size: 0.85rem;
  letter-spacing: 0.14em; color: var(--orange-text); margin-bottom: 8px;
}
.film-text h3 { font-size: clamp(1.5rem, 5vw, 1.9rem); color: var(--navy); margin: 0 0 10px; line-height: 1.15; }
.film-text p { margin: 0 0 18px; color: var(--muted); max-width: 46ch; }
.film-pips { display: none; }

@media (min-width: 640px) and (max-width: 899px) {
  .film-chaps { grid-template-columns: 1fr 1fr; }
}

/* Pinned (desktop) version */
.film--pinned { padding: 0; }
.film--pinned .film-head {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
}
.film--pinned .film-stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); }
.film--pinned .film-chaps {
  position: absolute; inset: 0; max-width: none; padding: 0; display: block; gap: 0;
  clip-path: inset(9vh 7vw 9vh 7vw round 36px);
  background: var(--navy-900); will-change: clip-path;
}
.film--pinned .film-chap {
  position: absolute; inset: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: hidden;
  display: block;
}
.film--pinned .film-slide { position: absolute; inset: 0; aspect-ratio: auto; background: var(--navy-900); }
.film--pinned .film-slide img { transform: none; will-change: transform; }
.film--pinned .film-chap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 21, 56, 0.82) 0%, rgba(5, 21, 56, 0.55) 38%, rgba(5, 21, 56, 0.08) 72%),
    linear-gradient(0deg, rgba(5, 21, 56, 0.55), transparent 40%);
}
.film--pinned .film-text {
  position: absolute; z-index: 2; left: max(48px, calc((100vw - 1200px) / 2 + 24px)); bottom: 16vh;
  width: min(580px, 80vw); padding: 0; color: #fff; pointer-events: none;
}
.film--pinned .film-chap.is-active .film-text { pointer-events: auto; }
.film--pinned .film-num { color: var(--orange); font-size: 0.95rem; margin-bottom: 14px; }
.film--pinned .film-text h3 {
  color: #fff; font-weight: 900; font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: 1.02; margin-bottom: 18px;
  text-shadow: 0 6px 30px rgba(5, 21, 56, 0.35);
}
.film--pinned .film-text p { color: #e3ecff; font-size: clamp(1rem, 1.35vw, 1.2rem); margin-bottom: 26px; }
.film--pinned .film-eyebrow {
  display: inline-flex; position: absolute; z-index: 3; left: max(48px, calc((100vw - 1200px) / 2 + 24px));
  top: calc(var(--header-h) + 3vh); color: var(--orange); opacity: 0;
}
.film--pinned .film-pips {
  display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0;
  position: absolute; z-index: 3; right: max(28px, calc((100vw - 1200px) / 2 + 12px)); top: 50%; transform: translateY(-50%);
}
.film-pips li {
  width: 10px; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.35);
  transition: height 0.4s var(--ease), background 0.4s;
}
.film-pips li.on { height: 38px; background: var(--orange); }

/* ---------- Furry family: horizontal furry ---------- */
.furry { background: var(--cream); padding: clamp(64px, 8vw, 110px) 0; position: relative; overflow: hidden; }
.furry-head { margin-bottom: 34px; }
.furry-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 24px 26px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.furry-track::-webkit-scrollbar { display: none; }
.furry-card {
  flex: 0 0 74%; aspect-ratio: 4 / 5; scroll-snap-align: center; position: relative; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--sky-100); margin: 0;
}
.furry-card img { width: 112%; height: 100%; max-width: none; object-fit: cover; display: block; }
.furry-card figcaption {
  position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: 7px 14px; border-radius: 99px;
  font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; background: rgba(255, 255, 255, 0.92); color: var(--navy);
}
.furry-bar { display: none; }
@media (min-width: 640px) and (max-width: 899px) { .furry-card { flex-basis: 44%; } }

.furry--pinned { padding: 0; }
.furry--pinned .furry-pin {
  height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 4vh; overflow: hidden;
  padding-top: var(--header-h);
}
.furry--pinned .furry-head { margin: 0 auto; width: 100%; max-width: var(--container); padding: 0 24px; }
.furry--pinned .furry-head h2 { margin-bottom: 0; }
.furry--pinned .furry-track {
  overflow: visible; scroll-snap-type: none; width: max-content; align-items: center;
  gap: 28px; padding: 0 8vw 4vh max(24px, calc((100vw - 1200px) / 2 + 24px)); will-change: transform;
}
.furry--pinned .furry-card { flex: 0 0 auto; width: clamp(240px, 24vw, 400px); height: 46vh; max-height: 500px; aspect-ratio: auto; }
.furry--pinned .furry-card:nth-child(even) { transform: translateY(3vh); }
.furry--pinned .furry-card:nth-child(3n) { width: clamp(280px, 30vw, 500px); }
.furry--pinned .furry-bar {
  display: block; height: 4px; width: min(1200px, calc(100% - 48px)); margin: 0 auto; border-radius: 99px;
  background: rgba(8, 34, 81, 0.12); overflow: hidden;
}
.furry--pinned .furry-bar i { display: block; height: 100%; background: var(--orange); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Emergency heartbeat line ---------- */
.ecg {
  position: absolute; left: 0; right: 0; bottom: 14px; width: 100%; height: 70px; z-index: -1; pointer-events: none;
  fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  overflow: visible;
}
.ecg path { vector-effect: non-scaling-stroke; }

/* ---------- Word-by-word text highlight ---------- */
.scrub-words .w { transition: none; }

@media (max-width: 899px) {
  .ecg { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .film-slide img { transform: none; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

/* Services: cards stack over each other as you scroll (desktop; added by JS) */
.svc--stack .svc-row {
  position: sticky; top: calc(var(--header-h) + 18px); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(26px, 3.4vw, 46px);
  margin-bottom: 6vh; min-height: min(70vh, 600px); transform-origin: 50% 0; will-change: transform;
}
.svc--stack .svc-row + .svc-row { border-top: 1px solid var(--line); }
.svc--stack .svc-row:nth-child(2) { top: calc(var(--header-h) + 32px); }
.svc--stack .svc-row:nth-child(3) { top: calc(var(--header-h) + 46px); }
.svc--stack .svc-row:nth-child(4) { top: calc(var(--header-h) + 60px); }
.svc--stack .svc-media .photo.tall { aspect-ratio: 5 / 4; }

/* About: full-bleed promise band */
.quote-band {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--navy-900);
  padding: clamp(90px, 15vw, 190px) 0;
}
.qb-bg { position: absolute; inset: -14% 0; z-index: -2; }
.qb-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quote-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5, 21, 56, 0.88), rgba(5, 21, 56, 0.6) 55%, rgba(5, 21, 56, 0.25));
}
.quote-band .eyebrow { color: var(--orange); }
.qb-text {
  font-family: var(--font-head); font-weight: 900; font-size: clamp(2rem, 5.2vw, 4.4rem); line-height: 1.08;
  max-width: 21ch; margin: 16px 0 0; color: #fff;
}

/* Shop: drifting outline text */
.drift { overflow: hidden; padding: clamp(28px, 5vw, 64px) 0; background: var(--paper); }
.drift-row {
  display: flex; white-space: nowrap; width: max-content; gap: 0.5em; will-change: transform;
  font-family: var(--font-head); font-weight: 900; font-size: clamp(2.6rem, 8vw, 7rem); line-height: 1.12;
  color: transparent; -webkit-text-stroke: 2px var(--blue);
}
.drift-row.alt { -webkit-text-stroke-color: var(--orange-600); }

/* Blog: light sweep across thumbnails as they scroll past */
.post .thumb .shine {
  position: absolute; inset: 0; pointer-events: none; transform: translateX(var(--sx, -130%));
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.4) 50%, transparent 62%);
}

/* ==========================================================================
   Doctor chambers (Services page). Without JS every day is listed in order;
   chambers.js turns them into day tabs.
   ========================================================================== */
.ch-days { max-width: 1100px; margin: 0 auto; }
.ch-day { margin-bottom: 34px; }
.ch-day-title { font-size: 1.5rem; margin: 0 0 12px; color: var(--navy); }
.ch-note { color: var(--muted); margin: -4px 0 14px; font-weight: 600; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ch-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.ch-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.ch-time {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px;
  font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; color: var(--navy-900); background: var(--orange-100);
}
.ch-time .ico { width: 15px; height: 15px; }
.ch-time.tbc { background: #eef1f7; color: var(--muted); }
.ch-time.oncall { background: var(--green-100); color: #20754f; }
.ch-card h3 { font-size: 1.18rem; margin: 4px 0 0; line-height: 1.25; }
.ch-area { margin: 0; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; font-size: 0.96rem; }
.ch-area .ico { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--blue); }
.ch-map {
  margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; color: var(--blue);
}
.ch-map .ico { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.ch-map:hover .ico { transform: translateX(4px); }
.ch-foot { text-align: center; color: var(--muted); margin: 8px 0 18px; font-weight: 600; }
.ch-actions { justify-content: center; }

/* tab mode (added by chambers.js) */
.ch-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 auto 18px; max-width: 1100px;
  scrollbar-width: none; justify-content: center; flex-wrap: wrap;
}
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab {
  position: relative; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer;
  padding: 10px 18px; border-radius: 99px; font-family: var(--font-head); font-weight: 800; font-size: 0.95rem;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.ch-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ch-tab[aria-selected="true"] { background: var(--orange); border-color: var(--orange); color: var(--navy-900); box-shadow: 0 10px 24px -12px var(--orange-600); }
.ch-tab.is-today::after {
  content: ""; position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
}
.ch--tabs .ch-day { display: none; margin-bottom: 14px; }
.ch--tabs .ch-day.is-active { display: block; }
.ch--tabs .ch-day-title { display: none; }
.ch-today-tag { display: inline-block; margin: 0 0 12px; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; color: #20754f; }
.ch--tabs .ch-note { text-align: center; margin: 0 0 14px; }
.ch--tabs .ch-grid { justify-content: center; }
@media (max-width: 640px) {
  .ch-tabs { justify-content: flex-start; flex-wrap: nowrap; max-width: 100%; }
  .ch-tab { flex: none; }
}

/* Contact: let both columns shrink to the screen on phones */
.contact-grid > * { min-width: 0; }
.info-list .info > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Elements that slide in from the side must never create a sideways scrollbar before they arrive */
html, body { overflow-x: clip; }

/* ==========================================================================
   Phones & tablets: story cards (home film). Added by cinematic.js as .film--stack
   ========================================================================== */
.film--stack .film-chaps { display: block; padding: 0 14px; }
.film--stack .film-chap {
  position: sticky; top: 14px; display: block; height: min(78vh, 640px); height: min(78svh, 640px);
  margin: 0 0 16px; border-radius: 28px; overflow: hidden; background: var(--navy-900);
  transform-origin: 50% 0; will-change: transform; box-shadow: 0 24px 50px -24px rgba(5, 21, 56, 0.55);
}
.film--stack .film-chap:nth-child(2) { top: 24px; }
.film--stack .film-chap:nth-child(3) { top: 34px; }
.film--stack .film-chap:nth-child(4) { top: 44px; }
.film--stack .film-slide { position: absolute; inset: 0; aspect-ratio: auto; background: var(--navy-900); }
.film--stack .film-slide img { transform: none; will-change: transform; }
.film--stack .film-chap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(0deg, rgba(5, 21, 56, 0.92) 0%, rgba(5, 21, 56, 0.6) 38%, rgba(5, 21, 56, 0) 68%);
}
.film--stack .film-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 22px 26px; color: #fff; }
.film--stack .film-text h3 { color: #fff; font-weight: 900; font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.05; margin-bottom: 10px; }
.film--stack .film-text p { color: #e3ecff; margin-bottom: 18px; font-size: 1rem; }
.film-dim { position: absolute; inset: 0; z-index: 3; background: #051538; opacity: 0; pointer-events: none; }
@media (min-width: 640px) and (max-width: 899px) {
  .film--stack .film-chaps { max-width: 620px; margin: 0 auto; }
}
/* coverflow: let the centred card breathe */
@media (max-width: 899px) {
  .furry-card { transition: none; will-change: transform; }
}

/* Official WhatsApp glyph: solid shape, no outline stroke */
svg.ico[viewBox="0 0 720 720"] { stroke: none; }
.wa-fab .ico[viewBox="0 0 720 720"] { width: 30px; height: 30px; }
/* WhatsApp brand rule: the glyph is shown only in WhatsApp green, white or black */
.contact-li .ico[viewBox="0 0 720 720"],
.info .icon-bubble .ico[viewBox="0 0 720 720"] { color: #25d366; }

/* Emergency bands: friendly WhatsApp button (white pill, green WhatsApp dot) */
.btn.btn-wa { --bg: #ffffff; --fg: var(--navy-900); padding: 10px 26px 10px 10px; gap: 12px; box-shadow: 0 16px 34px -16px rgba(8, 34, 81, 0.45); }
.btn-wa .wa-dot {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #25d366; color: #fff; flex: none; transition: transform 0.4s var(--ease);
}
.btn-wa .wa-dot .ico { width: 22px; height: 22px; }
.btn-wa:hover .wa-dot { transform: rotate(-12deg) scale(1.08); }
