/* Boop's site. Dense and lively, in the manner of today's iOS app pages: a split hero
   with things floating round a thin iPhone, a running ribbon, a film, numbered features,
   live bits of the app redrawn in HTML, and the inhabitants walking a dark band. */

:root {
  --bg: #FFFCF4;
  --warm: #FFF4D6;
  --surface: #FFFFFF;
  --text: #17181D;
  --muted: #676877;
  --line: rgba(23, 24, 29, 0.08);
  --ink: #2B3AC9;
  --coral: #FF5E4D;
  --sun: #F6C945;
  --night: #15173A;
  --shadow: 0 30px 60px -28px rgba(23, 24, 29, 0.35), 0 10px 22px -14px rgba(23, 24, 29, 0.2);
  --shadow-sm: 0 1px 2px rgba(23, 24, 29, 0.06), 0 10px 28px -14px rgba(23, 24, 29, 0.22);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  /* The app's pen, for headings and big figures; the rest stays in the sans. */
  --pen: "Pangolin", "Geist", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); overflow-x: hidden;
  /* The app's dot-grid paper. */
  background-color: var(--bg);
  background-image: radial-gradient(rgba(43, 58, 201, 0.16) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
  font: 400 1.0625rem/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }

/* Nav */
/* The bar stays at the top while the page scrolls, frosted over what passes under it. */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 252, 244, 0.72); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); transition: box-shadow 0.25s ease; }
.topbar.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(23, 24, 29, 0.35); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
section[id] { scroll-margin-top: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.6rem/1 var(--pen); letter-spacing: -0.01em; -webkit-text-stroke: 0.035em currentColor; paint-order: stroke fill; }
.mark { width: 34px; height: 34px; border-radius: 9px; background: var(--sun); display: grid; place-items: center; flex: none; }
.mark svg { width: 26px; height: 26px; }
.char { fill: none; stroke: #17181D; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; color: var(--muted); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--text); }
@media (max-width: 860px) { .top nav .link { display: none; } }

/* The App Store button, drawn after Apple's badge, linking to Boop's page in the store. */
.store { text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px;
  border-radius: 13px; background: #000; color: #fff; white-space: nowrap; text-align: left;
}
.store svg { width: 22px; height: 26px; flex: none; }
.store-text { display: grid; line-height: 1.05; }
.store-text small { font-size: 0.7rem; font-weight: 500; }
.store-text b { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.025em; }
/* Asking to be pressed: a light sweeping over it now and then, a lift and a tilt under the
   pointer, a press when it is tapped. */
.store { position: relative; overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 14px 26px -12px rgba(23, 24, 29, 0.55), 0 3px 6px -2px rgba(23, 24, 29, 0.3); cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.25s ease; }
.store::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; will-change: transform; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: translateX(-150%) skewX(-20deg); animation: glint 5s 1.2s ease-in-out infinite; pointer-events: none; }
/* Moved, never laid out again: the glint slides by transform alone. */
@keyframes glint { 0%, 70% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(325%) skewX(-20deg); } }
.store:hover { transform: translateY(-3px) rotate(-1.5deg) scale(1.03); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 22px 34px -14px rgba(23, 24, 29, 0.6), 0 6px 10px -4px rgba(23, 24, 29, 0.3); }
.store:active { transform: translateY(1px) scale(0.98); transition-duration: 0.08s; }
.store-text small { color: #fff; opacity: 0.9; }
.store.small { box-shadow: 0 6px 14px -8px rgba(23, 24, 29, 0.5); }
.store.small::before { animation-delay: 3.5s; }

/* A note in the pen beside the badge, its arrow pointing back at it. */
.hand-note { position: relative; margin: 0; padding-left: 52px; font: 400 1.45rem/1.1 var(--pen); color: var(--coral); transform: rotate(-3deg); }
.hand-note small { display: block; margin-top: 4px; font: 500 0.88rem/1.35 var(--font); color: var(--muted); transform: rotate(3deg); transform-origin: left; }
.hand-note svg { position: absolute; left: -2px; top: -6px; width: 50px; height: 34px; fill: none; stroke: var(--coral); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.store.small { height: 40px; padding: 0 13px 0 11px; border-radius: 10px; gap: 7px; }
.store.small svg { width: 15px; height: 18px; }
.store.small .store-text small { font-size: 0.55rem; }
.store.small .store-text b { font-size: 1rem; }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.8rem, 6.6vw, 5.1rem); line-height: 0.98; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.02; }
h3 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.hl { color: var(--coral); position: relative; white-space: nowrap; }
/* A pen's stroke under the coloured words, drawn once the page is in. */
.hl svg { position: absolute; left: -1%; bottom: -0.16em; width: 102%; height: 0.22em; overflow: visible; }
.hl path { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: underline 0.9s 0.5s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
@keyframes underline { to { stroke-dashoffset: 0; } }
.sub { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; max-width: 32em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.85rem; font-weight: 600; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 94, 77, 0.18); }

