/* Locals Only. Tokens follow brand/brand.md */
@font-face { font-family: Jost; font-weight: 500; font-display: swap; src: url(../fonts/jost-500.ttf); }
@font-face { font-family: Jost; font-weight: 700; font-display: swap; src: url(../fonts/jost-700.ttf); }
@font-face { font-family: Jost; font-weight: 800; font-display: swap; src: url(../fonts/jost-800.ttf); }
@font-face { font-family: Plex; font-weight: 400; font-display: swap; src: url(../fonts/plexmono-400.ttf); }
@font-face { font-family: Plex; font-weight: 500; font-display: swap; src: url(../fonts/plexmono-500.ttf); }
@font-face { font-family: InterL; font-weight: 400; font-display: swap; src: url(../fonts/Inter-Regular.otf); }
@font-face { font-family: InterL; font-weight: 500; font-display: swap; src: url(../fonts/Inter-Medium.otf); }

:root {
  --ink: #070606; --black: #000; --white: #fff; --off: #F8F9F9;
  --deep: #030D11; --teal: #0E1D27; --concrete: #475653; --olive: #6A746D;
  --sage: #92A498; --haze: #C2CBC9; --paper: #DCE4E6; --line: #1E282C;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;
  --gutter: 24px; --max: 1280px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--ink); }
body { background: var(--ink); color: var(--off); font: 400 17px/1.55 InterL, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.mono { font-family: Plex, ui-monospace, monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
h1, h2, h3 { font-family: Jost, sans-serif; font-weight: 800; line-height: .92; letter-spacing: -.01em; }
h2 { font-size: clamp(40px, 7vw, 96px); text-transform: uppercase; }
h3 { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--gutter); background: linear-gradient(var(--ink), transparent); }
.nav-logo img { height: 28px; width: auto; }
.nav nav { display: flex; gap: var(--s4); align-items: center; }
.nav nav a { font: 500 12px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--haze); }
.nav nav a:hover { color: var(--white); }
.nav-cta { border: 1px solid var(--haze); padding: var(--s2) var(--s3); }

