/* =========================================================
   Pixelesc — "Make every pixel count"
   The square in the logo is a canvas. Square pixels, a quiet
   grid, one red pixel of emphasis. "esc" is a footnote.
   ========================================================= */
:root {
  --bg: #f6f6f3;
  --card: #ebebe7;
  --card-2: #e1e1dc;
  --ink: #0b0b0b;
  --ink-2: #5c5c58;
  --ink-3: #9a9a95;
  --line: rgba(11, 11, 11, .1);
  --red: #e8352f;
  --paper: #f6f6f3;
  --dark: #0b0b0b;
  --dark-card: #161616;
  --dark-line: rgba(246, 246, 243, .12);
  --sans: "Montserrat", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --cell: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: 88px; }

.mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.red { color: var(--red); }
.braille-text { font-family: system-ui, sans-serif; letter-spacing: .15em; color: var(--red); text-transform: none; }

/* the red pixel — used as a full stop and as a bullet */
.px { display: inline-block; width: 8px; height: 8px; background: var(--red); flex: none; }
.px-dot { display: inline-block; width: .18em; height: .18em; background: var(--red); margin-left: .06em; vertical-align: baseline; }

.skip { position: fixed; left: 16px; top: -60px; z-index: 300; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 99px; font-size: 14px; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper);
  padding: 16px 24px; border-radius: 10px; font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; border: 0; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.btn span { font-size: 16px; line-height: 0; transition: transform .25s; }
.btn:hover { background: var(--red); }
.btn:hover span { transform: translateX(4px); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px rgba(246, 246, 243, .3); }
.btn-ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--paper); }
.btn-ghost.copied { background: var(--red); box-shadow: none; }
.link { display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color .2s; }
.link:hover { color: var(--red); }
.magnetic { will-change: transform; }

