/**
 * Homepage: hero with the sketch scene and the search prompt, then the overview sections.
 */

.home .nav--clear { margin-bottom: calc(var(--nav-h) * -1); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: max(720px, min(100svh, 940px));
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + var(--s-48)) var(--s-128);
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* blend into the page at the bottom (and softly under the navbar) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 52%, transparent 97%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 52%, transparent 97%);
}
.hero__veil {
  position: absolute;
  inset: 0;
  /* keep the headline readable; the tiles at the edges stay bright */
  background: radial-gradient(ellipse 40% 46% at 50% 48%, var(--bg) 35%, color-mix(in srgb, var(--bg) 72%, transparent) 62%, transparent 100%);
}
.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__content > * { animation: heroIn 1s var(--ease-out) backwards; }
.hero__content > :nth-child(2) { animation-delay: 0.08s; }
.hero__content > :nth-child(3) { animation-delay: 0.16s; }
.hero__content > :nth-child(4) { animation-delay: 0.24s; }
.hero__content > :nth-child(5) { animation-delay: 0.32s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

.hero__title {
  margin: var(--s-32) 0 0;
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.hero__title span { color: var(--muted); }
.hero__sub {
  max-width: 560px;
  margin: var(--s-24) 0 0;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__sub b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.hero__try {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s-8);
  margin-top: var(--s-24);
  font-size: var(--fs-xs);
  color: var(--faint);
}
.hero__try span { margin-right: var(--s-4); font-family: var(--font-mono); font-size: var(--fs-micro); }
.hero__try a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 var(--s-12);
  border-radius: 99px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.hero__try a:hover { color: var(--ink); border-color: var(--line-strong); }

/* ============ Hero tiles ============ */
:root[data-theme='light'] {
  --cell-bg: #fbfbfb;
  --cell-line: #f0f0f0;
  --cell-hi: rgba(10, 10, 10, 0.5);
  --beam: rgba(10, 10, 10, 0.16);
  --beam-glow: rgba(10, 10, 10, 0.06);
}
:root[data-theme='dark'] {
  --cell-bg: #0d0d0d;
  --cell-line: #1a1a1a;
  --cell-hi: rgba(255, 255, 255, 0.55);
  --beam: rgba(255, 255, 255, 0.16);
  --beam-glow: rgba(255, 255, 255, 0.07);
}
.tiles { position: absolute; inset: 0; }
.tiles__field { position: absolute; display: grid; grid-auto-rows: 88px; gap: var(--s-8); }
.cell {
  position: relative;
  border-radius: 12px;
  background: var(--cell-bg);
  border: 1px solid var(--cell-line);
  transition: background 0.6s var(--ease-out), border-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.cell.is-dim { background: transparent; border-color: color-mix(in srgb, var(--cell-line) 50%, transparent); }

/* a corner catching the light */
.cell::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--cell-hi);
  -webkit-mask: radial-gradient(circle at var(--cx, 0) var(--cy, 0), #000, transparent 45%);
  mask: radial-gradient(circle at var(--cx, 0) var(--cy, 0), #000, transparent 45%);
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
  pointer-events: none;
}
.cell[data-corner='tr'] { --cx: 100%; }
.cell[data-corner='bl'] { --cy: 100%; }
.cell[data-corner='br'] { --cx: 100%; --cy: 100%; }
.cell.is-lit::after { opacity: 1; }

/* a tile at work */
.cell.is-active {
  z-index: 2;
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.28), 0 0 0 4px var(--bg);
}
[data-theme='dark'] .cell.is-active { box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 4px var(--bg); }
.cell.is-active::after { opacity: 0.6; --cx: 50%; --cy: 0; }

.cell__beam {
  position: absolute;
  left: var(--s-8); right: var(--s-8);
  bottom: calc(100% + 1px);
  height: 184px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, var(--beam-glow), transparent 70%),
    repeating-linear-gradient(90deg, var(--beam) 0 1px, transparent 1px 4px);
  -webkit-mask: linear-gradient(to top, #000, transparent);
  mask: linear-gradient(to top, #000, transparent);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: bottom;
  transition: opacity 0.9s var(--ease-out), transform 1.2s var(--ease-out);
  pointer-events: none;
}
.cell.is-active .cell__beam { opacity: 1; transform: none; }
.cell.is-done .cell__beam { opacity: 0.45; }

.cell__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.cell__icon svg { width: 40px; height: 40px; overflow: visible; }
.cell__icon .ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cell.is-drawn .cell__icon .ink {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s var(--ease-glide) calc(var(--d, 0) * 120ms);
}
.cell:not(.is-active) .cell__icon { opacity: 0; transition: opacity 0.5s; }

.cell__badge {
  position: absolute;
  top: calc(var(--s-8) * -1); right: calc(var(--s-8) * -1);
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--bg);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s, transform 0.5s var(--ease-spring);
}
.cell__badge svg { width: 16px; height: 16px; }
.cell:not(.is-done) .cell__badge svg { animation: spin 0.9s linear infinite; }
.cell.is-active .cell__badge { opacity: 1; transform: none; transition-delay: 0.3s; }

.cell__cap, .cell__mark {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.cell__cap {
  top: calc(100% + var(--s-16));
  left: var(--s-8);
  display: grid;
  gap: var(--s-4);
  color: var(--faint);
}
.cell__cap b { font-weight: 400; }
.cell__cap span { color: var(--ink-2); }
.cell__mark { top: calc(100% + 72px); right: var(--s-8); color: var(--faint); }
.cell.is-active .cell__cap, .cell.is-active .cell__mark { opacity: 1; transform: none; transition-delay: 0.4s; }

/* ============ Prompt (AI-style search) ============ */
.prompt {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 680px;
  margin-top: var(--s-40);
  text-align: left;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 60px -28px rgba(0, 0, 0, 0.28);
  transition: border-color 0.3s, box-shadow 0.4s var(--ease-out);
}
[data-theme='dark'] .prompt { box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.prompt:focus-within {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--line-strong));
  box-shadow: 0 0 0 5px var(--accent-soft), 0 28px 70px -28px rgba(0, 0, 0, 0.32);
}
.prompt__field {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  padding: var(--s-16) 20px var(--s-8);
}
.prompt__icon { width: 20px; height: 20px; color: var(--faint); flex-shrink: 0; transition: color 0.25s; }
.prompt:focus-within .prompt__icon { color: var(--ink); }
.prompt__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.prompt__input::placeholder { color: var(--faint); }
.prompt__input::-webkit-search-cancel-button { display: none; }
.prompt__kbd { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }
.prompt:focus-within .prompt__kbd { opacity: 0; }

.prompt__results { padding: 0 20px var(--s-8) 52px; animation: fadeUp 0.35s var(--ease-out); }
.prompt__row { display: flex; gap: var(--s-8); overflow-x: auto; padding: var(--s-4) 0; scrollbar-width: none; }
.prompt__row::-webkit-scrollbar { display: none; }
.hit {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  animation: pop 0.35s var(--ease-spring) backwards;
  animation-delay: calc(var(--i) * 22ms);
  transition: transform 0.3s var(--ease-spring), border-color 0.2s, background 0.2s;
}
.hit svg { width: 20px; height: 20px; }
.hit:hover, .hit:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface); }
.prompt__meta { margin: var(--s-4) 0 0; font-size: var(--fs-micro); color: var(--muted); }
.prompt__meta kbd { font-size: 11px; }

