Files
gw-svelte/src/lib/components/PricingPage.svelte
T

604 lines
15 KiB
Svelte
Raw Normal View History

2026-05-02 08:26:18 +12:00
<script lang="ts">
2026-05-02 09:43:32 +12:00
import { onMount } from 'svelte';
2026-05-02 08:26:18 +12:00
import { reveal } from '$lib/actions/reveal';
import BookingSection from '$lib/components/BookingSection.svelte';
import Icon from '$lib/components/Icon.svelte';
2026-05-13 00:34:34 +12:00
import PageHeader from '$lib/components/PageHeader.svelte';
2026-05-13 20:44:01 +12:00
import PricingPlanCard from '$lib/components/PricingPlanCard.svelte';
2026-05-02 08:26:18 +12:00
import TestimonialsSection from '$lib/components/TestimonialsSection.svelte';
2026-05-13 20:44:01 +12:00
import { decoratePlans } from '$lib/utils/pricing';
2026-05-02 08:26:18 +12:00
import type { PricingPageContent, SiteSharedContent } from '$lib/types';
export let content: SiteSharedContent;
export let pageContent: PricingPageContent;
2026-05-02 09:43:32 +12:00
let showMeetGreetPrompt = false;
let dismissMeetGreetPrompt = false;
let promptShown = false;
let canShowDesktopPrompt = false;
2026-05-13 20:44:01 +12:00
const desktopPromptMediaQuery = '(min-width: 769px)';
2026-05-02 09:43:32 +12:00
function revealMeetGreetPrompt() {
2026-05-15 16:27:39 +12:00
if (dismissMeetGreetPrompt || promptShown || !canShowDesktopPrompt) {
2026-05-02 09:43:32 +12:00
return;
}
showMeetGreetPrompt = true;
promptShown = true;
}
function closeMeetGreetPrompt() {
showMeetGreetPrompt = false;
dismissMeetGreetPrompt = true;
}
function handleMeetGreetCta() {
showMeetGreetPrompt = false;
dismissMeetGreetPrompt = true;
}
2026-05-15 16:27:39 +12:00
$: if (!canShowDesktopPrompt && showMeetGreetPrompt) {
2026-05-02 09:43:32 +12:00
showMeetGreetPrompt = false;
}
onMount(() => {
const desktopPromptQuery = window.matchMedia(desktopPromptMediaQuery);
canShowDesktopPrompt = desktopPromptQuery.matches;
const handleDesktopPromptViewportChange = (event: MediaQueryListEvent) => {
canShowDesktopPrompt = event.matches;
};
2026-05-15 16:27:39 +12:00
const firstPricingSection = document.querySelector<HTMLElement>('.pricing-section');
2026-05-03 11:49:59 +12:00
const handleScroll = () => {
2026-05-15 16:27:39 +12:00
if (promptShown || dismissMeetGreetPrompt || !canShowDesktopPrompt || !firstPricingSection) {
2026-05-03 11:49:59 +12:00
return;
}
2026-05-02 09:43:32 +12:00
2026-05-15 16:27:39 +12:00
const firstSectionBottom = firstPricingSection.getBoundingClientRect().bottom;
if (firstSectionBottom <= 0) {
2026-05-02 09:43:32 +12:00
revealMeetGreetPrompt();
}
2026-05-03 11:49:59 +12:00
};
window.addEventListener('scroll', handleScroll, { passive: true });
2026-05-02 09:43:32 +12:00
desktopPromptQuery.addEventListener('change', handleDesktopPromptViewportChange);
2026-05-15 16:27:39 +12:00
handleScroll();
2026-05-02 09:43:32 +12:00
return () => {
2026-05-03 11:49:59 +12:00
window.removeEventListener('scroll', handleScroll);
2026-05-02 09:43:32 +12:00
desktopPromptQuery.removeEventListener('change', handleDesktopPromptViewportChange);
};
});
2026-05-02 08:26:18 +12:00
</script>
<main class="pricing-page">
2026-05-13 00:34:34 +12:00
<PageHeader variant="green" title={pageContent.title} subtitle={pageContent.subtitle}>
<a
class="pricing-trust"
href="https://g.page/r/CUsvrWPhkYrAEB0/"
target="_blank"
rel="noopener"
aria-label="Read our 5-star Google reviews"
>
<img
class="pricing-trust-logo"
src="/images/google-g-logo.svg"
alt=""
width="18"
height="19"
/>
<span class="pricing-trust-stars" aria-hidden="true">
{#each Array(5) as _}
<Icon name="fas fa-star" />
{/each}
</span>
<span class="pricing-trust-label">30+ 5-star Google reviews, trusted by Auckland dog owners</span>
<Icon name="fas fa-arrow-right" className="pricing-trust-arrow" />
</a>
</PageHeader>
2026-05-02 08:26:18 +12:00
2026-05-06 11:36:19 +12:00
{#each pageContent.sections as section, index}
2026-05-02 08:26:18 +12:00
<section use:reveal class="pricing-section reveal-block">
2026-05-13 20:44:01 +12:00
<div class="page-inner">
2026-05-02 08:26:18 +12:00
<div class="pricing-section-heading">
{#if section.icon}
<div class="pricing-section-icon">
<Icon name={section.icon} />
</div>
{/if}
<h2>{section.title}</h2>
{#if section.blurb}
<p class="pricing-section-blurb">{section.blurb}</p>
{/if}
{#if section.detailCta}
<a
class={`btn pricing-section-link ${section.detailCta.variant === 'yellow' ? 'btn-yellow' : section.detailCta.variant === 'outline' ? 'btn-outline' : 'btn-green'}`}
href={section.detailCta.href}
>
2026-05-06 11:36:19 +12:00
<span>{section.detailCta.label}</span>
<Icon name="fas fa-arrow-right" />
2026-05-02 08:26:18 +12:00
</a>
{/if}
</div>
<div class:pricing-plan-grid-three={section.plans.length === 3} class="pricing-plan-grid">
2026-05-07 21:47:42 +12:00
{#each decoratePlans(section.plans) as plan}
2026-05-13 20:44:01 +12:00
<PricingPlanCard {plan} variant="pricing" />
2026-05-02 08:26:18 +12:00
{/each}
</div>
2026-05-06 11:36:19 +12:00
<a class="btn btn-yellow btn-mobile-center pricing-section-mobile-cta" href="#newlead">
2026-05-06 11:36:19 +12:00
Book a Meet &amp; Greet
</a>
{#if index === 0}
<aside class="pricing-mobile-consult" aria-label="Need help choosing the right option?">
<span class="pricing-mobile-consult-kicker">
<Icon name="fas fa-comment-dots" />
Not sure which option fits?
</span>
<p>
Book a free Meet &amp; Greet and well help you choose the right walk or visit for your dog.
</p>
<a class="btn btn-outline btn-outline-green btn-mobile-center pricing-mobile-consult-cta" href="#newlead">
2026-05-06 11:36:19 +12:00
Talk it through with us
</a>
</aside>
{/if}
2026-05-02 08:26:18 +12:00
</div>
</section>
{/each}
<TestimonialsSection
heading={pageContent.testimonialsHeading}
testimonials={content.testimonials}
seedKey="/our-pricing"
/>
2026-05-15 16:27:39 +12:00
<BookingSection booking={pageContent.booking} variant="card-stepper" />
2026-05-02 09:43:32 +12:00
{#if showMeetGreetPrompt}
<aside class="meet-greet-prompt" aria-label="Free meet and greet reminder">
<button class="meet-greet-close" type="button" aria-label="Dismiss reminder" on:click={closeMeetGreetPrompt}>
<Icon name="fas fa-xmark" />
</button>
<div class="meet-greet-copy">
2026-05-15 16:27:39 +12:00
<div class="meet-greet-top">
<span class="meet-greet-kicker">
<Icon name="fas fa-comment-dots" />
Free Meet & Greet
</span>
<div class="meet-greet-profile" aria-label="Aless from Goodwalk">
<img
class="meet-greet-avatar"
src="/images/founder-image-aless-goodwalk.jpg"
alt="Aless from Goodwalk"
width="52"
height="52"
/>
<div class="meet-greet-profile-copy">
<strong>Talk it through with Aless</strong>
<span>Founder, Goodwalk</span>
</div>
</div>
</div>
2026-05-02 09:43:32 +12:00
<p>
2026-05-15 16:27:39 +12:00
Not sure which option fits best? Aless can help you choose the right walk or visit for your dog, routine, and temperament.
2026-05-02 09:43:32 +12:00
</p>
</div>
2026-05-15 16:27:39 +12:00
<a class="meet-greet-cta" href="#newlead" on:click={handleMeetGreetCta}>
<span>Book a Meet &amp; Greet</span>
<Icon name="fas fa-arrow-right" />
</a>
2026-05-02 09:43:32 +12:00
</aside>
{/if}
2026-05-02 08:26:18 +12:00
</main>
<style>
.pricing-page {
background: var(--off-white);
}
2026-05-06 08:27:24 +12:00
.pricing-trust {
display: inline-flex;
align-items: center;
gap: 12px;
margin-top: 22px;
padding: 9px 18px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.18);
color: #fff;
font-family: var(--font-head);
2026-05-06 08:27:24 +12:00
font-size: 14px;
font-weight: 700;
line-height: 1.2;
letter-spacing: 0.01em;
2026-05-06 08:27:24 +12:00
text-decoration: none;
transition:
background 0.2s ease,
transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
2026-05-06 11:36:19 +12:00
.pricing-trust-logo {
width: 18px;
height: 19px;
flex: 0 0 auto;
}
2026-05-06 08:27:24 +12:00
.pricing-trust:hover {
background: rgba(255, 255, 255, 0.18);
transform: translateY(-1px);
}
.pricing-trust-stars {
display: inline-flex;
align-items: center;
gap: 2px;
color: var(--yellow);
font-size: 13px;
}
:global(.pricing-trust .pricing-trust-arrow) {
font-size: 12px;
opacity: 0.85;
}
2026-05-02 08:26:18 +12:00
.pricing-section-heading h2 {
margin: 0;
text-align: center;
font-family: var(--font-head);
font-size: clamp(24px, 2.8vw, 36px);
font-weight: 700;
line-height: 1.08;
2026-05-02 08:26:18 +12:00
letter-spacing: -0.03em;
text-wrap: balance;
2026-05-02 08:26:18 +12:00
color: #000;
}
.pricing-section {
padding: 48px 0 72px;
}
.pricing-section-heading {
margin-bottom: 30px;
text-align: center;
}
.pricing-section-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 56px;
height: 56px;
margin-bottom: 16px;
border-radius: 16px;
2026-05-15 16:27:39 +12:00
background: linear-gradient(135deg, var(--gw-green), var(--green-mid));
color: var(--yellow);
2026-05-02 08:26:18 +12:00
font-size: 22px;
}
.pricing-plan-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 22px;
}
.pricing-section-blurb {
max-width: 680px;
margin: 14px auto 0;
color: #4c5056;
font-size: 17px;
line-height: 1.65;
}
.pricing-section-link {
2026-05-06 11:36:19 +12:00
display: inline-flex;
align-items: center;
gap: 10px;
2026-05-02 08:26:18 +12:00
margin-top: 18px;
}
.pricing-plan-grid-three {
grid-template-columns: repeat(3, minmax(0, 1fr));
2026-05-15 16:27:39 +12:00
max-width: calc(((var(--max-w) - (var(--space-container-x) * 2) - (22px * 3)) / 4 * 3) + (22px * 2));
margin-inline: auto;
2026-05-02 08:26:18 +12:00
}
2026-05-06 11:36:19 +12:00
.pricing-section-mobile-cta,
.pricing-mobile-consult {
display: none;
}
2026-05-02 09:43:32 +12:00
.meet-greet-prompt {
position: fixed;
right: 24px;
bottom: 24px;
z-index: 30;
display: flex;
2026-05-15 16:27:39 +12:00
flex-direction: column;
2026-05-02 09:43:32 +12:00
gap: 18px;
2026-05-15 16:27:39 +12:00
width: min(430px, calc(100vw - 32px));
padding: 20px;
border-radius: 30px;
2026-05-02 09:43:32 +12:00
background:
2026-05-15 16:27:39 +12:00
radial-gradient(circle at top right, rgba(255, 209, 0, 0.12), rgba(255, 209, 0, 0) 34%),
linear-gradient(180deg, rgba(251, 251, 251, 0.98), rgba(247, 248, 246, 0.98));
2026-05-02 09:43:32 +12:00
box-shadow:
2026-05-15 16:27:39 +12:00
0 20px 40px rgba(17, 20, 24, 0.14),
inset 0 0 0 1px rgba(17, 20, 24, 0.06);
2026-05-02 09:43:32 +12:00
animation: meet-greet-rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
backdrop-filter: blur(10px);
}
.meet-greet-copy {
min-width: 0;
2026-05-15 16:27:39 +12:00
}
.meet-greet-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 14px;
2026-05-02 09:43:32 +12:00
}
.meet-greet-kicker {
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
padding: 6px 10px;
border-radius: 999px;
background: rgba(33, 48, 33, 0.08);
2026-05-07 21:47:42 +12:00
color: var(--gw-green);
2026-05-02 09:43:32 +12:00
font-family: var(--font-head);
font-size: 12px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.meet-greet-kicker :global(.icon) {
font-size: 12px;
}
2026-05-15 16:27:39 +12:00
.meet-greet-profile {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
padding: 8px 10px 8px 8px;
border-radius: 18px;
background: rgba(33, 48, 33, 0.05);
box-shadow: inset 0 0 0 1px rgba(33, 48, 33, 0.07);
}
.meet-greet-avatar {
width: 52px;
height: 52px;
border-radius: 16px;
object-fit: cover;
object-position: center top;
flex: 0 0 auto;
box-shadow:
0 8px 20px rgba(17, 20, 24, 0.12),
inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.meet-greet-profile-copy {
display: flex;
flex-direction: column;
min-width: 0;
}
.meet-greet-profile-copy strong {
color: #16181d;
font-family: var(--font-head);
font-size: 12px;
font-weight: 700;
line-height: 1.3;
}
.meet-greet-profile-copy span {
color: #59606d;
font-size: 12px;
line-height: 1.35;
}
2026-05-02 09:43:32 +12:00
.meet-greet-copy p {
2026-05-15 16:27:39 +12:00
margin: 14px 0 0;
2026-05-02 09:43:32 +12:00
color: #2f3134;
font-size: 15px;
line-height: 1.55;
}
.meet-greet-cta {
2026-05-15 16:27:39 +12:00
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
padding: 14px 18px;
2026-05-02 09:43:32 +12:00
border-radius: 999px;
2026-05-15 16:27:39 +12:00
background: linear-gradient(135deg, #ffd54a, var(--yellow-soft));
2026-05-02 09:43:32 +12:00
color: #111;
font-family: var(--font-head);
font-size: 14px;
2026-05-15 16:27:39 +12:00
font-weight: 700;
2026-05-02 09:43:32 +12:00
text-decoration: none;
box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
transition:
transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.2s ease,
background 0.2s ease;
}
.meet-greet-close {
position: absolute;
top: 12px;
right: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
border-radius: 999px;
background: rgba(17, 20, 24, 0.05);
color: #2f3134;
cursor: pointer;
transition:
transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
background 0.2s ease;
}
@media (hover: hover) {
.meet-greet-cta:hover {
transform: translateY(-2px);
2026-05-15 16:27:39 +12:00
background: linear-gradient(135deg, #ffdc66, #f4c94f);
2026-05-02 09:43:32 +12:00
box-shadow:
inset 0 -2px 0 rgba(0, 0, 0, 0.08),
0 12px 24px rgba(17, 20, 24, 0.12);
}
.meet-greet-close:hover {
transform: scale(1.05);
background: rgba(17, 20, 24, 0.09);
}
}
.meet-greet-cta:active,
.meet-greet-close:active {
transform: scale(0.97);
}
@keyframes meet-greet-rise {
from {
opacity: 0;
transform: translate3d(0, 16px, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
2026-05-02 08:26:18 +12:00
@media (max-width: 1024px) {
.pricing-plan-grid,
.pricing-plan-grid-three {
grid-template-columns: repeat(2, minmax(0, 1fr));
2026-05-15 16:27:39 +12:00
max-width: none;
2026-05-02 08:26:18 +12:00
}
}
@media (max-width: 768px) {
2026-05-06 11:36:19 +12:00
.pricing-trust {
gap: 10px;
padding: 10px 14px;
font-size: 13px;
}
2026-05-02 08:26:18 +12:00
.pricing-section-heading h2 {
font-size: 26px;
}
.pricing-section {
padding: 30px 0 52px;
}
.pricing-section-heading {
2026-05-06 11:36:19 +12:00
margin-bottom: 26px;
2026-05-02 08:26:18 +12:00
}
.pricing-section-blurb {
font-size: 15px;
line-height: 1.55;
}
2026-05-06 11:36:19 +12:00
.pricing-section-link {
margin-top: 22px;
margin-bottom: 8px;
}
2026-05-02 08:26:18 +12:00
.pricing-plan-grid,
.pricing-plan-grid-three {
grid-template-columns: 1fr;
gap: 18px;
2026-05-15 16:27:39 +12:00
max-width: none;
2026-05-02 08:26:18 +12:00
}
2026-05-06 11:36:19 +12:00
.pricing-section-mobile-cta {
display: flex;
width: fit-content;
margin: 18px auto 0;
font-family: var(--font-head);
}
.pricing-mobile-consult {
display: block;
margin-top: 18px;
padding: 22px 20px;
border-radius: 24px;
background: linear-gradient(180deg, #fffaf0 0%, #f9f4e7 100%);
box-shadow: 0 12px 28px rgba(17, 20, 24, 0.05);
text-align: left;
}
.pricing-mobile-consult-kicker {
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
2026-05-07 21:47:42 +12:00
color: var(--gw-green);
2026-05-06 11:36:19 +12:00
font-family: var(--font-head);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.pricing-mobile-consult p {
margin: 0;
color: #34363a;
font-size: 15px;
line-height: 1.55;
}
.pricing-mobile-consult-cta {
margin-top: 16px;
}
2026-05-02 09:43:32 +12:00
.meet-greet-prompt {
right: 16px;
left: 16px;
bottom: 16px;
width: auto;
gap: 14px;
padding: 18px 18px 16px;
border-radius: 28px;
2026-05-02 09:43:32 +12:00
}
2026-05-15 16:27:39 +12:00
.meet-greet-top {
flex-direction: column;
align-items: stretch;
gap: 12px;
}
2026-05-02 09:43:32 +12:00
.meet-greet-copy p {
font-size: 14px;
line-height: 1.5;
padding-right: 26px;
}
.meet-greet-cta {
2026-05-15 16:27:39 +12:00
width: 100%;
2026-05-02 09:43:32 +12:00
}
2026-05-02 08:26:18 +12:00
}
</style>