/* The website's home page (truepets.app; scripts/site/build.mjs). "A sunny day in the park" like the game's menus:
   a sky that gets lighter as you scroll down to the grass, chunky glossy bubbles with a darker lip, the game's fonts,
   pictures from the game inside iPhones drawn in CSS. Physical sides follow the reading direction (logical
   properties): Hebrew and Arabic mirror. Phone first; 980 px and up = two columns. */
:root {
  --ink: #1F2A5C;
  --muted: #4A5788;
  --sky1: #7CCBF6;
  --sky2: #B5E4FF;
  --sky3: #E4F6FF;
  --paper: #F6FCFF;
  --head: 'Fredoka', 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hw: 700;
  --wrap: min(1160px, calc(100% - 32px));
  color-scheme: light;
}
.l-he { --head: 'Rubik', system-ui, sans-serif; --hw: 800; }
.l-ar { --head: 'Baloo Bhaijaan 2', 'Rubik', system-ui, sans-serif; --hw: 800; }
.l-ja { --head: 'M PLUS Rounded 1c', system-ui, sans-serif; --body: 'M PLUS Rounded 1c', system-ui, sans-serif; --hw: 800; }
.l-ko { --head: 'Jua', system-ui, sans-serif; --body: 'Nanum Gothic', system-ui, sans-serif; --hw: 400; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); font-size: 17px; line-height: 1.55; overflow-x: hidden;
  background: linear-gradient(180deg, var(--sky1) 0, var(--sky2) 640px, var(--sky3) 1500px, var(--paper) 2600px, var(--paper) 100%);
  background-color: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--head); font-weight: var(--hw); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
