Design language

This commit is contained in:
2026-05-13 00:34:34 +12:00
parent ac6179e776
commit 6c943b14bd
34 changed files with 1986 additions and 697 deletions
+489 -141
View File
@@ -2,6 +2,7 @@
import Icon from '$lib/components/Icon.svelte';
import { reveal } from '$lib/actions/reveal';
import BookingSection from '$lib/components/BookingSection.svelte';
import ServiceHero from '$lib/components/ServiceHero.svelte';
import TestimonialsSection from '$lib/components/TestimonialsSection.svelte';
import { getEnhancedImage } from '$lib/enhanced-images';
import type { ServicePageContent, SiteSharedContent } from '$lib/types';
@@ -9,6 +10,7 @@
export let content: SiteSharedContent;
export let pageContent: ServicePageContent;
export let currentPath = '';
let benefitScroller: HTMLDivElement | null = null;
function numericPrice(price: string) {
const value = Number(price.replace(/[^0-9.]/g, ''));
@@ -30,7 +32,6 @@
}));
}
$: heroEnhanced = getEnhancedImage(pageContent.hero.imageUrl);
$: highlightEnhanced = pageContent.highlight ? getEnhancedImage(pageContent.highlight.imageUrl) : null;
$: highlightCollageImages =
pageContent.highlight?.collageImages?.map((image) => ({
@@ -39,6 +40,12 @@
})) ?? [];
$: relatedServices = content.services.filter((s) => s.href && s.href !== currentPath);
$: pricingPlans = decoratePlans(pageContent.pricing.plans);
$: benefitCards = pageContent.benefits.items.map((benefit, index) => ({
...benefit,
tintClass: `service-benefit-tint-${(index % 3) + 1}`,
featured: index === 0
}));
$: showRelatedServices = relatedServices.length > 0 && currentPath !== '/pack-walks';
$: relatedCards = [
...relatedServices.map((s) => ({
@@ -58,85 +65,123 @@
pill: 'All services'
}
];
function scrollBenefits(direction: -1 | 1) {
if (!benefitScroller) return;
benefitScroller.scrollBy({
left: direction * Math.round(benefitScroller.clientWidth * 0.86),
behavior: 'smooth'
});
}
</script>
<main class="service-page">
<section class="service-hero">
<div class="service-inner service-hero-grid">
<div class="service-hero-copy">
<p class="eyebrow">{pageContent.hero.eyebrow}</p>
<h1>{pageContent.hero.title}</h1>
{#each pageContent.hero.paragraphs as paragraph}
<p>{paragraph}</p>
{/each}
</div>
<div class="service-hero-media">
{#if heroEnhanced}
<enhanced:img
src={heroEnhanced}
alt={pageContent.hero.imageAlt}
loading="eager"
fetchpriority="high"
decoding="async"
/>
{:else}
<img
src={pageContent.hero.imageUrl}
alt={pageContent.hero.imageAlt}
loading="eager"
fetchpriority="high"
decoding="async"
/>
{/if}
</div>
</div>
</section>
<ServiceHero
eyebrow={pageContent.hero.eyebrow}
title={pageContent.hero.title}
subtitle={pageContent.hero.subtitle}
imageUrl={pageContent.hero.imageUrl}
imageAlt={pageContent.hero.imageAlt}
chips={pageContent.hero.chips ?? []}
cta={pageContent.hero.cta}
/>
{#if pageContent.highlight}
<section use:reveal class="service-highlight reveal-block">
<div class="service-inner service-highlight-copy">
<p class="eyebrow service-highlight-eyebrow">{pageContent.highlight.eyebrow}</p>
<h2>{pageContent.highlight.title}</h2>
</div>
<div class="service-inner">
{#if highlightCollageImages.length}
<div class="service-highlight-collage" aria-label={pageContent.highlight.title}>
{#each highlightCollageImages as image, index}
<figure class={`service-collage-card service-collage-card-${index + 1}`}>
{#if image.enhanced}
<enhanced:img src={image.enhanced} alt={image.imageAlt} loading="lazy" decoding="async" />
{:else}
<img src={image.imageUrl} alt={image.imageAlt} loading="lazy" decoding="async" />
{/if}
</figure>
{/each}
</div>
{:else}
<div class="service-highlight-image">
{#if highlightEnhanced}
<enhanced:img
src={highlightEnhanced}
alt={pageContent.highlight.imageAlt}
loading="lazy"
decoding="async"
/>
{:else}
<img
src={pageContent.highlight.imageUrl}
alt={pageContent.highlight.imageAlt}
loading="lazy"
decoding="async"
/>
<div class:service-highlight-layout-points={pageContent.highlight.points?.length} class="service-highlight-layout">
<div class="service-highlight-copy">
<p class="eyebrow service-highlight-eyebrow">{pageContent.highlight.eyebrow}</p>
<h2>{pageContent.highlight.title}</h2>
{#if pageContent.highlight.points?.length}
<div class="service-highlight-points">
{#each pageContent.highlight.points as point}
<article class="service-highlight-point">
<h3>{point.title}</h3>
<p>{point.body}</p>
</article>
{/each}
</div>
{/if}
</div>
{/if}
{#if highlightCollageImages.length}
<div class="service-highlight-collage" aria-label={pageContent.highlight.title}>
{#each highlightCollageImages as image, index}
<figure class={`service-collage-card service-collage-card-${index + 1}`}>
{#if image.enhanced}
<enhanced:img src={image.enhanced} alt={image.imageAlt} loading="lazy" decoding="async" />
{:else}
<img src={image.imageUrl} alt={image.imageAlt} loading="lazy" decoding="async" />
{/if}
</figure>
{/each}
</div>
{:else}
<div class="service-highlight-image">
{#if highlightEnhanced}
<enhanced:img
src={highlightEnhanced}
alt={pageContent.highlight.imageAlt}
loading="lazy"
decoding="async"
/>
{:else}
<img
src={pageContent.highlight.imageUrl}
alt={pageContent.highlight.imageAlt}
loading="lazy"
decoding="async"
/>
{/if}
</div>
{/if}
</div>
</div>
</section>
{/if}
<section use:reveal class="service-benefits reveal-block">
<div class="service-inner">
<div class="service-section-heading">
<h2>{pageContent.benefits.title}</h2>
{#if pageContent.benefits.intro}
<p>{pageContent.benefits.intro}</p>
{/if}
</div>
<p class="service-benefit-mobile-hint">Swipe through the reasons Tiny Gang works so well.</p>
<div class="service-benefit-shell">
<div bind:this={benefitScroller} class="service-benefit-grid">
{#each benefitCards as benefit}
<article class:service-benefit-card-featured={benefit.featured} class={`service-benefit-card ${benefit.tintClass}`}>
<div class="service-benefit-icon" aria-hidden="true">
<Icon name={benefit.icon ?? 'fas fa-paw'} />
</div>
{#if benefit.badge}
<p class="service-benefit-kicker">{benefit.badge}</p>
{/if}
<h3>{benefit.title}</h3>
<p>{benefit.body}</p>
</article>
{/each}
</div>
<div class="service-benefit-mobile-controls" aria-label="Benefit cards navigation">
<button type="button" class="service-benefit-mobile-button" aria-label="Previous benefit" on:click={() => scrollBenefits(-1)}>
<Icon name="fas fa-chevron-left" />
</button>
<button type="button" class="service-benefit-mobile-button" aria-label="Next benefit" on:click={() => scrollBenefits(1)}>
<Icon name="fas fa-chevron-right" />
</button>
</div>
</div>
</div>
</section>
<section use:reveal class="service-pricing reveal-block">
<div class="service-inner">
<div class="service-section-heading">
@@ -205,27 +250,7 @@
</div>
</section>
<section use:reveal class="service-benefits reveal-block">
<div class="service-inner">
<div class="service-section-heading">
<h2>{pageContent.benefits.title}</h2>
</div>
<div class="service-benefit-grid">
{#each pageContent.benefits.items as benefit}
<article class="service-benefit-card">
<div class="service-benefit-icon" aria-hidden="true">
<Icon name="fas fa-paw" />
</div>
<h3>{benefit.title}</h3>
<p>{benefit.body}</p>
</article>
{/each}
</div>
</div>
</section>
{#if relatedServices.length}
{#if showRelatedServices}
<section use:reveal class="service-related reveal-block" aria-label="Other services">
<div class="service-inner">
<div class="service-section-heading">
@@ -277,10 +302,6 @@
padding: 0 50px;
}
.service-hero {
padding: 72px 0 96px;
}
.service-related {
padding: 0 0 96px;
}
@@ -390,14 +411,6 @@
font-size: 14px;
}
.service-hero-grid {
display: grid;
grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
gap: 52px;
align-items: center;
}
.service-hero-copy h1,
.service-section-heading h2,
.service-highlight-copy h2 {
margin: 0;
@@ -406,11 +419,6 @@
color: #000;
}
.service-hero-copy h1 {
line-height: 1.05;
letter-spacing: -0.04em;
}
.service-section-heading h2,
.service-highlight-copy h2 {
font-weight: 700;
@@ -419,7 +427,7 @@
text-wrap: balance;
}
.service-hero-copy p,
.service-section-heading p,
.service-benefit-card p {
margin: 20px 0 0;
@@ -429,7 +437,6 @@
line-height: 1.7;
}
.service-hero-media,
.service-highlight-image {
position: relative;
overflow: hidden;
@@ -438,10 +445,6 @@
box-shadow: 0 16px 40px rgba(17, 20, 24, 0.08);
}
.service-hero-media {
aspect-ratio: 4 / 3;
}
.service-highlight-image {
aspect-ratio: 4 / 3;
max-width: 900px;
@@ -486,7 +489,6 @@
min-height: 250px;
}
.service-hero-media img,
.service-highlight-image img {
display: block;
width: 100%;
@@ -495,12 +497,23 @@
}
.service-highlight {
padding: 0 0 96px;
padding: 80px 0 96px;
}
.service-highlight-layout {
display: grid;
grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
gap: 40px;
align-items: center;
}
.service-highlight-layout-points {
align-items: start;
}
.service-highlight-copy {
text-align: center;
margin-bottom: 34px;
text-align: left;
margin-bottom: 0;
}
/*
@@ -512,11 +525,55 @@
margin: 0 0 16px;
}
.service-highlight-points {
display: grid;
gap: 16px;
margin-top: 28px;
}
.service-highlight-point {
padding: 0 0 16px;
border-bottom: 1px solid rgba(33, 48, 33, 0.1);
}
.service-highlight-point:last-child {
padding-bottom: 0;
border-bottom: none;
}
.service-highlight-point h3 {
margin: 0 0 8px;
font-family: var(--font-head);
font-size: 18px;
line-height: 1.2;
color: #000;
}
.service-highlight-point p {
margin: 0;
color: #34363a;
font-size: 15px;
line-height: 1.65;
}
.service-pricing,
.service-benefits {
padding: 0 0 96px;
}
.service-benefit-shell {
position: relative;
overflow: visible;
}
.service-benefit-mobile-hint {
display: none;
}
.service-benefit-mobile-controls {
display: none;
}
.service-section-heading {
text-align: center;
margin-bottom: 38px;
@@ -540,10 +597,12 @@
.service-plan-card,
.service-benefit-card {
position: relative;
background: #fff;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 248, 246, 0.98) 100%);
border-radius: 28px;
padding: 30px 26px;
box-shadow: 0 14px 34px rgba(17, 20, 24, 0.05);
box-shadow:
inset 0 0 0 1px rgba(17, 20, 24, 0.045),
0 8px 40px rgba(0, 0, 0, 0.06);
transition:
transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.22s ease,
@@ -578,10 +637,12 @@
}
@media (hover: hover) {
.service-plan-card:hover,
.service-benefit-card:hover {
transform: translateY(-6px) scale(1.012);
box-shadow: 0 22px 44px rgba(17, 20, 24, 0.1);
.service-plan-card:hover {
transform: translateY(-2px);
box-shadow:
inset 0 0 0 1px rgba(17, 20, 24, 0.055),
0 10px 40px rgba(0, 0, 0, 0.08);
filter: brightness(1.015);
}
}
@@ -767,38 +828,200 @@
.service-benefit-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
gap: 18px;
}
.service-benefit-card {
display: flex;
flex-direction: column;
align-items: flex-start;
min-height: 100%;
overflow: hidden;
border-radius: 28px;
padding: 28px 26px 26px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 248, 246, 0.98) 100%);
box-shadow:
inset 0 0 0 1px rgba(17, 20, 24, 0.045),
0 8px 28px rgba(17, 20, 24, 0.05);
}
.service-benefit-card::before {
content: '';
position: absolute;
inset: 0;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 100%);
pointer-events: none;
}
.service-benefit-card::after {
content: '';
position: absolute;
top: 24px;
left: 26px;
width: 42px;
height: 2px;
border-radius: 999px;
background: rgba(255, 209, 0, 0.42);
pointer-events: none;
}
.service-benefit-tint-1::before {
background:
radial-gradient(circle at top left, rgba(255, 209, 0, 0.08) 0%, rgba(255, 209, 0, 0.03) 24%, transparent 48%),
linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 100%);
}
.service-benefit-tint-2::before {
background:
radial-gradient(circle at top right, rgba(229, 214, 194, 0.12) 0%, rgba(229, 214, 194, 0.04) 28%, transparent 54%),
linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 100%);
}
.service-benefit-tint-3::before {
background:
radial-gradient(circle at top left, rgba(33, 48, 33, 0.04) 0%, rgba(33, 48, 33, 0.015) 28%, transparent 54%),
linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 100%);
}
.service-benefit-card-featured {
background:
radial-gradient(circle at top right, rgba(255, 209, 0, 0.14) 0%, rgba(255, 209, 0, 0.04) 28%, transparent 52%),
linear-gradient(180deg, var(--green-mid) 0%, var(--gw-green) 100%);
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.06),
0 14px 32px rgba(17, 20, 24, 0.12);
}
.service-benefit-card-featured::before {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
}
.service-benefit-card-featured::after {
background: linear-gradient(90deg, #ffd54a 0%, rgba(242, 191, 47, 0.72) 100%);
}
.service-benefit-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 52px;
height: 52px;
border-radius: 50%;
background: #efe4d1;
width: 54px;
height: 54px;
border-radius: 16px;
background: linear-gradient(180deg, rgba(255, 250, 236, 0.96) 0%, rgba(242, 191, 47, 0.18) 100%);
box-shadow:
inset 0 0 0 1px rgba(17, 20, 24, 0.04),
0 8px 20px rgba(17, 20, 24, 0.08);
color: var(--gw-green);
font-size: 18px;
margin-bottom: 18px;
font-size: 17px;
margin-top: 4px;
margin-bottom: 14px;
position: relative;
z-index: 1;
}
.service-benefit-tint-1 .service-benefit-icon {
background: linear-gradient(180deg, rgba(255, 250, 236, 0.96) 0%, rgba(242, 191, 47, 0.16) 100%);
}
.service-benefit-tint-2 .service-benefit-icon {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(229, 214, 194, 0.42) 100%);
}
.service-benefit-tint-3 .service-benefit-icon {
background: linear-gradient(180deg, rgba(250, 252, 248, 0.96) 0%, rgba(33, 48, 33, 0.08) 100%);
}
.service-benefit-card-featured .service-benefit-icon {
background: linear-gradient(180deg, rgba(255, 248, 214, 0.96) 0%, rgba(255, 209, 0, 0.34) 100%);
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.08),
0 10px 24px rgba(0, 0, 0, 0.16);
}
.service-benefit-card h3,
.service-benefit-card p,
.service-benefit-kicker {
position: relative;
z-index: 1;
}
.service-benefit-kicker {
margin: 0 0 12px;
color: var(--gw-green);
font-family: var(--font-head);
font-size: 11px;
font-weight: 700;
line-height: 1.2;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.service-benefit-card h3 {
max-width: 16ch;
text-wrap: balance;
color: #000;
}
.service-benefit-card p {
margin-top: 14px;
font-size: 16px;
margin-top: 0;
color: #5b6067;
font-size: 15px;
line-height: 1.7;
}
.service-benefit-card-featured .service-benefit-kicker {
color: rgba(255, 245, 204, 0.92);
}
.service-benefit-card-featured h3 {
color: #fff;
}
.service-benefit-card-featured p {
color: rgba(255, 255, 255, 0.8);
}
@media (hover: hover) {
.service-benefit-card:hover {
transform: translateY(-2px);
box-shadow:
inset 0 0 0 1px rgba(17, 20, 24, 0.05),
0 12px 30px rgba(17, 20, 24, 0.08);
filter: brightness(1.01);
}
.service-benefit-card-featured:hover {
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.08),
0 16px 36px rgba(17, 20, 24, 0.14);
}
}
@media (max-width: 1024px) {
.service-hero-grid,
.service-plan-grid,
.service-plan-grid-three,
.service-benefit-grid,
.service-related-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.service-hero-grid {
align-items: start;
.service-benefit-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.service-highlight-layout {
grid-template-columns: 1fr;
gap: 28px;
}
.service-section-heading-split {
grid-template-columns: 1fr;
gap: 14px;
}
.service-section-heading-split p {
justify-self: start;
}
.service-highlight-collage {
@@ -817,30 +1040,155 @@
padding: 0 24px;
}
.service-hero {
padding: 48px 0 72px;
}
.service-hero-grid,
.service-plan-grid,
.service-plan-grid-three,
.service-benefit-grid,
.service-related-grid {
grid-template-columns: 1fr;
gap: 24px;
}
.service-benefit-grid {
grid-auto-flow: column;
grid-auto-columns: minmax(272px, 84vw);
grid-template-columns: none;
gap: 14px;
overflow-x: auto;
overscroll-behavior-x: contain;
scroll-snap-type: x proximity;
scroll-padding-left: 24px;
padding: 0 24px 8px 0;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.service-benefit-grid::-webkit-scrollbar {
display: none;
}
.service-benefit-card {
padding: 24px 22px 22px;
border-radius: 24px;
scroll-snap-align: start;
}
.service-plan-card {
order: var(--mobile-order, 0);
}
.service-highlight,
.service-highlight {
padding-top: 56px;
padding-bottom: 72px;
}
.service-highlight-layout {
gap: 24px;
}
.service-highlight-copy {
text-align: left;
}
.service-highlight-points {
gap: 14px;
margin-top: 22px;
}
.service-highlight-point {
padding-bottom: 14px;
}
.service-highlight-point h3 {
font-size: 17px;
}
.service-highlight-point p {
font-size: 15px;
line-height: 1.62;
}
.service-pricing,
.service-benefits,
.service-related {
padding-bottom: 72px;
}
.service-section-heading h2 {
font-size: clamp(30px, 7vw, 38px);
}
.service-benefit-icon {
width: 50px;
height: 50px;
margin-bottom: 18px;
}
.service-benefit-card h3 {
max-width: none;
font-size: 20px;
}
.service-benefit-card p {
margin-top: 12px;
font-size: 15px;
line-height: 1.68;
}
.service-benefit-mobile-hint {
display: block;
margin: -10px 0 16px;
color: var(--gray);
font-size: 13px;
line-height: 1.5;
}
.service-benefit-mobile-controls {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-top: 16px;
}
.service-benefit-mobile-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 46px;
height: 46px;
border: none;
border-radius: 50%;
background: rgba(33, 48, 33, 0.08);
color: var(--gw-green);
box-shadow: inset 0 0 0 1px rgba(17, 20, 24, 0.06);
transition:
background 0.18s ease,
transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-benefit-mobile-button:active {
transform: scale(0.97);
}
.service-benefit-mobile-button :global(.icon) {
font-size: 14px;
}
.service-benefit-meta {
gap: 10px;
padding-top: 18px;
}
.service-benefit-badge {
min-height: 34px;
font-size: 11px;
padding: 7px 12px;
letter-spacing: 0.015em;
white-space: normal;
}
.service-benefit-meta::before {
background: linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%);
}
.service-extra-row {
flex-direction: column;
align-items: flex-start;