/* alexpon.dev — a dark business card and portfolio. Monochrome; one object, the card; everything else stays quiet. */

@font-face { font-family: "Sora"; src: url("fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #08080a;
  --bg-2: #0e0e12;
  --panel: #111116;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f2f1ee;
  --text-2: #a3a5ad;
  --text-3: #7c7f88;
  --sans: "Sora", -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: break-word; }
p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
button { font: inherit; color: inherit; }

/* Header */
/* Liquid Glass: clear lens over the page. Chromium gets real edge refraction from glass.js
   (backdrop-filter: url(#lg)); Safari and Firefox get the same rim and tint over a light blur. */
.top { position: sticky; top: 0; z-index: 50; padding-top: 12px; pointer-events: none; }
.top-row { display: flex; justify-content: center; }
.lg { position: relative; flex: 1; justify-content: space-between; display: flex; align-items: center; gap: 6px; height: 72px; padding: 0 8px 0 22px; border-radius: 999px; pointer-events: auto; background: rgba(14, 14, 17, .32); -webkit-backdrop-filter: blur(6px) saturate(170%) brightness(1.05); backdrop-filter: blur(6px) saturate(170%) brightness(1.05); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .10), inset 0 -10px 18px -12px rgba(255, 255, 255, .10), 0 1px 2px rgba(0, 0, 0, .35), 0 14px 40px -10px rgba(0, 0, 0, .65); }
.lg.lg-lens { -webkit-backdrop-filter: url(#lg); backdrop-filter: url(#lg); }
.lg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12) 22%, rgba(255, 255, 255, .02) 50%, rgba(255, 255, 255, .10) 78%, rgba(255, 255, 255, .38)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.lg .brand { margin-right: 22px; font-size: 1.14rem; gap: 10px; }
.lg .mark { width: 32px; height: 32px; }
.lg .btn { min-height: 56px; padding: 0 28px; font-size: 1rem; }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 52px; padding: 0 18px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-size: 1rem; transition: color .2s ease, background-color .2s ease; }
.top nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.mark { width: 26px; height: 26px; color: var(--text); flex: none; }
.mark-text { font: 600 13px/1 var(--sans); letter-spacing: -.04em; fill: var(--bg); }
.card-mark .mark-text { fill: currentColor; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.brand em { font-style: normal; color: var(--text-3); font-weight: 400; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 .94rem/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.btn:active { transform: scale(.98); }
.btn-light { background: var(--text); color: #0b0b0d; }
.btn-light:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .875rem; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; align-items: center; }
.store-badge img { width: 150px; height: auto; }
.text-link { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .94rem; display: inline-flex; align-items: center; min-height: 44px; transition: color .2s ease; }
.text-link:hover { color: var(--text); }


/* Hero */
.hero { position: relative; isolation: isolate; padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 100px); }
/* Hero backdrops (fal.ai material plates). They start under the floating header so the glass has something to bend. */
:root { --top-h: 84px; }
.has-bg { position: relative; isolation: isolate; overflow-x: clip; margin-top: calc(-1 * var(--top-h)); padding-top: calc(var(--top-h) + clamp(56px, 9vw, 120px)); }
.has-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(8, 8, 10, .62), rgba(8, 8, 10, .1) 62%), linear-gradient(to bottom, rgba(8, 8, 10, .2), transparent 30%, transparent 62%, var(--bg)), var(--hero) right center / cover no-repeat, var(--bg); }
.app-hero.has-bg { padding-top: calc(var(--top-h) + clamp(48px, 8vw, 100px)); }
.bg-aluminium { --hero: url("hero/aluminium.webp"); }
.bg-glass { --hero: url("hero/glass.webp"); }
.bg-graphite { --hero: url("hero/graphite.webp"); }
.bg-stone { --hero: url("hero/stone.webp"); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.9rem); letter-spacing: -.045em; max-width: 9.5em; }
.lead { margin-top: 26px; color: var(--text-2); font-size: clamp(1.02rem, 1.4vw, 1.14rem); max-width: 31em; }

