/* VetGrid landing page, "at the clinic" (D180). The app's area colours and its own pet drawings
   (frontend/components/ui/Pets.tsx, colours from tokens.css) peek over the screens and cards; paw
   trails walk across the sections; a ticker shows the demo clinic's patients; a timeline follows a
   day at the clinic. Coloured sections have scalloped edges and stay coloured in both themes; the
   plain ones follow the visitor's light or dark setting. Entrances spring in once (the pets peek,
   wag and blink, and again on hover); the floating vet things, the paw trails and the ticker keep
   moving. Nothing moves under prefers-reduced-motion. No inline styles (the page's CSP). */

@font-face { font-family: 'Instrument Sans'; src: url('/_landing/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/_landing/bricolage-grotesque.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/_landing/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --lime: #c3ec52; --sky: #5cc6ff; --violet: #b39bff; --coral: #ff8a63; --mint: #4ed6ae; --amber: #ffc43d; --rose: #ff7fb2;
  --ink: #161612; --ink-2: #24241e; --ink-3: #303029; --ink-fg: #efeee7; --ink-muted: #b4b1a6;
  --bg: #f6f1e7; --surface: #ffffff; --fg: #161612; --muted: #4d4a42; --dots: rgb(22 22 18 / 0.07);
  --line: var(--ink); --pop: var(--ink); --accent-ink: #3d5a0b;
  --paper: #fbf6e8; --paper-fg: #2b261c; --paper-muted: #6a604d; --stamp: #c03a2b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  /* The app's pet colours (frontend/components/ui/tokens.css), the same in both themes. */
  --vf-pet-dog: #e0a464; --vf-pet-dog-2: #9c6136; --vf-pet-cat: #a3a9b8; --vf-pet-cat-2: #747b8c;
  --vf-pet-cream: #fbf1df; --vf-pet-pink: #f39aa9; --vf-pet-ink: #1d1b16; --vf-pet-bird: #8ad15f;
  --vf-pet-bird-2: #5ea83d; --vf-pet-bird-face: #f5dc5a; --vf-pet-bird-cheek: #5b86d6; --vf-pet-beak: #f2a650;
  --vf-pet-rabbit: #cfb293; --vf-pet-rabbit-2: #a88a6c; --vf-pet-hamster: #efb25e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121210; --surface: #1c1c18; --fg: #efeee7; --muted: #b4b1a6; --line: #4a4a41; --pop: var(--lime); --accent-ink: var(--lime); --dots: rgb(239 238 231 / 0.06); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 'Instrument Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; letter-spacing: -0.03em; margin: 0; font-weight: 760; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.9em; }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.ink :focus-visible { outline-color: var(--lime); }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--lime); } .pop :focus-visible { outline-color: var(--ink); } }

.wrap { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 2rem); }
.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 50; background: var(--lime); color: var(--ink); padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; border: 2px solid var(--ink); }
.skip:focus { left: 1rem; }

/* Brand, header (ink bar) and the scroll progress: a lime line with a paw walking along it */
.mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 0.65rem; background: var(--lime); color: var(--ink); transform: rotate(-6deg); transition: transform 0.4s var(--spring); }
.brand:hover .mark { transform: rotate(8deg) scale(1.1); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font: 700 1.2rem/1 var(--display); text-decoration: none; letter-spacing: -0.02em; }
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--ink-fg); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 4.25rem; }
.top nav { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.top nav a, .ink .link, .top .link { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.top nav a:hover, .top .link:hover, .ink .link:hover { color: var(--lime); }
.top-actions { display: flex; align-items: center; gap: 1.1rem; }
@media (max-width: 900px) { .top nav { display: none; } }
@media (max-width: 420px) { .top .link { display: none; } }
.progress { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--ink); pointer-events: none; }
.progress::before { content: ''; position: absolute; inset: 0; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); }
.progress-paw { position: absolute; top: -9px; left: 0; width: 20px; height: 20px; display: none; }
.progress-paw .paw { width: 20px; height: 20px; fill: var(--lime); rotate: 90deg; }
@supports (animation-timeline: scroll()) {
  .progress::before { animation: grow linear both; animation-timeline: scroll(root); }
  .progress-paw { display: block; animation: ride linear both; animation-timeline: scroll(root); }
}
@keyframes grow { to { transform: scaleX(1); } }
@keyframes ride { to { left: calc(100% - 20px); } }

