/* Home: the first screen is the studio with ONE bubble; it fits 100svh at 1366x768, 1440x900 and 1920x1080. */
.page-home { background: var(--milk); }
.page-home::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 100svh; z-index: -1; background: url("/img/bg-wide.webp") center bottom / cover no-repeat; }
.stage { position: relative; height: calc(100svh - var(--hh) - var(--rl)); min-height: 600px; }
.leadwrap { position: relative; z-index: 3; height: 100%; display: flex; align-items: center; pointer-events: none; }
.lead { width: min(560px, 44vw); pointer-events: auto; padding-bottom: clamp(8px, 2vh, 24px); }
.name { margin: 0; font: 800 clamp(64px, min(8.6vw, 15vh), 132px)/.92 var(--display); letter-spacing: -.035em; color: var(--ink); white-space: nowrap; }
.name span { color: var(--cobalt); }
.head { margin: clamp(12px, 2.2vh, 24px) 0 0; font: 800 clamp(28px, min(2.9vw, 5vh), 44px)/1.08 var(--display); letter-spacing: -.015em; max-width: 15ch; }
.head em { font-style: normal; color: var(--cobalt); }
.lede { margin: clamp(10px, 1.8vh, 20px) 0 0; max-width: 46ch; color: var(--ink); }
.acts { display: flex; gap: 12px; margin-top: clamp(16px, 3vh, 32px); flex-wrap: wrap; }
.lead .tray { margin-top: clamp(14px, 2.6vh, 28px); }