.prompt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12) var(--s-12);
}
.prompt__end { display: flex; align-items: center; gap: var(--s-8); }
.prompt__send {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--on-accent);
  background: var(--accent);
  transition: transform 0.3s var(--ease-spring), opacity 0.2s;
}
.prompt__send svg { width: 20px; height: 20px; transition: transform 0.35s var(--ease-spring); }
.prompt__send:hover svg { transform: translateY(-2px); }
.prompt__send:active { transform: scale(0.92); }

/* dropdowns in the prompt bar */
.picker { position: relative; }
.picker__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  height: 36px;
  padding: 0 var(--s-12) 0 var(--s-8);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.picker__btn:hover, .picker__btn[aria-expanded='true'] { border-color: var(--line-strong); background: var(--surface-2); }
.picker__glyph { width: 16px; height: 16px; display: grid; place-items: center; color: var(--ink); }
.picker__glyph svg { width: 16px; height: 16px; }
.picker__chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.3s var(--ease-out); }
.picker__btn[aria-expanded='true'] .picker__chev { transform: rotate(180deg); }
.picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: var(--s-8);
  list-style: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  outline: 0;
  transform-origin: top left;
  animation: menuIn 0.22s var(--ease-out);
}
.picker--end .picker__menu { left: auto; right: 0; transform-origin: top right; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
.picker__opt {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  height: 36px;
  padding: 0 var(--s-8);
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.picker__opt .picker__glyph { color: var(--muted); }
.picker__opt span:nth-child(2) { flex: 1; }
.picker__opt small { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }
.picker__opt[data-active] { background: var(--surface-2); }
.picker__opt[aria-selected='true'] { color: var(--ink); font-weight: 500; }
.picker__opt[aria-selected='true'] .picker__glyph { color: var(--ink); }
.picker__opt[aria-selected='true']::after { content: '✓'; font-size: var(--fs-micro); margin-left: var(--s-4); }

@media (max-width: 560px) {
  .prompt__field { padding: var(--s-16) var(--s-16) var(--s-8); }
  .prompt__input { font-size: 16px; }
  .prompt__kbd { display: none; }
  .prompt__results { padding-left: var(--s-16); }
  .picker__btn { padding: 0 var(--s-8); }
  .picker__label { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  padding-inline: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-32);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat b {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat small { font-size: 0.5em; font-weight: 500; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.stat span { font-size: var(--fs-sm); line-height: 20px; color: var(--muted); }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; margin-inline: var(--gutter); width: auto; }
  .stat { padding: var(--s-24) var(--s-16); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ============ Style showcase ============ */
.showcase__tabs {
  display: flex;
  gap: var(--s-8);
  flex-wrap: wrap;
  margin-bottom: var(--s-16);
}
.showcase__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 var(--s-12) 0 var(--s-8);
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.showcase__tab svg { width: 20px; height: 20px; }
.showcase__tab:hover { color: var(--ink); border-color: var(--line-strong); }
.showcase__tab[aria-selected='true'] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}
.style-card {
  position: relative;
  aspect-ratio: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s-16);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: background 0.3s;
}
.style-card:hover { background: var(--surface-2); }
.style-card__glyph {
  position: relative;
  align-self: center;
  width: clamp(48px, 6vw, 72px);
  aspect-ratio: 1;
}
.style-card__glyph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.style-card__glyph .keys { color: var(--ink); opacity: 0; transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out); transform: scale(0.9); }
.style-card:hover .keys { opacity: 0.35; transform: scale(1.1); }
.style-card__glyph .icon { transition: transform 0.6s var(--ease-out); }
.style-card:hover .icon { transform: scale(1.1); }
.style-card__glyph.swap .icon { animation: glyphSwap 0.55s var(--ease-out); }
@keyframes glyphSwap { from { opacity: 0; transform: scale(0.8); filter: blur(4px); } }
.style-card__top, .style-card__bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.style-card__name { font-size: var(--fs-sm); font-weight: 500; }
.style-card__count { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }
.style-card__desc { font-size: var(--fs-xs); color: var(--muted); }
.style-card__go { font-size: var(--fs-xs); color: var(--faint); transition: transform 0.3s var(--ease-out), color 0.2s; }
.style-card:hover .style-card__go { color: var(--ink); transform: translateX(3px); }
@media (max-width: 860px) { .showcase__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .style-card { aspect-ratio: 0.95; padding: var(--s-12); } .style-card__desc { display: none; } }

/* ============ Bento ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-16);
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  min-height: 336px;
}
.tile--grid { grid-column: span 3; grid-row: span 2; }
.tile--code { grid-column: span 3; }
.tile--tune { grid-column: span 3; }
.tile--motion { grid-column: span 3; }
.tile--search { grid-column: span 3; }
.tile__art {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 176px;
  padding: var(--s-24);
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 16px 16px;
  border-bottom: 1px solid var(--line);
}
.tile__text { padding: var(--s-24); }
.tile h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.02em; }
.tile p { margin: var(--s-8) 0 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); max-width: 440px; }
.tile code { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--ink); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--grid { grid-column: 1 / -1; grid-row: auto; }
  .tile--code, .tile--tune, .tile--motion, .tile--search { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .tile--code, .tile--tune, .tile--motion, .tile--search { grid-column: auto; }
  .tile { min-height: 0; }
}

/* keyline illustration */
.keyart { width: min(100%, 380px); height: auto; overflow: visible; }
.keyart__grid path { stroke: var(--line-strong); stroke-width: 0.05; fill: none; }
.keyart__keys > * { stroke: var(--muted); stroke-width: 0.06; fill: none; stroke-dasharray: 0.3 0.25; }
.keyart__icon { color: var(--ink); }
.keyart__icon > * { stroke-width: 1.25; }
.keyart__dims path { stroke: var(--faint); stroke-width: 0.06; fill: none; }
.keyart__dims text { font-family: var(--font-mono); font-size: 0.9px; fill: var(--muted); text-anchor: middle; }
.tile--grid.is-in .keyart__icon [pathLength] { stroke-dasharray: 1; animation: draw 2.4s var(--ease-glide) both; animation-delay: calc(0.3s + var(--d, 0) * 0.25s); }

/* code sample */
.code {
  width: 100%;
  max-width: 464px;
  margin: 0;
  padding: var(--s-16);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
  box-shadow: var(--shadow-md);
}
.code .t { color: var(--ink); }
.code .a { color: var(--ink-2); }
.code .v { color: var(--muted); }

/* stroke tuner */
.tune { gap: var(--s-24); }
.tune__icons { display: flex; gap: var(--s-16); color: var(--ink); }
.tune__icons svg { width: 40px; height: 40px; transition: stroke-width 0.25s; }
.tune__ctrl {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  width: min(304px, 100%);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.tune__ctrl output { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--ink); min-width: 32px; text-align: right; }
.range {
  --pct: 50%;
  flex: 1;
  height: 24px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--pct), var(--line-strong) var(--pct)); }