/* Buttons: chunky, outlined, offset shadow that presses in */
.btn { display: inline-flex; align-items: center; gap: 0.55rem; background: var(--ink); color: var(--lime); font-weight: 700; text-decoration: none; border: 3px solid var(--ink); border-radius: 999px; padding: 0.75rem 1.25rem; box-shadow: 5px 6px 0 rgb(22 22 18 / 0.35); transition: transform 0.25s var(--spring), box-shadow 0.25s var(--spring); }
.btn:hover { transform: translate(-2px, -3px) rotate(-1.5deg); box-shadow: 7px 9px 0 rgb(22 22 18 / 0.45); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgb(22 22 18 / 0.4); }
.btn svg { transition: transform 0.35s var(--spring); }
.btn:hover svg { transform: scale(1.25) rotate(-12deg); }
.btn.small { padding: 0.45rem 0.95rem; font-size: 0.92rem; background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
.btn.small:hover { box-shadow: 4px 4px 0 var(--ink-3); }
.btn.big { padding: 0.95rem 1.5rem; font-size: 1.05rem; }
.btn.alt { background: #fff; color: var(--ink); box-shadow: 5px 6px 0 var(--ink); }
.btn.alt:hover { box-shadow: 7px 9px 0 var(--ink); }

/* Colour sections: flooded with one area colour, ink type, in both themes */
.pop { --tint: var(--lime); background: var(--tint); color: var(--ink); position: relative; overflow: hidden; }
.pop.lime { --tint: var(--lime); --blob1: var(--mint); --blob2: var(--sky); }
.pop.violet { --tint: var(--violet); --blob1: var(--sky); --blob2: var(--rose); }
.pop.amber { --tint: var(--amber); --blob1: var(--coral); --blob2: var(--lime); }
.pop.coral { --tint: var(--coral); --blob1: var(--amber); --blob2: var(--rose); }
.pop::before, .pop::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; opacity: 0.5; }
.pop::before { width: 46rem; height: 46rem; right: -16rem; top: -24rem; background: var(--blob1); }
.pop::after { width: 36rem; height: 36rem; left: -14rem; bottom: -22rem; background: var(--blob2); opacity: 0.4; }
.pop > .wrap { position: relative; z-index: 1; }
.pop p, .pop .lead { color: rgb(22 22 18 / 0.82); }
.pop h2, .pop h3 { color: var(--ink); }
.ink { background: var(--ink); color: var(--ink-fg); }
.ink p { color: var(--ink-muted); }
/* Scalloped top and bottom edges, like a pet tag's rim. */
.scallop {
  --r: 16px;
  padding-block: calc(6rem + var(--r));
  mask:
    radial-gradient(circle var(--r) at 50% var(--r), #000 96%, #0000) 50% 0 / calc(var(--r) * 2.6) calc(var(--r) * 2) repeat-x,
    radial-gradient(circle var(--r) at 50% var(--r), #000 96%, #0000) 50% 100% / calc(var(--r) * 2.6) calc(var(--r) * 2) repeat-x,
    linear-gradient(#000 0 0) 0 var(--r) / 100% calc(100% - var(--r) * 2) no-repeat;
}

/* Paw prints and their trails (they walk: each print shows, holds and fades a step after the last) */
.paw { width: 100%; height: 100%; fill: currentColor; }
.trail { position: absolute; display: flex; gap: 1.6rem; pointer-events: none; color: var(--ink); }
.pp { width: 1.7rem; height: 1.7rem; opacity: 0.16; rotate: 90deg; }
.pp:nth-child(odd) { translate: 0 1.1rem; }
.hero-trail { left: 2%; bottom: 1.5rem; }
.demo-trail { right: 3%; bottom: 1.2rem; }
.day-trail { left: 2.5%; top: 9rem; flex-direction: column; gap: 2.4rem; color: var(--fg); }
.day-trail .pp { rotate: 180deg; opacity: 0.1; }
.day-trail .pp:nth-child(odd) { translate: 1.1rem 0; }
@media (max-width: 1100px) { .day-trail { display: none; } }
.js .pp { animation: walk 5.6s ease-in-out infinite; animation-delay: calc(var(--s) * 0.45s); }
@keyframes walk { 0% { opacity: 0; scale: 0.4; } 8%, 55% { opacity: 0.2; scale: 1; } 75%, 100% { opacity: 0; scale: 1; } }

/* The pets: the app's drawings peeking over the top edge of the thing below them */
.pets { position: absolute; z-index: -1; display: flex; align-items: flex-end; gap: 0.6rem; bottom: calc(100% - var(--ph) * var(--hide, 0.3)); pointer-events: none; }
.pet-slot { display: block; pointer-events: auto; cursor: default; }
.pet { display: block; height: var(--ph); width: auto; overflow: visible; }
.on-screen { --hide: 0.36; --ph: clamp(56px, 8vw, 104px); left: 7%; gap: clamp(0.2rem, 1.5vw, 1.4rem); }
.on-gallery { --ph: clamp(52px, 6.5vw, 86px); right: 9%; }
.on-card { --ph: 80px; --hide: 0.24; right: 1.2rem; }
.on-foot { --ph: clamp(48px, 6vw, 72px); right: 6%; }
.sleepy { --ph: 70px; --hide: 0.26; left: 50%; translate: -50% 0; }
.pet-wag, .pet-blink, .pet-flap, .pet-ear { transform-box: fill-box; }
.pet-wag { transform-origin: 0% 100%; } .pet-blink { transform-origin: 50% 50%; } .pet-flap { transform-origin: 50% 0%; } .pet-ear { transform-origin: 50% 100%; }
/* Hidden behind the edge until the thing is on screen; then up they pop, one after another. */
.js .pet-slot { transform: translateY(62%); }
.js :is(.stage, .in) .pet-slot { animation: peek 0.9s var(--spring) both; animation-delay: calc(var(--pd, 0) * 110ms + var(--pbase, 0ms)); }
.js .stage { --pbase: 900ms; }
:is(.stage, .in) .pet-wag { animation: wag 280ms ease-in-out 3 both; animation-delay: calc(var(--pd, 0) * 110ms + var(--pbase, 0ms) + 700ms); }
:is(.stage, .in) .pet-blink { animation: blink 500ms ease-in-out 2, blink-idle 6s ease-in-out infinite; animation-delay: calc(var(--pd, 0) * 110ms + var(--pbase, 0ms) + 800ms), calc(var(--pd, 0) * 400ms + 3s); }
:is(.stage, .in) .pet-flap { animation: flap 300ms ease-in-out 2; animation-delay: calc(var(--pbase, 0ms) + 900ms + var(--pd, 0) * 110ms); }
:is(.stage, .in) .pet-ear { animation: ear 400ms ease-in-out 1; animation-delay: calc(var(--pbase, 0ms) + 1100ms + var(--pd, 0) * 110ms); }
.pet-slot:hover .pet-wag { animation: wag2 280ms ease-in-out 3; }
.pet-slot:hover .pet-blink { animation: blink2 500ms ease-in-out 1; }
.pet-slot:hover .pet-flap { animation: flap2 300ms ease-in-out 3; }
.pet-slot:hover .pet-ear { animation: ear2 400ms ease-in-out 2; }
.pet-slot { transition: translate 0.35s var(--spring); }
.pet-slot:hover { translate: 0 -8%; }
.pet-slot:has(.pet-hamster) { margin-bottom: calc(var(--ph) * 0.16); }
.p0 { --pd: 0; } .p1 { --pd: 1; } .p2 { --pd: 2; } .p3 { --pd: 3; } .p4 { --pd: 4; }
@keyframes peek { from { transform: translateY(62%); } to { transform: translateY(0); } }
@keyframes wag { 50% { transform: rotate(-22deg); } } @keyframes wag2 { 50% { transform: rotate(-22deg); } }
@keyframes blink { 20% { transform: scaleY(0.1); } } @keyframes blink2 { 30% { transform: scaleY(0.1); } }
@keyframes blink-idle { 0%, 94%, 100% { transform: none; } 97% { transform: scaleY(0.1); } }
@keyframes flap { 50% { transform: rotate(-28deg); } } @keyframes flap2 { 50% { transform: rotate(-28deg); } }
@keyframes ear { 40% { transform: rotate(-14deg); } } @keyframes ear2 { 40% { transform: rotate(-14deg); } }

/* Hero: centred words, floating vet things, the clinic's screen with pets peeking over it */
.hero { padding: 4.5rem 0 5.5rem; text-align: center; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 0.6rem; font: 600 0.8rem/1 var(--mono); color: var(--ink); border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 0.5rem 0.9rem; box-shadow: 3px 3px 0 var(--ink); }
.live { position: relative; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #1f9d55; }
.live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #1f9d55; animation: ping 1.8s var(--ease) infinite; }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 6.4rem); margin: 1.5rem 0 1.5rem; font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; max-width: 15ch; }
.w { display: inline-block; animation: word 0.9s var(--spring) both; animation-delay: calc(var(--i) * 90ms); }
.tag { display: inline-block; margin-top: 0.3rem; padding: 0.02em 0.3em 0.12em; background: var(--ink); color: var(--lime); border-radius: 0.22em; rotate: -2.5deg; animation: stamp 0.8s var(--spring) 0.6s both; }
.hero .lead { font-size: 1.18rem; max-width: 40rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.fl { position: absolute; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1.1rem; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 5px 0 var(--ink); animation: pop-in 0.7s var(--spring) both, drift 7s ease-in-out infinite alternate; }
.fl1 { left: 6%; top: 7rem; --c: var(--sky); rotate: -10deg; animation-delay: 0.3s, 1s; }
.fl2 { right: 7%; top: 6rem; --c: var(--coral); rotate: 12deg; animation-delay: 0.4s, 1.6s; }
.fl3 { left: 13%; top: 19rem; --c: var(--violet); rotate: 8deg; animation-delay: 0.5s, 0.6s; }
.fl4 { right: 14%; top: 18rem; --c: var(--amber); rotate: -14deg; animation-delay: 0.6s, 2s; }
.fl5 { left: 3%; top: 31rem; --c: var(--rose); rotate: -4deg; animation-delay: 0.7s, 1.2s; }
.fl6 { right: 4%; top: 30rem; --c: #fff; rotate: 6deg; animation-delay: 0.8s, 0.4s; }
.fl7 { left: 21%; top: 2.5rem; --c: var(--mint); rotate: 5deg; width: 3rem; height: 3rem; animation-delay: 0.9s, 1.8s; }
.fl8 { right: 23%; top: 2rem; --c: #fff; rotate: -8deg; width: 3rem; height: 3rem; animation-delay: 1s, 0.8s; }
.fl { background: var(--c); }
@media (max-width: 1100px) { .fl3, .fl4, .fl7, .fl8 { display: none; } }
@media (max-width: 760px) { .floaters { display: none; } }
.ki { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ink); color: var(--lime); }

.stage-wrap { position: relative; z-index: 1; margin-top: clamp(5rem, 9vw, 7.5rem); }
.stage { position: relative; max-width: 1020px; margin-inline: auto; isolation: isolate; }
.browser { position: relative; border-radius: 1rem; overflow: hidden; background: var(--ink-2); border: 3px solid var(--ink); box-shadow: 14px 16px 0 var(--ink); }
.bar { display: flex; align-items: center; gap: 0.4rem; height: 2.1rem; padding: 0 0.8rem; background: var(--ink); }
.bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #55554b; }
.bar i:nth-child(1) { background: var(--coral); } .bar i:nth-child(2) { background: var(--amber); } .bar i:nth-child(3) { background: var(--mint); }
.url { margin-left: 0.8rem; display: inline-flex; align-items: center; gap: 0.35rem; font: 0.72rem var(--mono); color: var(--ink-muted); background: var(--ink-2); padding: 0.2rem 0.7rem; border-radius: 6px; }
.stage .browser { transform: perspective(1800px) rotateX(10deg) scale(0.96); transform-origin: 50% 100%; transition: transform 0.9s var(--ease); }
.stage:hover .browser { transform: perspective(1800px) rotateX(2deg) scale(0.99); }
@supports (animation-timeline: view()) {
  /* The screen straightens as it scrolls into view. */
  .stage .browser { animation: straighten linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
}
@keyframes straighten { from { transform: perspective(1800px) rotateX(16deg) scale(0.92); } to { transform: perspective(1800px) rotateX(0deg) scale(1); } }
.phone { border-radius: 1.8rem; padding: 0.45rem; background: #0b0b09; border: 3px solid var(--ink); box-shadow: 10px 12px 0 var(--ink); overflow: hidden; }
.phone img { border-radius: 1.4rem; }
.stage .phone { position: absolute; right: -3%; bottom: -9%; width: 22%; min-width: 104px; rotate: 5deg; animation: swing-in 1s var(--spring) 0.9s both; }
.float { position: absolute; display: flex; gap: 0.6rem; align-items: center; text-align: left; border-radius: 999px; padding: 0.65rem 1.1rem 0.65rem 0.7rem; border: 3px solid var(--ink); box-shadow: 6px 7px 0 var(--ink); }
.float small { display: block; font: 600 0.68rem var(--mono); }
.float b { display: block; font: 700 0.95rem var(--display); }
.f-sms { left: -4%; top: 16%; background: var(--coral); color: var(--ink); rotate: -5deg; animation: pop-in 0.8s var(--spring) 1.2s both, bob 6s ease-in-out 2.4s infinite; }
.f-sms .ki { background: var(--ink); color: var(--coral); width: 2.1rem; height: 2.1rem; }
.f-sms small { color: rgb(22 22 18 / 0.8); }
.f-card { left: 4%; bottom: -7%; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.8rem 2.8rem 0.9rem 1.1rem; border-radius: 0.9rem; background: var(--paper); color: var(--paper-fg); rotate: -3deg; animation: pop-in 0.8s var(--spring) 1.4s both; }
.f-card small { color: var(--paper-muted); }
.f-card .due { font: 0.75rem var(--mono); color: var(--paper-muted); }
.stamp { position: absolute; right: -2.2rem; bottom: -0.8rem; font: 800 0.72rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--stamp); border: 2px solid var(--stamp); border-radius: 999px; padding: 0.5rem 0.6rem; background: color-mix(in srgb, var(--paper) 85%, transparent); animation: stamp 0.7s var(--spring) 2s both; rotate: -10deg; }
.f-heart { right: 18%; top: -1.6rem; padding: 0; width: 3.2rem; height: 3.2rem; justify-content: center; background: var(--rose); color: var(--ink); border-radius: 50%; animation: pop-in 0.7s var(--spring) 1.6s both, beat 1.6s ease-in-out 2.4s infinite; }
.f-heart svg { fill: var(--ink); }
@media (max-width: 640px) {
  .f-sms { left: -0.4rem; top: auto; bottom: -1.6rem; padding: 0.45rem 0.8rem 0.45rem 0.45rem; }
  .f-sms .ki { width: 1.7rem; height: 1.7rem; }
  .f-card, .f-heart { display: none; }
  .stage .phone { right: -0.4rem; bottom: -14%; width: 30%; }
  .browser { box-shadow: 7px 8px 0 var(--ink); }
}
.keys { list-style: none; padding: 0; margin: 5rem auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 1020px; text-align: left; }
@media (max-width: 900px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .keys { grid-template-columns: minmax(0, 1fr); margin-top: 4rem; } }
.keys li { display: flex; gap: 0.75rem; align-items: center; background: rgb(255 255 255 / 0.55); border: 2px solid var(--ink); border-radius: 999px; padding: 0.5rem 1rem 0.5rem 0.5rem; }
.keys b { display: block; font: 700 1rem var(--display); color: var(--ink); }
.keys small { color: rgb(22 22 18 / 0.78); font-size: 0.84rem; }

/* Ticker: today's patients at the demo clinic, rolling past */
.ticker { display: flex; align-items: center; gap: 1.5rem; padding: 0.95rem 0 0.95rem 1.2rem; overflow: hidden; border-block: 3px solid var(--ink); }
.ticker .ticker-label { display: inline-flex; align-items: center; gap: 0.45rem; flex-shrink: 0; font: 700 0.8rem var(--mono); color: var(--ink); background: var(--lime); border-radius: 999px; padding: 0.35rem 0.85rem; position: relative; z-index: 1; box-shadow: 0 0 0 0.6rem var(--ink); }
.ticker-label svg { animation: beat 1.2s ease-in-out infinite; }
.ticker-track { display: flex; width: max-content; animation: roll 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; gap: 2.4rem; list-style: none; margin: 0; padding: 0 1.2rem; }
.ticker-list li { display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; font-size: 0.95rem; }
.ticker-list b { font: 700 1rem var(--display); color: var(--ink-fg); }
.ticker-list span:last-child { color: var(--ink-muted); }
.ti { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; color: var(--ink); background: var(--amber); }
.ticker-list li:nth-child(3n + 1) .ti { background: var(--sky); } .ticker-list li:nth-child(3n + 2) .ti { background: var(--rose); }
@media (max-width: 640px) { .ticker { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding-left: 1rem; } .ticker-label { box-shadow: none; } }
@keyframes roll { to { transform: translateX(-50%); } }

/* Bands and headings */
.band { padding: 6rem 0; position: relative; }
.head { max-width: 46rem; margin-bottom: 3rem; }
.head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.8rem var(--mono); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.8rem; margin-bottom: 1.1rem; box-shadow: 3px 3px 0 var(--ink); }
@media (prefers-color-scheme: dark) { .band:not(.pop) .eyebrow { background: var(--lime); border-color: var(--lime); box-shadow: none; } }
.head h2 { font-size: clamp(2.1rem, 4.8vw, 3.8rem); }
.head .lead { margin-top: 1rem; font-size: 1.12rem; color: var(--muted); }
.pop .head .lead { color: rgb(22 22 18 / 0.82); }

/* A day at the clinic: a timeline down the middle, moments on alternate sides */
.day { background-color: var(--bg); background-image: radial-gradient(var(--dots) 1.5px, transparent 1.6px); background-size: 22px 22px; overflow: hidden; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 1rem; bottom: 1rem; left: 50%; width: 4px; margin-left: -2px; border-radius: 4px; background: repeating-linear-gradient(var(--line) 0 12px, transparent 12px 22px); }
.moment { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 1fr); align-items: center; }
.moment + .moment { margin-top: -2.2rem; }
.dot { grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 1; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 0 0 6px var(--bg); }
.hue-sky { background: var(--sky); } .hue-coral { background: var(--coral); } .hue-violet { background: var(--violet); } .hue-mint { background: var(--mint); }
.hue-lime { background: var(--lime); } .hue-amber { background: var(--amber); } .hue-rose { background: var(--rose); }
.mcard { grid-row: 1; background: var(--surface); border: 3px solid var(--line); border-radius: 1.2rem; padding: 1.2rem 1.4rem; box-shadow: 7px 8px 0 var(--pop); position: relative; transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring); }
.moment.left .mcard { grid-column: 1; } .moment.right .mcard { grid-column: 3; }
.mcard:hover { transform: translate(-3px, -4px) rotate(-0.6deg); box-shadow: 10px 12px 0 var(--pop); }
.mcard .time { display: inline-flex; align-items: center; gap: 0.35rem; font: 700 0.8rem var(--mono); color: var(--accent-ink); margin-bottom: 0.4rem; }
.mcard h3 { font-size: 1.35rem; margin-bottom: 0.45rem; }
.mcard p:last-child { color: var(--muted); font-size: 0.96rem; }
.day-end { position: relative; width: fit-content; max-width: 100%; margin: 7rem auto 0; text-align: center; isolation: isolate; }
.day-end p { background: var(--surface); border: 3px solid var(--line); border-radius: 999px; padding: 1rem 1.8rem; box-shadow: 6px 7px 0 var(--pop); }
.day-end b { font-family: var(--display); }
@media (max-width: 800px) {
  .timeline::before { left: 1.7rem; }
  .moment { grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0 0.9rem; align-items: start; }
  .moment + .moment { margin-top: 1.4rem; }
  .dot { grid-column: 1; }
  .moment.left .mcard, .moment.right .mcard { grid-column: 2; }
  .day-end p { border-radius: 1.2rem; }
}

/* Gallery (violet) */
.gallery-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-bottom: 4.5rem; }
.seg { display: inline-flex; gap: 0.25rem; padding: 0.3rem; background: #fff; border: 3px solid var(--ink); border-radius: 999px; max-width: 100%; box-shadow: 4px 5px 0 var(--ink); }
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg button { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font: 600 0.9rem 'Instrument Sans', sans-serif; color: var(--ink); background: transparent; border: 0; border-radius: 999px; padding: 0.5rem 0.9rem; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.25s var(--spring); }
.seg button:hover { background: rgb(22 22 18 / 0.08); transform: translateY(-1px); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--lime); }
.gallery { margin: 0; position: relative; isolation: isolate; max-width: 1060px; margin-inline: auto; }
.gallery img { transition: opacity 0.35s var(--ease), transform 0.5s var(--spring), filter 0.35s var(--ease); }
.gallery img.swap { opacity: 0; transform: scale(0.95) translateY(10px); filter: blur(8px); }
.phones { display: flex; justify-content: center; gap: 2rem; }
.phones[hidden] { display: none; }
.phones .phone { width: min(300px, 44%); rotate: -3deg; animation: swing-in 0.8s var(--spring) both; }
.phones .phone:nth-child(2) { margin-top: 3rem; rotate: 3deg; animation-delay: 0.12s; }

/* Why (cards with a colour chip and a paw in the corner) */
.cards { display: grid; gap: 1.4rem; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1050px) { .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards.four { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; overflow: hidden; background: var(--surface); border: 3px solid var(--line); border-radius: 1.4rem; padding: 1.5rem; box-shadow: 7px 8px 0 var(--pop); transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring); }
.card h3 { font-size: 1.25rem; margin: 1.1rem 0 0.6rem; }
.card p { color: var(--muted); font-size: 0.96rem; position: relative; }
.card > :not(.card-paw) { position: relative; z-index: 1; }
.card-paw { position: absolute; right: -1.3rem; bottom: -1.5rem; width: 5.5rem; height: 5.5rem; color: var(--chip); opacity: 0.3; rotate: -20deg; transition: rotate 0.5s var(--spring), scale 0.5s var(--spring); }
.card:hover .card-paw { rotate: 5deg; scale: 1.2; }
.ci { display: inline-grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 0.9rem; background: var(--chip, var(--lime)); color: var(--ink); border: 2px solid var(--ink); transition: rotate 0.3s var(--spring), scale 0.3s var(--spring); }
.card:hover .ci, .role:hover .ci { rotate: -12deg; scale: 1.1; }
.h0 { --chip: var(--sky); } .h1 { --chip: var(--violet); } .h2 { --chip: var(--coral); } .h3 { --chip: var(--mint); } .h4 { --chip: var(--amber); } .h5 { --chip: var(--rose); }

/* Tech stack (amber) */
.stack { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; max-width: 900px; }
.stack li { display: inline-flex; align-items: baseline; gap: 0.5rem; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 0.55rem 1.05rem; box-shadow: 4px 5px 0 var(--ink); }
.stack li:nth-child(3n + 1) { rotate: -1.5deg; } .stack li:nth-child(3n + 2) { rotate: 1deg; }
.stack b { font: 700 1rem var(--display); }
.stack span { font: 0.78rem var(--mono); color: rgb(22 22 18 / 0.72); }

/* Demo roles (coral), each with a pet peeking over its card */
.roles { margin-top: 4.5rem; row-gap: 4.5rem; }
.role-wrap { position: relative; isolation: isolate; display: flex; }
.role { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 1.4rem; padding: 1.5rem; box-shadow: 7px 8px 0 var(--ink); transition: transform 0.3s var(--spring), box-shadow 0.3s var(--spring); }
.role:hover { transform: translate(-3px, -4px) rotate(-1deg); box-shadow: 10px 12px 0 var(--ink); }
.role-wrap:hover .pet-slot { translate: 0 -16%; }
.role .ci { margin-bottom: 0.6rem; }
.role-wrap:nth-child(1) .ci { --chip: var(--lime); } .role-wrap:nth-child(2) .ci { --chip: var(--sky); } .role-wrap:nth-child(3) .ci { --chip: var(--violet); } .role-wrap:nth-child(4) .ci { --chip: var(--amber); }
.role h3 { font-size: 1.4rem; }
.role p { font-size: 0.96rem; flex: 1; color: rgb(22 22 18 / 0.78); }
.go { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.8rem; font-weight: 700; color: var(--lime); background: var(--ink); border-radius: 999px; padding: 0.45rem 0.9rem; align-self: flex-start; }
.go svg { transition: transform 0.3s var(--spring); }
.role:hover .go svg { transform: translateX(5px); }

/* FAQ */
.faq { display: grid; gap: 1rem; }
.faq details { background: var(--surface); border: 3px solid var(--line); border-radius: 1.2rem; padding: 0 1.3rem; box-shadow: 5px 6px 0 var(--pop); transition: box-shadow 0.3s var(--spring), transform 0.3s var(--spring); }
.faq details:hover { transform: translate(-2px, -2px); box-shadow: 7px 8px 0 var(--pop); }
.faq summary { display: flex; align-items: center; gap: 0.8rem; padding: 1.15rem 0; font: 700 1.05rem var(--display); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.q { width: 1.3rem; height: 1.3rem; color: var(--accent-ink); flex-shrink: 0; transition: rotate 0.4s var(--spring); }
details[open] .q { rotate: -20deg; }
.pm { position: relative; width: 1rem; height: 1rem; flex-shrink: 0; margin-left: auto; }
.pm::before, .pm::after { content: ''; position: absolute; inset: 50% 0 auto; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--accent-ink); transition: transform 0.35s var(--spring); }
.pm::after { transform: rotate(90deg); }
details[open] .pm::after { transform: rotate(0); }
.faq p { color: var(--muted); padding: 0 0 1.2rem 2.1rem; }
details[open] p { animation: open 0.45s var(--ease) both; }

/* Footer, with the pets peeking over its top */
.foot { position: relative; margin-top: 5rem; padding: 2.2rem 0; font-size: 0.9rem; border-top: 3px solid var(--lime); }
.foot .pets { bottom: calc(100% + 3px - var(--ph) * 0.3); }
.js .foot .pets.reveal { opacity: 1; transform: none; }
.row-foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; color: var(--ink-muted); }
.foot .brand { color: var(--ink-fg); }
.foot .link { display: inline-flex; align-items: center; gap: 0.3rem; }

/* Stagger steps (classes, not style attributes, so the strict CSP holds). */
.i0 { --i: 0; } .i1 { --i: 1; } .i2 { --i: 2; } .i3 { --i: 3; } .i4 { --i: 4; } .i5 { --i: 5; } .i6 { --i: 6; } .i7 { --i: 7; } .i8 { --i: 8; } .i9 { --i: 9; } .i10 { --i: 10; } .i11 { --i: 11; }
.d0 { --d: 0; } .d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; }
.s0 { --s: 0; } .s1 { --s: 1; } .s2 { --s: 2; } .s3 { --s: 3; } .s4 { --s: 4; } .s5 { --s: 5; } .s6 { --s: 6; } .s7 { --s: 7; } .s8 { --s: 8; } .s9 { --s: 9; }

/* Motion: entrances spring in once as they scroll into view (up, from the side, popping, flipping). */
.rise { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.9s var(--spring); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.from-left { transform: translateX(-70px) rotate(-4deg); }
.js .reveal.from-right { transform: translateX(70px) rotate(4deg); }
.js .reveal.pop-in { transform: scale(0.6) rotate(-6deg); }
.js .reveal.flip { transform: perspective(1400px) rotateX(28deg) translateY(40px); transform-origin: 50% 100%; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.in:is(.card, .role-wrap):hover { transition-delay: 0s; }
.js .card.reveal.in:hover { transform: translate(-3px, -4px) rotate(-1deg); box-shadow: 10px 12px 0 var(--pop); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes word { from { opacity: 0; transform: translateY(70%) rotate(10deg) scale(0.7); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.3); } }
@keyframes swing-in { from { opacity: 0; transform: translateY(40px) rotate(14deg); } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-9px); } }
@keyframes drift { from { transform: translateY(0) rotate(0); } to { transform: translateY(-14px) rotate(8deg); } }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(0.95); } 45% { transform: scale(1.1); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2); } 60% { opacity: 1; transform: scale(0.92); } 100% { opacity: 1; transform: scale(1); } }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .pet-slot { opacity: 1; transform: none; }
  .pp { opacity: 0.16; } .day-trail .pp { opacity: 0.1; }
  .progress { display: none; }
  .stage .browser { transform: none; }
}
