/* home.css: the home page's own layout (plan.md "Home page"). Only places and sizes its parts, with system.css's tokens. */

/* ---------- 1. hero: the inset video stage, the words, the form, the proof row ---------- */
.hero { padding: 12px 12px 0; }
.hero__stage { position: relative; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: clamp(640px, calc(100svh - var(--header-h) - 104px), 820px); padding: clamp(2rem, 1rem + 3vw, 3.75rem) clamp(1.5rem, 0.5rem + 3.6vw, 4.25rem) clamp(1.75rem, 1rem + 2.4vw, 3.25rem); border-radius: var(--radius-l); overflow: hidden; isolation: isolate; background: var(--c-ink); }
.hero__slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
.hero__slides [data-kit-slide] video { object-position: var(--pos, 50% 50%); }
/* the grade: one still layer over the slides, ink from the left (never a blackout) */
.hero__slides::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 74%, transparent) 0%, color-mix(in srgb, var(--c-ink) 46%, transparent) 34%, transparent 60%), linear-gradient(0deg, color-mix(in srgb, var(--c-ink) 42%, transparent) 0%, transparent 36%); }
.loop--hero { --loop-inset: 14px; --loop-r: 18px; }
.hero__copy { position: relative; z-index: 5; display: grid; gap: 1.1rem; max-width: 37rem; }
.hero__title { font-size: var(--fs-display); color: var(--c-white); text-shadow: 0 2px 28px color-mix(in srgb, var(--c-ink) 40%, transparent); }
.hero__line { font-size: var(--fs-lead); line-height: 1.5; color: color-mix(in srgb, var(--c-white) 93%, transparent); max-width: 33rem; text-shadow: 0 1px 14px color-mix(in srgb, var(--c-ink) 45%, transparent); }
.hero__formwrap { position: relative; z-index: 5; width: min(700px, 100%); }
.hero__stop { z-index: 7; }
@media (max-width: 899px) {
  .hero { padding: 8px 8px 0; }
  .hero__stage { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 0; gap: 0; border-radius: 0; overflow: visible; background: none; }
  .hero__slides { position: relative; grid-area: 1 / 1; height: max(430px, 60svh); border-radius: 22px; background: var(--c-ink); }
  .hero__slides [data-kit-slide] video { object-position: var(--pos-phone, var(--pos, 50% 50%)); transform: scale(var(--zoom-phone, 1)); transform-origin: 50% 0; }
  .hero__slides::after { background: linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 80%, transparent) 0%, color-mix(in srgb, var(--c-ink) 52%, transparent) 34%, transparent 58%), linear-gradient(0deg, color-mix(in srgb, var(--c-ink) 30%, transparent) 0%, transparent 22%); }
  .hero__copy { grid-area: 1 / 1; align-self: start; gap: 0.7rem; padding: 1.5rem 1.25rem 0; }
  .hero__title { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
  .hero__line { font-size: 1.02rem; line-height: 1.45; }
  .hero__formwrap { grid-area: 2 / 1; margin-top: -2.25rem; padding: 0 6px; width: auto; }
  .loop--hero { --loop-inset: 9px; --loop-r: 14px; }
  .hero__stop { top: 12px; right: 12px; }
}

/* ---------- 2. the dogs on their wall ---------- */
.wall__media { aspect-ratio: 6 / 5; }
.wall__scene { position: absolute; inset: 0; }
@media (min-width: 900px) { .wall__scene { overflow: visible; } }
.wall__stop { top: 4px; right: 4px; }

/* ---------- 3. how it works, over the yard from above ---------- */
.how .head { margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); }
.how__stage { aspect-ratio: 16 / 9; }
.how__media { position: absolute; inset: 0; overflow: hidden; }
.how__media video { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 40% 50%; }
.how__scene { position: absolute; inset: 0; z-index: 2; }
@media (max-width: 759px) {
  .how__stage { aspect-ratio: auto; padding-bottom: var(--hw-room, 170px); background: none; border-radius: 0; overflow: visible; }
  .how__media { position: relative; inset: auto; aspect-ratio: 10 / 9; border-radius: 22px; background: var(--c-ink); }
  .how__media video { object-position: 20% 50%; }
}