/* Hero */
.hero-band { background: radial-gradient(120% 90% at 85% 10%, #FFE9A8 0%, rgba(255, 233, 168, 0) 60%), radial-gradient(80% 70% at 0% 100%, #E8EBFF 0%, rgba(232, 235, 255, 0) 60%); }
.hero { display: grid; gap: 32px; align-items: center; padding: 20px 0 64px; }
@media (min-width: 940px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; padding: 24px 0 72px; } }
.hero h1 { margin: 18px 0 18px; }
.hero .sub { margin: 0; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero .cta { margin-top: 28px; }
.tags { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 9px;
  border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  font-size: 0.92rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tags li:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.tags svg { width: 26px; height: 26px; padding: 2px; border-radius: 50%; background: #F7F5EF; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tags.cloud { justify-content: center; max-width: 980px; margin: 28px auto 0; gap: 10px; }
.tags.cloud li { font-size: 0.98rem; padding: 8px 16px 8px 9px; }
.tags.cloud svg { width: 30px; height: 30px; }
@media (max-width: 600px) { .tags li { white-space: normal; } }

/* What Boop does, in three steps under the headline. */
.steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; max-width: 34em; }
.steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; }
.steps .sticker { filter: url(#sticker-sm); width: 44px; height: 44px; padding: 4px; overflow: visible; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.steps span { color: var(--muted); font-size: 0.98rem; line-height: 1.45; }
.steps b { display: block; color: var(--text); font: 400 1.3rem/1.15 var(--pen); -webkit-text-stroke: 0.03em currentColor; }

.scene { position: relative; display: grid; place-items: center; min-height: 560px; }
.scene .phone { width: min(290px, 70vw); }
/* Each on a layer of its own, so its sticker filter is drawn once and the bob only moves it. */
.float { position: absolute; z-index: 3; animation: bob 6s ease-in-out infinite; will-change: transform; }
.float.chip { display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.chip svg { width: 26px; height: 26px; fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.float.doodle { width: 74px; height: 74px; padding: 7px; overflow: visible; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.float.ninja { width: 118px; z-index: 4; filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 8px 12px rgba(23, 24, 29, 0.25)); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }

/* The iPhone is Apple's own bezel (Apple Design Resources, iPhone 18 Pro Max) laid over
   the screen: its hole is 1320 x 2868 of 1470 x 3000, the size of the app's screenshots. */
.phone { position: relative; aspect-ratio: 1470 / 3000; z-index: 2; filter: drop-shadow(0 30px 34px rgba(23, 24, 29, 0.28)) drop-shadow(0 8px 10px rgba(23, 24, 29, 0.14)); }
.phone::after { content: ""; position: absolute; inset: 0; background: var(--bezel, url(img/bezel_black.webp)) center / 100% 100% no-repeat; pointer-events: none; z-index: 4; }
/* The screen is cut by the bezel's own hole (its continuous corners, grown a little to
   tuck under the frame), so no paper shows between the two. */
.screen { position: absolute; left: 5.1%; top: 2.2%; width: 89.8%; height: 95.6%; overflow: hidden; background: #F7F5EF;
  -webkit-mask: url(img/screen_mask.png) center / 100% 100% no-repeat; mask: url(img/screen_mask.png) center / 100% 100% no-repeat; }
/* The app's screens keep the status bar's room empty at their top: the bar is laid over it. */
.screen img, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .bar { position: absolute; top: 0; left: 0; right: 0; height: 5.6%; display: flex; align-items: center; justify-content: space-between; padding: 0 9% 0 11%; font: 600 clamp(9px, 1vw, 13px)/1 var(--font); color: #111; z-index: 2; }
.screen .bar b { font-weight: 600; }
.screen .bar svg { height: 0.95em; width: auto; }

/* Notes in the pen around the page, each with its arrow, as if scribbled on the paper. */
.scribble { position: absolute; z-index: 5; margin: 0; display: flex; align-items: flex-start; gap: 4px; font: 400 1.3rem/1.05 var(--pen); color: var(--coral); white-space: nowrap; transform: rotate(var(--r, 0deg)); pointer-events: none; }
.scribble svg { flex: none; width: 46px; height: 31px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.scribble.sun { color: var(--sun); }
.scribble.ink { color: var(--ink); }
.scribbled { position: relative; display: inline-block; }
.streak-wrap { position: relative; padding-top: 44px; }
.streak-wrap .streak { margin-top: 0; }
.closing-cta { position: relative; display: inline-block; }
@media (max-width: 899px) { .scribble.hide-sm, .scene .scribble, .scribbled .scribble, .closing-cta .scribble { display: none; } }
@media (max-width: 899px) { .tile .scribble { display: none; } }

/* A sticker: the span round a drawing carries the die-cut filter (see the filter's note). */
.sticker { display: inline-block; flex: none; filter: url(#sticker); }
.sticker > svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* A phone held up in the air: turned in perspective, its body given depth by thin slabs
   stacked behind the screen, the shadow cast on the paper well below it. */
.scene:has(.tilt) { perspective: 1600px; }
.scene:has(.tilt)::before { content: ""; position: absolute; left: 18%; right: 16%; bottom: -5%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(23, 24, 29, 0.42), rgba(23, 24, 29, 0)); filter: blur(4px); z-index: 0; animation: shadow 7s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scale(0.9); opacity: 0.75; } }
.phone.tilt { transform-style: preserve-3d; filter: none; transform: rotateX(14deg) rotateY(-24deg) rotateZ(6deg); animation: hover 7s ease-in-out infinite; }
.phone.tilt .edge { position: absolute; border-radius: 15.6% / 7.5%; }
.phone.tilt .button { position: absolute; right: -3px; width: 8px; border-radius: 3px; background: linear-gradient(90deg, #2A2B30, #8A8C94 60%, #3A3B42); }
/* Light across the glass, the way it catches a phone held up. */
.phone.tilt .glass { position: absolute; left: 5.1%; top: 2.2%; width: 89.8%; height: 95.6%; z-index: 5; pointer-events: none; transform: translateZ(0.5px);
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 30%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0.16) 100%);
  -webkit-mask: url(img/screen_mask.png) center / 100% 100% no-repeat; mask: url(img/screen_mask.png) center / 100% 100% no-repeat; }
@keyframes hover { 0%, 100% { transform: rotateX(14deg) rotateY(-24deg) rotateZ(6deg) translateY(0); } 50% { transform: rotateX(12deg) rotateY(-20deg) rotateZ(5deg) translateY(-10px); } }

/* The ribbon: a quiet line of what Boop does, drifting by between two hairlines, fading
   out at both ends. */
.ribbon { position: relative; z-index: 4; border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); 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); }
.ribbon .track { display: flex; width: max-content; animation: run 60s linear infinite; }
.ribbon span { display: flex; align-items: center; gap: 10px; padding: 16px 28px; font: 500 0.98rem/1 var(--font); letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; }
.ribbon svg { width: 24px; height: 24px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes run { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 72px 0 0; }
.center { text-align: center; }
.center .sub { margin: 16px auto 0; }

/* The film */
.film { display: grid; gap: 36px; align-items: center; margin-top: 44px; }
@media (min-width: 900px) { .film { grid-template-columns: 1fr 300px 1fr; gap: 48px; } }
.film .phone { width: min(300px, 74vw); justify-self: center; }
.beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.beats li { display: grid; gap: 4px; }
.beats b { font-size: 1.05rem; }
.beats span { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) { .beats.right { text-align: left; } .beats.left { text-align: right; } }

/* Numbered features */
.feature { display: grid; gap: 36px; align-items: center; padding: 104px 0 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .feature.flip .scene { order: -1; }
}
.feature .num { display: block; font: 800 5.5rem/0.8 var(--font); letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.6px rgba(255, 94, 77, 0.55); margin-bottom: 18px; }
.feature h2 { margin-bottom: 16px; }
.feature .scene { min-height: 520px; }
.feature .scene::before { content: ""; position: absolute; inset: 6% 8%; border-radius: 40px; background: var(--warm); z-index: 0; }
.feature.blue .scene::before { background: #E9ECFF; }
.feature.green .scene::before { background: #E3F5EC; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.ticks svg { width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--coral); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* How it works: three tiles, the words on top and the app's screen rising from the bottom. */
.how-row { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 900px) { .how-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile.how { min-height: 600px; padding-bottom: 0; }
.tile.how h3 { font-size: 1.7rem; line-height: 1.1; -webkit-text-stroke: 0.035em currentColor; }
.tile.how .ticks { margin-top: 14px; gap: 6px; font-size: 0.93rem; }
.tile.how .phone.rise { position: absolute; left: 50%; top: 52%; width: 70%; transform: translateX(-50%) rotate(-3deg); }
.tile.how:nth-child(2) .phone.rise { transform: translateX(-50%) rotate(2deg); }
/* The tints are the app's own light backgrounds, amber, sky, lavender, fuchsia and rose,
   at 12% on white (amber, nearest the cream paper, at 20%) rather than the app's 5%. */
.tile.blue { background: #E2EBFD; }
.tile.green { background: #EBE2FD; }
@media (max-width: 899px) { .tile.how { min-height: 640px; } .tile.how .phone.rise { width: min(62%, 280px); top: 48%; } }

/* Inhabitants, on a dark band: the words and a character's page, then the streak they
   come along, then two of them walking. */
.night { margin-top: 72px; background: radial-gradient(70% 60% at 80% 20%, #2A2E6E 0%, rgba(42, 46, 110, 0) 70%), #14163A; color: #F1F2FF; padding: 48px 0 0; overflow: hidden; }
.night .sub { color: #B9BCE3; }
.kicker.on-dark { color: #9EA3D6; margin-bottom: 12px; }
.night .grid { display: grid; gap: 32px; align-items: center; }
.night .grid > * { min-width: 0; }
@media (min-width: 900px) { .night .grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; } }
.night h2 .hl { color: var(--sun); }
.night .hl path { stroke: var(--sun); }
.character { position: relative; display: grid; place-items: center; }
.character .phone { width: min(250px, 62vw); transform: rotate(3deg); filter: drop-shadow(0 34px 40px rgba(0, 0, 0, 0.55)); }
.dark-chip { background: rgba(255, 255, 255, 0.96); color: var(--text); }

/* The streak: a line from the first day, the stops on it, filled up to the last one met. */
.streak { list-style: none; position: relative; margin: 32px 0 0; padding: 4px 0 0; display: grid; grid-template-columns: repeat(8, minmax(52px, 1fr)); gap: 4px; overflow-x: auto; scrollbar-width: none; }
.streak::before, .streak::after { content: ""; position: absolute; top: 30px; left: 6%; height: 3px; border-radius: 3px; }
.streak::before { right: 6%; background: rgba(255, 255, 255, 0.12); }
.streak::after { width: 13%; background: linear-gradient(90deg, #F6C945, #FF5E4D); box-shadow: 0 0 18px rgba(255, 94, 77, 0.6); }
.stop { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; z-index: 1; }
.disc { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; background: #1E2150; border: 2px dashed rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.45); font-size: 1.2rem; font-weight: 800; }
.met .disc { background: #fff; border: 0; box-shadow: 0 0 0 5px rgba(246, 201, 69, 0.35), 0 14px 30px -10px rgba(0, 0, 0, 0.7); transform: rotate(calc(-6deg + var(--i) * 9deg)); }
.disc img { width: 92%; height: 92%; }
.stop b { font-size: 0.85rem; font-weight: 700; }
.stop small { font-size: 0.72rem; color: #9EA3D6; }
.met small { color: var(--sun); font-weight: 600; }

.walkway { position: relative; height: 104px; margin: 8px 0 32px; border-bottom: 2px solid rgba(255, 255, 255, 0.18); container-type: inline-size; }
/* Two inhabitants walking the line and back, done by the compositor alone: the walk is a
   transform across the line's width, the step a strip of six frames slid along in steps.
   Nothing is laid out or drawn again while they go. */
.walker { position: absolute; left: 0; bottom: -7px; width: 100px; height: 100px; overflow: hidden; will-change: transform; animation: walk var(--period) linear var(--delay) infinite; }
.walker img { width: 600px; max-width: none; height: 100px; filter: invert(1); will-change: transform; animation: step 0.75s steps(6) infinite; }
@keyframes step { to { transform: translateX(-600px); } }
@keyframes walk {
  0% { transform: translateX(0) scaleX(1); }
  49.99% { transform: translateX(calc(100cqw - 100px)) scaleX(1); }
  50% { transform: translateX(calc(100cqw - 100px)) scaleX(-1); }
  100% { transform: translateX(0) scaleX(-1); }
}

/* Bento, as Apple lays it: tiles of different sizes and colors on a tight grid, a small
   kicker, a large claim, and the picture running off the tile's edge. */
.bento { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 268px; }
  .t-year { grid-column: span 2; grid-row: span 2; }
  .t-look { grid-row: span 2; }
  .t-habits, .t-widgets { grid-column: span 2; }
}
.tile { position: relative; overflow: hidden; border-radius: 30px; background: var(--surface); padding: 26px 26px 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-height: 240px; isolation: isolate; }
.tile p { margin: 0; }
.kicker { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.claim { margin-top: 6px !important; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.claim.small { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--muted); }
.claim.small a { color: var(--ink); }
.note { margin-top: 8px !important; color: var(--muted); font-size: 0.97rem; max-width: 22em; }
.huge { font-size: clamp(4.5rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: -0.06em; line-height: 0.9; margin-top: auto !important; }
.huge .small { display: block; margin-top: 8px; font-size: 1rem; letter-spacing: 0; font-weight: 600; color: rgba(255, 255, 255, 0.55); -webkit-text-fill-color: rgba(255, 255, 255, 0.55); }
.grad-warm { background: linear-gradient(120deg, #FF5E4D, #FFA23A 55%, #F6C945); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-cool { background: linear-gradient(110deg, #8F9BFF, #F06FB3 50%, #FFA23A); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(3rem, 6vw, 5rem); }
.tile.dark { background: #15173A; color: #F1F2FF; }
.tile.dark .kicker { color: #9EA3D6; }
.tile.warm { background: #FCEFD0; }
.tile.lilac { background: #FDE2FA; }
.tile.mint { background: #FDE2E7; }

.t-year .dots { margin-top: 20px; display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 600px) { .t-year .dots { grid-template-columns: repeat(24, minmax(0, 1fr)); } }
.t-year .dots i { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.1); transform: scale(0.55); transition: background 0.3s, transform 0.3s, box-shadow 0.3s; }
.t-year .dots i.on { transform: scale(1); }
.t-year .dots i.today { outline: 2px solid #fff; outline-offset: 2px; }
.t-year .huge { padding-top: 16px; }

.t-count .huge { margin-top: 10px !important; }
.t-count .claim.small { margin-top: 10px !important; max-width: 12em; }
.peekers { position: absolute; right: -14px; bottom: -26px; display: flex; z-index: -1; }
.peekers img, .peekers span { width: 112px; height: 112px; margin-left: -34px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.peekers img:nth-child(1) { transform: rotate(-10deg); }
.peekers img:nth-child(2) { transform: rotate(6deg) translateY(-14px); }
.peekers span { display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--muted); border: 2px dashed rgba(23, 24, 29, 0.15); background: #FFFCF4; transform: rotate(8deg); }

.t-zero .zero-icon { width: 54px; height: 54px; padding: 5px; margin: 6px 0 10px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#sticker-sm); }
.t-zero .claim { font-size: 1.7rem; line-height: 1.1; }
.t-zero .note { margin-top: 10px !important; }
.t-zero .note a { color: var(--ink); }

.t-look .phone.rise { position: absolute; left: 50%; top: 40%; width: 92%; transform: translateX(-50%) rotate(-4deg); }

.t-habits .habit { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.habit-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.85); }
.habit-row svg { width: 30px; height: 30px; fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.habit-row b { font-weight: 600; }
.habit-row small { display: block; color: var(--muted); font-size: 0.82rem; }
.habit-row .count { font: 700 0.95rem/1 var(--mono); color: var(--muted); }
.habit-row.done .count { color: #3FB27F; }
.slip { justify-self: end; padding: 3px 10px 4px; border-radius: 8px; background: #fff; color: #C8463D; font-weight: 700; font-size: 0.85rem; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, 0.2); transform: rotate(-4deg); }

.t-widgets .note { max-width: 15em; }
/* Two of the widgets, drawn as they look now: the pen's figures over dots. */
.homescreen { margin-top: auto; padding-top: 16px; display: flex; gap: 14px; align-items: flex-end; justify-content: center; }
.w-small, .w-medium { background: #F7F5EF; border-radius: 22px; box-shadow: var(--shadow); padding: 14px; font-family: "Pangolin", var(--font); color: var(--ink); }
.w-small { width: 150px; height: 150px; display: flex; flex-direction: column; transform: rotate(-3deg); }
.w-medium { width: 300px; height: 150px; display: flex; flex-direction: column; transform: rotate(2deg); }
.w-head { display: flex; align-items: baseline; gap: 4px; }
.w-head b { font-size: 1.5rem; font-weight: 400; line-height: 1; }
.w-head span { font-size: 0.8rem; color: rgba(43, 58, 201, 0.5); }
.w-head em { margin-left: auto; font-style: normal; font-size: 1rem; }
.w-month { margin-top: 8px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 6px; justify-items: center; }
.w-month i { width: 7px; height: 7px; border-radius: 50%; background: rgba(43, 58, 201, 0.15); }
.w-month i.past { background: #3FB27F; }
.w-month i.past:nth-child(3n) { background: #4AA8F0; }
.w-month i.past:nth-child(4n) { background: #FF5E4D; }
.w-month i.today { outline: 2px solid var(--ink); outline-offset: 1px; background: #F06FB3; }
.w-month i.blank { background: none; }
.w-year { flex: 1; display: grid; grid-template-columns: repeat(37, 1fr); gap: 2px; align-content: start; }
.w-year i { aspect-ratio: 1; border-radius: 50%; background: rgba(43, 58, 201, 0.14); }
.w-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 0.85rem; color: rgba(43, 58, 201, 0.55); }
.w-foot b { font-weight: 400; color: var(--ink); font-size: 1rem; }
@media (max-width: 600px) { .w-medium { display: none; } }
@media (max-width: 899px) {
  .t-look { min-height: 520px; }
  .t-widgets { min-height: 380px; }
}

/* Plus, as a bento too: a large tile saying what it is, and a tile for each thing it adds. */
.plus-bento { display: grid; gap: 16px; margin-top: 72px; }
@media (min-width: 900px) {
  .plus-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 112px; }
  .t-plus { grid-column: span 2; grid-row: span 4; }
}
.t-plus { background: linear-gradient(140deg, #FFE7A1 0%, #FFC9A8 55%, #FFB3B8 100%); justify-content: flex-end; }
.t-plus h2 { margin-top: 8px; font-size: clamp(2.4rem, 4.6vw, 3.8rem); }
.t-plus .kicker { color: #6B4A2E; }
.t-plus .note { color: #5A4636; max-width: 26em; margin-top: 14px !important; font-size: 1.05rem; }
.crown { position: absolute; top: 28px; right: 28px; width: 92px; height: 92px; fill: #F6C945; stroke: #17181D; stroke-width: 1.2; stroke-linejoin: round; transform: rotate(10deg); animation: bob 6s ease-in-out infinite; --r: 10deg; }
/* A perk: its sticker beside two lines. */
.perk { min-height: 0; padding: 18px 20px; display: grid; grid-template-columns: 62px minmax(0, 1fr); column-gap: 14px; align-content: center; align-items: center; }
.perk .perk-icon { grid-row: span 2; }
.perk .claim { margin: 0 !important; font-size: 1.25rem; align-self: end; }
.perk .note { margin: 2px 0 0 !important; font-size: 0.92rem; align-self: start; }
.perk-icon { width: 58px; height: 58px; padding: 5px; overflow: visible; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Closing: a last tile with the app's icon, the call and the badge, doodles round it. */
.closing { position: relative; margin: 72px 0 64px; padding: 56px 24px 52px; text-align: center; border-radius: 40px; overflow: hidden;
  background: radial-gradient(90% 120% at 50% 0%, #FFF3CC 0%, #FFE39A 60%, #FFD27A 100%); box-shadow: var(--shadow-sm); }
.closing h2 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.closing .sub { margin: 16px auto 30px; color: #5A4A2C; }
.app-icon { display: inline-grid; place-items: center; width: 92px; height: 92px; margin-bottom: 20px; border-radius: 26px; background: var(--sun); box-shadow: 0 0 0 6px #fff, var(--shadow); transform: rotate(-6deg); }
.app-icon svg { width: 68px; height: 68px; }
@media (max-width: 700px) { .closing .float { display: none; } }

/* Text pages */
.page { max-width: 42em; padding: 32px 0 96px; }
.page h1 { font-size: clamp(2.6rem, 7vw, 3.6rem); margin-bottom: 10px; }
.page .meta { color: var(--muted); margin: 0 0 40px; }
.page h2 { margin: 44px 0 10px; font-size: clamp(1.5rem, 3.4vw, 1.9rem); }
.page p { margin: 0 0 14px; }
.page a { color: var(--ink); }

/* Footer: no card of its own, just the paper under a hairline: a white band
   across the page: a row of links with their doodles, and the signature under it. */
.foot { position: relative; isolation: isolate; margin: 8px 0 0; padding: 26px 0 24px; color: var(--muted); }
/* The band runs the page's width: white paper with the app's crumpled sheet over it. */
.foot::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; background: url(img/paper_crumpled.webp) 0 0 / 384px 384px repeat, #FFFFFF; box-shadow: 0 -1px 0 var(--line); }
.foot-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.foot-col { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-col a { display: inline-flex; align-items: center; gap: 7px; width: fit-content; text-decoration: none; font-size: 0.97rem; font-weight: 500; color: var(--text); transition: color 0.2s ease, transform 0.2s ease; }
.foot-col a:hover { color: var(--text); transform: translateY(-2px); }
.foot-col svg { width: 22px; height: 22px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.heart { width: 1.05em; height: 1em; vertical-align: -0.15em; fill: var(--coral); stroke: var(--coral); stroke-width: 1.5; stroke-linejoin: round; transform: rotate(-8deg); }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(23, 24, 29, 0.1); font-size: 0.88rem; color: var(--muted); }

/* Coming into view, one after another. Hidden only once [js] on <html> proves app.js is
   actually running (set by an inline script in <head>) — so a blocked or broken script
   never leaves this content stuck invisible. */
.reveal { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal { opacity: 0; transform: translateY(32px); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal { opacity: 1; transform: none; transition: none; }
  .float, .ribbon .track, .store::before, .phone.tilt, .scene:has(.tilt)::before { animation: none; }
  .walker, .walker img { animation-play-state: paused; }
  .hl path { animation: none; stroke-dashoffset: 0; }
}

/* Headings, claims and big figures written with the app's pen. */
h1, h2, h3, .claim:not(.small), .huge, .feature .num, .stop b, .tags li, .chip { font-family: var(--pen); font-weight: 400; letter-spacing: -0.01em; }
h1 { line-height: 1.02; }
h2 { line-height: 1.06; }
.feature .num { -webkit-text-stroke-width: 1.4px; }
.huge { letter-spacing: -0.03em; }
/* The pen has one weight: a hairline of its own ink gives the large lines their body. */
h1, h2, .claim:not(.small), .huge { -webkit-text-stroke: 0.035em currentColor; paint-order: stroke fill; }
.grad-warm, .grad-cool { -webkit-text-stroke: 0; }

/* What's new: a release a section, its big things as tiles with a sticker, the rest as ticked lists. */
.changelog { max-width: 56em; }
.release { padding: 8px 0 40px; border-bottom: 1px dashed rgba(23, 24, 29, 0.14); margin-bottom: 40px; }
.release:last-child { border-bottom: 0; }
.rel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 22px; }
.rel-head h2 { margin: 0 !important; font-size: clamp(2.4rem, 6vw, 3.2rem) !important; }
.rel-head .when { color: var(--muted); font-size: 0.95rem; }
.highlights { display: grid; gap: 16px; margin-bottom: 28px; }
@media (min-width: 720px) { .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile.hi { min-height: 0; padding: 24px 24px 26px; }
.tile.hi .sticker { width: 56px; height: 56px; padding: 5px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#sticker-sm); margin-bottom: 12px; }
.tile.hi h3 { font-size: 1.6rem; line-height: 1.1; margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tile.hi p { color: #3C3D48; font-size: 0.98rem; line-height: 1.5; }
.tile.hi .tag { font: 600 0.75rem/1 var(--font); letter-spacing: 0; padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); color: #3C3D48; }
.tile.hi.mint { background: #DDF3EA; }
.changelog h3.kind { margin: 26px 0 4px; font-size: 1.35rem; }
.changelog .ticks { margin-top: 8px; gap: 8px; }
.changelog .first { font-size: 1.1rem; }
a.pill { text-decoration: none; color: var(--text); transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
a.pill b { color: var(--coral); font-weight: 700; }

/* The inhabitants' band, short: the words beside the streak, the walkers under them. */
.night { padding-top: 40px; }
.night .grid { align-items: end; }
.night .streak-wrap { padding-top: 40px; }

/* The closing, a slim strip: the icon, a line and the button in one row. */
.closing { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 28px; margin: 56px 0 48px; padding: 26px 32px; text-align: left; border-radius: 28px; }
.closing h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.closing .app-icon { width: 60px; height: 60px; margin: 0; border-radius: 17px; box-shadow: 0 0 0 4px #fff, var(--shadow-sm); }
.closing .app-icon svg { width: 44px; height: 44px; }
@media (max-width: 600px) { .closing { flex-direction: column; text-align: center; } }

/* The inhabitants on the page's own paper, not a dark band: ink lines, white discs, the
   walkers drawn black as they are. */
.night { margin-top: 40px; padding-top: 24px; background: none; color: var(--text); overflow: visible; }
.night .sub { color: var(--muted); }
.kicker.on-dark { color: var(--muted); }
.night h2 .hl { color: var(--coral); }
.night .hl path { stroke: var(--coral); }
.night .scribble.sun { color: var(--coral); }
.night .scribble.sun svg path { stroke: var(--coral); }
.night .streak::before { background: rgba(23, 24, 29, 0.1); }
.night .streak::after { box-shadow: none; }
.night .disc { background: var(--surface); border-color: rgba(23, 24, 29, 0.18); color: rgba(23, 24, 29, 0.35); }
.night .met .disc { box-shadow: 0 0 0 5px rgba(246, 201, 69, 0.4), var(--shadow-sm); }
.night .stop small { color: var(--muted); }
.night .met small { color: var(--coral); }
.night .walkway { border-bottom-color: rgba(23, 24, 29, 0.15); }
.night .walker img { filter: none; }

/* Questions, answered: each a strip of paper that opens on a tap, no script needed. */
.faq-list { display: grid; gap: 12px; max-width: 760px; margin: 28px auto 0; }
.qa { border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.qa summary { position: relative; display: block; padding: 20px 64px 20px 24px; cursor: pointer; list-style: none; font: 400 1.3rem/1.25 var(--pen); }
.qa summary::-webkit-details-marker { display: none; }
.qa-plus { position: absolute; right: 22px; top: 50%; width: 22px; height: 22px; margin-top: -11px; }
.qa-plus::before, .qa-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: var(--coral); transition: transform 0.25s ease; }
.qa-plus::after { transform: rotate(90deg); }
.qa[open] .qa-plus::after { transform: rotate(0deg); }
.qa p { margin: 0; padding: 0 24px 22px; color: var(--muted); line-height: 1.55; }
.faq .scribbled { text-align: center; }
.faq-more { text-align: center; color: var(--muted); margin-top: 22px; }
.faq-more a { color: var(--ink); }

/* The pen's notes write themselves: the arrow drawn, then the words, as each comes into view. */
.js .scribble.ink-wait svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .scribble.ink-wait span { opacity: 0; }
.js .scribble svg path { transition: stroke-dashoffset 0.6s ease-out; }
.js .scribble span { transition: opacity 0.4s ease 0.45s; }

/* A tap on an inhabitant stops it, and it says something of its own, as in the app. */
.walker { cursor: pointer; pointer-events: auto; }
.walker.talking, .walker.talking img { animation-play-state: paused; }
.say { position: absolute; z-index: 6; padding: 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font: 400 1.2rem/1.1 var(--pen); color: var(--text); white-space: nowrap; transform: translate(-50%, -100%); pointer-events: none; animation: say-in 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.say::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
@keyframes say-in { from { opacity: 0; transform: translate(-50%, -80%) scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .js .scribble.ink-wait svg path { stroke-dashoffset: 0; } .js .scribble.ink-wait span { opacity: 1; } }
.faq .qa { text-align: left; }

/* The streak, even: small discs with room for the met ones' halo, the day under each in
   one row, a name only under those who came. */
.night .streak { grid-template-columns: repeat(8, minmax(46px, 1fr)); grid-template-rows: auto; gap: 6px; padding: 10px 6px 4px; margin: 0 -6px; align-items: start; }
.night .streak::before, .night .streak::after { top: 33px; }
.night .stop { grid-template-rows: 46px 1.3em 1.2em; gap: 6px; }
.night .disc { width: 46px; height: 46px; margin: 0; font-size: 1.05rem; }
.night .met .disc { box-shadow: 0 0 0 4px rgba(246, 201, 69, 0.45), var(--shadow-sm); }
.night .stop b { font-size: 0.9rem; white-space: nowrap; }
.night .met small { font-size: 0.75rem; white-space: nowrap; }
@media (min-width: 900px) { .night .streak { overflow: visible; } }

/* The hero's words, given air: the underline close under its words, the line under the
   title set apart, the three steps side by side as short columns. */
.hero h1 { margin: 22px 0 28px; }
.hero h1 .hl svg { bottom: -0.06em; left: 0; width: 100%; }
.hero .sub { max-width: 30em; font-size: clamp(1.05rem, 1.5vw, 1.18rem); }
@media (min-width: 640px) {
  .hero .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: none; margin-top: 30px; }
  .hero .steps li { grid-template-columns: none; align-items: start; gap: 8px; }
  .hero .steps .sticker { width: 40px; height: 40px; }
  .hero .steps b { font-size: 1.15rem; margin-bottom: 2px; }
  .hero .steps span { font-size: 0.92rem; line-height: 1.4; }
}
