/* aer.app — the app catalogue (#projects) and main-page polish.
 * Tiles keep the site's hard-shadow language; the mini window inside each
 * tile is drawn in that app's own palette (--t-bg, --t-ink, --t-acc, --t-2).
 *
 * Motion contract: every "before" state lives under html.motion, which app.jsx
 * adds only when reduced motion is off. Without it, everything is final.
 * Entrances use backwards fill, so once they finish the element's own
 * transform (hover lifts, sticker tilts) takes over again. */

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-pop: cubic-bezier(.34, 1.56, .64, 1); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.huge, .mega, .footer__big, .kicker { text-wrap: balance; }
.lede { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--gr-black); outline-offset: 3px; }
.footer :focus-visible { outline-color: var(--gr-pink-500); }
#team, #projects, .app-group, .app-tile, .section--member { scroll-margin-top: 80px; }

/* ---------- Entrances ---------- */
.motion .rise:not(.is-in) { opacity: 0; }
.motion .rise.is-in { animation: rise 650ms var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes pop { from { opacity: 0; transform: scale(.55); } }
@keyframes slap { from { opacity: 0; transform: rotate(calc(var(--rot, 0deg) - 10deg)) scale(1.35); } }
@keyframes draw-x { from { transform: scaleX(0); } }

/* ---------- Scroll progress under the nav ---------- */
.nav__progress { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gr-pink-500); transform: scaleX(0); transform-origin: left; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .nav__progress { display: block; animation: progress linear both; animation-timeline: scroll(root block); }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- Hero ---------- */
.hero__stickers { position: absolute; inset: 0; left: 0; right: 0; pointer-events: none; }
.hero__stickers .hero__counter { right: 32px; top: 96px; }
/* Only when the headline breaks onto four lines is there free space beside it. */
@media (max-width: 1400px) { .float-sticker--hero { display: none; } }
@media (max-width: 900px) { .hero__stickers .hero__counter { top: 40px; } }
.hero__live { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #3DDC84; vertical-align: 1px; animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }

.hero__kicker { margin-bottom: 20px; }
.hero__sub { list-style: none; margin: 28px 0 0; padding: 0; }
.pill__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gr-black); flex: 0 0 auto; }
.motion .hero__title .word { animation: word-in 720ms var(--ease-out) backwards; animation-delay: calc(80ms + var(--i, 0) * 70ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(.42em) rotate(3deg); } }
.motion .hero__pinkbar, .motion .hero__yellowbar { animation: slap 560ms var(--ease-pop) backwards; animation-delay: calc(260ms + var(--i, 0) * 70ms); }
.motion .hero__sub.is-in { animation: none; }
.motion .hero__sub.is-in .pill { animation: pop 460ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + var(--i, 0) * 80ms); }

/* ---------- About ---------- */
.values-grid { margin-top: 48px; }
.motion .values-grid.is-in .value { animation: rise 600ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + 140ms + var(--i, 0) * 90ms); }

/* ---------- Cast band ---------- */
.cast { position: relative; overflow: hidden; border-top: 2px solid var(--gr-black); border-bottom: 2px solid var(--gr-black); padding: 52px 0 56px; text-align: center; }
.cast__stack { display: inline-flex; margin-bottom: 18px; }
.cast__av { --side: -1; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gr-black); box-shadow: 4px 4px 0 0 var(--gr-black); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; position: relative; transition: transform 260ms var(--ease-pop); }
.cast__av + .cast__av { margin-left: -8px; }
.cast__av--pink { background: var(--gr-white); }
.cast__av--yellow { background: var(--gr-gold-500); }
@media (hover: hover) { .cast__stack:hover .cast__av { transform: translateX(calc(var(--side) * 8px)) rotate(calc(var(--side) * 8deg)); } }
.motion .cast__stack.is-in { animation: none; }
.motion .cast__stack.is-in .cast__av { animation: meet 760ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + var(--k, 0) * 70ms); }
@keyframes meet { from { opacity: 0; transform: translateX(calc(var(--side) * 56px)) rotate(calc(var(--side) * 14deg)); } }
.cast__lede { margin: 16px auto 0; color: var(--gr-black); text-wrap: balance; }