/* ---------- 4. the trainer's deck (the unique element) ---------- */
.trainer__in { align-items: center; }
.trainer__media { aspect-ratio: 1.12; }
.trainer__deck { position: absolute; inset: 0; }
.trainer__stop { top: 6px; right: 6px; }
.trainer__note { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.4rem; font-size: var(--fs-small); color: var(--c-ink-soft); max-width: 30rem; }
.trainer__note .icon { flex: none; margin-top: 0.2em; color: var(--c-cobalt); font-size: 1.15rem; }
@media (max-width: 899px) { .trainer__media { aspect-ratio: 0.95; } }

/* ---------- 5. the vets ---------- */
.vets__in { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.vets__media video { object-position: 46% 50%; }
.finder { margin-top: 1.6rem; padding: 1.4rem 1.5rem 1.3rem; background: var(--c-white); border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
.finder__label { display: block; font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1.4rem; line-height: 1.2; font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.finder__field { display: flex; align-items: center; gap: 0.6rem; height: 56px; margin-top: 0.8rem; padding: 0 1rem; border-radius: 14px; background: var(--c-white); box-shadow: inset 0 0 0 1.5px var(--c-line); color: var(--c-ink-soft); font-size: 1.15rem; }
.finder__field:focus-within { box-shadow: inset 0 0 0 2px var(--c-cobalt), 0 0 0 4px var(--c-brand-light); color: var(--c-cobalt); }
.finder__field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: var(--fw-text) 1.05rem / 1 var(--font-text); color: var(--c-ink); }
.finder__count { margin: 0.9rem 0 0.7rem; font-weight: var(--fw-ui); font-size: var(--fs-small); color: var(--c-lawn-text); }
.finder__list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.4rem; margin: 0; padding: 4px 4px 1.25rem; list-style: none; max-height: 300px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.finder__list .chip { font-size: 0.86rem; padding: 0.4em 0.75em; transition: background-color var(--dur-fast), color var(--dur-fast); }
.finder__list .chip[data-found] { background: var(--c-white); color: var(--c-brand-text); outline: 2.5px dashed var(--c-cobalt); outline-offset: 2px; }
.finder__note { margin-top: 1rem; font-size: var(--fs-small); color: var(--c-ink-soft); }
.finder__note a { color: var(--c-cobalt); font-weight: var(--fw-ui); text-decoration: none; white-space: nowrap; }
@media (max-width: 899px) {
  .vets__in { grid-template-columns: minmax(0, 1fr); }
  .vets__media.frame--tall { aspect-ratio: 4 / 3; }
  .finder { padding: 1.2rem 1.1rem; }
  .finder__list { max-height: 228px; }
}

/* ---------- 6. reviews ---------- */
.reviews__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(2rem, 1rem + 2.5vw, 3rem); }
.reviews__grid { column-count: 3; column-gap: 1.25rem; }
.reviews__grid .review { margin-bottom: 1.25rem; }
@media (max-width: 1023px) { .reviews__grid { column-count: 2; } }
@media (max-width: 699px) {
  .reviews__grid { display: flex; gap: 0.9rem; column-count: initial; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 1rem; scrollbar-width: none; }
  .reviews__grid::-webkit-scrollbar { display: none; }
  .reviews__grid .review { flex: 0 0 84%; margin: 0; scroll-snap-align: center; }
  .rating__num { font-size: 3.2rem; }
}

/* ---------- 7. already have a fence: the tabs ---------- */
.other__head { margin-bottom: 1.6rem; }
.other .tabs { margin-bottom: 1.6rem; }
.tabpanel { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center; }
.tabpanel__stage { aspect-ratio: 16 / 10; }
.tabpanel__scene { position: absolute; inset: 0; z-index: 2; }
.tabpanel__text { display: grid; gap: 1rem; align-content: center; }
.tabpanel__quote { margin: 0; display: grid; gap: 0.6rem; }
.tabpanel__quote p, .tabpanel__big { font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); line-height: 1.2; color: var(--c-ink); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.tabpanel__quote footer { display: flex; align-items: center; gap: 0.55rem; font-size: var(--fs-small); font-weight: var(--fw-ui); color: var(--c-ink-soft); }
.tabpanel__line { color: var(--c-ink-soft); }
#panel-fix .tabpanel__stage video { object-position: 50% 60%; }
#panel-battery .tabpanel__stage video { object-position: 60% 50%; }
#panel-switch .tabpanel__stage video { object-position: 62% 60%; }
@media (max-width: 899px) {
  .tabpanel { grid-template-columns: minmax(0, 1fr); }
  .tabpanel__stage { aspect-ratio: 1 / 1; }
}
@media (max-width: 560px) {
  .other .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
  .other .tab { flex-direction: column; justify-content: center; gap: 0.4rem; min-height: 78px; padding: 0.65rem 0.35rem; border-radius: 16px; font-size: 0.86rem; line-height: 1.15; text-align: center; }
}

/* ---------- 8. the service area map ---------- */
.area__text .head__line a { color: var(--c-cobalt); }
.area__towns { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.area__map { aspect-ratio: 658 / 474; }
.map__svg { display: block; width: 100%; height: 100%; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
.map__water { fill: var(--c-brand-light); }
.parish { fill: var(--c-white); stroke: var(--c-line-cool); stroke-width: 0.9; }
.parish--served { fill: color-mix(in srgb, var(--c-lawn-light) 28%, var(--c-white)); stroke: color-mix(in srgb, var(--c-lawn) 30%, var(--c-white)); transition: fill 0.7s var(--ease-out) calc(var(--d, 0) * 1.4s + 0.25s), stroke 0.7s var(--ease-out) calc(var(--d, 0) * 1.4s + 0.25s); }
.map[data-on] .parish--served { fill: var(--c-lawn-light); stroke: color-mix(in srgb, var(--c-lawn) 55%, var(--c-white)); }
.map__loop-halo { fill: none; stroke: var(--c-white); stroke-width: 9; stroke-opacity: 0.75; }
.map__loop { fill: none; stroke: var(--c-cobalt); stroke-width: 3.2; stroke-dasharray: var(--loop-dash); stroke-linecap: round; }
.map__loop-mask { fill: none; stroke: var(--c-white); stroke-width: 20; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease-out) 1.5s; }
.map[data-on] .map__loop-mask { stroke-dashoffset: 0; }
.map__town circle { fill: var(--c-brand); stroke: var(--c-white); stroke-width: 1.5; }
.map__town text { font: var(--fw-strong) 15px var(--font-text); fill: var(--c-ink); paint-order: stroke; stroke: var(--c-white); stroke-width: 3.5px; stroke-linejoin: round; }
.map__dot { fill: var(--c-cobalt); stroke: var(--c-white); stroke-width: 3; }
.map__ring { fill: none; stroke: var(--c-cobalt); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map[data-on] .map__ring { animation: map-ring 1.6s var(--ease-out) 0.15s 2; }
@keyframes map-ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.map__home-label { font: var(--fw-ui) 17px var(--font-text); fill: var(--c-brand-text); paint-order: stroke; stroke: var(--c-white); stroke-width: 4.5px; stroke-linejoin: round; }
@media (max-width: 640px) { .map__town { display: none; } .map__home-label { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { .parish--served, .map__loop-mask { transition: none; } .map .map__ring { animation: none; } }

/* ---------- 9. FAQ ---------- */
.faq__in { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(2rem, 1rem + 5vw, 6rem); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h) + 2rem); }
@media (max-width: 899px) { .faq__in { grid-template-columns: minmax(0, 1fr); } .faq__head { position: static; } }

/* ---------- 10. close ---------- */
.close__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.close__media { aspect-ratio: 1 / 1.02; }
.close__media .frame__clip video { object-position: 46% 50%; }
.close .head { margin-bottom: 1.5rem; }
.close .head__title { font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.4rem); }
.close .formbox { box-shadow: 0 30px 70px color-mix(in srgb, var(--c-ink) 35%, transparent); }
@media (max-width: 899px) {
  .close__in { grid-template-columns: minmax(0, 1fr); }
  .close__media { aspect-ratio: 16 / 11; }
}