/* the scene: one box, everything placed in % of it; the bubble's dots sit on the wrinkle stars of its picture */
.scene { position: absolute; z-index: 2; right: 0; bottom: 0; width: min(56vw, calc((100svh - var(--hh) - var(--rl)) * 1.25)); aspect-ratio: 1.25; container-type: inline-size; }
.bub { position: absolute; left: 7%; top: 12%; width: 86%; aspect-ratio: 1210 / 712; transform-origin: 50% 82%; animation: breathe 6s ease-in-out infinite; z-index: 3; }
.bub > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bub .b1 { opacity: var(--tight, 0); transition: opacity .8s ease-out; }
.dot .dj { animation: dbreathe 3.2s ease-in-out var(--bd, 0s) infinite; }
@keyframes dbreathe { 0%, 100% { transform: none; } 50% { transform: translateY(-2.5%) scale(1.025); } }
@media (prefers-reduced-motion: reduce) { .dot .dj { animation: none; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012, 1.008); } }
.dot { position: absolute; left: var(--x); top: 49%; width: 17.5%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.dj { position: absolute; inset: 0; will-change: transform; }
.dj > img, .fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.fill { clip-path: inset(calc((1 - var(--f, 0)) * 100%) 0 0 0); transition: clip-path .7s cubic-bezier(.2, .9, .3, 1.2); }
.fill img { width: 100%; height: 100%; }
.dj .g { opacity: 0; transition: opacity .25s ease-out; }
.dot.dim .g { opacity: .6; transition-duration: .12s; }
.ring { position: absolute; left: 50%; bottom: -16%; width: 96%; height: 26%; margin-left: -48%; border-radius: 50%; border: 3px solid rgba(244, 241, 236, .85); opacity: 0; transform: scale(.5); pointer-events: none; }
.plate { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); margin: 0; display: flex; gap: 0; align-items: center; white-space: nowrap; padding: 10px 22px; border-radius: 999px; background: var(--plate); color: var(--ink); font-size: clamp(16px, 1.55cqi, 19px); box-shadow: 0 10px 24px -12px rgba(20, 30, 90, .6); }
.plate { display: grid; justify-items: center; row-gap: 2px; width: max-content; max-width: 96%; border-radius: 24px; padding: 10px 24px; } /* two lines: the pot and its dots / the people */
.plate .pg { display: flex; }
.plate .pg > span + span::before { content: "·"; margin: 0 12px; color: var(--grey); }
.plate.replay { outline: 3px solid var(--mint); }
.shadow { position: absolute; left: 12%; width: 78%; top: 66%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(28, 40, 120, .38), rgba(28, 40, 120, 0)); z-index: 1; }
/* the delivered messages on the floor, newest nearest */
.trail { position: absolute; inset: 0; z-index: 2; }
.trail .tm { position: absolute; transform: translate(-50%, -100%); transition: left .8s ease-out, top .8s ease-out, width .8s ease-out, opacity .5s; }
.trail .tm img { width: 100%; }
.trail .tm .tk { position: absolute; right: 8%; bottom: 14%; width: 26%; }
.trail .tm .lb { position: absolute; left: 12%; top: 44%; transform: translateY(-50%); display: grid; gap: 2px; color: var(--ink); white-space: nowrap; }
.trail .tm .lb b { font: 800 22px/1 var(--display); }
.trail .tm .lb span { font: 600 16px/1.2 var(--text); font-variant-numeric: tabular-nums; }
/* the Send */
.pop { position: absolute; left: 4%; top: 2%; width: 92%; opacity: 0; pointer-events: none; z-index: 6; }
.msg { position: absolute; left: 9%; top: 26%; width: 82%; z-index: 5; opacity: 0; pointer-events: none; }
.msg .mb { width: 100%; }
.msg .mt { position: absolute; left: 11%; right: 9%; top: 18%; bottom: 26%; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.msg p { margin: 0; white-space: nowrap; }
.msg .l1 { font: 800 clamp(20px, 3.4cqi, 36px)/1.1 var(--display); color: var(--ink); }
.msg .l2 { font-size: clamp(16px, 2.1cqi, 22px); font-weight: 600; color: var(--ink2); transition: filter .5s, opacity .5s; }
.msg .l2.gone { filter: blur(6px); opacity: 0; }
.msg .del { position: absolute; right: 0; top: -14%; height: 44px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.msg .del.on { opacity: 1; transform: none; }
.msg .ticks { position: absolute; right: 7%; bottom: 13%; width: 17%; aspect-ratio: 360 / 189; }
.msg .ticks img { position: absolute; inset: 0 0 auto 0; width: 100%; }
.msg .tg { filter: grayscale(1) brightness(.85); opacity: .7; }
.msg .tm { clip-path: inset(0 100% 0 0); transition: clip-path .35s ease-out; }
/* effect sprites */
.fxl { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.fxl .mini { position: absolute; width: 11%; transform: translate(-50%, -50%); }
.fxl .dust { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--milk); box-shadow: 0 0 0 1px rgba(35, 37, 46, .06); }

/* home sections */
.steps .step { display: flex; flex-direction: column; gap: 12px; }
.steps .step img, .steps .half { width: 96px; height: 96px; }
.steps .half { position: relative; }
.steps .half img { position: absolute; inset: 0; }
.steps .half .hf { clip-path: inset(50% 0 0 0); }
.steps h3 { margin: 4px 0 0; font: 800 28px/1.1 var(--display); }
.steps p { margin: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.lastmsg { position: relative; }
.lastmsg > img:first-child { width: 100%; }
.lastmsg .lt { position: absolute; left: 11%; right: 26%; top: 20%; bottom: 28%; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.lastmsg p { margin: 0; }
.lastmsg .l1 { font: 800 clamp(22px, 2.3vw, 32px)/1.1 var(--display); }
.lastmsg .l2 { font-weight: 600; color: var(--ink2); }
.lastmsg .tk { position: absolute; right: 7%; bottom: 14%; width: 15%; }

@media (max-width: 1023px) {
  .page-home::before { display: none; }
  .page-home { background: linear-gradient(rgba(244, 241, 236, 0) 0, rgba(244, 241, 236, 0) 120vw, var(--milk) 177vw) center top / 100% 178vw no-repeat, url("/img/bg-tall.webp") center top / 100% auto no-repeat, var(--milk); }
  .stage { height: auto; min-height: 0; display: flex; flex-direction: column-reverse; }
  .scene { position: relative; width: 100%; right: auto; bottom: auto; }
  .bub { left: 5%; width: 90%; top: 10%; }
  .shadow { top: 64%; }
  .leadwrap { height: auto; }
  .lead { width: 100%; padding: var(--s3) 0 0; }
  .name { font-size: clamp(52px, 15vw, 64px); }
  .head { font-size: clamp(26px, 7.4vw, 32px); }
  .plate { bottom: -4%; font-size: 16px; padding: 10px 16px; }
  .plate span + span::before { margin: 0 8px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .scene { aspect-ratio: 1.2; }
  .bub { top: 4%; }
  .shadow { top: 56%; }
}
@media (max-width: 480px) {
  .plate { display: grid; justify-items: center; row-gap: 2px; width: max-content; max-width: 92%; border-radius: 22px; padding: 10px 20px; }
  .plate .pg { display: flex; }
  .plate .pg + .pg > span:first-child::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bub { animation: none; } }
@media (max-width: 480px) { #top5 th:nth-child(2), #top5 td:nth-child(2) { display: none; } }

@media (max-width: 480px) {
  .lead .links { flex-direction: column; }
  .lead .links .lk { flex: none; }
  .lastmsg .l1 { font-size: 22px; }
}
@media (max-width: 420px) { .plate .pg { flex-wrap: wrap; justify-content: center; } .plate { font-size: 16px; padding: 10px 16px; } .plate .pg > span + span::before { margin: 0 6px; } }
/* small phones: the plate keeps two short lines (the dots are in the picture), never covers them */
@media (max-width: 420px) { .plate #p-dots, .plate .w { display: none; } .plate .pg { flex-wrap: nowrap; } }
.plate .w { font-style: normal; }