/* ---------- Member cards ---------- */
.section--member { overflow: hidden; }
@media (max-width: 720px) { .float-sticker--member { display: none; } }
.member-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 28px; grid-template-areas: "av meta" "av name" "av blurb" "av actions"; align-items: start; }
.member-card__av { grid-area: av; background: var(--gr-white); color: var(--gr-black); }
.member-card__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 6px; }
.member-card__fact { --rot: -3deg; font-size: 11px; padding: 6px 12px; }
.member-card__name { grid-area: name; margin-top: 18px; font-size: clamp(40px, 7vw, 88px); }
.member-card__blurb { grid-area: blurb; margin: 16px 0 0; color: inherit; }
.member-card__actions { grid-area: actions; margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.member-card__count { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: inherit; text-decoration: none; }
.member-card__count-text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.member-card__count span[aria-hidden] { display: inline-block; transition: transform 180ms var(--ease-out); }
.member-card__count:hover span[aria-hidden] { transform: translateY(3px); }
.member-card--r { --from: 1; }
.motion .member-card.rise.is-in { animation: card-in 720ms var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
@keyframes card-in { from { opacity: 0; transform: translate(calc(var(--from, -1) * 40px), 24px) rotate(calc(var(--from, -1) * 1.5deg)); } }
.motion .member-card.is-in .member-card__av { animation: pop 620ms var(--ease-pop) backwards, blob 8s ease-in-out infinite; animation-delay: calc(var(--d, 0ms) + 220ms), 0s; }
.motion .member-card.is-in .member-card__fact { animation: slap 520ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + 420ms); }

/* ---------- Footer ---------- */
.footer .btn { box-shadow: 4px 4px 0 0 var(--gr-white); }
@media (hover: hover) { .footer .btn:hover { box-shadow: 2px 2px 0 0 var(--gr-white); } }
.footer .btn:active { box-shadow: none; }
.footer__mark { position: relative; display: inline-block; margin-top: 8px; }
.footer__sticker { top: -6px; right: -84px; }
.footer__lede { margin-top: 24px; color: var(--gr-white); max-width: 60ch; }
.footer__ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.footer__row { margin-top: 56px; padding-top: 18px; border-top: 1.5px dashed rgba(255, 255, 255, 0.28); }
.footer__made { display: inline-flex; align-items: center; gap: 12px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer .avstack__av { border-color: var(--gr-white); --avring: var(--gr-black); }

/* ---------- Nav on phones: keep Projects reachable ---------- */
@media (max-width: 720px) {
  .nav { padding: 6px 20px; }
  .nav__links { gap: 18px; }
  .nav__links a:nth-child(2) { display: inline-flex; }
  .nav__link { display: inline-flex; align-items: center; min-height: 48px; }
  .nav__link::after { bottom: 10px; }
}

/* ---------- Catalogue header ---------- */
.apps-facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.apps-facts li { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; background: var(--gr-white); border: 2px solid var(--gr-black); border-radius: 4px; box-shadow: 3px 3px 0 0 var(--gr-black); font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.apps-facts strong { font-family: var(--font-display); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.motion .apps-facts.is-in { animation: none; }
.motion .apps-facts.is-in li { animation: pop 480ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + var(--k, 0) * 90ms); }
.apps-facts li:nth-child(2) { --k: 1; } .apps-facts li:nth-child(3) { --k: 2; }

/* ---------- Groups ---------- */
.app-group { margin-top: 64px; }
.app-group + .app-group { margin-top: 56px; }
.app-group__head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 26px; }
.app-group__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gr-black); transform-origin: left; }
.app-group__title { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.app-group__bar { --rot: -1deg; display: inline-block; white-space: nowrap; padding: 2px 12px 4px; border: 2px solid var(--gr-black); box-shadow: 4px 4px 0 0 var(--gr-black); transform: rotate(var(--rot)); }
.app-group:nth-of-type(2n) .app-group__bar { --rot: 0.8deg; }
.app-group__count { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; padding-bottom: 4px; }
.app-group__swipe { display: none; }
.app-group__nudge { display: inline-block; }
.motion .app-group__head.is-in::after { animation: draw-x 900ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + 120ms); }
.motion .app-group__head.is-in .app-group__bar { animation: slap 520ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + 80ms); }
.motion .app-group__head.is-in .app-group__nudge { animation: nudge 1.1s ease-in-out 3 backwards; animation-delay: calc(var(--d, 0ms) + 900ms); }
@keyframes nudge { 50% { transform: translateX(5px); } }
.app-dots { display: none; }