/* The business card */
.hero-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.card-stage { width: 100%; max-width: 520px; perspective: 1400px; padding: 20px 0 30px; }
.card {
  --rx: 0deg; --ry: 0deg; --gx: 30%; --gy: 20%;
  position: relative; width: 100%; aspect-ratio: 85 / 55; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease);
}
.js .card { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.card.flipped { transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + 180deg)); }
.card-turn { position: absolute; inset: 0; z-index: 3; background: none; border: 0; border-radius: 18px; cursor: pointer; transform: translateZ(2px); }
.face {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 7.5% 8%; display: flex; flex-direction: column;
  background: radial-gradient(120% 140% at 0% 0%, #1d1d23 0%, #121216 45%, #0c0c0f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 40px 80px -20px rgba(0, 0, 0, .8), 0 18px 30px -12px rgba(0, 0, 0, .7);
}
/* Fine grain on the card stock */
.face::before { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); }
.sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 80% at var(--gx) var(--gy), rgba(255, 255, 255, .1), transparent 60%); }
.card-mark { width: 11%; height: auto; color: #d9d9dc; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .8)) drop-shadow(0 1px 0 rgba(255, 255, 255, .08)); }
.front-text { position: relative; margin-top: auto; }
/* A large blind-debossed caret pressed into the card stock. */
.deboss { position: absolute; right: 5%; bottom: -14%; font-size: clamp(7rem, 18vw, 11.5rem); font-weight: 700; letter-spacing: -.07em; line-height: 1; color: #0d0d10; text-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0 -1px 0 rgba(0, 0, 0, .9); pointer-events: none; }
/* Blind-embossed lettering: light from above catches the top edge, the bottom edge sinks. */
.emboss { color: #d9d9dc; text-shadow: 0 -1px 0 rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08); }
.card-name { font-size: clamp(1.35rem, 3.2vw, 2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.role { margin-top: 6px; font-size: clamp(.72rem, 1.4vw, .9rem); color: #c9c7c2; letter-spacing: .01em; }
.front-meta { position: absolute; right: 8%; top: 9%; text-align: right; font-size: clamp(.6rem, 1.15vw, .74rem); line-height: 1.6; color: var(--text-3); }
.back { transform: rotateY(180deg); background: radial-gradient(120% 140% at 100% 0%, #1d1d23 0%, #121216 45%, #0c0c0f 100%); }
.back-title { font-size: clamp(.68rem, 1.2vw, .78rem); color: var(--text-3); }
.back-apps { margin-top: auto; }
.back-apps li:last-child { border-bottom: 0; }
.back-apps em { font-style: normal; font-weight: 400; color: var(--text-3); font-size: .82em; white-space: nowrap; }
.back-apps li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3.2% 0; border-bottom: 1px solid var(--line); font-size: clamp(.82rem, 1.8vw, 1.08rem); font-weight: 600; }
.back-mail { position: absolute; z-index: 4; top: 6%; right: 7%; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--text); color: #0b0b0d; font-size: .85rem; font-weight: 600; text-decoration: none; transform: translateZ(4px); }
.card:not(.flipped) .back-mail { pointer-events: none; }
.card.flipped .card-turn { inset: 0 0 auto; height: 60%; }
.card-flip { background: none; border: 0; color: var(--text-3); font-size: .82rem; cursor: pointer; min-height: 44px; padding: 0 12px; border-radius: 999px; transition: color .2s ease; }
.card-flip:hover { color: var(--text); }


/* Numbers */

/* Sections */
.section { padding: clamp(80px, 10vw, 130px) 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--text-2); max-width: 26em; }

/* Work: two quiet columns divided by a hairline; the icon is the only image. */
.works { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work { padding: clamp(36px, 4.5vw, 56px) clamp(24px, 4vw, 56px) clamp(36px, 4.5vw, 56px) 0; }
.work + .work { position: relative; padding-left: clamp(24px, 4vw, 56px); }
.work-icon-link { display: inline-block; margin-bottom: 28px; }
.work-app-icon { width: 104px; height: 104px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 36px -14px rgba(0, 0, 0, .85); transition: transform .4s var(--ease); }
.work-icon-link:hover .work-app-icon { transform: translateY(-3px); }
.work h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -.035em; }
.work h3 a { text-decoration: none; }
.work-tag { margin-top: 6px; color: var(--text-2); }
.work-where { margin-top: 4px; color: var(--text-3); font-size: .9rem; }
.work-links { display: flex; gap: 24px; margin-top: 10px; }
.work-links .text-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.work-links .text-link:hover { text-decoration-color: var(--text); }
.work-icon { display: block; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 24px rgba(0, 0, 0, .45); overflow: hidden; width: 64px; height: 64px; flex: none; }
.work-icon img { width: 100%; height: 100%; }
.work-specs { border-top: 1px solid var(--line); }
.work-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.work-specs dt { color: var(--text-3); flex: none; }
.work-specs dd { text-align: right; min-width: 0; }

/* How I work / features */
.craft-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.craft-list div { padding: 26px 26px 30px 0; }
.craft-list div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.craft-list dt { font-weight: 600; font-size: 1.08rem; letter-spacing: -.02em; }
.craft-list dd { margin-top: 10px; color: var(--text-2); font-size: .95rem; }
.feats div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.feats div:nth-child(n + 4) { border-top: 1px solid var(--line); }

/* Contact: a quiet row, like a support line on a business card. */
.contact { padding: clamp(80px, 10vw, 130px) 0 clamp(64px, 8vw, 100px); }
.contact-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) auto; align-items: center; gap: 20px 40px; padding-top: 36px; position: relative; }
.contact h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -.03em; }
.contact p { color: var(--text-2); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--text-3); font-size: .88rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot nav a { color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot nav a:hover { color: var(--text); }
.foot .brand { color: var(--text); }

/* App pages */
.app-hero { position: relative; isolation: isolate; padding: clamp(48px, 8vw, 100px) 0 clamp(40px, 6vw, 70px); }
.crumbs { color: var(--text-3); font-size: .88rem; margin-bottom: 36px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs span { margin: 0 6px; }
.work-icon.big { width: 104px; height: 104px; }
.app-hero h1 { margin-top: 28px; font-size: clamp(2.8rem, 7vw, 5.4rem); letter-spacing: -.05em; }
.app-tag { margin: 12px 0 16px; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text-2); }
.soon-note { color: var(--text-2); border-left: 1px solid var(--line-2); padding-left: 14px; max-width: 32em; }
.details .work-specs.full { margin-top: 0; max-width: 760px; }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.link-row a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; font-size: .9rem; font-weight: 500; transition: background-color .2s ease; }
.link-row a:hover { background: rgba(255, 255, 255, .05); }
.next-sec { padding-bottom: clamp(80px, 10vw, 130px); }
.next { display: flex; align-items: center; gap: 22px; padding: clamp(24px, 3.5vw, 36px); border-radius: var(--radius); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .2s ease; }
.next:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.next small { display: block; color: var(--text-3); font-size: .82rem; }
.next strong { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.035em; line-height: 1.15; }
.next em { font-style: normal; color: var(--text-2); font-size: .94rem; }
.next > span:last-child { min-width: 0; }
.nf { min-height: 60vh; }
.nf h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card { order: -1; }
  .card-stage { max-width: 460px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feats div:nth-child(3n + 1) { padding-left: 26px; border-left: 1px solid var(--line); }
  .feats div:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .feats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .contact-row { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .works { grid-template-columns: minmax(0, 1fr); }
  .work, .work + .work { padding: 36px 0; border-left: 0; }
  .craft-list, .feats { grid-template-columns: minmax(0, 1fr); }
  .craft-list div, .craft-list div + div, .feats div, .feats div:nth-child(n) { padding: 22px 0; border-left: 0; border-top: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hide-sm, .top nav a.hide-sm { display: none; }
  .lg { height: 64px; padding: 0 6px 0 18px; }
  :root { --top-h: 76px; }
  .has-bg::before { background: linear-gradient(to bottom, rgba(8, 8, 10, .35), rgba(8, 8, 10, .55) 45%, var(--bg)), var(--hero) 70% top / cover no-repeat, var(--bg); }
  .bg-aluminium { --hero: url("hero/aluminium-s.webp"); }
  .bg-glass { --hero: url("hero/glass-s.webp"); }
  .bg-graphite { --hero: url("hero/graphite-s.webp"); }
  .bg-stone { --hero: url("hero/stone-s.webp"); }
  .lg .btn { min-height: 52px; padding: 0 24px; }
  .work-icon { width: 56px; height: 56px; }
  .work-icon.big { width: 88px; height: 88px; }
  .work-specs div { flex-direction: column; gap: 2px; }
  .work-specs dd { text-align: left; }
  .cta-row .btn { flex: 1 1 auto; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 32px); }
  .lg .brand { margin-right: 8px; }
  .btn-sm { padding: 0 14px; }
}
/* Motion: the page settles in on load, sections draw themselves in as they arrive,
   and the hero sinks back as you scroll. All of it is off under prefers-reduced-motion. */
:root { --out: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.4, .64, 1); }
.works::before, .contact-row::before, .work + .work::before { content: ""; position: absolute; background: var(--line); }
.works::before, .contact-row::before { top: 0; left: 0; right: 0; height: 1px; transform-origin: left; }
.work + .work::before { top: 0; bottom: 0; left: 0; width: 1px; transform-origin: top; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .05em .16em; margin: 0 -.05em -.16em; }
.w > span { display: inline-block; }

@keyframes rise { from { transform: translateY(112%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.82); } }
@keyframes card-in { from { opacity: 0; transform: perspective(1200px) rotateX(26deg) translateY(56px) scale(.94); } }
@keyframes bg-in { from { opacity: 0; scale: 1.1; } }
@keyframes top-in { from { opacity: 0; transform: translateY(-18px) scale(.97); } }

/* On load */
.js .lg { animation: top-in 1s var(--out) .05s both; }
.js .has-bg::before { animation: bg-in 2.2s var(--out) both; }
.js :is(.hero, .app-hero) h1 .w > span { animation: rise 1.15s var(--out) calc(.22s + var(--w, 0) * 90ms) both; }
.js .crumbs { animation: fade-up .9s var(--out) .1s both; }
.js .app-hero .work-icon.big { animation: pop 1s var(--spring) .12s both; }
.js .app-tag { animation: fade-up 1s var(--out) .5s both; }
.js :is(.hero, .app-hero) .lead, .js .nf p { animation: fade-up 1s var(--out) .55s both; }
.js :is(.hero, .app-hero) .cta-row { animation: fade-up 1s var(--out) .68s both; }
.js .card-stage { transform-origin: 50% 100%; animation: card-in 1.5s var(--out) .3s both; }
.js .card-flip { animation: fade-up .9s var(--out) 1.15s both; }

/* As sections arrive */
.js .reveal .w > span { transform: translateY(112%); transition: transform 1s var(--out) calc(var(--w, 0) * 80ms); }
.js .reveal.in .w > span { transform: none; }
.js .draw::before, .js .draw .work + .work::before, .js .contact-row.draw::before { scale: 0 1; transition: scale 1.4s var(--out) .1s; }
.js .draw .work + .work::before { scale: 1 0; transition-delay: .5s; }
.js .draw.in::before, .js .draw.in .work + .work::before { scale: 1; }
.js .work.reveal { opacity: 1; transform: none; }
.js .work.reveal > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--out), transform 1s var(--out), filter 1s var(--out); transition-delay: calc(var(--i, 0) * 150ms + var(--k, 0) * 70ms); }
.js .work.reveal > .work-icon-link { transform: scale(.84); filter: blur(10px); }
.js .work.reveal.in > * { opacity: 1; transform: none; filter: none; }
.work > :nth-child(2) { --k: 1; } .work > :nth-child(3) { --k: 2; } .work > :nth-child(4) { --k: 3; } .work > :nth-child(5) { --k: 4; }

@media (max-width: 720px) {
  .work + .work::before { bottom: auto; right: 0; width: auto; height: 1px; transform-origin: left; }
  .js .draw .work + .work::before { scale: 0 1; transition-delay: .2s; }
}

/* While scrolling: the backdrop drifts slower than the page and the hero sinks back */
@supports (animation-timeline: scroll()) {
  @keyframes drift { to { translate: 0 22%; } }
  @keyframes sink { to { opacity: .15; transform: translateY(-56px) scale(.96); } }
  .js .has-bg::before { animation: bg-in 2.2s var(--out) both, drift linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 100vh; }
  @media (min-width: 721px) {
    .js :is(.hero-text, .hero-card, .app-hero > .wrap, .nf > .wrap) { animation: sink linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
  }
}

/* App icons stay monochrome until pointed at; on touch screens they colour in as they reach the middle of the screen. */
.js .work-app-icon, .js .work-icon img { filter: grayscale(1) brightness(.9); transition: filter .6s var(--ease), transform .4s var(--ease); }
.js .lit .work-app-icon, .js .lit.work-icon img, .js .lit .work-icon img { filter: none; }
@media (hover: hover) and (pointer: fine) {
  .work:hover .work-app-icon, .work:focus-within .work-app-icon, .work-icon.big:hover img, .next:hover .work-icon img, .next:focus-visible .work-icon img { filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .lg, .lg.lg-lens { background: #17171c; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lg { background: #17171c; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
