:root {
  --bg: #111214;
  --bg-2: #17191c;
  --panel: #1d2024;
  --line: #2a2e34;
  --text: #ecebe6;
  --muted: #9a9ea6;
  --accent: #ff8a3d;
  --accent-2: #4fd1c5;
  --radius: 14px;
  --max: 1240px;
  --head: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); background: rgba(17,18,20,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 600; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #111; font-size: .85rem; font-weight: 700; }
nav { display: flex; gap: clamp(10px, 2vw, 26px); align-items: center; font-size: .95rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }
nav .nav-cta { color: var(--text); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
@media (max-width: 640px) { nav a:not(.nav-cta):not([href$=".pdf"]) { display: none; } }

/* hero */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 8vw, 96px) clamp(16px, 4vw, 40px) 40px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.lede { color: #c9cbd0; font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 60ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 34px; }
.btn { display: inline-block; text-decoration: none; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); background: var(--panel); }
.btn.primary { background: var(--accent); color: #141414; border-color: var(--accent); }
.btn.primary:hover { background: #ff9d5c; }
.btn.big { font-size: clamp(1rem, 2.4vw, 1.35rem); padding: 16px 28px; }
.lanes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lanes li { border-top: 2px solid var(--line); padding-top: 10px; font-size: .9rem; }
.lanes strong { display: block; font-family: var(--head); font-size: .98rem; }
.lanes span { color: var(--muted); }
.lanes li:nth-child(1) { border-color: var(--accent); }
.lanes li:nth-child(2) { border-color: var(--accent-2); }
.lanes li:nth-child(3) { border-color: #c7b8ff; }
.hero-art { aspect-ratio: 1; position: relative; }
.hero-art canvas { width: 100%; height: 100%; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; width: 70%; margin: 0 auto -10px; order: -1; }
  .lanes { grid-template-columns: 1fr; }
}

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 40px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 500 .88rem var(--body); color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.is-on { background: var(--text); color: #111; border-color: var(--text); }

/* featured case studies */
.featured { display: grid; gap: clamp(48px, 7vw, 84px); }
.case { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; }
.case:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.case:nth-child(even) .case-media { order: 2; }
.case[hidden] { display: none; }
.case-media { display: grid; gap: 10px; }
.case-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); cursor: zoom-in; }
.case-main img, .case-main video { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.case-main.contain img { object-fit: contain; }
.case.pixel img, .lightbox.pixel img { image-rendering: pixelated; }
.case.pixel .case-main { background: #dedfd6; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 74px; height: 52px; background: var(--panel); cursor: pointer; opacity: .65; }
.thumbs button.is-on, .thumbs button:hover { opacity: 1; border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .vid-thumb { display: grid; place-items: center; font-size: .72rem; font-weight: 600; color: var(--text); }
.case-meta { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.case h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: .4em; }
.case .summary { font-size: 1.08rem; color: #d6d7da; }
.case p { color: #b9bcc3; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li { font-size: .78rem; color: var(--accent-2); border: 1px solid rgba(79,209,197,.35); padding: 3px 10px; border-radius: 999px; }
.case .ext { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; text-decoration: none; }
.case .ext:hover { text-decoration: underline; }
@media (max-width: 880px) {
  .case, .case:nth-child(even) { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-media { order: 0; }
}

/* gallery */
.gallery { columns: 3 300px; column-gap: 14px; }
.tile { break-inside: avoid; margin: 0 0 14px; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); cursor: zoom-in; position: relative; display: block; width: 100%; padding: 0; text-align: left; color: inherit; font: inherit; }
.tile img { width: 100%; height: auto; transition: transform .4s; }
.tile:hover img { transform: scale(1.03); }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.78)); font-size: .85rem; opacity: 0; transition: opacity .2s; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.cap strong { display: block; font-family: var(--head); }
.tile[hidden] { display: none; }
@media (hover: none) { .tile .cap { opacity: 1; } }

/* videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.vcard { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vcard video { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #000; }
.vcard figcaption { padding: 10px 12px; font-size: .88rem; color: var(--muted); }
.vcard figcaption strong { color: var(--text); display: block; font-family: var(--head); }

/* about */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 64px); }
.about p { color: #c4c6cc; }
.about-side h3 { color: var(--muted); text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; margin-top: 4px; }
.timeline { list-style: none; padding: 0; margin: 0 0 28px; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.timeline span { color: var(--accent); font-variant-numeric: tabular-nums; }
.tools { font-size: .93rem; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

/* contact */
.contact { text-align: center; padding-bottom: 110px; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.contact .lede { margin: 0 auto 28px; }
.cta-row.center { justify-content: center; margin: 0; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,10,.94); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-height: 100vh; padding: 24px 0; }
.lightbox img { max-height: calc(100vh - 110px); max-width: 100%; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: var(--muted); font-size: .92rem; text-align: center; }
.lightbox figcaption strong { color: var(--text); }
.lightbox button { background: none; border: 0; color: var(--text); font-size: 2.6rem; cursor: pointer; height: 100%; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 8px; right: 14px; height: auto !important; font-size: 2.2rem !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile img { transition: none; }
}
