/* fluffynote.app in the app's look (DESIGN.md): its paper with the grain,
 * its ink, Nunito, the app's rounded type, for every word, Shantell Sans for
 * a pet's name only, cards with the app's 24 corner, light and dark by the
 * phone or by the switch in the bar (theme.js, site.js).
 * The phones are pictures of the app's real screens (frame.py), their
 * shadow drawn here so it follows light and dark. */
@font-face { font-family: "Nunito"; font-weight: 500; font-display: swap; src: url("/fonts/nunito-500.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/fonts/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 700; font-display: swap; src: url("/fonts/shantell-700.woff2") format("woff2"); }

:root {
  --ground: #f4f0ea;
  --card: #ffffff;
  --ink: #231f1c;
  --sec: #6b635c;
  --on-ink: #ffffff;
  --rim: #ffffff;
  --hair: rgba(35, 31, 28, 0.08);
  --halo: #ebe3d8;
  --paper: url("/img/paper-light.png");
  --room-left: image-set(url("/img/room-l-light.webp") 1x, url("/img/room-l-light@2x.webp") 2x);
  --room-bare: image-set(url("/img/room-lbare-light.webp") 1x, url("/img/room-lbare-light@2x.webp") 2x);
  --room-mid: image-set(url("/img/room-m-light.webp") 1x, url("/img/room-m-light@2x.webp") 2x);
  --room-right: image-set(url("/img/room-r-light.webp") 1x, url("/img/room-r-light@2x.webp") 2x);
  --room-narrow: url("/img/room-high-light.webp");
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 10px 30px rgba(60, 40, 20, 0.07);
  --phone-shadow: drop-shadow(0 4px 6px rgba(60, 40, 20, 0.12)) drop-shadow(0 22px 30px rgba(60, 40, 20, 0.2));
  --rosette-shadow: drop-shadow(0 2px 4px rgba(35, 31, 28, 0.14));
  --glass: rgba(251, 248, 243, 0.72);
  --glass-rim: rgba(35, 31, 28, 0.08);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --pick: #ffe7d1;
  color-scheme: light;
}
/* Dark as the device is, unless the visitor chose light by the switch, or
   dark by hand. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #171513;
    --card: #24211e;
    --ink: #f4f0ea;
    --sec: #b3aaa1;
    --on-ink: #231f1c;
    --rim: #f4f0ea;
    --hair: rgba(244, 240, 234, 0.1);
    --halo: #221f1c;
    --paper: url("/img/paper-dark.png");
    --room-left: image-set(url("/img/room-l-dark.webp") 1x, url("/img/room-l-dark@2x.webp") 2x);
    --room-bare: image-set(url("/img/room-lbare-dark.webp") 1x, url("/img/room-lbare-dark@2x.webp") 2x);
    --room-mid: image-set(url("/img/room-m-dark.webp") 1x, url("/img/room-m-dark@2x.webp") 2x);
    --room-right: image-set(url("/img/room-r-dark.webp") 1x, url("/img/room-r-dark@2x.webp") 2x);
    --room-narrow: url("/img/room-high-dark.webp");
    --shadow: 0 0 0 1px rgba(244, 240, 234, 0.05);
    --phone-shadow: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
    --rosette-shadow: none;
    --glass: rgba(36, 33, 30, 0.66);
    --glass-rim: rgba(244, 240, 234, 0.1);
    --pick: #69523a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #171513;
  --card: #24211e;
  --ink: #f4f0ea;
  --sec: #b3aaa1;
  --on-ink: #231f1c;
  --rim: #f4f0ea;
  --hair: rgba(244, 240, 234, 0.1);
  --halo: #221f1c;
  --paper: url("/img/paper-dark.png");
  --room-left: image-set(url("/img/room-l-dark.webp") 1x, url("/img/room-l-dark@2x.webp") 2x);
  --room-bare: image-set(url("/img/room-lbare-dark.webp") 1x, url("/img/room-lbare-dark@2x.webp") 2x);
  --room-mid: image-set(url("/img/room-m-dark.webp") 1x, url("/img/room-m-dark@2x.webp") 2x);
  --room-right: image-set(url("/img/room-r-dark.webp") 1x, url("/img/room-r-dark@2x.webp") 2x);
  --room-narrow: url("/img/room-high-dark.webp");
  --shadow: 0 0 0 1px rgba(244, 240, 234, 0.05);
  --phone-shadow: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
  --rosette-shadow: none;
  --glass: rgba(36, 33, 30, 0.66);
  --glass-rim: rgba(244, 240, 234, 0.1);
  --pick: #69523a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
::selection { background: var(--pick); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
:root { accent-color: var(--ink); caret-color: var(--ink); }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; background: var(--ground) var(--paper) repeat; background-size: 128px 128px; scroll-behavior: smooth; }
body { margin: 0 auto; max-width: 74rem; padding: 1.1rem 1.5rem 2.5rem; color: var(--ink); font: 500 18px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-wrap: break-word; }
a { color: inherit; text-underline-offset: 0.18em; }
img, svg, picture { display: block; }
h1, h2, h3, .home, .ask, .ways, .button, .get-button, .sections, .foot-head, .qr-title { font-family: "Nunito", system-ui, sans-serif; }
h1 { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 1rem; }
h2 { font-weight: 800; font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.8rem; }
h3 { font-weight: 800; font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.3rem; }
p { margin: 0 0 0.8rem; }
.lead { font-size: 1.28rem; line-height: 1.5; color: var(--sec); max-width: 32rem; }
.sub { color: var(--sec); font-size: 1.2rem; line-height: 1.5; max-width: 40rem; margin: 0 auto; }
.quiet { color: var(--sec); }

/* The bar, as Tervaya's: across the top, and once the page scrolls it draws
   in to a narrower pill of the paper's glass floating over the page, which
   passes under it blurred. The mark, cut free as Tervaya's bird, and the
   name lead; light or dark and the other language end it. */
.bar { position: sticky; top: 0; z-index: 30; margin: -1.1rem -0.75rem 1rem; padding: 0.6rem 0.75rem 0; transition: padding-top 280ms var(--ease); }
.bar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; max-width: 100%; margin: 0 auto; padding: 0 0.25rem;
  border: 1px solid transparent; border-radius: 999px;
  transition: max-width 280ms var(--ease), min-height 280ms var(--ease), padding 280ms var(--ease), box-shadow 280ms var(--ease), border-color 280ms var(--ease), background-color 280ms var(--ease);
}
.bar.scrolled { padding-top: 0.6rem; }
.bar.scrolled .bar-in {
  max-width: 56rem; min-height: 3.3rem; padding: 0 0.4rem 0 0.8rem; border-color: var(--glass-rim); background: var(--glass);
  box-shadow: 0 12px 32px -18px rgba(35, 31, 28, 0.4);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.home { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.home img { width: 34px; height: 34px; }
.bar-end { display: flex; align-items: center; gap: 0.6rem; }
/* The page's parts between the name and the end, and the store's button
   ahead of light or dark, as Tervaya's bar has them. */
.sections { display: flex; align-items: center; gap: 0.15rem; }
.sections a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.85rem; border-radius: 999px; font-weight: 700; font-size: 0.98rem; text-decoration: none; transition: background-color 200ms var(--ease); }
.get-button { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1.1rem; white-space: nowrap; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 800; font-size: 0.98rem; text-decoration: none; box-shadow: var(--shadow); }
.theme, .lang { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.5rem; border: 1px solid var(--hair); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.theme::after, .lang::after { content: ""; position: absolute; inset: -4px; }
.theme { width: 2.5rem; padding: 0; }
.theme[hidden] { display: none; }
.lang { padding: 0 1rem; font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.theme svg, .lang svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* A phone has no hover: a hover there sticks after the tap, so it stands
   only where a pointer hovers. A tap answers as the finger lands, without
   the browser's flash or its wait for a second tap; a button gives a
   little, and only darkens where motion is reduced (package 29). */
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
button, summary, .pick label, .get-button, .badge, .lang, .sections a { touch-action: manipulation; }
.get-button, .badge, .qr-button, .qr-close, .theme, .lang { transition: transform 120ms var(--ease), filter 120ms var(--ease); }
.get-button:active, .badge:active, .qr-button:active, .qr-close:active, .theme:active, .lang:active { transform: scale(0.97); }
.sections a:active, .qa summary:active { background: var(--hair); }
.pick label:active svg { transform: scale(0.97); }
a:not([class]):active { opacity: 0.7; }
@media (hover: hover) and (pointer: fine) {
  .sections a:hover { background: var(--hair); }
  .pick label:hover svg { transform: scale(1.06) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .get-button:active, .badge:active, .qr-button:active, .qr-close:active, .theme:active, .lang:active, .pick label:active svg { transform: none; filter: brightness(0.9); }
}
[data-theme-toggle][aria-pressed="true"] .moon, [data-theme-toggle][aria-pressed="false"] .sun { display: none; }
.vh, .lang-short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 519px) {
  .lang-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lang-short { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .lang { padding: 0 0.65rem; gap: 0.3rem; }
  .bar-end { gap: 0.35rem; }
  .bar-in { gap: 0.5rem; }
  .home { font-size: 1.1rem; gap: 0.45rem; }
  .home img { width: 30px; height: 30px; }
  .get-button { padding: 0 0.8rem; font-size: 0.92rem; }
}
/* The narrowest phones keep the mark alone in the bar, the name stays its label. */
@media (max-width: 399px) {
  .bar .home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* The hero: the name large, the promise, and Home in a phone among the drawings. */
/* The hero fills the window below the header, so what follows comes only with the scroll. */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; min-height: calc(100svh - 5.2rem); padding: 1rem 0 2rem; }
.hero .ask { margin-bottom: 0.9rem; }
.hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.6rem); line-height: 1.02; letter-spacing: -0.032em; margin: 0 0 1.1rem; }
/* English would leave "know." alone on the last line; German breaks better unbalanced. */
.hero h1:lang(en) { text-wrap: balance; }
/* A short window: the words end at least 2.5rem above the phone's foot, so
   the floor (site.js) lies under the phone. Centred they would reach it
   below a window 740 px tall: there they stand at the top, and below 700 px
   the heading gives up size with the window's height too. */
@media (min-width: 861px) and (max-height: 740px) {
  .hero .words { align-self: start; }
  .hero h1 { font-size: clamp(2.7rem, min(5.8vw, calc(22.6svh - 5.29rem)), 4.6rem); }
}
/* The way to the store: Apple's own badge, beside it on a computer a
   button that shows a code to scan with the iPhone, and Android's store to
   come, said once. */
.get { display: flex; align-items: center; gap: 0.75rem; margin: 0.9rem 0 0.4rem; }
.badge { display: inline-flex; border-radius: 10px; }
.badge img { display: block; width: auto; height: 3.2rem; }
.qr-button { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border: 1px solid var(--hair); border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.qr-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.android { margin: 0 0 0.7rem; font-size: 0.95rem; }
.qr { width: min(20rem, calc(100% - 2rem)); padding: 1.6rem 1.6rem 1.3rem; border: 0; border-radius: 28px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); text-align: center; }
.qr::backdrop { background: rgba(23, 21, 19, 0.45); }
.qr-title { margin: 0 0 1rem; font-weight: 800; font-size: 1.25rem; }
.qr img { display: block; width: 12.5rem; height: 12.5rem; margin: 0 auto 0.9rem; border-radius: 14px; }
.qr-close { min-height: 44px; padding: 0 1.4rem; border: 1px solid var(--hair); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.end .get, .invite .get { justify-content: center; }
.end .android { margin-bottom: 1.2rem; }
/* A phone has no camera to point at itself. */
@media (hover: none) and (pointer: coarse), (max-width: 860px) { .qr-button { display: none; } }
.facts { color: var(--sec); font-size: 0.98rem; }
.stage { position: relative; display: grid; place-items: center; min-height: min(42rem, calc(100svh - 6rem)); overflow-x: clip; }
.halo { position: absolute; width: 34rem; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--halo); }
/* The hero stands in the app's paper-cut room, as Heute does: window-wide
   behind the header too, fading into the paper below. The owner's room
   comes in slices (room-slices.py): its left end, its right end with the
   rug's other corner, and between them a middle of plain wall, floor and
   rug that repeats without a seam, so the whole room shows at any window
   size, never cut and never stretched. site.js lays the floor strip's back
   edge (75 % down the picture) 1.5rem under the words' last line, makes
   the picture just tall enough to cover the hero from there, cutting only
   plain wall above, and shows the plant (its box a quarter of the
   picture's height wide) only where it stands clear of the words; the
   phone, ending 44 to 80 px under the words, then stands on the floor.
   Before the script, or without it, the room stands as the phone's foot
   suggests and without its plant. The picture is a layer of its own in a
   frame that clips it, so it can lie deeper than the page as the hero
   scrolls away. The words stand in ink there: the secondary grey loses
   its 4.5 : 1 on the wall. */
.hero { position: relative; isolation: isolate; }
.hero .room { position: absolute; z-index: -1; inset: -6rem calc(50% - 50vw) 0; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent); mask-image: linear-gradient(to bottom, #000 86%, transparent); }
.hero .room > div {
  --room-h: max(100%, calc(66.7svh + 30.8rem));
  --room-y: 0px;
  position: absolute; inset: 0;
  background:
    var(--room-right) right var(--room-y) / auto var(--room-h) no-repeat,
    var(--room-bare) left var(--room-y) / auto var(--room-h) no-repeat,
    var(--room-mid) left var(--room-y) / auto var(--room-h) repeat-x;
}
.hero .room[data-plant] > div { --room-bare: var(--room-left); }
.hero .halo { display: none; }
.hero .lead, .hero .facts { color: var(--ink); }

/* The hero's first seconds, as the app's welcome begins: the pet in its
   wreath on the paper, the phone around it, then Home on its screen while
   four drawings fly into their tiles and three step outside. Without
   motion, the end. Places are in hundredths of the phone picture's width
   (cqw), measured on the demo's Home by frame.py: the pet's box and the
   tiles' squares. A drawing goes from x, y, s, r to fx, fy, fs, fr. */
.intro { position: relative; width: min(19.5rem, calc((100svh - 9rem) * 648 / 1352)); aspect-ratio: 648 / 1352; container-type: inline-size; transform-origin: 50% 32.5%; }
.intro > picture { position: absolute; }
.intro .frame, .intro .shot { inset: 0; }
.intro .pet { left: 33.025cqw; top: 50.926cqw; width: 33.8cqw; }
.intro img { width: 100%; height: auto; }
.intro .frame img { filter: var(--phone-shadow); }
.intro .shot img { filter: none; }
.w { position: absolute; z-index: 1; translate: -50% -50%; left: calc(var(--fx) * 1cqw); top: calc(var(--fy) * 1cqw); width: calc(var(--fs) * 1cqw); rotate: var(--fr); }
.w.into { --fs: 5.8; --fr: 0deg; opacity: 0; }
.w-food { --x: 18; --y: 47; --s: 14; --r: -12deg; --fx: 14.19; --fy: 135.48; }
.w-walk { --x: 17; --y: 70; --s: 11; --r: -6deg; --fx: 57.54; --fy: 135.48; }
.w-water { --x: 82; --y: 42; --s: 10; --r: 8deg; --fx: 14.19; --fy: 163.96; }
.w-pill { --x: 27; --y: 91; --s: 9; --r: -20deg; --fx: 57.54; --fy: 163.96; }
.w-treat { --x: 84; --y: 64; --s: 10; --r: 18deg; --fx: 120; --fy: 70; --fs: 22; --fr: 24deg; }
.w-brush { --x: 25; --y: 33; --s: 10; --r: -24deg; --fx: -22; --fy: 46; --fs: 22; --fr: -30deg; }
.w-cage { --x: 77; --y: 89; --s: 12; --r: -4deg; --fx: 122; --fy: 152; --fs: 26; --fr: -8deg; }
/* Four more drop in around the phone once Home is on its screen. */
.d { position: absolute; z-index: 1; translate: -50% -50%; left: calc(var(--x) * 1cqw); top: calc(var(--y) * 1cqw); width: calc(var(--s) * 1cqw); rotate: var(--r); }
.d-bowl { --x: -24; --y: 112; --s: 26; --r: -10deg; }
.d-drop { --x: 124; --y: 26; --s: 15; --r: 12deg; }
.d-paws { --x: -20; --y: 176; --s: 20; --r: 18deg; }
.d-capsule { --x: 126; --y: 112; --s: 15; --r: -24deg; }
/* The halo waits for the filled screen: through the bare phone it would
   ring the pet's paper. */
@media (prefers-reduced-motion: no-preference) {
  .intro { animation: back 0.9s cubic-bezier(0.4, 0, 0.2, 1) 1.4s both; }
  .halo { animation: show 0.8s ease 2.6s both; }
  .intro .pet { animation: show 0.5s ease both; }
  .intro .frame { animation: show 0.5s ease 1.75s both; }
  .intro .shot { animation: show 0.4s ease 2.55s both; }
  .w { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.2s both, travel 0.8s cubic-bezier(0.55, 0, 0.25, 1) 2s both; }
  .w-walk { animation-delay: 0.3s, 2.05s; } .w-water { animation-delay: 0.4s, 2.1s; } .w-pill { animation-delay: 0.5s, 2.15s; }
  /* Those outside the phone then sway on their own, each in its own time,
     for as long as the page is open: the page lives by its motion (the
     owner's choice). */
  .w.out { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.6s both, travel 0.8s cubic-bezier(0.55, 0, 0.25, 1) 2.05s both, sway 6s ease-in-out 3.1s infinite; }
  .w-brush { animation-delay: 0.7s, 2.1s, 3.5s; animation-duration: 0.5s, 0.8s, 7s; } .w-cage { animation-delay: 0.8s, 2.15s, 3.3s; animation-duration: 0.5s, 0.8s, 6.5s; }
  .d { animation: pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25) 2.6s both, sway 5.5s ease-in-out 3.3s infinite; }
  .d-drop { animation-delay: 2.7s, 3.7s; animation-duration: 0.6s, 4.8s; } .d-paws { animation-delay: 2.8s, 3.4s; animation-duration: 0.6s, 6.8s; }
  .d-capsule { animation-delay: 2.9s, 3.9s; animation-duration: 0.6s, 5.2s; }
  .beside img, .trail img { animation: sway 6s ease-in-out infinite; }
  .hero .words { animation: rise 0.7s ease 2.8s both; }
  .hero .ask span { transform-origin: 0 100%; animation: message 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) 3s both; }
}
@media (prefers-reduced-motion: no-preference) {
  .parade > div { animation: march 32s linear infinite; }
  .parade picture:nth-child(odd) img { animation: hop 1.4s ease-in-out infinite; }
  .parade picture:nth-child(even) img { animation: hop 1.4s ease-in-out 0.7s infinite; }
  .board .tile, .board .chip { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
  .board .tile:nth-child(2) { animation-delay: 60ms; } .board .tile:nth-child(3) { animation-delay: 120ms; }
  .board .chip { animation-delay: 180ms; } .board .chip:nth-child(2) { animation-delay: 220ms; } .board .chip:nth-child(3) { animation-delay: 260ms; }
  .board .chip:nth-child(4) { animation-delay: 300ms; } .board .chip:nth-child(5) { animation-delay: 340ms; } .board .chip:nth-child(n+6) { animation-delay: 380ms; }
}
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .qa { interpolate-size: allow-keywords; }
    .qa details::details-content { height: 0; overflow: clip; transition: height 350ms var(--ease), content-visibility 350ms allow-discrete; }
    .qa details[open]::details-content { height: auto; }
  }
}
@keyframes march { to { translate: -50% 0; } }
@keyframes hop { 50% { translate: 0 -0.45rem; rotate: -6deg; } }
@keyframes show { from { opacity: 0; } }
@keyframes pop { from { scale: 0; } }
@keyframes back { from { scale: 1.8; } }
@keyframes sway { 0%, 100% { transform: none; } 30% { transform: translateY(-0.4rem) rotate(-5deg); } 70% { transform: translateY(0.3rem) rotate(4deg); } }
@keyframes travel { from { left: calc(var(--x) * 1cqw); top: calc(var(--y) * 1cqw); width: calc(var(--s) * 1cqw); rotate: var(--r); opacity: 1; } 75% { opacity: 1; } }
@keyframes rise { from { opacity: 0; translate: 0 1rem; } }

/* A screen of the app in its phone. */
.shot img { width: 100%; height: auto; filter: var(--phone-shadow); }

/* Between the sections, a trail of paws. */
.trail { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 3.5rem 0 1.5rem; }
.trail i { width: 2px; height: 4.5rem; background: linear-gradient(var(--hair), var(--sec)); opacity: 0.6; }
.trail picture { width: 3.4rem; rotate: -8deg; }
.trail img { width: 100%; height: auto; }

/* The question as the household's chat would carry it, then the answer. */
.ask { margin: 0 0 1.2rem; }
.ask span { display: inline-block; padding: 0.65rem 1.1rem; border-radius: 1.35rem 1.35rem 1.35rem 0.35rem; background: var(--card); box-shadow: var(--shadow); font-weight: 700; font-size: 1.12rem; line-height: 1.35; }


/* The tour: a question answered by a screen beside it, a drawing at the
   phone's edge, the sides taking turns. */
.step { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; align-items: center; gap: 5rem; max-width: 60rem; margin: 0 auto 5.5rem; }
.step:nth-child(even) { grid-template-columns: 18rem minmax(0, 1fr); }
.step:nth-child(even) .words { order: 2; }
.step:last-child { margin-bottom: 0; }
.step .sub { margin: 0; }
.held { position: relative; isolation: isolate; }
.held::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(150%, 90vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--square); opacity: 0.7; }
.beside, .side { position: absolute; z-index: 1; top: 10%; right: -3.2rem; width: 6.4rem; rotate: 12deg; }
.step:nth-child(even) .beside { right: auto; left: -3.2rem; rotate: -12deg; }
:is(.beside, .side) img { width: 100%; height: auto; }
.pinned { display: none; }