.app-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1179px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }

/* ---------- Tile ---------- */
.app-tile { --t-bg: #fff; --t-ink: #000; --t-acc: #000; --t-2: #ddd; position: relative; display: flex; flex-direction: column; background: var(--gr-white); border: 2px solid var(--gr-black); border-radius: 8px; box-shadow: 6px 6px 0 0 var(--gr-black); padding: 10px; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
@media (hover: hover) { .app-tile:hover { transform: translate(-3px, -4px) rotate(-0.4deg); box-shadow: 9px 10px 0 0 var(--gr-black); } }
.app-tile:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 0 var(--gr-black); transition-duration: 70ms; }
.motion .app-tile.rise.is-in { animation: tile-in 660ms var(--ease-out) backwards; animation-delay: var(--d, 0ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(36px) rotate(-1.2deg); } }
.app-tile__body { display: flex; flex-direction: column; flex: 1; padding: 16px 8px 6px; }
.app-tile__title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.app-tile__link { text-decoration: none; color: inherit; }
.app-tile__link::after { content: ""; position: absolute; inset: -2px; border-radius: 8px; z-index: 1; }
.app-tile__link:focus-visible { outline: none; }
.app-tile__link:focus-visible::after { outline: 3px solid var(--gr-black); outline-offset: 5px; }
.app-tile__badge { --rot: 5deg; position: absolute; top: 2px; right: -8px; z-index: 2; transform: rotate(var(--rot)); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border: 2px solid var(--gr-black); background: var(--gr-gold-500); box-shadow: 2px 2px 0 0 var(--gr-black); pointer-events: none; }
.motion .app-tile.is-in .app-tile__badge { animation: slap 480ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + 460ms); }
.app-tile__line { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #2b2b28; flex: 1; text-wrap: pretty; }
.app-tile__meta { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.app-tile__meta li { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 8px; border: 1.5px solid var(--gr-black); border-radius: 999px; background: var(--gr-light-body); }
.app-tile__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 16px; padding-top: 12px; border-top: 1.5px dashed rgba(0, 0, 0, 0.25); }
.app-tile__go { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.app-tile__arrow { display: inline-block; transition: transform 160ms ease; }
@media (hover: hover) { .app-tile:hover .app-tile__arrow { transform: translateX(4px); } }

/* Upstream credit: sits above the tile's stretched link so it stays its own target. */
.app-tile__credit { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 8px 0 -4px; padding: 0 2px; font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0; color: #4a4a45; max-width: 100%; line-height: 1.35; text-decoration: none; }
.app-tile__credit b { font-weight: 700; color: var(--gr-black); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.app-tile__credit:hover b { background: var(--gr-gold-500); }
.app-tile__credit::before { content: ""; width: 12px; height: 12px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--fork) center / contain no-repeat; mask: var(--fork) center / contain no-repeat; --fork: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='4' cy='3' r='1.8'/%3E%3Ccircle cx='12' cy='3' r='1.8'/%3E%3Ccircle cx='8' cy='13' r='1.8'/%3E%3Cpath d='M4 4.8v1.4c0 1.4 1 2.3 2.4 2.3h3.2c1.4 0 2.4-.9 2.4-2.3V4.8M8 8.5v2.7'/%3E%3C/svg%3E"); }
.app-tile__credit:focus-visible { outline-offset: 1px; }
@media (pointer: coarse) { .app-tile__credit { min-height: 44px; margin: 4px 0 -8px; } }

/* Authors: an overlapping avatar stack plus first names. */
.app-tile__by { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.app-tile__names { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.app-tile__body { container-type: inline-size; }
/* Too narrow for names beside "View page": keep the stack, keep the names for screen readers. */
@container (max-width: 220px) { .app-tile__names { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.avstack { display: inline-flex; flex: 0 0 auto; }
.avstack__av { --k: 0; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--gr-black); display: inline-grid; place-items: center; font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: -0.02em; color: var(--gr-black); transition: transform 240ms var(--ease-pop); }
.avstack__av + .avstack__av { margin-left: -9px; }
.avstack__av:not(:last-child) { box-shadow: 0 0 0 2px var(--avring, var(--gr-white)); }
.avstack__av--pink { background: var(--gr-pink-500); }
.avstack__av--yellow { background: var(--gr-gold-500); }
@media (hover: hover) {
  .app-tile:hover .avstack__av, .footer__made:hover .avstack__av { transform: translate(calc(var(--k) * 6px), -2px) rotate(-8deg); }
}
.motion .app-tile.is-in .avstack__av { animation: pop 440ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + 520ms + var(--k) * 100ms); }

/* ---------- Mini app window ---------- */
.app-win { container-type: inline-size; background: var(--t-bg); color: var(--t-ink); border: 1.5px solid var(--gr-black); border-radius: 5px; overflow: hidden; aspect-ratio: 16 / 10; display: flex; flex-direction: column; }
.app-win__bar { display: flex; gap: 0.4em; padding: 0.6em 0.7em; border-bottom: 1px solid color-mix(in srgb, var(--t-ink) 14%, transparent); }
.app-win__bar i { width: 0.6em; height: 0.6em; border-radius: 50%; background: color-mix(in srgb, var(--t-ink) 30%, transparent); }
.app-win__bar, .mini { font-size: calc(100cqw / 24.5); }
.mini { flex: 1; position: relative; display: grid; gap: 0.6em; padding: 0.9em; min-height: 0; }
.mini b, .mini i, .mini span { display: block; }
.mini b { height: 0.5em; border-radius: 0.3em; background: color-mix(in srgb, var(--t-ink) 22%, transparent); }
.mini .m-short { width: 55%; }
.mini .m-h { height: 0.8em; width: 70%; background: color-mix(in srgb, var(--t-ink) 60%, transparent); }

.mini--reader { grid-template-columns: 14% 36% 1fr; }
.m-rail { display: grid; gap: 0.5em; align-content: start; padding-top: 0.2em; }
.m-rail b { height: 0.4em; width: 80%; }
.m-rail--glass { background: color-mix(in srgb, #fff 60%, transparent); border-radius: 0.4em; padding: 0.6em 0.4em; }
.m-list { display: grid; gap: 0.4em; align-content: start; }
.m-row { height: 1.1em; border-radius: 0.3em; background: color-mix(in srgb, var(--t-ink) 9%, transparent); position: relative; }
.m-row--hot::before { content: ""; position: absolute; left: 0.3em; top: 0.3em; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--t-acc); }
.m-row--dim { opacity: 0.45; }
.m-row--av::before { content: ""; position: absolute; left: 0.3em; top: 0.2em; width: 0.7em; height: 0.7em; border-radius: 50%; background: color-mix(in srgb, var(--t-ink) 35%, transparent); }
.m-row--sel { background: var(--t-acc); }
.m-row--sel::before { background: rgba(255, 255, 255, 0.85); }
.m-article { display: grid; gap: 0.5em; align-content: start; padding-top: 0.2em; }
.m-article--sheet { background: #fff; border-radius: 0.4em; padding: 0.6em; box-shadow: 0 1px 0.2em rgba(0, 0, 0, 0.08); }

.mini--quill { grid-template-rows: repeat(4, auto) 1fr; align-content: start; gap: 0.7em; }
.m-turn { display: grid; gap: 0.3em; padding-left: 1em; position: relative; }
.m-turn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.3em; border-radius: 0.2em; background: var(--s); }
.m-slides { display: flex; gap: 0.4em; align-self: end; }
.m-slides b { height: 1.4em; width: 2.4em; border-radius: 0.2em; background: color-mix(in srgb, var(--t-ink) 18%, transparent); }

.mini--accio { grid-template-rows: auto 1fr; }
.m-relay { display: flex; justify-content: space-between; align-items: center; position: relative; padding: 0.4em 0.2em; }
.m-relay::before { content: ""; position: absolute; left: 0.6em; right: 0.6em; top: 50%; height: 1.5px; background: color-mix(in srgb, var(--t-ink) 25%, transparent); transform-origin: left; }
.m-relay i { width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--t-bg); border: 1.5px solid color-mix(in srgb, var(--t-ink) 45%, transparent); position: relative; }
.m-relay i.done { background: var(--t-acc); border-color: var(--t-acc); }
.m-relay i.on { background: var(--t-2); border-color: var(--t-2); box-shadow: 0 0 0 0.3em color-mix(in srgb, var(--t-2) 35%, transparent); }
.m-console { background: #0E0E10; border: 1px solid color-mix(in srgb, var(--t-acc) 30%, transparent); border-radius: 0.4em; padding: 0.7em; display: grid; gap: 0.5em; align-content: start; }
.m-console b { background: var(--t-acc); opacity: 0.75; height: 0.3em; }

.mini--erised { grid-template-columns: 40% 1fr; grid-template-rows: 1fr auto; column-gap: 1em; }
.m-arch { grid-row: 1 / 3; border-radius: 99.9em 99.9em 0.6em 0.6em; background: linear-gradient(180deg, var(--t-2) 0%, #3A4F7A 58%, var(--t-acc) 100%); border: 1.5px solid var(--t-acc); position: relative; overflow: hidden; }
.m-arch span { position: absolute; left: 12%; right: 12%; bottom: 18%; height: 0.2em; background: rgba(241, 231, 208, 0.7); border-radius: 0.2em; }
.m-prose { display: grid; gap: 0.5em; align-content: start; }
.m-choices { display: grid; gap: 0.4em; }
.m-choices b { height: 0.8em; width: 100%; background: transparent; border: 1px solid color-mix(in srgb, var(--t-acc) 70%, transparent); }
.m-choices b:first-child { background: var(--t-acc); }

.mini--cantis { grid-template-rows: 1fr auto; align-items: end; }
.m-wave { display: flex; align-items: center; gap: 0.2em; height: 100%; }
.m-wave i { flex: 1; background: var(--t-acc); border-radius: 0.2em; height: 30%; }
.m-wave i:nth-child(3n) { height: 70%; } .m-wave i:nth-child(4n) { height: 50%; } .m-wave i:nth-child(5n) { height: 90%; } .m-wave i:nth-child(7n) { height: 20%; }
.mini--pjv { grid-template-columns: 22% 1fr; align-items: center; }
.m-mic { width: 1.4em; height: 2.4em; border-radius: 0.7em; border: 1.5px solid var(--t-acc); justify-self: center; }
.m-wave--line { height: 70%; }
.m-wave--line i { opacity: 0.85; }

.mini--subtly { grid-template-rows: 1fr auto; padding: 0.8em; }
.m-frame { background: linear-gradient(160deg, #1B1F2B, #111827); border-radius: 0.3em; position: relative; aspect-ratio: 2.39 / 1; align-self: center; }
.m-cap { position: absolute; left: 24%; right: 24%; bottom: 1em; height: 0.4em !important; background: var(--t-acc) !important; box-shadow: 0 -8px 0 0 var(--t-acc); }
.m-wavebar { height: 0.3em !important; width: 70%; background: var(--t-2) !important; }

.mini--avifors { grid-template-rows: 1fr; }
.m-gantt { display: grid; gap: 0.7em; align-content: center; background-image: linear-gradient(90deg, color-mix(in srgb, var(--t-ink) 10%, transparent) 1px, transparent 1px); background-size: 25% 100%; }
.m-gantt b { height: 0.8em; width: var(--w); margin-left: var(--l); background: var(--c, var(--t-acc)); border-radius: 0.2em; }

.mini--athena { grid-template-columns: 40% 1fr; }
.m-tree { display: grid; gap: 0.5em; align-content: start; }
.m-tree b { width: 70%; } .m-tree .m-ind { margin-left: 1em; width: 55%; } .m-tree .m-ind--2 { margin-left: 2em; width: 45%; }
.m-table { display: grid; gap: 0.4em; align-content: start; }
.m-table b { height: 0.9em; background: color-mix(in srgb, var(--t-ink) 8%, transparent); }
.m-table .m-flag { background: color-mix(in srgb, var(--t-acc) 22%, transparent); box-shadow: inset 0.3em 0 0 var(--t-acc); border-radius: 0.1em; }

.mini--omni { grid-template-columns: 1fr 1.4em 40%; align-items: center; }
.m-board { height: 46%; border-radius: 0.4em; background: #2B2F33; position: relative; }
.m-board i { position: absolute; width: 0.6em; height: 0.6em; border-radius: 1px; background: var(--t-acc); top: 0.6em; left: 0.6em; }
.m-board i + i { left: auto; right: 0.6em; top: auto; bottom: 0.6em; width: 1em; background: #5d6670; }
.m-ble { height: 0.2em; background: var(--t-2); border-radius: 0.2em; }
.m-phone { height: 90%; border: 1.5px solid var(--t-ink); border-radius: 0.6em; padding: 0.8em 0.5em; display: grid; gap: 0.4em; align-content: start; background: #fff; }

.mini--mask { align-content: center; padding: 1.2em 1.6em; }
.mini--mask .m-prose { gap: 0.7em; }
.m-redact { background: #000 !important; height: 0.7em !important; }

/* ---------- Mini demos: play once when the tile arrives, then hold ---------- */
.mini :nth-child(1) { --k: 0; } .mini :nth-child(2) { --k: 1; } .mini :nth-child(3) { --k: 2; } .mini :nth-child(4) { --k: 3; }
.mini :nth-child(5) { --k: 4; } .mini :nth-child(6) { --k: 5; } .mini :nth-child(7) { --k: 6; }
.mini .m-list, .mini .m-article, .mini .m-console, .mini .m-prose, .mini .m-choices, .mini .m-table, .mini .m-ble, .mini .m-phone, .mini .m-slides, .mini .m-wave, .mini .m-wavebar { --k: 0; }
.m-article b, .m-console b, .m-prose b, .m-gantt b, .m-ble, .m-wavebar, .m-redact { transform-origin: left center; }
.motion .app-tile.is-in .mini :is(.m-row, .m-tree b, .m-turn, .m-table b, .m-choices b, .m-phone b, .m-cap, .m-arch) {
  animation: mi-up 520ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + var(--o, 320ms) + var(--k, 0) * var(--step, 90ms));
}
.motion .app-tile.is-in .mini :is(.m-article b, .m-console b, .m-prose b, .m-gantt b, .m-ble, .m-wavebar, .m-redact) {
  animation: draw-x 560ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + var(--o, 320ms) + var(--k, 0) * var(--step, 90ms));
}
.motion .app-tile.is-in .mini :is(.m-relay i, .m-slides b, .m-mic, .m-board), .motion .app-tile.is-in .mini .m-row--hot::before {
  animation: pop 460ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + var(--o, 320ms) + var(--k, 0) * var(--step, 90ms));
}
.motion .app-tile.is-in .mini .m-wave i { animation: mi-grow-y 520ms var(--ease-pop) backwards; animation-delay: calc(var(--d, 0ms) + var(--o, 320ms) + var(--k, 0) * var(--step, 35ms)); }
.motion .app-tile.is-in .mini .m-article--sheet { animation: mi-in-r 600ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + 640ms); }
.motion .app-tile.is-in .mini .m-relay::before { animation: draw-x 900ms var(--ease-out) backwards; animation-delay: calc(var(--d, 0ms) + 300ms); }
/* Per-app timing: what arrives first in each real app. */
.mini .m-article, .mini--erised .m-prose, .mini--athena .m-table { --o: 700ms; }
.mini--hedwig .m-article { --o: 900ms; }
.mini .m-row--hot::before { --o: 760ms; }
.mini--quill .m-turn { --step: 160ms; } .mini--quill .m-slides { --o: 1000ms; }
.mini--accio .m-console { --o: 1000ms; }
.mini--erised .m-arch { --o: 240ms; } .mini--erised .m-choices { --o: 1000ms; }
.mini--cantis .m-prose { --o: 1100ms; }
.mini--pjv .m-mic { --o: 240ms; } .mini--pjv .m-wave { --o: 480ms; --step: 45ms; }
.mini--subtly .m-wavebar { --o: 300ms; } .mini--subtly .m-cap { --o: 900ms; }
.mini--avifors .m-gantt b { --step: 160ms; }
.mini--omni .m-board { --o: 240ms; } .mini--omni .m-ble { --o: 560ms; } .mini--omni .m-phone { --o: 800ms; }
.mini--mask .m-prose > b:not(.m-redact) { animation: none !important; }
.mini--mask .m-redact { --o: 520ms; --step: 260ms; }
@keyframes mi-up { from { opacity: 0; transform: translateY(0.8em); } }
@keyframes mi-in-r { from { opacity: 0; transform: translateX(40%); } }
@keyframes mi-grow-y { from { transform: scaleY(0.08); } }

/* ---------- Tablets: side-by-side tiles, then shorter windows ---------- */
@media (min-width: 980px) and (max-width: 1179px) {
  .app-tile { display: grid; grid-template-columns: 46% minmax(0, 1fr); gap: 6px; align-items: stretch; }
  .app-tile .app-win { aspect-ratio: auto; min-height: 200px; }
  .app-tile__body { padding: 4px 6px 4px 12px; height: 100%; }
  .app-tile__badge { --rot: -4deg; top: -12px; right: auto; left: 14px; }
}
@media (min-width: 641px) and (max-width: 979px) { .app-tile .app-win { aspect-ratio: 16 / 9; } }

/* ---------- Phones ---------- */
@media (max-width: 720px) { .wrap { padding: 0 20px; } }
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 44px 0 60px; }
  .hero__sub { margin-top: 24px; gap: 8px; }
  .hero__cta-row { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .hero__cta-row .btn { justify-content: center; padding-inline: 12px; }
  .hero__cta-row .btn { white-space: normal; text-align: center; }
  .hero__cta-row .btn:first-child { grid-column: 1 / -1; }
  .values-grid { margin-top: 36px; }
  .cast { padding: 40px 0 44px; }
  .cast__av { width: 56px; height: 56px; font-size: 21px; }

  /* Member card: avatar beside role + sticker, then the name full width. */
  .member-card { grid-template-columns: 76px minmax(0, 1fr); column-gap: 16px; grid-template-areas: "av meta" "name name" "blurb blurb" "actions actions"; padding: 22px 20px 16px; }
  .member-card__av { width: 76px; height: 76px; font-size: 32px; }
  .member-card__meta { flex-direction: column; align-items: flex-start; align-self: center; gap: 10px; padding-top: 0; }
  .member-card__meta .kicker { font-size: 12px; letter-spacing: 0.1em; }
  .member-card__fact { font-size: 10.5px; padding: 5px 10px; white-space: normal; text-align: left; text-wrap: balance; max-width: 100%; }
  .member-card__name { margin-top: 22px; }
  .member-card__blurb { margin-top: 12px; }
  .member-card__actions { margin-top: 20px; }
  .member-card__count { flex-basis: 100%; margin-top: 6px; border-top: 1.5px dashed rgba(0, 0, 0, 0.3); padding-top: 4px; }

  /* Catalogue: a three-up stat strip, then each group becomes a swipe row. */
  .apps-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .apps-facts li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; font-size: 11.5px; line-height: 1.3; }
  .apps-facts strong { font-size: 30px; }
  .app-group { margin-top: 48px; }
  .app-group + .app-group { margin-top: 40px; }
  .app-group__head { margin-bottom: 18px; align-items: center; padding-bottom: 14px; }
  .app-group__title { font-size: 24px; }
  .app-group__count { font-size: 11.5px; letter-spacing: 0.08em; }
  .app-group__swipe { display: inline; }
  .app-tile .app-win { aspect-ratio: 16 / 8.5; }
  .app-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; margin: 0 -20px; padding: 2px 20px 14px; scrollbar-width: none; }
  .app-grid::-webkit-scrollbar { display: none; }
  .app-grid { align-items: start; }
  .app-tile { scroll-snap-align: start; box-shadow: 5px 5px 0 0 var(--gr-black); }
  .app-tile:last-child { scroll-snap-align: end; }
  .app-dots { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
  .app-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--gr-black); transition: background-color 200ms, transform 240ms var(--ease-pop); }
  .app-dots i.on { background: var(--gr-black); transform: scale(1.3); }

  .footer { padding: 56px 0 20px; }
  .footer__sticker { right: -58px; top: -34px; }
  .footer__ctas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .footer__ctas .btn { justify-content: center; }
  .footer__row { margin-top: 40px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer__made { align-items: flex-start; }
}

/* ---------- Phones: let the hero headline keep its phrasing ---------- */
@media (max-width: 480px) {
  .hero__title.mega { font-size: 13vw; }
  .pill--extra { display: none; }
}

@media (max-width: 360px) {
  .nav { padding-inline: 16px; gap: 12px; }
  .nav__badge { width: 36px; height: 36px; margin-right: 4px; }
  .nav__links { gap: 12px; }
  .nav__link { font-size: 11px; letter-spacing: 0.04em; }
}

/* ---------- Reduced motion: final states, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track, .float-sticker--anim, .float-sticker--anim2, .avatar-blob, .hero__live { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .app-tile, .app-tile__arrow, .btn, .hero__title .word, .avstack__av, .cast__av, .app-dots i { transition: none !important; }
}

/* Preserve the expressive arrivals; stop background movement when requested. */
.motion-control { display:flex; justify-content:flex-end; padding-block:10px; }
.motion-control button { min-height:36px; padding:6px 12px; color:var(--fg); background:var(--gr-light-body); border:1.5px solid var(--gr-black); border-radius:4px; font:12px/1.4 var(--font-mono); cursor:pointer; }
.motion-control button:disabled { cursor:default; }
html.motion-paused .marquee__track { animation-play-state:paused!important; }
html.motion-paused .float-sticker, html.motion-paused .avatar-blob, html.motion-paused .hero__live { animation:none!important; }
