@font-face {
  font-family: "Host Grotesk";
  src: url("assets/fonts/host-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ground: #f4f4f5;
  --ink: #0c0c0d;
  --soft: #626266;
  --line: rgb(12 12 13 / .12);
  --fill: rgb(12 12 13 / .06);
  --pad: clamp(20px, 2.4vw, 40px);
  --gap: clamp(16px, 1.8vw, 32px);
  --r: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --glass: rgb(255 255 255 / .72); --on-ink: #fff;
}
[data-theme="dark"] {
  --ground: #0b0b0c; --ink: #f1f1f2; --soft: #8e8e95; --line: rgb(255 255 255 / .12); --fill: rgb(255 255 255 / .07);
  --glass: rgb(22 22 24 / .72); --on-ink: #0b0b0c; color-scheme: dark;
}
[data-theme="dark"] .case { background: color-mix(in srgb, var(--tint) 7%, #0b0b0c); }
[data-theme="dark"] .shot { background: rgb(255 255 255 / .05); }
.theme { width: 40px; height: 40px; padding: 0 !important; display: grid; place-items: center; border-radius: 99px; }
.theme svg { width: 18px; height: 18px; }
.theme .moon, [data-theme="dark"] .theme .sun { display: none; }
[data-theme="dark"] .theme .moon { display: block; }
.versions { display: flex; gap: 2px; margin-left: 4px; padding: 3px; border-radius: 99px; background: var(--fill); }
.versions a { width: 30px; height: 30px; padding: 0 !important; display: grid; place-items: center; font-size: 13px; color: var(--soft); }
.versions a.on { background: var(--ink); color: var(--on-ink); }

* { box-sizing: border-box; margin: 0; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font: 400 16px/1.45 "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.012em;
  color: var(--ink);
  background: var(--ground);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
html:has(.case:not([hidden])) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--on-ink); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 99; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(14px, 1.5vw, 22px) var(--pad);
  pointer-events: none;
}
.top a, .top button { pointer-events: auto; }
main { overflow-x: clip; }
.name { position: relative; display: flex; align-items: center; padding: 0 14px; margin-left: -14px; border-radius: 99px; transition: background .35s; font-weight: 600; letter-spacing: -.025em; min-height: 44px; }
.name span { white-space: nowrap; }
.scrolled .name { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { padding: 11px 16px; border-radius: 99px; }
.top nav a:not(.pill) { transition: background .25s; }
.scrolled .top nav { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); border-radius: 99px; }
.top nav { transition: background .35s; border-radius: 99px; padding: 4px; }
.pill {
  display: inline-block; padding: 11px 18px; border-radius: 99px;
  background: var(--ink); color: var(--on-ink); font-weight: 500;
  transition: background .25s, transform .25s var(--ease);
}
.pill:active { transform: scale(.97); }
@media (hover: hover) {
  .top nav a:not(.pill):hover { background: var(--fill); }
  .pill:hover { background: #37373b; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 520px;
  touch-action: pan-y; cursor: grab;
  -webkit-user-select: none; user-select: none;
}
.hero.dragging, .dragging .block { cursor: grabbing !important; }
h1 {
  position: absolute; z-index: 40; left: var(--pad); bottom: calc(var(--pad) - 6px);
  max-width: 17.5em;
  font-weight: 500; font-size: clamp(30px, 3.7vw, 64px); line-height: 1.08; letter-spacing: -.045em;
  pointer-events: none;
}
h1 button {
  pointer-events: auto; font-weight: inherit; letter-spacing: inherit; line-height: inherit;
  background: linear-gradient(currentColor, currentColor) 0 94% / 100% .055em no-repeat;
  transition: background-size .5s var(--ease), opacity .3s;
}
h1.picking button:not(.on) { opacity: .32; }
h1 button.on { background-size: 0 .055em; background-position: 100% 94%; }
.readout {
  position: absolute; z-index: 40; right: var(--pad); bottom: var(--pad);
  text-align: right; pointer-events: none; line-height: 1.35;
}
.readout b { display: block; font-weight: 500; }
.readout span { color: var(--soft); }

/* ---------- work ---------- */
.work { padding: clamp(84px, 9vw, 120px) var(--pad) clamp(90px, 11vw, 180px); }
.filters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 clamp(24px, 2.6vw, 44px) -14px; position: relative; z-index: 30; }
.filters button { padding: 11px 14px; border-radius: 99px; color: var(--soft); transition: color .25s, background .25s; }
.filters button[aria-pressed="true"] { color: var(--ink); background: var(--fill); }
.filters sup { font-size: .68em; margin-left: 4px; font-variant-numeric: tabular-nums; line-height: 0; }
@media (hover: hover) { .filters button:hover { color: var(--ink); } }

.grid { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(48px, 5.4vw, 100px) var(--gap); align-items: start; }
.tile { position: relative; grid-column: var(--start) / span var(--span); }
.grid.few .tile { grid-column: span 6; }
.tile.off, .group.off { display: none; }
.group {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px;
  margin-bottom: calc(clamp(48px, 5.4vw, 100px) * -.55); padding-top: 14px; border-top: 1px solid var(--line);
  font-weight: 500; font-size: clamp(22px, 2vw, 34px); letter-spacing: -.035em; line-height: 1.15;
}
.group:first-child { border-top: 0; padding-top: 0; }
.group sup { font-size: .5em; color: var(--soft); font-variant-numeric: tabular-nums; }
.media { position: relative; aspect-ratio: var(--ratio); }
.block {
  position: absolute; inset: 0; display: block; transform-style: preserve-3d;
  will-change: transform; border-radius: var(--r); -webkit-user-drag: none;
}
.cover { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r); pointer-events: none; background: var(--edge, #222); backface-visibility: hidden; }
.cover > img { position: absolute; inset: 0; }
img.crop { position: absolute; object-fit: fill; max-width: none; transition: opacity .3s; }

/* ---------- scenes: Figma layers put back together ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.ly { position: absolute; }
.ly img { display: block; width: 100%; height: 100%; object-fit: fill; }
.ly.phone img { border-radius: 7.5% / 3.6%; }
.ly.phone { filter: drop-shadow(0 3cqh 4cqh rgb(0 0 0 / .45)); rotate: var(--rot, 0deg); }
.ly.phone.flat img { border-radius: 6.5% / 3.1%; outline: 1px solid rgb(255 255 255 / .08); outline-offset: -1px; }
.ly.lift { filter: drop-shadow(0 2cqh 3cqh rgb(0 0 0 / .5)); }
.cycle img { position: absolute; inset: 0; opacity: 0; animation: cycle 10.5s var(--ease) infinite both; animation-delay: calc(var(--i) * 3.5s - .6s); }
.cycle img:first-child { opacity: 1; }

.a-slab { animation: slab 6.5s ease-in-out infinite; animation-delay: var(--d); }
.a-chip { animation: chip 7s ease-in-out infinite; animation-delay: var(--d); }
.a-glow { animation: glow 5s ease-in-out infinite; animation-delay: var(--d); }
.a-phone { animation: phone 8s ease-in-out infinite; animation-delay: var(--d); }
.a-rock { animation: rock 7s ease-in-out infinite; animation-delay: var(--d); }
.a-coin { animation: coin 8s ease-in-out infinite; animation-delay: var(--d); }
.a-cloud { animation: cloud 18s ease-in-out infinite; animation-delay: var(--d); }
.a-theme { animation: theme 11s ease-in-out infinite; animation-delay: var(--d); }
@keyframes slab { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -5.5%; rotate: .8deg; } }
@keyframes chip { 0%, 100% { translate: 0 0; } 50% { translate: 1.5% -22%; } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
@keyframes phone { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.6%; } }
@keyframes rock { 0%, 100% { rotate: -1.4deg; } 50% { rotate: 1.6deg; } }
@keyframes coin { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -7%; rotate: -5deg; } }
@keyframes cloud { 0%, 100% { translate: 0 0; } 50% { translate: 3.5% 1%; } }
@keyframes theme { 0%, 38% { opacity: 0; } 50%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cycle { 0% { opacity: 0; scale: .985; } 5%, 30% { opacity: 1; scale: 1; } 36%, 100% { opacity: 0; scale: 1; } }
/* the thickness that makes each picture a block */
.block i {
  position: absolute; left: 0; top: 0; bottom: 0; width: max(6px, 1.7%);
  transform-origin: 0 50%; transform: rotateY(90deg);
  background: var(--edge, #bbb); border-radius: 3px;
}
figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
figcaption b { font-weight: 500; }
figcaption span { color: var(--soft); }

/* ---------- about ---------- */
.about { padding: 0 var(--pad) clamp(110px, 13vw, 220px); }
.lead {
  max-width: 21em; margin-bottom: clamp(64px, 8vw, 130px);
  font-size: clamp(26px, 3.1vw, 54px); line-height: 1.14; letter-spacing: -.04em; font-weight: 500; text-wrap: pretty;
}
.services li { border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services button {
  width: 100%; display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: baseline;
  padding: clamp(18px, 1.7vw, 28px) 0; text-align: left;
  transition: padding .5s var(--ease), opacity .3s;
}
.services b { font-weight: 500; font-size: clamp(22px, 2vw, 34px); letter-spacing: -.035em; line-height: 1.15; }
.services span { color: var(--soft); }
@media (hover: hover) {
  .services:hover button { opacity: .35; }
  .services button:hover { opacity: 1; padding-left: 18px; }
}
.peek {
  position: fixed; left: 0; top: 0; z-index: 35; width: clamp(200px, 19vw, 320px); aspect-ratio: 1;
  pointer-events: none; opacity: 0; will-change: transform;
}
.peek img { position: absolute; inset: 0; border-radius: var(--r); opacity: 0; transition: opacity .35s; }
.peek img.on { opacity: 1; }

/* ---------- contact ---------- */
.contact { min-height: 88svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--pad) var(--pad); }
.ask { font-size: clamp(22px, 2vw, 34px); letter-spacing: -.035em; color: var(--soft); margin-bottom: .2em; }
.mail {
  align-self: flex-start; font-weight: 500; text-align: left; white-space: nowrap;
  font-size: clamp(34px, 9.6vw, 200px); line-height: 1.12; letter-spacing: -.06em; margin-left: -.05em;
}
.mail span { display: inline-flex; }
.mail i { font-style: normal; display: inline-block; will-change: transform; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: clamp(28px, 4vw, 64px); padding-top: 14px; color: var(--soft); }
.links { display: flex; gap: 4px; margin-right: -14px; }
.links a { padding: 11px 14px; border-radius: 99px; color: var(--ink); transition: background .25s; }
@media (hover: hover) { .links a:hover { background: var(--fill); } }

/* ---------- case ---------- */
.case { position: fixed; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: var(--tint); outline: none; }
.case[hidden] { display: none; }
.close { position: fixed; right: var(--pad); top: clamp(18px, 1.8vw, 26px); z-index: 3; }
.case-in { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gap) clamp(24px, 5vw, 96px); padding: clamp(84px, 7vw, 110px) var(--pad) var(--pad); }
.case-text { position: sticky; top: clamp(84px, 7vw, 110px); min-height: calc(100svh - clamp(84px, 7vw, 110px) - var(--pad)); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.case h2 { font-weight: 500; font-size: clamp(40px, 5vw, 88px); line-height: .98; letter-spacing: -.055em; margin-bottom: .5em; text-wrap: balance; margin-left: -.04em; }
.case-text p { max-width: 34em; }
.case-text p + p { margin-top: 1em; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 28px; }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; }
.facts a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.niche { color: var(--soft); margin-bottom: .6em; }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); align-content: start; align-items: start; }
.shot { position: relative; overflow: hidden; border-radius: var(--r); background: rgb(12 12 13 / .05); }
.shot.full { grid-column: 1 / -1; }
.shot.half { aspect-ratio: 1; grid-column: span 3; }
.shot.third { grid-column: span 2; }
.shot.whole { aspect-ratio: auto; background: none; }
.shot > img { position: absolute; inset: 0; }
.shot.main .cover { border-radius: 0; }
.shot.pad > img { inset: 5% 0; height: 90%; }
/* complete designs, never cropped */
.shot.whole > img { position: static; height: auto; }
.shot.whole.boxed > img { position: absolute; inset: 4% 0; width: 100%; height: 92%; object-fit: contain; }
.motion-tag { position: absolute; left: 16px; top: 16px; z-index: 2; padding: 6px 11px; border-radius: 99px; background: rgb(255 255 255 / .88); color: var(--ink); font-size: 13px; font-weight: 500; backdrop-filter: blur(10px); }
.mail { display: inline-block; }
/* long pages pan slowly inside a window */
.shot.browse { background: #111; }
.shot.browse > img { inset: 0 auto auto 0; height: auto; animation: browse 46s ease-in-out infinite alternate; }
/* top runs over the window's height while the picture moves up by its own height: the page pans from top to bottom */
@keyframes browse { 0%, 6% { top: 0; translate: 0 0; } 94%, 100% { top: 100%; translate: 0 -100%; } }
@media (hover: hover) { .shot.browse:hover > img { animation-play-state: paused; } }
/* screens side by side */
.shot.row { display: flex; justify-content: center; align-items: center; gap: 4%; padding: 5% 6%; }
.shot.row .phone { position: relative; height: 100%; flex: 0 1 auto; aspect-ratio: .52; }
.shot.row .phone img { position: absolute; inset: 0; border-radius: 6%; }
.next { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-top: 1px solid var(--line); margin-top: clamp(50px, 7vw, 120px); padding-top: 18px; text-align: left; }
.next b { font-weight: 500; font-size: clamp(34px, 5vw, 88px); letter-spacing: -.055em; line-height: 1.08; transition: transform .6s var(--ease); }
.next span { color: var(--soft); }
@media (hover: hover) { .next:hover b { transform: translateX(14px); } }
.flyer { position: fixed; left: 0; top: 0; z-index: 90; transform-origin: 50% 50%; pointer-events: none; will-change: transform; }
.flyer .cover { border-radius: var(--r); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .top nav > a:not(.pill) { display: none; }
  .top nav > .pill { display: none; }
  h1 { right: var(--pad); bottom: 26px; font-size: clamp(30px, 8.6vw, 46px); }
  .readout { left: var(--pad); right: auto; text-align: left; bottom: auto; top: 84px; }
  .tile { grid-column: 1 / -1 !important; }
  .tile.narrow { margin-right: 18%; }
  .tile.narrow:nth-child(even) { margin: 0 0 0 18%; }
  .services button { grid-template-columns: 1fr; gap: 4px; }
  .peek { display: none; }
  .foot { align-items: flex-start; flex-direction: column; }
  .links { margin-left: -14px; }
  .case-in { grid-template-columns: 1fr; gap: 40px; }
  .case-text { position: static; min-height: 0; }
  .shot.third { grid-column: span 3; }
  .contact { min-height: 70svh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  [class*="a-"], .shot.browse > img { animation: none !important; }
  .cycle img:not(:first-child) { display: none; }
}

/* a second version of the design that fades in on hover (Proof: dark to light) */
.cover > img.hov { opacity: 0; transition: opacity .7s var(--ease); }
@media (hover: hover) { .block:hover .cover > img.hov, .block:focus-visible .cover > img.hov { opacity: 1; } }

/* pieces shown only in the hero chain: they take no room in the grid */
.tile.hero-only { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; }
.tile.hero-only figcaption { display: none; }