/* A band of one family's colour across the window, the paper's grain
   showing through it. */
.band { margin: 4.5rem calc(50% - 50vw + 0.75rem); padding: 5rem max(1.5rem, calc(50vw - 36rem)); border-radius: 2.75rem; background: color-mix(in srgb, var(--square) 58%, transparent); }

/* The lock screen and the home screen, leaning on each other. */
.duo { display: flex; justify-content: center; align-items: flex-start; margin: 2.8rem auto 0.5rem; }
.duo .shot { width: min(15rem, 40vw); }
.duo .lock { rotate: -6deg; margin: 2.6rem -1.8rem 0 0; }
.duo .widget { rotate: 5deg; position: relative; }

section.center { text-align: center; }

/* The ways from anywhere. */
.ways { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem 1.2rem; max-width: 52rem; margin: 2.4rem auto 0; padding: 0; }
.ways li { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; width: 8.5rem; text-align: center; }
.ways .sq { width: 4.2rem; height: 4.2rem; border-radius: 1.2rem; color: var(--deep); }
.ways svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ways b { font-weight: 800; font-size: 1rem; line-height: 1.25; }

.sq { display: grid; place-items: center; flex: none; width: 3.6rem; height: 3.6rem; border-radius: 1rem; background: var(--square); }
.sq picture, .sq img { width: 78%; height: auto; }