/* ---------- Custom cursor: a pixel and a frame ---------- */
.cursor { display: none; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label { cursor: none; }
html.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 150; mix-blend-mode: difference; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid #fff; border-radius: 7px; display: grid; place-items: center; transition: width .3s, height .3s, margin .3s, background .3s, border-radius .3s; }
.cursor.hover .cursor-ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: #fff; border-radius: 12px; }
.cursor.label .cursor-ring { width: 80px; height: 80px; margin: -40px 0 0 -40px; background: #fff; border-radius: 16px; }
.cursor-label { font-family: var(--mono); font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
.cursor.label .cursor-label { opacity: 1; }
.cursor.hidden { opacity: 0; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; z-index: 160; pointer-events: none; }

/* ---------- Paused notice ---------- */
.notice {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 140;
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--paper);
  font-size: 12px; letter-spacing: .04em; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(11, 11, 11, .18);
}
.notice .px { flex: none; width: 7px; height: 7px; background: var(--red); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 12px var(--gutter); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 10px 8px 16px; border-radius: 14px; position: relative; }
.nav-bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(246, 246, 243, .8); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity .3s;
}
.nav.scrolled .nav-bar::before { opacity: 1; }
.logo { display: inline-flex; position: relative; z-index: 2; }
.logo img { height: clamp(48px, 5vw, 64px); width: auto; display: block; transition: height .35s var(--ease); }
.nav.scrolled .logo img { height: 46px; }
.nav-links { display: flex; gap: 28px; align-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.nav-links a { position: relative; }
.nav-links a:not(.nav-cta)::before { content: ""; position: absolute; left: -12px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; background: var(--red); transform: scale(0); transition: transform .25s; }
.nav-links a:not(.nav-cta):hover::before { transform: scale(1); }
.nav-cta { background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 10px; display: inline-flex; gap: 10px; align-items: center; transition: background .2s; }
.nav-cta:hover { background: var(--red); }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; z-index: 2; }
.menu-btn span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--ink); transition: transform .3s; }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: clamp(104px, 15vh, 140px) var(--gutter) clamp(40px, 8vh, 80px);
  /* the canvas grid — cells line up with the JS grid field */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
}
.hero::after { /* fade the grid out toward the edges */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 70% 45%, transparent 30%, var(--bg) 85%);
}
#grid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-inner {
  position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 80px); pointer-events: none; will-change: transform, opacity;
}
.hero-inner a, .hero-inner button { pointer-events: auto; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin-bottom: clamp(18px, 3vh, 32px); }
.eyebrow .px { animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-title { font-size: clamp(48px, min(8.4vw, 15vh), 156px); line-height: .92; font-weight: 800; letter-spacing: -.055em; }
.hero-title .line { display: block; overflow: hidden; padding: .02em 0 .06em; }
.hero-title .line > * { display: inline-block; transform: translateY(110%); animation: rise 1s var(--d, 0s) var(--ease) forwards; }
.hero-title .px-dot { animation: popPx .5s 1.05s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes rise { to { transform: none; } }
@keyframes popPx { from { transform: scale(0); } }

.intro { opacity: 0; transform: translateY(16px); animation: fadeUp .9s var(--d, 0s) var(--ease) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-foot { margin-top: clamp(22px, 4vh, 40px); display: grid; gap: clamp(20px, 3vh, 30px); max-width: 520px; }
.hero-foot p { color: var(--ink-2); font-size: clamp(15px, 2.1vh, 18px); line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* the frame — the logo's square, used as a canvas — with layers stacked around it */
.hero-frame { --size: clamp(240px, min(34vw, 52vh), 460px); display: grid; justify-items: center; gap: 22px; }
.stack { position: relative; width: var(--size); height: var(--size); }
.stack > * { will-change: transform; }
.frame-back { /* the red card underneath, knocked off-axis */
  position: absolute; inset: 0; border-radius: calc(var(--size) * .055); background: var(--red);
  rotate: 7deg; translate: 7% 5%;
}
.frame-grid { /* a ghost grid peeking out behind */
  position: absolute; inset: -14% 22% 30% -16%; border-radius: 12px;
  background-image: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 14px 14px; opacity: .08;
}
.frame {
  position: absolute; inset: 0; padding: calc(var(--size) * .07);
  background: var(--paper); border: calc(var(--size) * .03) solid var(--ink); border-radius: calc(var(--size) * .055);
  cursor: pointer; box-shadow: 0 40px 80px -40px rgba(11, 11, 11, .4);
}
.frame canvas { width: 100%; height: 100%; display: block; transition: transform .4s var(--ease); }
.frame:hover canvas { transform: scale(.97); }
.frame:active canvas { transform: scale(.93); }

.stamp { position: absolute; width: calc(var(--size) * .3); height: auto; left: calc(var(--size) * -.14); top: calc(var(--size) * -.12); z-index: 3; overflow: visible; }
.stamp text { font-family: var(--mono); font-size: 9.6px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; fill: var(--paper); }
.stamp-bg { fill: var(--ink); }
.stamp-px { fill: var(--red); transform-origin: 60px 60px; animation: spinBack 14s linear infinite; }
.stamp text, .stamp-bg { transform-origin: 60px 60px; animation: spin 14s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes spinBack { to { rotate: -360deg; } }

.chip {
  position: absolute; z-index: 4; background: var(--paper); color: var(--ink); border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(11, 11, 11, .45);
}
.chip strong { font-weight: 800; letter-spacing: -.05em; line-height: 1; display: block; }
.chip .mono { font-size: 10px; color: var(--ink-2); }
.chip-rev { right: calc(var(--size) * -.2); bottom: calc(var(--size) * .1); padding: 14px 16px; display: grid; gap: 6px; rotate: 4deg; background: var(--ink); color: var(--paper); }
.chip-rev .mono { color: rgba(246, 246, 243, .6); }
.chip-rev strong { font-size: calc(var(--size) * .1); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 4px; }
.bars i { width: 8px; height: calc(var(--h) * 100%); background: rgba(246, 246, 243, .3); transform-origin: bottom; animation: grow 1s calc(1s + var(--i, 0) * 80ms) var(--ease) both; }
.bars i:last-child { background: var(--red); }
@keyframes grow { from { transform: scaleY(0); } }
.chip-ship { left: calc(var(--size) * -.18); bottom: calc(var(--size) * -.08); padding: 12px 16px 12px 12px; display: flex; align-items: center; gap: 12px; rotate: -5deg; }
.chip-ship strong { font-size: calc(var(--size) * .075); }
.pxs { display: grid; grid-template-columns: repeat(2, 12px); gap: 3px; }
.pxs i { width: 12px; height: 12px; background: var(--ink); }
.pxs i.r { background: var(--red); }

/* collaborators' cursors drifting over the canvas */
.cursors { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.mate { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; will-change: transform; }
.mate svg { width: 18px; height: 18px; fill: var(--red); stroke: var(--paper); stroke-width: 1.2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.mate em { font-style: normal; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: var(--red); color: #fff; padding: 3px 7px; border-radius: 6px 6px 6px 0; margin: 14px 0 0 -4px; white-space: nowrap; }
.mate-ink svg { fill: var(--ink); } .mate-ink em { background: var(--ink); }
.mate-light svg { fill: var(--paper); stroke: var(--ink); } .mate-light em { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.frame-cap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: var(--size); color: var(--ink-2); margin-top: calc(var(--size) * .08); }
.cap-bar { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.cap-bar i { position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; }
.cap-name { color: var(--ink); min-width: 9ch; text-align: right; }

/* ---------- Crossed bands (overlap the hero's bottom edge) ---------- */
.bands { position: relative; z-index: 5; height: clamp(120px, 14vw, 190px); margin-top: clamp(-90px, -7vw, -50px); margin-bottom: clamp(-40px, -3vw, -20px); pointer-events: none; }
.marquee { position: absolute; left: -5vw; right: -5vw; overflow: hidden; padding: 18px 0; pointer-events: auto; }
.band-dark { top: 50%; background: var(--dark); color: var(--paper); rotate: 2.2deg; translate: 0 -30%; }
.band-red { top: 50%; background: var(--red); color: #fff; rotate: -3deg; translate: 0 -70%; box-shadow: 0 20px 40px -20px rgba(11, 11, 11, .45); }
.marquee-track { display: flex; width: max-content; animation: scroll 50s linear infinite; }
.marquee span { font-weight: 700; letter-spacing: -.03em; font-size: clamp(20px, 2.6vw, 36px); padding-right: 40px; display: inline-flex; align-items: center; gap: 40px; white-space: nowrap; }
.marquee span::after { content: ""; width: .32em; height: .32em; background: var(--red); }
.band-red span::after { background: var(--ink); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter); }
.section > :not(.loose) { position: relative; z-index: 1; }
.section[data-n]::before { /* oversized outlined index, sitting behind the title */
  content: attr(data-n); position: absolute; right: calc(var(--gutter) * .5); top: clamp(30px, 5vw, 70px); z-index: 0; pointer-events: none;
  font-weight: 800; font-size: clamp(160px, 30vw, 460px); line-height: .8; letter-spacing: -.07em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(11, 11, 11, .12);
}
.section.dark[data-n]::before { -webkit-text-stroke-color: rgba(246, 246, 243, .14); }
.loose { /* pixels that escaped the canvas, drifting over section edges */
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: var(--red); z-index: 3; pointer-events: none;
  box-shadow: 0 16px 30px -14px rgba(11, 11, 11, .5); rotate: 8deg;
}
.loose-ink { background: var(--ink); rotate: -10deg; }
.section.dark { background: var(--dark); color: var(--paper); }
.label { color: var(--ink-2); margin-bottom: 36px; display: flex; align-items: center; gap: 12px; }
.label::before { content: ""; width: 8px; height: 8px; background: var(--red); }
.dark .label, .contact .label { color: rgba(246, 246, 243, .55); }
.section-title { font-weight: 800; font-size: clamp(40px, 6.4vw, 108px); line-height: .94; letter-spacing: -.05em; margin-bottom: clamp(48px, 7vw, 96px); }

/* Manifesto — with little pixel pictures set into the sentence */
.manifesto-text { font-size: clamp(26px, 3.6vw, 56px); line-height: 1.18; letter-spacing: -.035em; font-weight: 700; max-width: 1240px; }
.muted { color: var(--ink-2); font-weight: 500; }
.words .w { color: rgba(11, 11, 11, .13); transition: color .3s; }
.words .w.lit { color: var(--ink); }
.words .muted .w.lit { color: var(--ink-2); }
.ipx {
  display: inline-block; width: 1.5em; height: .95em; margin: 0 .12em 0 .2em; vertical-align: -.12em;
  border: .07em solid var(--ink); border-radius: .16em; background: var(--paper); padding: .08em .2em; rotate: -4deg;
  box-shadow: .08em .08em 0 var(--red); transition: rotate .4s var(--ease), translate .4s var(--ease);
}
.ipx:nth-of-type(2) { rotate: 5deg; }
.ipx canvas { height: 100%; width: auto; aspect-ratio: 1; display: block; margin: 0 auto; }
.ipx-red { background: var(--red); border-color: var(--red); box-shadow: .08em .08em 0 var(--ink); }
.ipx-ink { background: var(--ink); box-shadow: .08em .08em 0 var(--red); }
.manifesto-text:hover .ipx { rotate: 0deg; translate: 0 -.06em; }

/* Bento stats — each number gets a tiny picture of itself */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(56px, 8vw, 112px); }
.tile {
  background: var(--card); border-radius: var(--radius); padding: 22px; min-height: 240px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px; position: relative; overflow: hidden;
}
.tile-k { color: var(--ink-2); position: relative; z-index: 1; }
.tile-v { font-weight: 800; font-size: clamp(52px, 6vw, 100px); line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; position: relative; z-index: 1; white-space: nowrap; }
.tile-v .unit { color: var(--red); }
.tile-px { --c: 12px; display: grid; grid-template-columns: repeat(auto-fill, var(--c)); gap: 4px; align-content: start; }
.tile-px-sm { --c: 8px; gap: 3px; }
.tile-px-lg { --c: 22px; gap: 5px; }
.tile-px i { width: var(--c); height: var(--c); background: rgba(11, 11, 11, .1); transition: background .3s, transform .4s var(--ease); transition-delay: calc(var(--i) * 25ms); transform: scale(.4); }
.tile.in .tile-px i { background: var(--ink); transform: none; }
.tile.in .tile-px i.r { background: var(--red); }
.tile:hover .tile-px i.r { transform: scale(1.3) rotate(12deg); }

.tile-red { background: var(--red); color: #fff; grid-column: span 2; overflow: visible; }
.tile-red .tile-k { color: rgba(255, 255, 255, .85); }
.tile-red .tile-v .unit { color: var(--ink); }
.tile-chart { position: absolute; right: 22px; bottom: 22px; top: 64px; width: 36%; display: flex; align-items: flex-end; gap: 5px; }
.tile-chart i { flex: 1; height: calc(var(--h) * 100%); background: rgba(255, 255, 255, .28); transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 60ms + .2s); }
.tile-chart i:last-child { background: var(--ink); }
.tile.in .tile-chart i { transform: none; }
.sticker {
  position: absolute; z-index: 3; right: -14px; top: -16px; rotate: 6deg; background: var(--paper); color: var(--ink);
  padding: 9px 13px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -16px rgba(11, 11, 11, .5); white-space: nowrap;
}
.sticker-ink { background: var(--ink); color: var(--paper); right: 10%; top: auto; bottom: -18px; rotate: -4deg; }
.tile-mate { left: 50%; top: 40%; z-index: 3; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { translate: 10px -8px; } }

.tile-dark { background: var(--dark); color: var(--paper); }
.tile-dark .tile-k { color: rgba(246, 246, 243, .55); }
.tile-wide { grid-column: span 3; min-height: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; }
.tile-wide .tile-k { grid-column: 1 / -1; }
.code-tick { height: 84px; overflow: hidden; color: rgba(246, 246, 243, .45); text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 28px;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.code-tick > div { display: flex; flex-direction: column; animation: tick 12s steps(6) infinite; }
.code-tick b { color: var(--red); font-weight: 500; }
.code-tick i { color: var(--paper); font-style: normal; }
.code-tick em { color: #9fd18b; font-style: normal; }
@keyframes tick { to { transform: translateY(-168px); } }

/* Services (dark) — sticky canvas on the left, list on the right */
.services { z-index: 0; }
.svc-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 100px); align-items: start; }
.svc-sticky { position: sticky; top: 120px; display: grid; gap: 22px; justify-items: start; }
.svc-stack { --size: clamp(220px, 26vw, 380px); position: relative; width: var(--size); height: var(--size); }
.svc-back { position: absolute; inset: 0; border-radius: calc(var(--size) * .055); background: var(--red); rotate: -6deg; translate: -5% 4%; transition: rotate .6s var(--ease); }
.svc-frame { position: absolute; inset: 0; background: var(--dark-card); border: calc(var(--size) * .03) solid var(--paper); border-radius: calc(var(--size) * .055); padding: calc(var(--size) * .08); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.svc-frame canvas { width: 100%; height: 100%; display: block; }
.svc-mate { z-index: 3; left: 0; top: 0; transition: transform .7s var(--ease); }
.svc-cap { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; width: clamp(220px, 26vw, 380px); color: rgba(246, 246, 243, .55); }
.svc-cap .cap-bar { background: var(--dark-line); }
.svc-cap #svc-name { color: var(--paper); }

.service-list { border-top: 1px solid var(--dark-line); }
.service {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 8px 24px; align-items: start;
  padding: 30px 0; border-bottom: 1px solid var(--dark-line); position: relative; cursor: default;
  transition: padding .4s var(--ease), color .3s, opacity .4s;
}
.service-list.has-active .service:not(.active) { opacity: .38; }
.service::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1) 0 -24px; background: var(--paper); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; border-radius: 12px 0 0 12px; }
.service:hover { color: var(--ink); padding-inline: 18px; opacity: 1 !important; }
.service:hover::before { transform: scaleY(1); }
.s-num { color: var(--red); font-size: 14px; padding-top: .7em; }
.s-body { display: grid; gap: 12px; }
.service h3 { font-size: clamp(28px, 3.6vw, 54px); letter-spacing: -.045em; line-height: 1; font-weight: 700; }
.service p { opacity: .7; max-width: 520px; font-size: 16px; }
.s-tags { opacity: .5; }
.s-arrow { font-size: 28px; line-height: 1; padding-top: .3em; opacity: 0; transform: translateX(-12px) rotate(-45deg); transition: opacity .3s, transform .4s var(--ease); color: var(--red); }
.service.active .s-arrow, .service:hover .s-arrow { opacity: 1; transform: none; }

/* Process — a fanned deck that goes from blank to full colour */
.deck { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 20px 0 40px; }
/* .step is a still hit area; .step-in is the card that tilts and lifts, so hovering near an edge can't flicker */
.step { position: relative; margin-right: -28px; z-index: var(--z); }
.step:last-child { margin-right: 0; }
.step-in {
  --r: 0deg; height: 100%; padding: 22px; border-radius: 18px; display: flex; flex-direction: column; gap: 16px; min-height: 420px; position: relative;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(11, 11, 11, .45);
  rotate: var(--r); transition: rotate .5s var(--ease), translate .5s var(--ease), box-shadow .5s var(--ease);
}
.s1 { --z: 1; } .s1 .step-in { --r: -3deg; }
.s2 { --z: 2; translate: 0 24px; } .s2 .step-in { --r: 2deg; background: var(--card); }
.s3 { --z: 3; } .s3 .step-in { --r: -2deg; background: var(--ink); color: var(--paper); }
.s4 { --z: 4; translate: 0 24px; } .s4 .step-in { --r: 3deg; background: var(--red); color: #fff; }
.step:hover { z-index: 6; }
.step:hover .step-in { rotate: 0deg; translate: 0 -14px; box-shadow: 0 0 0 1px var(--line), 0 40px 70px -30px rgba(11, 11, 11, .5); }
.step header { display: flex; justify-content: space-between; }
.step:not(:last-child) header { padding-right: 34px; }
.step-n, .step-w { opacity: .55; }
.step h3 { font-weight: 800; font-size: clamp(26px, 2.4vw, 34px); line-height: 1; letter-spacing: -.04em; margin-top: auto; }
.step p { opacity: .72; font-size: 15px; line-height: 1.55; padding-right: 20px; }
.step-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: min(100%, 200px); margin-top: 6px; }
.step-grid i { aspect-ratio: 1; border-radius: 2px; background: rgba(11, 11, 11, .08); transition: background .3s, transform .4s var(--ease); transition-delay: calc(var(--i, 0) * 12ms); }
.s3 .step-grid i { background: rgba(246, 246, 243, .1); }
.s4 .step-grid i { background: rgba(255, 255, 255, .2); }
.step.in .step-grid i.on { background: var(--ink); }
.s3.in .step-grid i.on { background: var(--paper); }
.step.in .step-grid i.r { background: var(--red); }
.s4.in .step-grid i.r { background: #fff; }
.step:hover .step-grid i.r { transform: scale(1.2); }

/* Clients */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 80px); }
.work-head .section-title { margin-bottom: 0; }
.work-lede { max-width: 380px; color: var(--ink-2); }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-flow: dense; gap: 12px; position: relative; }
.client-grid::before {
  content: ""; position: absolute; inset: -40px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 53, 47, .12), transparent 70%);
}
.client-grid:hover::before { opacity: 1; }
.client-grid li { opacity: 0; transform: scale(.94); transition: opacity .6s, transform .6s var(--ease); transition-delay: var(--stagger, 0s); }
.client-grid li.wide { grid-column: span 2; }
.client-grid.in li { opacity: 1; transform: none; }
.client-grid a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: 14px; min-height: 200px; height: 100%; padding: 20px;
  background: var(--card); border-radius: var(--radius); position: relative; transition: background .25s, color .25s, transform .4s var(--ease);
}
.client-grid a:hover { background: var(--ink); color: var(--paper); transform: translateY(-4px) rotate(-1deg); }
.client-grid small { color: var(--ink-3); grid-column: 2; grid-row: 1; text-align: right; }
.client-grid span { grid-column: 1 / -1; grid-row: 3; font-size: 24px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; transition: transform .4s var(--ease); }
.client-grid i { grid-column: 1 / -1; grid-row: 2; align-self: end; font-style: normal; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; color: var(--red); }
.client-grid a:hover i { opacity: 1; transform: none; }
.client-grid a:hover span { transform: translateY(-4px); }
.mono-px { grid-column: 1; grid-row: 1; display: flex; gap: 5px; }
.mono-px > span { display: grid; grid-template-columns: repeat(5, 5px); gap: 1px; }
.mono-px s { width: 5px; height: 5px; background: transparent; text-decoration: none; transition: background .3s, transform .35s var(--ease); }
.mono-px s.on { background: var(--ink); }
.mono-px > span + span s.on { background: var(--red); }
.client-grid a:hover .mono-px s.on { background: var(--paper); }
.client-grid a:hover .mono-px > span + span s.on { background: var(--red); }
.client-grid a:hover .mono-px s.on:nth-child(3n) { transform: translate(2px, -2px); }
.client-grid .wide .mono-px > span { grid-template-columns: repeat(5, 8px); gap: 2px; }
.client-grid .wide .mono-px s { width: 8px; height: 8px; }
.client-grid .wide span { font-size: clamp(28px, 3vw, 40px); }
.client-grid .dark a { background: var(--ink); color: var(--paper); }
.client-grid .dark .mono-px s.on { background: var(--paper); }
.client-grid .dark a:hover { background: var(--red); }
.client-grid .dark a:hover i { color: var(--ink); }
.client-grid .you a { background: var(--red); color: #fff; }
.client-grid .you small { color: rgba(255, 255, 255, .7); }
.client-grid .you i { opacity: 1; transform: none; color: #fff; }
.client-grid .you .mono-px s.on { background: #fff; }
.client-grid .you a:hover { background: var(--ink); }

/* Contact (dark) */
.contact {
  background-color: var(--dark); color: var(--paper); padding: clamp(80px, 12vw, 160px) var(--gutter) 72px; position: relative; overflow: hidden;
  background-image: linear-gradient(var(--dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--dark-line) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
}
.contact::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(110% 90% at 80% 20%, transparent 20%, var(--dark) 80%); }
#contact-grid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.contact-inner { position: relative; z-index: 2; pointer-events: none; }
.contact-inner a, .contact-inner button { pointer-events: auto; }
.contact-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.contact-title { font-size: clamp(36px, 6vw, 100px); line-height: .98; letter-spacing: -.05em; font-weight: 800; }
.contact-lede { margin-top: 32px; max-width: 560px; font-size: 18px; line-height: 1.6; color: rgba(246, 246, 243, .68); }
.contact-art { display: grid; justify-items: center; }
.c-stack { --size: clamp(200px, 24vw, 340px); position: relative; width: var(--size); height: var(--size); rotate: 4deg; }
.c-back { position: absolute; inset: 0; border-radius: calc(var(--size) * .055); background: var(--red); rotate: -10deg; translate: -6% 6%; }
.c-frame { position: absolute; inset: 0; background: var(--paper); border: calc(var(--size) * .03) solid var(--paper); border-radius: calc(var(--size) * .055); padding: calc(var(--size) * .08); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.c-frame canvas { width: 100%; height: 100%; display: block; }
.c-chip { left: calc(var(--size) * -.22); bottom: calc(var(--size) * .08); padding: 12px 16px 12px 12px; display: flex; align-items: center; gap: 12px; rotate: -8deg; }
.c-chip strong { font-size: calc(var(--size) * .085); }
.c-mate { z-index: 5; left: 0; top: 0; animation: toMail 5s var(--ease) infinite; }
@keyframes toMail {
  0%, 100% { transform: translate(calc(var(--size) * .95), calc(var(--size) * .15)); }
  45%, 60% { transform: translate(calc(var(--size) * .5), calc(var(--size) * .55)) scale(1); }
  52% { transform: translate(calc(var(--size) * .5), calc(var(--size) * .55)) scale(.85); }
}
.mail-row { margin-top: clamp(48px, 7vw, 96px); padding-block: 32px; border-block: 1px solid var(--dark-line); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.big-mail { position: relative; font-weight: 700; font-size: clamp(28px, 5vw, 84px); letter-spacing: -.045em; line-height: 1.05; transition: color .2s; overflow-wrap: anywhere; }
.big-mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: 4px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.big-mail:hover { color: var(--red); }
.big-mail:hover::after { transform: scaleX(1); transform-origin: left; }
.mail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-meta { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-meta > div { background: var(--dark-card); border-radius: var(--radius); padding: 20px; }
.contact-meta dt { color: rgba(246, 246, 243, .45); margin-bottom: 10px; }
.contact-meta dd { font-size: 16px; line-height: 1.5; }

/* Footer */
.footer {
  background: var(--dark); color: rgba(246, 246, 243, .6); padding: 56px var(--gutter) 28px;
  border-top: 1px solid var(--dark-line); display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start;
}
.footer-logo img { height: 60px; width: auto; display: block; filter: invert(1); opacity: .92; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 28px; color: var(--paper); }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--red); }
.giant { grid-column: 1 / -1; color: var(--paper); font-weight: 800; letter-spacing: -.07em; line-height: .8; font-size: clamp(80px, 23vw, 420px); margin-top: 24px; }
.giant .g-line { display: block; overflow: hidden; padding: .02em 0 .12em; }
.giant .g-esc { color: rgba(246, 246, 243, .22); }
.giant .gch { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease), color .2s; transition-delay: var(--gd, 0s); }
.giant.in .gch { transform: none; }
.giant .gch:hover { color: var(--red); transform: translateY(-.04em); transition-duration: .25s; transition-delay: 0s; }
.name-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; text-transform: none; letter-spacing: .02em; font-size: 13px; }
.name-note .braille-text { font-size: 20px; }
.name-note kbd { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--dark-line); border-bottom-width: 2px; color: var(--paper); }
.footer-base { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--dark-line); }

/* Toast (Esc easter egg) */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 170; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; text-transform: none; letter-spacing: .02em; font-size: 13px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); transition: opacity .3s, transform .3s var(--ease); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--stagger, 0s); }
.reveal.in { opacity: 1; transform: none; }
.section-title.reveal { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1); }
.section-title.reveal.in { clip-path: inset(0 0 -10% 0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-wide, .tile-red { grid-column: 1 / -1; }
  .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .step { margin-right: -16px; }
  .step:nth-child(2n) { margin-right: 0; }
  .svc-wrap { grid-template-columns: minmax(0, 1fr); }
  .svc-sticky { display: none; }
  .service-list.has-active .service:not(.active) { opacity: 1; }
  .contact-top { grid-template-columns: minmax(0, 1fr); }
  .contact-art { justify-items: start; padding-left: 60px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center;
    gap: 28px; font-size: 22px; transform: translateY(-100%); transition: transform .45s var(--ease);
  }
  .nav-links.open { transform: none; }
  body.menu-open { overflow: hidden; }
  .logo img, .nav.scrolled .logo img { height: 44px; }

  .hero { align-items: flex-start; padding-top: 96px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-frame { order: -1; }
  .hero-frame { --size: min(56vw, 32vh, 250px); justify-items: center; width: 100%; margin-top: 18px; }
  .mate-light { display: none; }
  .chip .mono { font-size: 9px; }
  .chip-rev { padding: 10px 12px; }
  .bars { height: 18px; } .bars i { width: 6px; }
  .hero-title { font-size: clamp(44px, 14vw, 72px); }

  .contact-meta { grid-template-columns: minmax(0, 1fr); }
  .deck { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .step, .step:nth-child(2n) { margin: 0 0 -18px; translate: none; }
  .step-in { min-height: 0; }
  .step h3 { margin-top: 12px; }
  .step-grid { width: 140px; }
  .tile { min-height: 180px; }
  .tile-chart { width: 40%; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .client-grid li.wide { grid-column: 1 / -1; }
  .client-grid a { min-height: 160px; padding: 16px; }
  .client-grid span { font-size: 19px; }
  .client-grid small { display: none; }
  .service { grid-template-columns: 36px 1fr; }
  .s-arrow { display: none; }
  .sticker { right: 8px; }
  .c-stack { --size: 200px; }
  .footer { grid-template-columns: minmax(0, 1fr); }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal, .intro { opacity: 1; transform: none; }
  .hero-title .line > *, .giant .gch { transform: none; }
  .stamp text, .stamp-bg, .stamp-px { animation: none; }
  .cursors, .tile-mate, .c-mate { display: none; }
  .code-tick > div { animation: none; }
}
