/* Layout: a kinetic wordmark over the drifting catalogue, a pinned six-chapter feature reel, then the full catalogue as a searchable grid or a draggable wall. */
/* light first; dark follows the system or the toggle */
:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --raise: #eceef3;
  --line: #dcdfe8;
  --fg: #12141d;
  --muted: #5b6074;
  --accent: #f3a21c;      /* signal amber: the lab's indicator light */
  --accent-ink: #9a5a00;
  --on-accent: #1d1204;
  --shadow: rgba(20, 24, 40, .16);
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c12; --surface: #141621; --raise: #1b1e2c; --line: #262a3d; --fg: #eceef6; --muted: #8d92aa;
    --accent: #ffb547; --accent-ink: #ffc46e; --on-accent: #1a1204; --shadow: rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c12; --surface: #141621; --raise: #1b1e2c; --line: #262a3d; --fg: #eceef6; --muted: #8d92aa;
  --accent: #ffb547; --accent-ink: #ffc46e; --on-accent: #1a1204; --shadow: rgba(0, 0, 0, .55); color-scheme: dark;
}

* { box-sizing: border-box; }
.seo-list { columns: 3 220px; }
[hidden] { display: none !important; }
/* no CSS smooth scrolling: it would also smooth the reel's snap, turning it into a slow crawl. Links scroll smoothly via app.js. */
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { padding-inline: var(--gutter); max-width: 1440px; margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 40; padding-top: env(safe-area-inset-top, 0px); pointer-events: none; transition: transform .4s cubic-bezier(.2,.8,.2,1), background .3s, border-color .3s; border-bottom: 1px solid transparent; }
/* once the page has scrolled, the bar gets a surface so nothing shows through it; scrolling down tucks it away */
html.scrolled .bar { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); pointer-events: auto; }
html.bar-hidden .bar { transform: translateY(-100%); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.mark { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 15px/1 var(--display); font-stretch: 120%; letter-spacing: .02em; text-transform: uppercase; }
.lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 18px var(--accent); animation: lamp 2.8s ease-in-out infinite; }
@keyframes lamp { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 10%, transparent), 0 0 26px var(--accent); } }
.bar nav { pointer-events: auto; display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); }
.bar nav a { text-decoration: none; font: 600 13px/1 var(--body); padding: 9px 14px; border-radius: 999px; color: var(--muted); }
.bar nav a:hover { color: var(--fg); background: var(--raise); }
.theme { appearance: none; border: 0; cursor: pointer; width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); color: var(--fg); }
.theme svg { width: 16px; height: 16px; grid-area: 1 / 1; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.theme .sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
html.is-dark .theme .sun { opacity: 1; transform: none; }
html.is-dark .theme .moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 900px); display: grid; align-content: center; padding-block: 120px 72px; overflow: hidden; isolation: isolate; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 48%, transparent 0, var(--bg) 78%); pointer-events: none; }
.word { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .84; letter-spacing: -.01em; font-size: clamp(64px, 17vw, 260px); }
.word span { display: block; font-variation-settings: "wdth" var(--w, 112); }
.word .l2 { color: transparent; -webkit-text-stroke: 2px var(--fg); padding-left: .55em; }
.hero p.lede { margin: 34px 0 0; max-width: 46ch; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); text-wrap: pretty; }
.hero p.lede b { color: var(--fg); font-weight: 600; }
.hero p.lede .slogan { display: block; margin-bottom: 6px; font: 800 clamp(22px, 2.4vw, 30px)/1.1 var(--display); font-stretch: 115%; letter-spacing: -.005em; }
.stats { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.stat { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px); }
.stat b { font: 800 18px/1 var(--display); font-stretch: 115%; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.scrollcue { position: absolute; left: var(--gutter); bottom: 24px; display: flex; align-items: center; gap: 10px; }
.scrollcue i { width: 1px; height: 36px; background: linear-gradient(var(--accent), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- featured reel ---------- */
const SB_ICONS = '<svg viewBox="0 0 18 12" fill="currentColor"><rect x="0" y="8" width="3" height="4" rx="1"/><rect x="5" y="5.5" width="3" height="6.5" rx="1"/><rect x="10" y="3" width="3" height="9" rx="1"/><rect x="15" y="0" width="3" height="12" rx="1"/></svg>' +
  '<svg viewBox="0 0 16 12" fill="currentColor"><path d="M8 2.2c2.4 0 4.6.9 6.3 2.5l1.2-1.3A10.8 10.8 0 0 0 8 .4C5.2.4 2.5 1.5.5 3.4l1.2 1.3A9 9 0 0 1 8 2.2zm0 3.6c1.4 0 2.7.5 3.7 1.4l1.2-1.3A7.4 7.4 0 0 0 8 4c-1.8 0-3.6.7-4.9 1.9l1.2 1.3c1-.9 2.3-1.4 3.7-1.4zM8 9.4l2.2-2.1a3.3 3.3 0 0 0-4.4 0z"/></svg>' +
  '<svg viewBox="0 0 27 12"><rect x=".5" y=".5" width="23" height="11" rx="3.5" fill="none" stroke="currentColor" opacity=".4"/><rect x="2" y="2" width="17" height="8" rx="2" fill="currentColor"/><path d="M25 4v4c.8-.3 1.3-1.1 1.3-2S25.8 4.3 25 4z" fill="currentColor" opacity=".45"/></svg>';
const lum = h => { const n = parseInt(h.slice(1), 16); return (.299 * (n >> 16) + .587 * (n >> 8 & 255) + .114 * (n & 255)) / 255; };
function devices(p, alt = true) {
  const ph = p.phone, bar = ph.bar || "#000", fg = lum(bar) > .6 ? "#000" : "#fff";
  return `<div class="devices">
    <div class="browser"><div class="chrome"><i></i><i></i><i></i><span class="url"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>${esc(host(p.url))}</span></div>
      <img src="${p.desk}" alt="${alt ? esc(p.name) + " website on a laptop" : ""}"></div>
    <div class="iphone${ph.land ? " land" : ""}"><div class="scr${ph.fit === "contain" ? " contain" : ""}" style="--sb:${bar};--sbfg:${fg}">
      <span class="isl"></span><span class="sbar"><b>9:41</b><span>${SB_ICONS}</span></span>
      <img src="${ph.img}" alt="${alt ? esc(p.name) + " on an iPhone" : ""}"></div></div>
  </div>`;
}
.reel { position: relative; overflow-x: clip; }
.reel-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-block: 24px 8px; }
.reel-head h2, .cat-head h2 { margin: 10px 0 0; font: 800 clamp(30px, 4.4vw, 56px)/1 var(--display); font-stretch: 118%; text-transform: uppercase; text-wrap: balance; }
.stage { position: relative; }
.chapter { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding-block: 48px; }
.ch-copy { min-width: 0; }
.ch-no { display: flex; align-items: center; gap: 12px; }
.ch-no .bar-i { width: 46px; height: 2px; background: var(--c); }
.ch-name { margin: 18px 0 0; font: 900 clamp(46px, 6.2vw, 100px)/.9 var(--display); font-stretch: 112%; overflow-wrap: anywhere; text-transform: uppercase; letter-spacing: -.01em; text-wrap: balance; }
.ch-pitch { margin: 22px 0 0; font-size: clamp(18px, 1.7vw, 23px); max-width: 30ch; color: var(--muted); text-wrap: pretty; }
.ch-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.ch-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 700 14px/1 var(--body); padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--fg) 30%, var(--line)); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn svg { width: 16px; height: 16px; }
.domain { margin-top: 16px; color: var(--muted); }
.phone-col { position: relative; display: grid; place-items: center; min-width: 0; }
.glow { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 110%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 34%, transparent), transparent 72%); filter: blur(12px); z-index: 0; pointer-events: none; }