/* Privacy: the answer and two facts beside the invitation itself, drawn
   as a household passes it on. */
.private { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; align-items: center; gap: 4.5rem; max-width: 58rem; margin: 0 auto; }
.points { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; margin: 2rem 0 0; padding: 0; }
.points li { display: flex; align-items: flex-start; gap: 1rem; }
.points .sq { width: 3rem; height: 3rem; border-radius: 0.9rem; }
.points h3 { margin: 0.1rem 0 0.2rem; }
.points p { color: var(--sec); margin: 0; }
.invite-card { margin: 0; padding: 1.6rem 1.5rem 1.4rem; border-radius: 1.9rem; background: var(--card); box-shadow: var(--shadow); rotate: 3deg; text-align: center; }
.invite-title { font-weight: 800; font-size: 1.1rem; line-height: 1.3; margin: 0 0 1.1rem; }
.code { display: block; width: 100%; height: auto; border-radius: 14px; }
.invite-link { display: inline-block; margin: 1.1rem 0 0; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--ground); color: var(--sec); font-weight: 700; font-size: 0.92rem; }

/* The species to pick, radios without a script: the chosen rosette lifts
   onto a card, and its buttons show, its board as the app's tiles. */
/* Six columns of one width, so a long name (Meerschweinchen) stands as far
   from its neighbours as a short one; it breaks at its own hyphen where a
   column is narrow. */
