/* Zoomiez homepage. Colours, fonts and the hard black shadow come from the app's theme. */
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(assets/fonts/montserrat-medium.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(assets/fonts/montserrat-bold.woff2) format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(assets/fonts/montserrat-extrabold.woff2) format("woff2"); }
@font-face { font-family: Caprasimo; font-weight: 400; font-display: swap; src: url(assets/fonts/caprasimo.woff2) format("woff2"); }

:root {
  --orange: #ea631b;
  --cream: #fffce6;
  --yellow: #ffc618;
  --navy: #3e5c87;
  --blue: #a8c2e0;
  --black: #18191f;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 5px 5px 0 var(--black);
  --spring: cubic-bezier(.2, 1.25, .35, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font: 500 18px/1.55 Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
main { overflow-x: clip; } /* galloping pets leave the screen without widening the page */
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, .claim-text { font-family: Caprasimo, Georgia, serif; font-weight: 400; letter-spacing: 0; } /* headlines only; the font has one weight */
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(42px, 6.6vw, 80px); line-height: 1.04; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; }
h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: var(--orange); border-bottom: 4px solid var(--black); }
.top a:focus-visible { outline-color: var(--black); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; flex: none; text-decoration: none; }
.brand img { width: auto; height: 46px; transition: transform .3s var(--spring); }
.brand:hover img { transform: rotate(-2deg) scale(1.04); }
.top nav { display: flex; gap: clamp(14px, 3vw, 30px); font-weight: 700; font-size: 16px; }
.top nav a { color: var(--cream); text-decoration: none; padding: 8px 0; white-space: nowrap; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* Buttons and store badges */
.btn {
  display: inline-block; padding: 14px 24px; border: 3px solid var(--black); border-radius: 16px;
  background: var(--yellow); color: var(--black); font-weight: 800; font-size: 17px; line-height: 1.2;
  text-decoration: none; box-shadow: var(--shadow); transition: transform .1s ease-out, box-shadow .1s ease-out;
}
a.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--black); }
a.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--black); }
.btn.plain { background: var(--cream); }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.badges a { display: block; transition: transform .2s var(--spring); }
.badges a:hover { transform: translateY(-4px) scale(1.03); }
.badges a:active { transform: scale(.97); }
.badge-apple { height: 56px; width: auto; }
/* Google's badge file has a clear margin built in, so it's sized bigger and pulled in to match Apple's. */
.badge-google { height: 83px; width: auto; max-width: none; margin: -13px -12px; }
.more { display: inline-block; margin-top: 22px; font-weight: 700; }

/* A phone showing a real app screen: metal edge, black bezel, side buttons, status bar, Dynamic Island, home bar. */
.phone {
  --w: min(320px, 76vw);
  position: relative; width: var(--w); margin: 0 auto; padding: calc(var(--w) * .012);
  border-radius: calc(var(--w) * .172);
  background: linear-gradient(135deg, #8b8c92 0%, #3a3b41 16%, #24252a 50%, #3a3b41 84%, #77787e 100%);
  box-shadow: 0 34px 48px -22px rgba(24, 25, 31, .6), 0 10px 18px -8px rgba(24, 25, 31, .35);
}
.phone::before, .phone::after {
  content: ""; position: absolute; width: calc(var(--w) * .012); border-radius: 2px; background: #33343a;
}
.phone::before { /* volume up (the mute and volume down are its shadows) */
  right: 100%; top: 26.5%; height: 8%; border-radius: 2px 0 0 2px;
  box-shadow: 0 calc(var(--w) * -.235) 0 calc(var(--w) * -.0001) #33343a, 0 calc(var(--w) * .215) 0 #33343a;
}
.phone::after { left: 100%; top: 27%; height: 12.5%; border-radius: 0 2px 2px 0; }
.screen {
  box-sizing: content-box; position: relative; aspect-ratio: 390 / 844; overflow: hidden; isolation: isolate;
  border: calc(var(--w) * .026) solid #060607; border-radius: calc(var(--w) * .16); background: #060607;
}
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.screen img.on { opacity: 1; }
.screen img.demo:not([src]) { display: none; }
.screen::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto; aspect-ratio: 390 / 54; background: url(assets/status-dark.svg) center / 100% 100% no-repeat; }
.phone.light-status .screen::before { background-image: url(assets/status-light.svg); }
.screen::after { content: ""; position: absolute; z-index: 2; left: 33%; right: 33%; bottom: 1%; height: calc(var(--w) * .013); border-radius: 9px; background: var(--black); }