/* Hero globe */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: radial-gradient(80% 70% at 70% 50%, var(--teal) 0%, var(--ink) 65%); }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; } /* swipe up/down scrolls the page, sideways spins the globe */
.scroll-cue { position: absolute; right: var(--gutter); bottom: var(--s5); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  font: 500 11px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--haze); text-decoration: none; }
.scroll-cue::after { content: ""; width: 1px; height: 40px; background: linear-gradient(var(--haze), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }
.globe:active { cursor: grabbing; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.pin-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; gap: var(--s2); align-items: center; margin: -34px 0 0 14px;
  background: rgba(7, 6, 6, .72); border: 1px solid rgba(248, 249, 249, .35); color: var(--off); padding: 6px 10px; cursor: pointer;
  font: 500 11px Plex, monospace; letter-spacing: .14em; transition: opacity .3s, border-color .2s; backdrop-filter: blur(4px); }
.pin-label:hover, .pin-label.is-active { border-color: var(--white); background: var(--off); color: var(--ink); }
.pin-label.is-left { margin: -34px 0 0 -14px; }
.pin-label .pin-count { color: var(--sage); }
.pin-label:hover .pin-count, .pin-label.is-active .pin-count { color: var(--olive); }
.pin-label.is-hidden { opacity: 0; pointer-events: none; }
.hero-copy { position: absolute; left: var(--gutter); bottom: var(--s7); max-width: 560px; pointer-events: none; z-index: 2; }
.hero-copy h1 { font-size: clamp(52px, 9vw, 132px); margin: var(--s3) 0; color: var(--off); }
.hero-sub { color: var(--paper); max-width: 420px; }
.hint { margin-top: var(--s4); }

/* Glitch in, resolve clean (Raw then Curated) */
.glitch { position: relative; }
.intro .glitch { animation: glitch-in .9s steps(1) both; }
.intro .glitch::before, .intro .glitch::after { content: attr(data-text); position: absolute; inset: 0; animation: glitch-slice .9s steps(1) both; }
.intro .glitch::before { transform: translateX(-4px); clip-path: inset(10% 0 60% 0); color: var(--haze); }
.intro .glitch::after { transform: translateX(5px); clip-path: inset(55% 0 15% 0); color: var(--sage); }
@keyframes glitch-in { 0% { opacity: 0; } 10% { opacity: 1; transform: skewX(12deg); } 25% { transform: skewX(-6deg) translateX(6px); } 40% { transform: none; opacity: .6; } 55% { opacity: 1; filter: blur(1px); } 70%, 100% { transform: none; filter: none; opacity: 1; } }
@keyframes glitch-slice { 0% { opacity: 1; } 30% { clip-path: inset(30% 0 40% 0); } 60% { clip-path: inset(70% 0 5% 0); } 80%, 100% { opacity: 0; } }

/* White flash exit, once */
.flash { position: fixed; inset: 0; background: var(--white); z-index: 50; pointer-events: none; opacity: 0; }
.intro .flash { animation: flash 3.6s both; }
@keyframes flash { 0%, 86% { opacity: 0; } 89% { opacity: .85; } 100% { opacity: 0; } }

/* Panel: places and projects */
.panel { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(400px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100svh - 140px); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(3, 13, 17, .9); border: 1px solid var(--line); padding: var(--s5) var(--s4) var(--s4); z-index: 3; backdrop-filter: blur(10px); }
.panel[hidden] { display: none; }
.panel-title { font-size: 44px; margin: var(--s2) 0 var(--s3); }
.panel-close { position: absolute; top: var(--s3); right: var(--s3); background: none; border: 0; color: var(--haze); font: 500 11px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.panel-list { list-style: none; }
.spot { padding-top: var(--s3); }
.spot-name { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer;
  font: 500 12px Plex, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--off); padding: var(--s3) 0 var(--s2); border-bottom: 1px solid var(--line); }
.spot-name::after { content: "+"; margin-left: var(--s3); color: var(--sage); font-size: 14px; }
.spot.is-open .spot-name::after { content: "\2212"; }
.spot-name .count { margin-left: auto; color: var(--sage); }
.spot-name:focus-visible { outline: 1px solid var(--off); outline-offset: 2px; }
.spot-body[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s1) 0 var(--s2); }
.chip { background: none; border: 1px solid var(--line); color: var(--haze); padding: 6px 10px; font-size: 10px; cursor: pointer; }
.chip:hover { border-color: var(--haze); color: var(--off); }
.chip.is-on { background: var(--off); border-color: var(--off); color: var(--ink); }
.item-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: radial-gradient(circle, rgba(248, 249, 249, .22) 1px, transparent 1.4px) 0 0 / 7px 7px, var(--deep); }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb .play { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(7, 6, 6, .7); border: 1px solid var(--off); }
.item-thumb .play::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid var(--off); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.is-set .thumb .more { font-size: 11px; }
.project { box-sizing: border-box; display: grid; grid-template-columns: 64px 1fr; gap: var(--s3); align-items: start; width: 100%;
  padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.project.has-media { cursor: pointer; }
.project.has-media:hover .title, .project.has-media:focus-visible .title { text-decoration: underline; text-underline-offset: 3px; }
.project:focus-visible { outline: 1px solid var(--off); outline-offset: 2px; }
.thumb { position: relative; display: block; width: 64px; aspect-ratio: 4 / 5; overflow: hidden;
  background: radial-gradient(circle, rgba(248, 249, 249, .22) 1px, transparent 1.4px) 0 0 / 7px 7px, var(--deep); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(7, 6, 6, .7); border: 1px solid var(--off); }
.thumb .play::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid var(--off); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.thumb .more { position: absolute; right: 3px; bottom: 3px; background: var(--ink); color: var(--off); padding: 1px 4px; font-size: 10px; }
.info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info .kind { font-size: 10px; }
.info .title { font: 700 18px/1.15 Jost, sans-serif; color: var(--off); }
.info .meta { font-size: 10px; color: var(--haze); }
.info .watch { margin-top: var(--s1); color: var(--off); text-decoration: underline; text-underline-offset: 3px; font-size: 10px; width: fit-content; }
.info .watch:hover { color: var(--white); }
.info .note { font-size: 14px; line-height: 1.4; color: var(--paper); margin-top: 2px; }

/* Viewer */
.viewer { margin: auto; max-width: 100vw; max-height: 100svh; width: 100vw; height: 100svh; padding: 0; border: 0; background: var(--ink); color: var(--off); }
.viewer::backdrop { background: var(--ink); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer img { flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: var(--s6) var(--gutter) var(--s3); }
.viewer-video { width: min(100% - 2 * var(--gutter), calc((100svh - 160px) * 16 / 9)); aspect-ratio: 16 / 9; max-height: calc(100svh - 160px); margin: var(--s6) auto var(--s3); border: 0; background: var(--black); }
.viewer-video { background: var(--black) center / cover no-repeat; }
.viewer-video[hidden], .viewer img[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--gutter) var(--s4); border-top: 1px solid var(--line); }
.viewer-cap { color: var(--off); }
.viewer-nav { display: flex; align-items: center; gap: var(--s3); }
.viewer button { background: none; border: 1px solid var(--line); color: var(--haze); padding: var(--s2) var(--s3); font: 500 11px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.viewer button:hover { border-color: var(--off); color: var(--off); }
.viewer-nav[hidden], .viewer-out[hidden], .viewer-copy[hidden] { display: none; }
.viewer-copy { margin-left: 18px; background: none; border: 0; padding: 0; cursor: pointer; font: 500 11px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--off); text-decoration: underline; text-underline-offset: 3px; }
.viewer-out[hidden] + .viewer-copy { margin-left: auto; }
.viewer-out { margin-left: auto; font: 500 11px Plex, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--off); text-decoration: underline; text-underline-offset: 3px; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: var(--s9) var(--gutter); }
.section-head { margin-bottom: var(--s6); }
.section-head .mono, .about .mono, .contact > .mono { display: block; margin-bottom: var(--s3); }
.work-grid { columns: 3; column-gap: var(--s3); } /* masonry: photos at their own shape */
.work-grid figure { break-inside: avoid; margin: 0 0 var(--s4); }
.work-grid .open { all: unset; display: block; width: 100%; cursor: zoom-in; overflow: hidden; }
.work-grid .open:focus-visible { outline: 1px solid var(--off); outline-offset: 3px; }
.work-grid img { display: block; height: auto; width: 100%; filter: saturate(.9); transition: filter .4s, transform .6s; }
.work-grid figure:hover img { filter: saturate(1.05); transform: scale(1.015); }
figcaption { margin-top: var(--s2); }
.clients { margin-top: var(--s7); display: grid; grid-template-columns: 200px 1fr; gap: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s4); }
.clients ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font: 700 22px Jost, sans-serif; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cat-tabs .chip { font-size: 12px; padding: var(--s2) var(--s3); }
.cat-tabs .chip span { opacity: .6; margin-left: var(--s1); }
.cat-text { color: var(--paper); margin: var(--s4) 0 var(--s5); max-width: 520px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4) var(--s3); }
.cat-card { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--s1); cursor: pointer; min-width: 0; }
.cat-card .cat-thumb { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: var(--s2);
  background: radial-gradient(circle, rgba(248, 249, 249, .22) 1px, transparent 1.4px) 0 0 / 7px 7px, var(--deep); }