.pick { display: grid; grid-template-columns: repeat(6, minmax(0, 10.6rem)); justify-content: center; gap: 0.5rem 0.6rem; margin-top: 2.2rem; }
.pick label { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; min-width: 0; padding: 0.7rem 0.4rem 0.75rem; text-align: center; hyphens: manual; border-radius: 1.5rem; font-weight: 800; cursor: pointer; transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease); }
.pick label svg { width: 5.2rem; height: 5.2rem; filter: var(--rosette-shadow); transition: transform 350ms var(--ease); }
.pick input:checked + label { background: var(--card); box-shadow: var(--shadow); }
.pick input:checked + label svg { transform: scale(1.08); }
.pick input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.rim { stroke: var(--rim); }
.boards { max-width: 46rem; margin: 1.6rem auto 0; text-align: left; }
.board { display: none; padding: 1.6rem; border-radius: 1.8rem; background: var(--card); box-shadow: var(--shadow); }
.species:has(#sp-dog:checked) .b-dog, .species:has(#sp-cat:checked) .b-cat, .species:has(#sp-rabbit:checked) .b-rabbit,
.species:has(#sp-guinea:checked) .b-guinea, .species:has(#sp-bird:checked) .b-bird, .species:has(#sp-horse:checked) .b-horse { display: block; }
.label { font-weight: 800; font-size: 1rem; color: var(--sec); margin: 0 0 0.75rem; }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem; margin: 0 0 1.5rem; padding: 0; }
.tile { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem; border-radius: 1.25rem; background: color-mix(in srgb, var(--square) 45%, var(--card)); }
.tile .sq { width: 3.1rem; height: 3.1rem; border-radius: 0.95rem; }
.tile b { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.9rem 0.35rem 0.4rem; border-radius: 999px; background: color-mix(in srgb, var(--square) 60%, var(--card)); font-weight: 700; font-size: 0.95rem; }
.chip picture, .chip img { width: 1.7rem; height: 1.7rem; }

/* Questions and answers, each opening in place. */
.qa { display: flex; flex-direction: column; gap: 0.7rem; max-width: 44rem; margin: 2rem auto 0; text-align: left; }
.qa details { border-radius: 1.35rem; background: var(--card); box-shadow: var(--shadow); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: 1.05rem 1.35rem; font-weight: 800; font-size: 1.1rem; line-height: 1.3; list-style: none; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; width: 0.7rem; height: 0.7rem; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; rotate: 45deg; translate: 0 -0.2rem; transition: rotate 300ms var(--ease), translate 300ms var(--ease); }
.qa details[open] summary::after { rotate: 225deg; translate: 0 0.2rem; }
.qa details p { margin: 0; padding: 0 1.35rem 1.25rem; color: var(--sec); }

/* The end: the drawings march past, and the stores to come. */
.end { overflow: hidden; padding-top: 3.5rem; }
.parade { margin: 0 -1rem 2.4rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.parade > div { display: flex; gap: 2.6rem; width: max-content; }
.parade picture { width: 4.2rem; }
.parade img { width: 100%; height: auto; }

/* The legal pages: the app's text on paper. */
.text { max-width: 46rem; margin: 0 auto; }
.text h1 { font-size: clamp(2.1rem, 5vw, 2.8rem); }
.text h2 { font-size: 1.35rem; letter-spacing: 0; margin-top: 2.2rem; }
.draft { background: var(--card); border-radius: 16px; padding: 0.9rem 1.1rem; box-shadow: var(--shadow); }

/* The invitation and the 404: one card in the middle. */
.join main { display: grid; place-items: center; min-height: 60vh; }
.invite { max-width: 34rem; text-align: center; padding: 2.2rem 1.6rem 1.6rem; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.invite h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
.drawn { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.drawn img { width: 56px; height: 56px; }
.button { display: inline-block; min-height: 48px; padding: 0.8rem 1.6rem; margin: 0.4rem 0 0.6rem; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.button[hidden], section[hidden], nav[hidden] { display: none; }

footer { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--hair); font-size: 0.95rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.4rem; text-align: center; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
/* The foot of a page in one language, as Tervaya's: the name and what it
   is, then a column each for the page, help, the legal pages and the
   languages, the stores' marks beneath. */
.foot { padding-top: 2.4rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: 1.6rem 2rem; max-width: 72rem; margin: 0 auto; }
.foot-grid > div { display: flex; flex-direction: column; align-items: flex-start; }
.foot-grid a, .foot-grid [aria-current] { display: inline-flex; align-items: center; min-height: 40px; }
.foot-brand p { max-width: 21rem; margin: 0.3rem 0 0; font-size: 0.92rem; }
.foot-head { margin: 0 0 0.3rem; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sec); }
.foot [aria-current] { color: var(--sec); }
.marks { max-width: 72rem; margin: 2rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--hair); color: var(--sec); font-size: 0.8rem; line-height: 1.5; }

@media (max-width: 860px) {
  body { padding: 1rem 1rem 2rem; }
  .bar { margin: -1rem -0.5rem 0.5rem; padding-inline: 0.5rem; }
  .bar.scrolled .bar-in { max-width: calc(100% - 1rem); }
  /* On a phone the bar keeps the name and the store, and the foot stands
     centred under the centred page, its columns two by two. */
  .sections { display: none; }
  footer nav { gap: 0.2rem 1.4rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; text-align: center; }
  .foot-grid > div { align-items: center; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-brand p { margin-inline: auto; }
  .marks { text-align: center; }
  .hero .get { justify-content: center; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 1rem; }
  .stage { min-height: 0; padding: 2rem 0; }
  .halo { width: 22rem; }
  /* On a phone the hero opens with the phone playing, whole on the first
     screen; the words follow below. */
  .hero .stage { order: -1; min-height: calc(100svh - 5.5rem); padding: 0; }
  /* On a phone the room stands behind the phone only, the words below on paper. */
  .hero .room { bottom: auto; height: calc(100svh - 5.5rem + 6rem); }
  .hero .room > div { background: var(--room-narrow) center bottom / auto 128% no-repeat; }
  .intro { width: min(60vw, calc((100svh - 8rem) * 648 / 1352)); }
  /* Beside a phone's phone there is little room: the drawings outside
     stay closer and smaller, so the screen's edge never cuts them. */
  .w-treat { --fx: 112; --fs: 15; } .w-brush { --fx: -12; --fs: 15; } .w-cage { --fx: 113; --fs: 17; }
  .d-bowl { --x: -13; --s: 16; } .d-drop { --x: 113; --s: 11; } .d-paws { --x: -12; --s: 14; } .d-capsule { --x: 114; --s: 11; }
  .hero .words, .hero .ask span { animation: none; }
  .step, .step:nth-child(even) { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 4.5rem; text-align: center; }
  .step:nth-child(even) .words { order: 0; }
  .held { width: min(15rem, 68vw); margin: 0 auto; }
  .beside { width: 4.4rem; right: -2rem; }
  .step:nth-child(even) .beside { left: -2rem; }
  .band { margin: 3.5rem calc(50% - 50vw + 0.4rem); padding: 3.5rem 1.1rem; border-radius: 2rem; }
  .duo .shot { width: min(11rem, 42vw); }
  .duo .lock { margin: 2rem -1.2rem 0 0; }
  .private { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .points { text-align: left; }
  .invite-card { width: min(17rem, 80vw); margin: 0 auto; }
  .pick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem 0.4rem; }
  .pick label { padding: 0.55rem 0.3rem 0.6rem; font-size: 0.95rem; }
  .pick label svg { width: 4.2rem; height: 4.2rem; }
  .board { padding: 1.2rem; }
  .trail { padding: 2.2rem 0 1rem; }
}

/* Below the hero, each part comes with the scroll and goes back with it: a
   question pops in like a message, the answer rises after it, the phone
   rises on its growing round with its drawing hopping on, a trail draws
   itself, a row comes one by one, the invitation comes in. A part is in
   place by the time it is a third up the window. Where a browser cannot
   tie an animation to the scroll, or motion is reduced, everything simply
   stands. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .front section:not(.hero) .ask span, .front .step h2, .front section.center h2, .front .sub, .front .ways li, .front .points li,
    .front .pick label, .front .qa details, .front .end p, .front .trail i, .front .trail picture, .front .held .shot, .front .held::before, .front .beside,
    .front .duo .shot, .front .invite-card {
      animation: reveal ease-out both;
      animation-timeline: view();
      animation-range: cover 0% cover 30%;
    }
    .front section:not(.hero) .ask span { animation-name: message; transform-origin: 0 100%; }
    .front .sub { animation-range: cover 3% cover 33%; }
    .front .held { view-timeline: --held; }
    .front .held .shot { animation-name: lift; animation-timeline: --held; animation-range: cover 0% cover 35%; }
    .front .held::before { animation-name: grow; animation-timeline: --held; animation-range: cover 0% cover 40%; }
    .front .beside { animation-name: pop; animation-timeline: --held; animation-range: cover 18% cover 38%; }
    .front .trail i { animation-name: draw; transform-origin: 50% 0; }
    .front .trail picture { animation-name: pop; animation-range: cover 10% cover 35%; }
    .front .invite-card { animation-name: lift; animation-range: cover 5% cover 38%; }
    .front .pick label { animation-name: pop; }
    .front .duo .shot { animation-name: lift; animation-range: cover 0% cover 38%; }
    .front .duo .widget { animation-range: cover 8% cover 44%; }
    /* Depth, as the drawings are stickers on the paper: the round behind a
       phone lags the scroll, the drawing beside it leads, and leaving the
       hero, the phone and its halo lag the words. */
    .front .hero { view-timeline: --hero; }
    .front .hero .stage { animation: lag linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    /* The room lies deepest, as on Heute: leaving the hero it goes by at
       about half the page's pace. */
    .front .hero .room > div { animation: deep linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .front .held::before { animation-name: grow, depth; animation-timing-function: ease-out, linear; animation-timeline: --held, --held; animation-range: cover 0% cover 40%, cover 0% cover 100%; --depth: 2.5rem; }
    .front .beside { animation-name: pop, depth; animation-timing-function: ease-out, linear; animation-timeline: --held, --held; animation-range: cover 18% cover 38%, cover 0% cover 100%; --depth: -3rem; }
    :is(.front .ways li, .front .points li, .front .qa details):nth-child(2) { animation-range: cover 4% cover 34%; }
    :is(.front .ways li, .front .points li, .front .qa details):nth-child(3) { animation-range: cover 8% cover 38%; }
    :is(.front .ways li, .front .qa details):nth-child(4) { animation-range: cover 12% cover 42%; }
    :is(.front .ways li, .front .qa details):nth-child(5) { animation-range: cover 16% cover 46%; }
    .front .pick label:nth-of-type(2) { animation-range: cover 3% cover 33%; } .front .pick label:nth-of-type(3) { animation-range: cover 6% cover 36%; }
    .front .pick label:nth-of-type(4) { animation-range: cover 9% cover 39%; } .front .pick label:nth-of-type(5) { animation-range: cover 12% cover 42%; }
    .front .pick label:nth-of-type(6) { animation-range: cover 15% cover 45%; }
    /* The last parts sit too near the page's end to reach a third up a tall
       window: they finish a set way after coming fully in, which the page
       always has below them. */
    .front section.end h2 { animation-range: entry 0% entry calc(100% + 120px); }
    .front .end p { animation-range: entry 0% entry calc(100% + 80px); }
  }
}

/* The tour, where the browser ties animations to the scroll and the window
   is wide: one phone stays in the middle of the window while the questions
   pass beside it, and as each comes to the middle its screen, its round and
   its drawing take the last one's place. A question's own phone stands
   aside. A stop's screen shows from a third into its pass to seven tenths,
   the next one's coming in as it goes, since each stop is 80% of the
   window tall and starts 44% of its pass after the last. */
@supports (animation-timeline: view()) and (timeline-scope: --t1) {
  @media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
    .tour { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 4rem; max-width: 62rem; margin: 0 auto; timeline-scope: --t1, --t2, --t3, --t4, --t5; }
    .tour .step, .tour .step:nth-child(even) { display: flex; flex-direction: column; justify-content: center; min-height: 80vh; margin: 0; }
    .tour .step .held { display: none; }
    .s-1 { view-timeline: --t1; } .s-2 { view-timeline: --t2; } .s-3 { view-timeline: --t3; } .s-4 { view-timeline: --t4; } .s-5 { view-timeline: --t5; }
    .pinned { display: block; }
    .pinned .in { --pw: min(18rem, calc((100vh - 10rem) * 648 / 1352)); position: sticky; top: calc(50vh - var(--pw) * 676 / 648 + 2rem); width: var(--pw); aspect-ratio: 648 / 1352; margin: 0 auto; isolation: isolate; }
    .pinned .shot, .pinned .round, .pinned .side { position: absolute; }
    .pinned .shot { inset: 0; }
    .pinned .round { z-index: -1; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: color-mix(in srgb, var(--square) 70%, transparent); }
    .pinned .t-1 { animation: first linear both; animation-timeline: --t1; }
    .pinned .t-2 { animation: middle linear both; animation-timeline: --t2; }
    .pinned .t-3 { animation: middle linear both; animation-timeline: --t3; }
    .pinned .t-4 { animation: middle linear both; animation-timeline: --t4; }
    .pinned .t-5 { animation: last linear both; animation-timeline: --t5; }
    .pinned .side img { animation: sway 6s ease-in-out infinite; }
  }
}
@keyframes first { 0%, 70% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes middle { 0%, 25% { opacity: 0; scale: 0.96; } 35%, 70% { opacity: 1; scale: 1; } 80%, 100% { opacity: 0; scale: 1; } }
@keyframes last { 0%, 25% { opacity: 0; scale: 0.96; } 35%, 100% { opacity: 1; scale: 1; } }
@keyframes reveal { from { opacity: 0; translate: 0 2rem; } }
@keyframes message { from { opacity: 0; scale: 0.4; translate: -0.5rem 1rem; } }
@keyframes lift { from { opacity: 0; translate: 0 5rem; } }
@keyframes grow { from { opacity: 0; scale: 0.3; } }
@keyframes draw { from { scale: 1 0; } }
@keyframes depth { from { transform: translateY(calc(var(--depth) * -1)); } to { transform: translateY(var(--depth)); } }
@keyframes lag { to { transform: translateY(7rem); } }
@keyframes deep { to { transform: translateY(40%); } }