.range::-moz-range-track { height: 4px; border-radius: 99px; background: var(--line-strong); }
.range::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); box-shadow: var(--shadow-md); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); }

/* animated icons */
.motion { grid-template-columns: repeat(4, 56px); gap: var(--s-16); place-content: center; }
.motion span {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.motion svg { width: 24px; height: 24px; }

/* tag search */
.tagsearch { gap: var(--s-16); align-content: center; }
.tagsearch__q {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  width: min(280px, 100%);
  height: 40px;
  padding: 0 var(--s-12);
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: var(--fs-body);
}
.tagsearch__q svg { width: 16px; height: 16px; color: var(--muted); }
.tagsearch__q i { width: 1.5px; height: 16px; margin-left: calc(var(--s-4) * -1); background: var(--ink); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.tagsearch__hits { display: flex; gap: var(--s-8); min-height: 48px; }
.tagsearch__hits span {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  animation: pop 0.4s var(--ease-spring) backwards;
  animation-delay: calc(var(--i) * 60ms);
}
.tagsearch__hits svg { width: 24px; height: 24px; }

/* ============ Categories ============ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-16);
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
  padding: var(--s-24);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.25s, transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.cat-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card__glyphs { display: flex; gap: var(--s-12); color: var(--ink); }
.cat-card__glyphs svg { width: 24px; height: 24px; transition: transform 0.5s var(--ease-spring); }
.cat-card:hover .cat-card__glyphs svg { transform: translateY(-2px); }
.cat-card:hover .cat-card__glyphs svg:nth-child(2) { transition-delay: 40ms; }
.cat-card:hover .cat-card__glyphs svg:nth-child(3) { transition-delay: 80ms; }
.cat-card:hover .cat-card__glyphs svg:nth-child(4) { transition-delay: 120ms; }
.cat-card__name { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-body); line-height: 24px; font-weight: 500; }
.cat-card__name small { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 400; color: var(--faint); }
@media (max-width: 1000px) { .cats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .cats-grid { grid-template-columns: 1fr 1fr; gap: var(--s-12); }
  .cat-card { min-width: 0; gap: var(--s-16); padding: var(--s-16); }
  .cat-card__glyphs { gap: var(--s-8); }
}

/* ============ Final call to action ============ */
.cta {
  padding-top: clamp(96px, 12vw, 160px); /* the closer gets more air than a regular section */
  text-align: center;
}
.cta__title {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.cta__sub { margin: var(--s-24) 0 0; font-size: var(--fs-lede); color: var(--muted); }
.cta__actions { display: flex; justify-content: center; gap: var(--s-12); flex-wrap: wrap; margin-top: var(--s-40); }