.cat-card .cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat-card:hover .cat-thumb img { transform: scale(1.03); }
.cat-card .title { font: 700 18px/1.15 Jost, sans-serif; color: var(--off); }
.cat-card:focus-visible { outline: 1px solid var(--off); outline-offset: 3px; }
.cat-thumb .play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(7, 6, 6, .7); border: 1px solid var(--off); }
.cat-thumb .play::after { content: ""; position: absolute; left: 17px; top: 13px; border-left: 14px solid var(--off); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s7); align-items: center; }
.about-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about h2 { margin-bottom: var(--s4); }
.about p:not(.mono) { color: var(--paper); margin-bottom: var(--s3); max-width: 560px; }
.ecosystem { list-style: none; margin-top: var(--s5); border-top: 1px solid var(--line); }
.ecosystem li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; color: var(--paper); }
.ecosystem .mono { color: var(--off); }
.contact { text-align: left; padding-bottom: var(--s9); }
.contact p:not(.mono) { color: var(--paper); margin: var(--s4) 0 var(--s5); max-width: 520px; }
.btn { display: inline-block; font: 500 14px Plex, monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--off); padding: var(--s3) var(--s4); transition: background .2s, color .2s; }
.btn:hover { background: var(--off); color: var(--ink); }
.footer { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--gutter); border-top: 1px solid var(--line); }
.footer img { height: 24px; width: auto; }
.socials { display: flex; gap: var(--s4); }
.socials a { font: 500 12px Plex, monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--haze); }
.socials a:hover { color: var(--white); }
.contact .socials { margin-top: var(--s5); }
.book { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4) var(--s5); max-width: 860px; margin-top: var(--s5); }
.book label { display: flex; flex-direction: column; gap: var(--s2); }
.book .wide { grid-column: 1 / -1; }
.book input, .book select, .book textarea { font: 400 17px/1.4 InterL, system-ui, sans-serif; color: var(--off); background: transparent; border: 0; border-bottom: 1px solid #3A474C; padding: var(--s2) 0; border-radius: 0; outline: none; }
.book select { appearance: none; cursor: pointer; }
.book select option { background: var(--ink); color: var(--off); }
.book textarea { resize: vertical; border: 1px solid #3A474C; padding: var(--s2); }
.book input:focus, .book select:focus, .book textarea:focus { border-color: var(--off); }
.book ::placeholder { color: #777; }
.book-send { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.book-send .btn { background: transparent; color: var(--off); cursor: pointer; }
.book-send .btn:disabled { opacity: .5; cursor: wait; }
.contact .book-status { margin: 0; color: var(--paper); }
.contact .book-alt { margin-top: var(--s5); color: #888; }
.contact .book-alt span { color: var(--off); user-select: all; }

/* Project pages (#/p/<project>): same look as the homepage, one column of work */
.pp { margin: 0; width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; padding: 0; border: 0; background: var(--ink); color: var(--off); overflow-y: auto; overscroll-behavior: contain; }
.pp::backdrop { background: var(--ink); }
.pp-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) var(--gutter); background: linear-gradient(var(--ink) 55%, transparent); }
.pp-bar img { height: 26px; width: auto; }
.pp-bar button { background: none; border: 0; padding: var(--s2) 0; color: var(--off); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pp-back::before { content: "\2190  "; }
.pp-body { max-width: var(--max); margin: 0 auto; padding: var(--s6) var(--gutter) var(--s7); }
.pp-body:focus { outline: none; }
.pp-head { margin-bottom: var(--s6); }
.pp-head h1 { font-size: clamp(44px, 8vw, 112px); text-transform: uppercase; margin: var(--s3) 0; text-wrap: balance; }
.pp-meta { color: var(--haze); }
.pp-note { color: var(--paper); margin-top: var(--s3); max-width: 560px; }
.pp-cats { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.pp-cats .chip { text-decoration: none; }
.pp-video { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: var(--s6); cursor: pointer; background: var(--deep) center / cover no-repeat; }
.pp-video .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(7, 6, 6, .7); border: 1px solid var(--off); transition: background .2s; }
.pp-video .play::after { content: ""; position: absolute; left: 30px; top: 23px; border-left: 22px solid var(--off); border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.pp-video:hover .play { background: rgba(7, 6, 6, .9); }
.pp-video .mono { position: absolute; left: var(--s3); bottom: var(--s3); background: var(--ink); color: var(--off); padding: var(--s1) var(--s2); }
.pp-video:focus-visible, .pp-grid button:focus-visible, .pp-items button:focus-visible { outline: 1px solid var(--off); outline-offset: 3px; }
.pp-count { margin-bottom: var(--s3); }
.pp-grid { columns: 3; column-gap: var(--s3); } /* masonry: every photo at its own shape */
.pp-grid button { all: unset; display: block; overflow: hidden; cursor: zoom-in; break-inside: avoid; margin-bottom: var(--s3); }
.pp-grid img { display: block; width: 100%; height: auto; transition: transform .6s; }
.pp-grid button:hover img { transform: scale(1.015); }
.pp-items { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4) var(--s3); }
.pp-items button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--s1); width: 100%; cursor: pointer; }
.pp-items button[disabled] { cursor: default; }
.pp-items .item-thumb { margin-bottom: var(--s2); }
.pp-items .title { font: 700 18px/1.15 Jost, sans-serif; color: var(--off); }
.pp-items button:not([disabled]):hover .title { text-decoration: underline; text-underline-offset: 3px; }
.pp-links { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.pp-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line); }

.no-webgl .globe, .no-webgl .hint { display: none; }

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .cat-grid, .pp-items { grid-template-columns: repeat(2, 1fr); }
  .work-grid { columns: 2; }
  .pp-grid { columns: 2; }
  .footer { flex-wrap: wrap; gap: var(--s3); }
  .about { grid-template-columns: 1fr; gap: var(--s5); }
  .clients { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .section { padding: var(--s8) var(--gutter); }
  .hero-copy { bottom: var(--s5); }
  .panel { top: auto; bottom: var(--s3); transform: none; max-height: 60svh; }
  .viewer-bar { flex-wrap: wrap; }
  .ecosystem li { grid-template-columns: 1fr; gap: var(--s1); }
  .pp-grid { column-gap: var(--s2); }
  .book { grid-template-columns: 1fr; }
  .pp-grid button { margin-bottom: var(--s2); }
  .pp-items { grid-template-columns: 1fr; }
  .clients ul { font-size: 18px; }
}