.l-ar h1, .l-ar h2 { line-height: 1.3; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #FF7A1F; outline-offset: 3px; border-radius: 8px; }

/* ── the bar on top: glass once the page moves */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.solid { background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 6px 24px rgba(31,42,92,.12); }
.brand img { height: 44px; width: auto; opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
.nav.solid .brand img { opacity: 1; transform: none; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.pill {
  text-decoration: none; font-family: var(--head); font-weight: var(--hw); font-size: 16px; color: #fff; padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(180deg, #FFB257, #FF7A1F); box-shadow: 0 4px 0 #C9500F, 0 8px 18px rgba(201,80,15,.3); border: 3px solid #fff;
}
.pill:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9500F; }
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 3px solid #fff; box-shadow: 0 4px 0 #A9DBFF, 0 8px 18px rgba(31,42,92,.15); font-weight: 600; font-size: 15px;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 20px; height: 20px; fill: none; stroke: #1A5DC4; stroke-width: 1.8; }
.langs ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; min-width: 210px;
  background: #fff; border-radius: 20px; box-shadow: 0 18px 40px rgba(31,42,92,.25); animation: pop .18s ease-out;
}
.langs li a { display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.langs li a:hover { background: #E8F6FF; }
.langs li a[aria-current] { background: #FFF2CC; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ── the top: the banner melts into the sky under it */
.hero { position: relative; padding-bottom: 40px; }
.banner { position: relative; height: clamp(300px, 34vw, 560px); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%); }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
/* wider than the picture: its sides melt too */
@media (min-width: 1700px) {
  .banner { max-width: 1900px; margin: 0 auto;
    -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, #000 58%, transparent 100%), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-composite: intersect; }
}
.hero-in { width: var(--wrap); margin: -40px auto 0; position: relative; display: grid; gap: 28px; align-items: center; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-logo { width: 230px; height: auto; margin-bottom: -4px; filter: drop-shadow(0 10px 18px rgba(31,42,92,.18)); }
.kicker { margin: 0; font-weight: 700; color: #1A5DC4; font-size: 15px; letter-spacing: .02em; background: rgba(255,255,255,.7); padding: 5px 14px; border-radius: 999px; }
.hero h1 span { display: inline-block; }
/* a long headline (Spanish, Portuguese…): a little smaller, so it stays two lines on a computer */
.hero h1.long { font-size: clamp(30px, 4.4vw, 48px); }
.hero h1 { font-size: clamp(34px, 6vw, 62px); color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,.6); }
.sub { margin: 0; font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 520px; }
.free { margin: 0; font-weight: 700; color: #1E8A36; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; direction: ltr; margin-top: 6px; }
.badge { display: block; border-radius: 10px; transition: transform .2s, filter .2s; filter: drop-shadow(0 8px 14px rgba(31,42,92,.22)); }
.badge:hover { transform: translateY(-3px) scale(1.03); }
.badge img { height: 52px; width: auto; }
.badges.big .badge img { height: 58px; }

/* the stage: the big phone with its pictures, floating, tilting after the finger / the mouse */
.stage { position: relative; perspective: 1600px; padding: 26px 6px 40px; }
.glow { position: absolute; inset: 6% 0 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); filter: blur(10px); }
.tilt { --rx: 10deg; --ry: -14deg; transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(1.5deg); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1); animation: float 7s ease-in-out infinite; }
[dir='rtl'] .tilt { --ry: 14deg; }
@keyframes float { 50% { translate: 0 -12px; } }
.fl { position: absolute; width: clamp(48px, 7vw, 84px); height: auto; filter: drop-shadow(0 10px 14px rgba(31,42,92,.25)); animation: bob 5s ease-in-out infinite; }
.f-a { inset-inline-start: 2%; top: 2%; }
.f-b { inset-inline-end: 1%; top: 40%; animation-delay: -1.6s; }
.f-c { inset-inline-start: 10%; bottom: 6%; animation-delay: -3.1s; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(8deg); } }
.dots { position: absolute; inset-inline: 0; bottom: 6px; display: flex; justify-content: center; gap: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 9px; background: rgba(31,42,92,.2); transition: width .3s, background .3s; }
.dots i.on { width: 26px; background: #FF7A1F; }

/* ── an iPhone on its side (16 Pro Max: a 956×440 screen), every size in the phone's own width (cqw) */
.phone { container-type: inline-size; }
.ph {
  position: relative; padding: 1.9cqw; border-radius: 7cqw; background: #0B0B0D;
  box-shadow: inset 0 0 0 .35cqw #2B2C31, 0 0 0 .38cqw #B9BDC6, 0 0 0 .62cqw #6F737C, 0 3cqw 6cqw rgba(31,42,92,.28), 0 1cqw 2cqw rgba(31,42,92,.2);
}
.scr { position: relative; aspect-ratio: 956 / 440; border-radius: 5.1cqw; overflow: hidden; background: #000; isolation: isolate; }
.scr img { width: 100%; height: 100%; object-fit: cover; }
.scr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 32%); pointer-events: none; z-index: 2; }
.isl { position: absolute; left: 3.1cqw; top: 50%; width: 2.4cqw; height: 9cqw; margin-top: -4.5cqw; border-radius: 1.2cqw; background: #000; z-index: 3; }
.ph .btn { position: absolute; background: linear-gradient(180deg, #9EA2AB, #5E626B); border-radius: .4cqw; height: .7cqw; }
.b1 { top: -.95cqw; left: 17cqw; width: 6cqw; }
.b2 { top: -.95cqw; left: 25cqw; width: 6cqw; }
.b3 { bottom: -.95cqw; left: 24cqw; width: 9cqw; }
.slides .scr img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.slides .scr img.on { opacity: 1; animation: kb 6.5s ease-out both; }
@keyframes kb { from { transform: scale(1.0); } to { transform: scale(1.06); } }

/* ── the numbers: the game's chunky buttons */
.stats { width: var(--wrap); margin: 10px auto 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat {
  border-radius: 26px; padding: 16px 12px 14px; text-align: center; color: #fff; border: 4px solid #fff; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 7px 0 var(--lip), 0 16px 26px rgba(31,42,92,.18); background: var(--bg); position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; inset: 6px 14px auto; height: 38%; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }
.stat b { font-family: 'Fredoka', var(--head); font-weight: 700; font-size: clamp(40px, 6vw, 58px); line-height: 1; text-shadow: 0 3px 0 var(--lip); position: relative; }
.stat b.inf { font-family: system-ui, -apple-system, sans-serif; font-weight: 800; }
.stat span { font-family: var(--head); font-weight: var(--hw); font-size: 16px; line-height: 1.2; text-shadow: 0 2px 0 var(--lip); position: relative; }
.sky { --bg: linear-gradient(180deg, #7FD6FF, #2AA3F0); --lip: #1474C0; }
.pink { --bg: linear-gradient(180deg, #FFB3D2, #FF6FA5); --lip: #DB4F86; }
.sun { --bg: linear-gradient(180deg, #FFE36E, #FFC21A); --lip: #D99400; }
.grass { --bg: linear-gradient(180deg, #74DE6C, #2FAE47); --lip: #1E8A36; }
.purple { --bg: linear-gradient(180deg, #C690FF, #8A4DEB); --lip: #6A33C2; }
.teal { --bg: linear-gradient(180deg, #7FEBDC, #1FB5A3); --lip: #13877A; }

/* ── every breed: the gallery in a phone, and a moving belt of the game's own cards */
.breeds { margin-top: 90px; }
.breeds-in { width: var(--wrap); margin: 0 auto; display: grid; gap: 30px; align-items: center; }
.copy h2, .feat-copy h2, .gentle h2, .cta h2 { font-size: clamp(28px, 4.2vw, 44px); }
.copy p, .feat-copy p { font-size: clamp(17px, 1.8vw, 19px); color: var(--muted); margin: 12px 0 0; }
.breeds .copy { text-align: center; }
.tiltin { transform: perspective(1400px) rotateY(var(--t, -9deg)) rotateX(4deg); transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
[dir='rtl'] .tiltin { --t: 9deg; }
.belt { margin-top: 46px; display: grid; gap: 18px; direction: ltr; overflow: hidden; padding: 14px 0 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.row { overflow: visible; }
.track { display: flex; gap: 16px; width: max-content; animation: belt 90s linear infinite; }
.r1 .track { animation-direction: reverse; animation-duration: 100s; }
.belt:hover .track { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(calc(-50% - 8px)); } }
.card { margin: 0; width: 132px; background: #fff; border-radius: 18px; padding: 7px 7px 6px; box-shadow: 0 6px 0 #CFE9FA, 0 12px 20px rgba(31,42,92,.14); transition: transform .3s; }
.card:nth-child(odd) { transform: rotate(-2.2deg); }
.card:nth-child(even) { transform: rotate(1.8deg) translateY(6px); }
.card:hover { transform: rotate(0) scale(1.07); }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.card figcaption { font-family: var(--head); font-weight: var(--hw); font-size: 13px; text-align: center; padding-top: 5px; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; justify-content: center; }

/* paw prints walking down the page (no inline styles: the page's policy allows none) */
.trail i:nth-child(1) { --i: 0; }
.trail i:nth-child(2) { --i: 1; }
.trail i:nth-child(3) { --i: 2; }
.trail i:nth-child(4) { --i: 3; }
.trail i:nth-child(5) { --i: 4; }
.trail i:nth-child(6) { --i: 5; }
.trail i:nth-child(7) { --i: 6; }

.trail { width: var(--wrap); margin: 40px auto 0; height: 70px; position: relative; }
.trail i { position: absolute; width: 34px; height: 34px; fill: rgba(26,93,196,.2); inset-inline-start: calc(6% + var(--i) * 13.5%); top: calc((var(--i) % 2) * 30px); rotate: 90deg; opacity: 0; }
[dir='rtl'] .trail i { rotate: -90deg; }
.trail.in i { animation: step .45s ease-out forwards; animation-delay: calc(var(--i) * .2s); }
@keyframes step { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

/* ── the features: a phone (sometimes two) and a few words, side to side on a computer */
.features { width: var(--wrap); margin: 10px auto 0; display: grid; gap: 70px; }
.feat { display: grid; gap: 26px; align-items: center; }
.feat-pics { position: relative; padding: 8% 4% 12%; }
.blob { position: absolute; inset: 0 6%; border-radius: 42% 58% 52% 48% / 52% 44% 56% 48%; background: var(--bg); opacity: .32; filter: blur(2px); animation: morph 14s ease-in-out infinite; }
@keyframes morph { 50% { border-radius: 58% 42% 44% 56% / 44% 58% 42% 56%; transform: rotate(6deg) scale(1.03); } }
.feat .phone.mid { position: relative; }
.feat .phone.small { position: absolute; width: 46%; inset-inline-end: -2%; bottom: 0; transform: rotate(-4deg); transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .2s; }
.feat.flip .phone.small { inset-inline-end: auto; inset-inline-start: -2%; transform: rotate(4deg); }
.feat-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ic { width: 76px; height: 76px; padding: 10px; border-radius: 26px; background: var(--bg); border: 4px solid #fff; box-shadow: 0 6px 0 var(--lip), 0 12px 22px rgba(31,42,92,.18); margin-bottom: 14px; }

/* the evening feature: the page turns to night for a moment (stars, the moon), then back to day */
.feat.band-night { position: relative; color: #fff; padding: 70px 0; }
.sky-night { position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, rgba(246,252,255,0) 0, #1B2A6B 14%, #0F1A4A 50%, #1B2A6B 86%, rgba(246,252,255,0) 100%); }
.features { position: relative; z-index: 0; }
.sky-night .moon { position: absolute; top: 16%; inset-inline-end: 9%; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #FFFBE6, #F3E7B0 60%, #E6D592); box-shadow: 0 0 40px 12px rgba(255,244,200,.35); }
.sky-night .stars { position: absolute; inset: 10% 0; background-repeat: repeat; animation: twinkle 4s ease-in-out infinite; }
.s1 { background-image: radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent), radial-gradient(1.2px 1.2px at 140px 80px, #fff, transparent), radial-gradient(1.8px 1.8px at 260px 20px, #FFF6C8, transparent), radial-gradient(1.2px 1.2px at 330px 140px, #fff, transparent); background-size: 380px 180px; }
.s2 { background-image: radial-gradient(1.2px 1.2px at 70px 110px, #fff, transparent), radial-gradient(1.6px 1.6px at 210px 160px, #fff, transparent), radial-gradient(1px 1px at 300px 60px, #fff, transparent); background-size: 340px 200px; animation-delay: -2s; }
@keyframes twinkle { 50% { opacity: .35; } }
.band-night .feat-copy p { color: #C9D6FF; }
.band-night .blob { opacity: .22; }

/* ── always gentle */
.gentle { width: min(760px, calc(100% - 32px)); margin: 90px auto 0; text-align: center; background: #fff; border-radius: 34px; padding: 30px 24px 32px;
  box-shadow: 0 8px 0 #FFD3E5, 0 22px 44px rgba(219,79,134,.16); position: relative; }
.gentle img { width: 84px; height: 84px; margin: -72px auto 8px; filter: drop-shadow(0 10px 14px rgba(219,79,134,.3)); }
.gentle p { color: var(--muted); font-size: clamp(17px, 1.8vw, 19px); margin: 12px 0 0; }

/* ── download: a hill of grass under the sky */
.cta { margin-top: 90px; position: relative; padding: 50px 0 0; text-align: center; overflow: hidden; }
.cta-in { width: var(--wrap); margin: 0 auto; position: relative; z-index: 1; }
.cta p { color: var(--muted); font-size: 18px; margin: 12px auto 22px; max-width: 560px; }
.cta-row { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.qr { display: none; align-items: center; gap: 12px; background: #fff; padding: 10px 16px 10px 10px; border-radius: 20px; box-shadow: 0 6px 0 #CFE9FA, 0 12px 22px rgba(31,42,92,.14); }
.qr svg { width: 96px; height: 96px; }
.qr span { font-weight: 700; max-width: 140px; text-align: start; line-height: 1.3; font-size: 15px; }
.hill { height: 170px; margin-top: 40px; background:
  radial-gradient(120% 140px at 30% 100%, #2FAE47 60%, transparent 61%),
  radial-gradient(110% 160px at 80% 100%, #49C45A 60%, transparent 61%),
  linear-gradient(180deg, transparent 60%, #2FAE47 60%); }
.foot { background: #2FAE47; color: #fff; text-align: center; padding: 10px 16px max(30px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.foot-logo { width: 150px; height: auto; }
.foot-links, .foot-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot-langs { font-size: 14px; opacity: .92; gap: 6px 16px; }
.foot-langs a[aria-current] { text-decoration: underline; }
.foot .copy { margin: 0; font-size: 13px; opacity: .85; }

/* ── showing up as you scroll (only when the script runs: without it everything is simply there) */
.js .rv { opacity: 0; transform: translateY(34px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
.js .feat .tiltin { --t: -26deg; }
.js [dir='rtl'] .feat .tiltin, [dir='rtl'].js .feat .tiltin { --t: 26deg; }
.js .feat.in .tiltin { --t: -7deg; }
[dir='rtl'].js .feat.in .tiltin { --t: 7deg; }
.js .feat:not(.in) .phone.small { transform: translateY(40px) rotate(-12deg); }

/* ── a computer / a tablet */
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .card { width: 150px; }
  .qr { display: flex; }
}
@media (min-width: 980px) {
  body { font-size: 18px; }
  .hero-in { grid-template-columns: 0.9fr 1.1fr; margin-top: -24px; }
  .hero-copy { text-align: start; align-items: flex-start; }
  .hero-logo { display: none; }
  .badges { justify-content: flex-start; }
  [dir='rtl'] .badges { justify-content: flex-end; }
  .breeds-in { grid-template-columns: 0.8fr 1.2fr; }
  .breeds .copy { text-align: start; }
  .feat { grid-template-columns: 1.25fr 0.75fr; gap: 56px; }
  .feat.flip .feat-pics { order: 2; }
  .feat-copy { text-align: start; align-items: flex-start; }
  .features { gap: 110px; }
}
/* a phone: the banner shows the dog and the cat (its logo would be cut at the edge: the logo is in the copy below) */
@media (max-width: 979px) {
  .banner { height: min(78vw, 360px); }
  .banner img { object-position: 97% 40%; }
  .hero-in { margin-top: -60px; }
}
@media (max-width: 420px) {
  .langs summary span { display: none; }
  .langs summary { padding: 9px; }
  .badge img { height: 46px; }
  .card { width: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .belt { overflow-x: auto; }
  .js .rv { opacity: 1; transform: none; }
  .trail i { opacity: 1; }
}