/* a desktop browser window and an iPhone, drawn to their real proportions */
.devices { position: relative; z-index: 1; width: 100%; aspect-ratio: 16 / 11.2; }
.browser { position: absolute; left: 0; top: 0; width: 86%; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 34px 70px -30px var(--shadow); }
.chrome { position: relative; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; background: var(--raise); border-bottom: 1px solid var(--line); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.url { position: absolute; left: 50%; translate: -50% 0; max-width: 60%; display: flex; align-items: center; gap: 6px; height: 20px; padding: 0 12px; border-radius: 6px; background: var(--surface); color: var(--muted); font: 500 11px/1 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url svg { width: 10px; height: 10px; flex: none; }
.browser > img { display: block; width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; }
.iphone { position: absolute; right: 0; bottom: 0; width: 29%; container-type: inline-size; border-radius: 15% / 6.9%; padding: 1.7%; background: #0b0b0d;
  box-shadow: 0 0 0 1px #b4b6bb, 0 0 0 2px #5d5f65, 0 40px 60px -22px var(--shadow), 0 14px 24px -12px var(--shadow); }
.iphone::before, .iphone::after { content: ""; position: absolute; width: 1.4%; border-radius: 2px; background: linear-gradient(90deg, #6d6f75, #a4a6ab); }
.iphone::before { right: -1.6%; top: 26%; height: 12%; }                 /* side button */
.iphone::after { left: -1.6%; top: 21%; height: 7%; box-shadow: 0 9cqw 0 #8a8c91, 0 18cqw 0 #8a8c91; }  /* action + volume */
.scr { position: relative; width: 100%; aspect-ratio: 393 / 852; border-radius: 13.6% / 6.3%; overflow: hidden; background: var(--sb, #000); }
.scr img { position: absolute; left: 0; right: 0; bottom: 0; top: 6.3%; width: 100%; height: 93.7%; object-fit: cover; object-position: top; }
.scr.contain img { object-fit: contain; object-position: top; }
.isl { position: absolute; z-index: 3; left: 50%; top: 1.45%; translate: -50% 0; width: 33%; height: 3.9%; border-radius: 99px; background: #000; }
.sbar { position: absolute; z-index: 2; inset: 0 0 auto 0; height: 6.3%; display: flex; align-items: center; justify-content: space-between; padding: 0 8.5% 0 11%; color: var(--sbfg, #000); font: 600 4.1cqw/1 -apple-system, "SF Pro Text", var(--body); letter-spacing: -.01em; }
.sbar span { display: flex; gap: 1.6cqw; align-items: center; }
.sbar svg { height: 3.4cqw; width: auto; }
/* landscape (games): the phone turns on its side and the game fills the glass */
.iphone.land { width: 52%; border-radius: 6.9% / 15%; padding: .8%; right: 2%; bottom: 0; }
.iphone.land::before { right: auto; left: 26%; top: -3.4%; width: 12%; height: 2.2%; }
.iphone.land::after { display: none; }
.iphone.land .scr { aspect-ratio: 852 / 393; border-radius: 6.3% / 13.6%; }
.iphone.land .scr img { top: 0; height: 100%; }
.iphone.land .isl { left: 1.6%; top: 50%; translate: 0 -50%; width: 3.9%; height: 33%; }
.iphone.land .sbar { display: none; }
.src { position: absolute; left: 0; bottom: -2px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font: 600 12px/1 var(--body); border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.chip svg { width: 13px; height: 13px; }
.rail { display: none; }
.reel.pinned .stage { height: 100svh; }
.reel.pinned .chapter { position: absolute; inset: 0 var(--gutter); padding-block: 90px 70px; }
.reel.pinned .chapter .phone-col { visibility: hidden; }
.reel.pinned .dev-fixed { display: grid; }
.dev-fixed { display: none; position: absolute; top: 0; bottom: 0; right: var(--gutter); width: calc((100% - 2 * var(--gutter) - clamp(24px, 5vw, 80px)) * .53); place-items: center; pointer-events: none; }
.dev-fixed .devices { position: absolute; width: 100%; top: 50%; translate: 0 -50%; }
.dev-fixed .glow { width: 90%; }
.reel.pinned .rail { display: flex; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px; gap: 6px; z-index: 5; }
.rail button { flex: 1; min-width: 0; appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px 0 0; text-align: left; font: 600 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.rail button::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--line); }
.rail button i { position: absolute; top: 0; left: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--fg); }
.rail button.on { color: var(--fg); }

/* ---------- catalogue ---------- */
.catalogue { padding-block: 96px 40px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.tools { position: relative; z-index: 30; margin-top: 26px; padding-block: 12px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tools-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* the compact bar floats in once the full filters have scrolled away; it never changes the page's layout */
.mini { position: fixed; z-index: 35; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 65px); padding: 8px var(--gutter); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s, top .4s cubic-bezier(.2,.8,.2,1); }
.mini.show { transform: none; opacity: 1; pointer-events: auto; }
html.bar-hidden .mini { top: env(safe-area-inset-top, 0px); }
.mini-row { display: flex; gap: 10px; max-width: 1344px; margin-inline: auto; }
.mini .search { flex: 1 1 auto; }
.mini .search input { height: 42px; }
.sum { appearance: none; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 13px/1 var(--body); max-width: 50vw; }
.sum[aria-expanded="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.sum span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum svg { width: 16px; height: 16px; flex: none; }
.panel { max-width: 1344px; margin: 10px auto 2px; display: grid; gap: 10px; max-height: 60svh; overflow: auto; }
.panel .seg { width: fit-content; }
.panel .cats { margin-top: 0; flex-wrap: wrap; overflow: visible; }
.search { position: relative; flex: 1 1 280px; min-width: 0; }
.search input { width: 100%; height: 50px; padding: 0 52px 0 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 500 16px/1 var(--body); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.search kbd { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font: 600 12px/1 var(--mono); padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line); color: var(--muted); background: var(--raise); }
.seg { min-width: 0; display: flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { appearance: none; border: 0; cursor: pointer; white-space: nowrap; font: 600 13px/1 var(--body); color: var(--muted); background: none; padding: 11px 13px; border-radius: 10px; display: inline-flex; gap: 7px; align-items: center; }
.seg button em { font: 600 11px/1 var(--mono); font-style: normal; opacity: .7; font-variant-numeric: tabular-nums; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.cats { margin-top: 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cats::-webkit-scrollbar { display: none; }
.cats button { appearance: none; cursor: pointer; flex: none; font: 600 13px/1 var(--body); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.cats button:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, var(--line)); }
.cats button[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.status { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.status button { appearance: none; border: 0; background: none; color: var(--accent-ink); font: 600 12px/1 var(--mono); cursor: pointer; padding: 0; }

.grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 14px; }
.card { --c: var(--accent); position: relative; min-width: 0; text-align: left; appearance: none; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transform-style: preserve-3d; transition: border-color .25s, box-shadow .25s; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--c) 70%, transparent); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: -44px; position: relative; }
.card .cno { padding-bottom: 4px; }
.banner { display: block; margin: -18px -18px 0; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--raise); border-bottom: 1px solid var(--line); }
.banner img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.card:hover .banner img { transform: scale(1.05); }
.gen { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 18px;
  background: radial-gradient(120% 140% at 15% 0%, color-mix(in srgb, var(--c) 55%, #fff) 0, var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000) 100%); overflow: hidden; }
.gen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 0) 0 0 / 14px 14px; }
.gen .icon { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.25); }
.gen b { position: relative; z-index: 1; color: #fff; font: 800 19px/1.05 var(--display); font-stretch: 112%; text-shadow: 0 1px 10px rgba(0,0,0,.25); max-width: 60%; }
.card-top .icon { box-shadow: 0 0 0 3px var(--surface), 0 8px 18px -10px color-mix(in srgb, var(--c) 80%, transparent); }
.icon { width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--c) 85%, #000); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--c) 80%, transparent), inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.icon img { width: 100%; height: 100%; object-fit: cover; }
.icon .mono-mark { font: 800 21px/1 var(--display); font-stretch: 110%; color: #fff; text-transform: uppercase; letter-spacing: -.02em; text-shadow: 0 1px 0 rgba(0,0,0,.2); }
.card:hover .card-top .icon { transform: translateZ(30px) scale(1.06) rotate(-3deg); }
.cno { color: var(--muted); text-align: right; line-height: 1.4; }
.card h3 { margin: 0; font: 800 21px/1.05 var(--display); font-stretch: 112%; letter-spacing: -.005em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; flex: 1; }
.card-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.card mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; }
.empty { margin-top: 30px; padding: 48px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty b { color: var(--fg); }

/* wall */
.wall { margin-top: 18px; position: relative; height: min(72svh, 720px); border-radius: 24px; border: 1px solid var(--line); background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--fg) 12%, transparent) 1px, transparent 0) 0 0 / 28px 28px, var(--surface); overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.wall.drag { cursor: grabbing; }
.plane { position: absolute; left: 0; top: 0; will-change: transform; }
.tile { --c: var(--accent); position: absolute; width: 132px; display: grid; justify-items: center; gap: 10px; text-align: center; appearance: none; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font: inherit; transform-origin: 50% 40%; transition: opacity .35s, filter .35s; }
.tile .icon { width: 84px; height: 84px; border-radius: 22px; }
.tile .icon .mono-mark { font-size: 30px; }
.tile span { font: 700 13px/1.15 var(--body); max-width: 130px; }
.tile.dim { opacity: .12; filter: grayscale(1); pointer-events: none; }
.wall-hint { position: absolute; left: 16px; bottom: 14px; pointer-events: none; color: var(--muted); }

/* detail sheet */
.sheet-back { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-back.open { opacity: 1; pointer-events: auto; }
.sheet { --c: var(--accent); position: fixed; z-index: 61; left: 50%; top: 50%; translate: -50% -50%; width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto; padding: 28px; border-radius: 26px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 50px 120px -40px rgba(0,0,0,.7); }
.sheet[hidden] { display: none; }
.sheet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 180px; background: radial-gradient(80% 100% at 20% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); pointer-events: none; border-radius: 26px 26px 0 0; }
.sheet .icon { width: 96px; height: 96px; border-radius: 24px; position: relative; }
.sheet-og { display: block; width: calc(100% + 56px); margin: -28px -28px 0; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--line); }
.sheet-og + .icon { margin-top: -48px; box-shadow: 0 0 0 4px var(--surface); }
.sheet .icon .mono-mark { font-size: 36px; }
.sheet h3 { position: relative; margin: 20px 0 0; font: 900 clamp(34px, 6vw, 52px)/.95 var(--display); font-stretch: 122%; text-transform: uppercase; text-wrap: balance; }
.sheet p { position: relative; margin: 14px 0 0; font-size: 18px; color: var(--muted); }
.sheet .facts { position: relative; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sheet .facts div { background: var(--raise); padding: 12px 14px; min-width: 0; }
.sheet .facts dt { font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sheet .facts dd { margin: 7px 0 0; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.sheet .ch-links { position: relative; }
.sheet .close { position: absolute; right: 14px; top: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--raise); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.sheet .close svg { width: 16px; height: 16px; }

footer { padding-block: 70px 50px; margin-top: 60px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; color: var(--muted); }
footer .big { font: 900 clamp(40px, 9vw, 120px)/.85 var(--display); font-stretch: 140%; text-transform: uppercase; color: var(--fg); letter-spacing: -.01em; }

@media (max-width: 820px) {
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .reel.pinned .chapter { align-content: start; gap: 22px; padding-block: calc(env(safe-area-inset-top, 0px) + 84px) 64px; }
  .reel.pinned .chapter .phone-col { visibility: visible; }
  .reel.pinned .dev-fixed { display: none; }
  .phone-col .devices { width: 100%; }
  .phone-col .glow { width: 80%; }
  .chrome { height: 20px; gap: 4px; } .chrome i { width: 7px; height: 7px; } .url { height: 14px; font-size: 9px; padding: 0 8px; }
  .ch-name { font-size: clamp(34px, 10vw, 54px); margin-top: 10px; }
  .ch-pitch { margin-top: 8px; font-size: 15px; }
  .ch-meta, .ch-links { margin-top: 14px; }
  .reel.pinned .ch-meta, .reel.pinned .domain { display: none; }
  .reel.pinned .btn { padding: 12px 15px; font-size: 13px; }
  .bar nav a.hide-s { display: none; }
  .word .l2 { -webkit-text-stroke-width: 1.5px; padding-left: .3em; }
}
/* hero entrance: pure CSS so it begins on first paint. "backwards" fill only holds the start frame before it plays,
   so once it finishes the scroll-linked script is free to set the same properties. */
@property --w { syntax: "<number>"; inherits: true; initial-value: 112; }
@keyframes hl-word-1 { from { --w: 60; opacity: 0; transform: translateY(40px); } to { --w: 112; opacity: 1; transform: none; } }
@keyframes hl-word-2 { from { --w: 150; opacity: 0; transform: translateY(40px); } to { --w: 112; opacity: 1; transform: none; } }
@keyframes hl-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.word .l1 { animation: hl-word-1 1.4s cubic-bezier(.16, 1, .3, 1) backwards; }
.word .l2 { animation: hl-word-2 1.6s .1s cubic-bezier(.16, 1, .3, 1) backwards; }
.hero .lede { animation: hl-rise .9s .45s cubic-bezier(.22, 1, .36, 1) backwards; }
.stat { animation: hl-rise .9s cubic-bezier(.22, 1, .36, 1) backwards; }
.stat:nth-child(1) { animation-delay: .51s; } .stat:nth-child(2) { animation-delay: .57s; } .stat:nth-child(3) { animation-delay: .63s; }
.stat:nth-child(4) { animation-delay: .69s; } .stat:nth-child(5) { animation-delay: .75s; }
/* held on the first frame until the page has finished setting up (app.js adds .hero-go), so the main thread is free
   and the whole entrance is seen; the inline script in index.html starts it anyway after 3s if the script never runs */
.word .l1, .word .l2, .hero .lede, .stat { animation-play-state: paused; }
html.hero-go .word .l1, html.hero-go .word .l2, html.hero-go .hero .lede, html.hero-go .stat { animation-play-state: running; }
/* invisible markers at each featured project's resting scroll position; while inside the reel the browser always comes to rest on one of them */
.snap-layer { position: absolute; top: 0; left: 0; width: 1px; height: 0; pointer-events: none; }
.snap-layer i { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; }
html.has-snap { scroll-snap-type: y mandatory; }
/* Lab picks: the owner's favourites */
.pick { position: absolute; z-index: 3; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px 6px 8px; border-radius: 999px; font: 700 11px/1 var(--body); letter-spacing: .02em; color: #1d1204; background: linear-gradient(135deg, #ffd27a, #f3a21c); box-shadow: 0 6px 16px -6px rgba(243, 162, 28, .7), inset 0 0 0 1px rgba(255,255,255,.35); }
.pick svg { width: 12px; height: 12px; }
.sheet-pick { position: relative; top: auto; left: auto; margin-top: 16px; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; }
.pick-chip svg { width: 13px; height: 13px; color: #f3a21c; }
.pick-chip em { font: 600 11px/1 var(--mono); font-style: normal; opacity: .7; }
.cats .pick-chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.pick-chip[aria-pressed="true"] svg { color: #f3a21c; }
.tile span svg { width: 11px; height: 11px; color: #f3a21c; margin-right: 3px; vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- stealth projects: an animated "classified" panel in place of any picture ---------- */
.stealth-art { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; clip-path: inset(0 round var(--sa-r, 0px)); isolation: isolate; background: #07070c; color: #fff; }
.stealth-art.big { --sa-r: 22px; height: auto; aspect-ratio: 16 / 10.5; border-radius: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -30px var(--shadow); }
.sa-swirl { position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: conic-gradient(var(--c), #7c5cff, #00e1ff, #ff3d81, #ffb547, var(--c)); filter: blur(34px); opacity: .85; will-change: transform; animation: sa-spin 9s linear infinite; }
.sa-swirl::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, #07070c 0 38%, transparent 70%); }
.sa-grain { position: absolute; inset: -50%; will-change: transform; opacity: .32; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: sa-grain .5s steps(4) infinite; }
.sa-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 2px, transparent 2px 4px); mix-blend-mode: multiply; }
.sa-beam { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.22) 48%, rgba(255,255,255,.05) 52%, transparent 65%); transform: translateX(-100%); animation: sa-beam 3.6s cubic-bezier(.6,0,.2,1) infinite; }
.sa-redact { position: absolute; left: 9%; right: 9%; bottom: 13%; display: grid; gap: 7px; }
.sa-redact b { display: block; height: 9px; border-radius: 3px; background: rgba(0,0,0,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); animation: sa-flicker 2.6s steps(1) infinite; }
.sa-redact b:nth-child(1) { width: 78%; } .sa-redact b:nth-child(2) { width: 54%; animation-delay: -.9s; } .sa-redact b:nth-child(3) { width: 66%; animation-delay: -1.7s; }
.sa-mark { position: absolute; left: 50%; top: 42%; translate: -50% -50%; display: grid; justify-items: center; gap: 10px; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.sa-mark svg { width: 34px; height: 34px; filter: drop-shadow(0 0 14px rgba(255,255,255,.7)); animation: sa-pulse 2.4s ease-in-out infinite; will-change: transform; }
.sa-mark em { font: 600 11px/1 var(--mono); font-style: normal; letter-spacing: .32em; text-transform: uppercase; padding: 6px 10px 6px 13px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); }
.stealth-art.big .sa-mark svg { width: 56px; height: 56px; }
.stealth-art.big .sa-mark em { font-size: 13px; padding: 8px 14px 8px 18px; }
.stealth-art.big .sa-redact b { height: 13px; }
.card.stealth .banner { background: #07070c; }
.card.stealth:hover .sa-swirl { animation-duration: 3s; }
.stealth-icon { background: #0b0b12 !important; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 24px -4px color-mix(in srgb, var(--c) 70%, transparent) !important; }
.stealth-icon svg { width: 52%; height: 52%; }
.chip svg { flex: none; }
.soon { display: inline-flex; align-items: center; gap: 9px; padding: 13px 18px; border-radius: 999px; font: 700 14px/1 var(--body); color: var(--fg); background: var(--raise); border: 1px dashed color-mix(in srgb, var(--fg) 35%, var(--line)); }
.card-foot .soon { padding: 6px 10px; font-size: 12px; }
.soon i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--accent)) 25%, transparent); animation: lamp 1.6s ease-in-out infinite; }
.sheet-og .stealth-art { aspect-ratio: 1200 / 630; height: auto; }
.banner .stealth-art { --sa-r: 0px; }
.banner .sa-redact { display: none; }
.banner .sa-mark { top: 46%; }
@keyframes sa-spin { to { transform: rotate(360deg); } }
@keyframes sa-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-6%, 4%); } 50% { transform: translate(5%, -3%); } 75% { transform: translate(-3%, -6%); } }
@keyframes sa-beam { 0%, 30% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
@keyframes sa-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .35; } 50% { opacity: 1; } 83% { opacity: .6; } }
@keyframes sa-pulse { 50% { transform: scale(1.1); } }