/* Hero */
.hero { position: relative; background: var(--blue); overflow: hidden; border-bottom: 4px solid var(--black); --crop: 200px; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 52px; }
.hero-copy { padding-bottom: 72px; }
.hero-copy p { font-size: clamp(19px, 1.9vw, 23px); margin-top: 22px; max-width: 30em; }
.w { display: inline-block; }
br.phone-only { display: none; }
.hero-art { position: relative; align-self: end; margin-bottom: calc(var(--crop) * -1); }
.hero .phone { --w: min(330px, 74vw); }
/* Drawn at exactly 2x. The picture has 12px of empty space under the feet, so it's pulled down to stand on the line. */
.hero-pet { position: absolute; z-index: 2; bottom: calc(var(--crop) - 24px); left: -120px; width: 246px; height: auto; max-width: none; image-rendering: pixelated; }
.cloud { position: absolute; width: 96px; height: 20px; background: #dfeaf6; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; }
.cloud::before { left: 16px; right: 28px; top: -12px; height: 12px; }
.cloud::after { left: 32px; right: 44px; top: -22px; height: 10px; }
.cloud.a { top: 8%; left: 58%; }
.cloud.b { top: 22%; left: 53%; transform: scale(.7); }
.cloud.c { top: 13%; left: 82%; transform: scale(1.2); }

/* Sections */
section.band { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.band.yellow { background: var(--yellow); }
.band.blue { background: var(--blue); }
.band.navy { background: var(--navy); color: var(--cream); }
.band.orange { background: var(--orange); color: var(--cream); overflow: hidden; }
.band + .band { border-top: 4px solid var(--black); }
.band > .wrap { position: relative; z-index: 1; }
.intro { font-size: clamp(18px, 1.7vw, 21px); margin-top: 18px; max-width: 34em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.split.flip .phone-side { order: -1; }

/* A pet popping up from behind a section line, using the artist's own animations */
.perch { position: absolute; z-index: 10; top: -118px; width: 174px; height: 114px; overflow: hidden; pointer-events: none; }
.perch img { width: 174px; height: 129px; max-width: none; image-rendering: pixelated; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 24px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; counter-increment: step; transition: opacity .3s; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border: 3px solid var(--black);
  border-radius: 50%; background: var(--yellow); font-weight: 800; font-size: 22px; box-shadow: 3px 3px 0 var(--black);
  transition: transform .3s var(--spring), background-color .2s;
}
.steps p { margin-top: 4px; }
.times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.times span { border: 2px solid var(--black); border-radius: 10px; padding: 3px 10px; background: var(--cream); font-size: 14px; font-weight: 700; white-space: nowrap; }
.steps.live li { opacity: .35; }
.steps.live li.active { opacity: 1; }
.steps.live li.active::before { transform: scale(1.14) rotate(-6deg); background: var(--orange); color: var(--cream); }

/* Screen time */
.perks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 20px; }
.perks li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.perks p { margin-top: 3px; }

/* Lives */
.stakes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card { background: var(--cream); color: var(--black); border: 3px solid var(--black); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.card p { margin-top: 8px; font-size: 17px; }
.card-art { height: 74px; display: flex; align-items: flex-end; gap: 6px; margin-bottom: 14px; }
.card-art img { width: 38px; height: auto; }
.card-art img.revive { width: 100px; image-rendering: pixelated; }
.slot { position: relative; width: 38px; }
.slot img + img { position: absolute; left: 0; bottom: 0; }
.plus { align-self: center; font-weight: 800; font-size: 24px; color: var(--orange); }

/* Pets strip */
.marquee { margin-top: 40px; padding: 6px 0 14px; overflow-x: auto; }
.marquee-track { display: flex; gap: 16px; width: max-content; padding: 0 var(--gutter); }
.js .marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.js .marquee-track { padding: 0; animation: slide 52s linear infinite; }
.js .marquee-track { gap: 0; }
.js .marquee .pet { margin-right: 16px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.pet { position: relative; flex: none; width: 196px; background: var(--cream); border: 3px solid var(--black); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; cursor: pointer; }
.pet-box { height: 138px; display: flex; align-items: flex-end; justify-content: center; background: var(--blue); border-bottom: 3px solid var(--black); padding: 0 6px 10px; }
.pet-box img { width: 174px; height: auto; image-rendering: pixelated; }
.pet-box img.cat { width: 123px; }
.pet h3 { font-size: 17px; }
.pet p { font-size: 14px; line-height: 1.35; margin-top: 3px; min-height: 3.9em; }
.pet-text { padding: 12px 12px 12px; }
.free { position: absolute; z-index: 1; top: 8px; left: 8px; background: var(--yellow); border: 2px solid var(--black); border-radius: 9px; padding: 1px 8px; font-size: 13px; font-weight: 800; }

/* Shelters */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sky i { position: absolute; left: var(--x); bottom: -50px; width: var(--size); height: var(--size); background: url(assets/heart.svg) center / contain no-repeat; opacity: 0; }
.claim { color: var(--yellow); font-size: clamp(64px, 10vw, 120px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.band.navy .btn, .band.orange .btn { color: var(--black); }

/* Closing */
.closing { text-align: center; }
.closing .badges { justify-content: center; }
.closing p { margin: 16px auto 0; max-width: 32em; }
.closing img.greet { margin: 0 auto 8px; width: 174px; image-rendering: pixelated; }
.coins { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.coins i { position: absolute; top: 0; width: 30px; height: 30px; background: url(assets/treat.svg) center / contain no-repeat; opacity: 0; }

/* Footer */
.foot { background: var(--navy); color: var(--cream); border-top: 4px solid var(--black); padding: 56px 0 28px; font-size: 15px; }
.foot a { text-decoration: none; }
.foot-main { display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand img { width: auto; height: 40px; }
.foot-brand p { margin-top: 14px; max-width: 20em; line-height: 1.45; }
.foot-social { display: flex; gap: 12px; margin-top: 20px; }
.foot-social a { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--cream); border-radius: 50%; transition: background-color .15s, border-color .15s, color .15s, transform .2s var(--spring); }
.foot-social a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); transform: translateY(-2px); }
.foot-social svg { display: block; width: 22px; height: 22px; }
.foot-title { margin: 0 0 12px; color: var(--yellow); font-weight: 800; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 252, 230, .22); display: grid; gap: 6px; }
.foot-bottom p { margin: 0; font-size: 13px; }
.foot-bottom .legal { font-size: 12px; line-height: 1.5; opacity: .85; }

/* Motion: everything below only runs for people who haven't asked their device to reduce motion. */
@media (prefers-reduced-motion: no-preference) {
  .w { animation: word .7s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 100ms); }
  .hero-copy p, .hero-copy .badges, .hero-copy .more { animation: rise .7s ease-out .65s both; }
  .hero-copy .badges { animation-delay: .8s; }
  .hero-copy .more { animation-delay: .95s; }
  .hero-art .phone { animation: phone-in 1s var(--spring) .25s both; }
  .hero-pet { animation: pet-drop .7s var(--spring) 1.1s both; }
  .cloud.a { animation: drift 46s linear infinite alternate; }
  .cloud.b { animation: drift-small 60s linear infinite alternate; }
  .cloud.c { animation: drift-big 38s linear infinite alternate-reverse; }
  .more::after { content: " ↓"; display: inline-block; animation: nudge 1.4s ease-in-out infinite; }

  .js .reveal { opacity: 0; transform: translateY(36px); }
  .js .reveal.pop { transform: scale(.82) rotate(-2deg); }
  .js .reveal.phone-in { transform: translateY(110px) rotate(5deg); }
  .js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .55s ease-out var(--d, 0s), transform .8s var(--spring) var(--d, 0s);
  }

  .js .reveal.perch { opacity: 1; transform: none; }
  .js .perch img { transform: translateY(100%); }
  .js .perch.in img { transform: none; transition: transform .7s var(--spring) .1s; }

  .pet:hover .pet-box img, .pet.hop .pet-box img { animation: hop .5s ease-out; }

  .in .slot .blink { animation: lose-life 7s linear .9s infinite; }
  .in .pop-heart { animation: heart-back 3s var(--spring) 1s infinite; }
  .in .plus { animation: heart-back 3s var(--spring) 1s infinite; }

  .sky i { animation: float-up var(--time) linear var(--wait) infinite; }
  .coins i { animation: coin 3.8s linear var(--wait) both; }
}

@keyframes word { from { opacity: 0; transform: translateY(.7em) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes phone-in { from { opacity: 0; transform: translateY(160px) rotate(7deg); } to { opacity: 1; transform: none; } }
@keyframes pet-drop { from { opacity: 0; transform: translateY(-130px); } to { opacity: 1; transform: none; } }
@keyframes drift { to { transform: translateX(70px); } }
@keyframes drift-small { from { transform: scale(.7); } to { transform: scale(.7) translateX(60px); } }
@keyframes drift-big { from { transform: scale(1.2); } to { transform: scale(1.2) translateX(-70px); } }
@keyframes nudge { 50% { transform: translateY(4px); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes hop { 35% { transform: translateY(-22px); } 70% { transform: translateY(0); } 85% { transform: translateY(-6px); } }
/* Like the app: a lost heart blinks slowly, stays empty a moment, then comes back. */
@keyframes lose-life {
  0%, 34% { opacity: 1; } 4%, 12%, 20%, 28% { opacity: 0; } 8%, 16%, 24% { opacity: 1; }
  34.1%, 78% { opacity: 0; transform: scale(1); } 86% { opacity: 1; transform: scale(1.35); } 92%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes heart-back { 0%, 55%, 100% { transform: scale(1); } 20% { transform: scale(1.3) rotate(-8deg); } 35% { transform: scale(.94); } }
@keyframes float-up {
  0% { opacity: 0; transform: translate(0, 0) rotate(-8deg); } 10% { opacity: .5; }
  50% { transform: translate(26px, -50vh) rotate(8deg); } 85% { opacity: .35; }
  100% { opacity: 0; transform: translate(-10px, -95vh) rotate(-6deg); }
}
/* One coin: falls, bounces twice on the floor, fades. */
@keyframes coin {
  0%   { opacity: 1; transform: translateY(-40px) rotate(0); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  36%  { transform: translateY(var(--floor)) rotate(calc(var(--spin) * .6)); animation-timing-function: cubic-bezier(.1, .5, .5, 1); }
  52%  { transform: translateY(calc(var(--floor) - var(--bounce))) rotate(calc(var(--spin) * .8)); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  68%  { transform: translateY(var(--floor)) rotate(var(--spin)); animation-timing-function: cubic-bezier(.1, .5, .5, 1); }
  76%  { transform: translateY(calc(var(--floor) - var(--bounce) * .3)) rotate(var(--spin)); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  84%  { opacity: 1; transform: translateY(var(--floor)) rotate(var(--spin)); }
  100% { opacity: 0; transform: translateY(var(--floor)) rotate(var(--spin)); }
}

@media (max-width: 800px) {
  body { font-size: 17px; }
  .top nav a:first-child { display: none; } /* the phone menu only has room for two links */
  .brand img { height: 28px; }
  /* Phone banner: one centred column, with the phone and cat standing together on the line. */
  .hero { --art: min(320px, 66vw); --crop: calc(var(--art) * .606); } /* same part of the phone as desktop */
  .hero .wrap { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }
  .hero-copy { padding-bottom: 30px; text-align: center; }
  .hero h1 { font-size: clamp(27px, 8.6vw, 56px); }
  br.phone-only { display: inline; }
  .hero-copy p { margin: 14px auto 0; max-width: 23em; font-size: 17px; text-wrap: balance; }
  .hero .badges { --badge: clamp(40px, 12.5vw, 56px); flex-wrap: nowrap; justify-content: center; gap: 10px; margin-top: 22px; }
  .hero .badge-apple { height: var(--badge); }
  .hero .badge-google { height: calc(var(--badge) * 83 / 56); margin: calc(var(--badge) * -13 / 56) calc(var(--badge) * -12 / 56); }
  .hero .more { display: none; }
  #shelters .buttons { justify-content: center; }
  .hero .phone { --w: var(--art); }
  /* The cat's picture has empty space around it: it may run off the screen edge, so the cat itself just touches the phone's side. */
  .hero-pet { width: 123px; left: max(calc(var(--gutter) * -1 - 4px), calc(50% - var(--art) / 2 - 76px)); bottom: calc(var(--crop) - 12px); }
  /* Clouds drift beside and behind the phone, clear of the text. */
  .cloud.a { top: auto; left: 76%; bottom: calc(var(--art) * 1.12); animation-duration: 26s; }
  .cloud.b { top: auto; left: -3%; bottom: calc(var(--art) * .92); animation-duration: 32s; }
  .cloud.c { top: auto; left: 84%; bottom: calc(var(--art) * .42); animation-duration: 22s; }
  .split { grid-template-columns: 1fr; }
  .split.flip .phone-side { order: 0; }
  .stakes { grid-template-columns: 1fr; }
  section.band:has(+ .band > .perch) { padding-bottom: 150px; } /* room for the pet standing on the next section's line */
  .pet { width: 176px; }
  .pet-box img { width: 156px; }
  .pet-box img.cat { width: 110px; }
  .foot-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 12px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* The smallest phones: logo and menu still fit side by side. */
@media (max-width: 359px) {
  .top .wrap { gap: 10px; }
  .brand img { height: 24px; }
  .top nav { gap: 10px; font-size: 14px; }
}
