/* Nyala Production — dark, grid-first studio site */

:root {
  --bg: #000;
  --bg-2: #0d0d0d;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, .62);
  --ink-3: rgba(255, 255, 255, .38);
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(60, 60, 60, .55);
  --glass-yellow: rgba(255, 202, 5, .86);
  --yellow: #ffca05;
  --display: "Montserrat", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 2.2vw, 28px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.dim { color: var(--ink-3); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader-mark { width: 92px; animation: spin 2.4s var(--ease) infinite; }
.loader-count { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: var(--ink-2); }
body.is-ready .loader { opacity: 0; visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.topbar {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto minmax(0, 220px) auto auto;
  align-items: start; gap: 0 clamp(20px, 4vw, 64px);
  padding: max(20px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 20px max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand img { width: 118px; height: auto; }
.reel { display: inline-flex; align-items: center; gap: 8px; padding-top: 4px; }
.reel:hover .dim { color: var(--yellow); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.eq i { width: 2px; height: 100%; background: currentColor; opacity: .5; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.9s; }
.eq i { transform-origin: bottom; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.tagline { margin: 0; padding-top: 4px; }
.clock { display: grid; gap: 2px; padding-top: 4px; white-space: nowrap; }
.clock .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-right: 6px; vertical-align: 1px; }
.talk {
  background: var(--ink); color: #000;
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  padding: 12px 20px; border-radius: 999px;
  transition: background .3s, transform .3s var(--ease);
}
.talk:hover { background: var(--yellow); transform: scale(1.04); }

/* ---------- Views ---------- */
.view {
  position: fixed; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease), visibility .6s;
}
body[data-view="work"] .view-work,
body[data-view="about"] .view-about,
body[data-view="contact"] .view-contact { opacity: 1; visibility: visible; }

/* ---------- Curved grid ---------- */
.stage {
  position: absolute; inset: 0; overflow: hidden;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  perspective-origin: 50% 50%;
  transition: opacity .6s var(--ease);
}
.stage.is-dragging { cursor: grabbing; }
.plane { position: absolute; inset: 0; transform-style: preserve-3d; }
body:not(.is-ready) .plane { opacity: 0; transform: scale(.82); }
.plane { transition: opacity 1.2s var(--ease), transform 1.6s var(--ease); }

.card {
  position: absolute; left: 50%; top: 50%;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  padding: 12px 14px; overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backface-visibility: hidden;
  will-change: transform;
  -webkit-user-drag: none;
}
.card-top, .card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; min-width: 0;
}
.card-top b { color: var(--ink); font-weight: 500; font-family: var(--display); font-size: 12px; letter-spacing: 0; text-transform: none; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card-top span { flex-shrink: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card-media { position: relative; min-height: 0; overflow: hidden; margin: 12px 9%; border-radius: 2px; }
.card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 2px;
  transition: transform .8s var(--ease), filter .6s;
  pointer-events: none;
  filter: brightness(.88);
}
.card:hover .card-media img { transform: scale(1.05); filter: brightness(1); }
.tags { display: flex; gap: 4px; overflow: hidden; min-width: 0; }
.tags i {
  font-style: normal; padding: 3px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: var(--ink-2);
}

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .78) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .5) 70px, transparent 150px);
}
.hint {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%);
  color: var(--ink-2); pointer-events: none;
  transition: opacity .6s;
}
.hint.is-gone { opacity: 0; }

/* custom cursor */
.cursor {
  position: fixed; z-index: 60; left: 0; top: 0;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--yellow); color: #000; font-weight: 500;
  pointer-events: none;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) scale(0);
  transition: transform .35s var(--ease);
}
.cursor.is-on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- List mode ---------- */
.list {
  position: absolute; inset: 0; overflow-y: auto;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
body[data-mode="list"] .list { opacity: 1; visibility: visible; }
body[data-mode="list"] .stage, body[data-mode="list"] .vignette, body[data-mode="list"] .hint { opacity: 0; pointer-events: none; }
.list-inner { padding: 130px var(--gutter) 140px; }
.list-head {
  margin: 0 0 4px; padding-bottom: 14px;
  font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.03em;
  border-bottom: 1px solid var(--line);
}
.group {
  display: grid; grid-template-columns: minmax(140px, 1fr) 3.5fr;
  gap: 0 24px; padding: 18px 0 56px; border-bottom: 1px solid var(--line);
}
.group-name { color: var(--yellow); font-weight: 700; font-size: 15px; letter-spacing: -.01em; padding-top: 10px; }
.group-name .dim { color: rgba(255, 202, 5, .55); font-family: var(--mono); font-size: 11px; margin-left: 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows a {
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  transition: color .25s, padding .35s var(--ease);
}
.rows a .mono { color: var(--ink-2); font-size: 10px; }
.rows a .client { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.rows:hover a { color: var(--ink-3); }
.rows a:hover { color: var(--ink); padding-left: 10px; }
.rows a:hover .client { color: var(--yellow); }
.peek {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 300px; aspect-ratio: 16 / 10; pointer-events: none;
  border-radius: 6px; overflow: hidden;
  opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(.9);
  transition: opacity .3s, transform .45s var(--ease);
}
.peek.is-on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1); }
.peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .peek { display: none; } }

/* ---------- Pages (about / contact) ---------- */
.view-about, .view-contact { overflow-y: auto; overflow-x: hidden; background: #1a1a1a; }
.topbar::before {
  content: ""; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, #1a1a1a 55%, transparent);
  opacity: 0; transition: opacity .5s;
}
body[data-view="about"] .topbar::before { opacity: 1; }
body[data-view="contact"] .topbar::before { opacity: 1; background: linear-gradient(to bottom, rgba(0,0,0,.85) 50%, transparent); }
.view-contact { background: var(--bg); }
.page { padding: 150px var(--gutter) 150px; max-width: 1600px; margin: 0 auto; position: relative; }
.page-label { color: var(--ink); }
.mega, .d-title, .cta-text, .d-next strong, .h2 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.mega {
  margin: 14px 0 0;
  font-size: clamp(44px, 8.6vw, 148px);
  line-height: .9; font-weight: 800; letter-spacing: -.055em; text-transform: uppercase;
}
.ast {
  display: inline-block; width: .5em; height: .5em; margin-left: .06em; vertical-align: .32em;
  background: url(../assets/brand/web/asterisk.png) center / contain no-repeat;
  animation: spin 14s linear infinite;
}
.hero-media { margin: clamp(48px, 7vw, 96px) 0 0; position: relative; }
.hero-media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 4px; }
.hero-media figcaption { margin-top: 10px; color: var(--ink-2); }
.intro-grid, .zones-head, .process, .clients-head {
  display: grid; grid-template-columns: 1fr 3fr; gap: 24px;
}
.intro-grid { margin-top: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); padding-top: 18px; }
.intro-grid .body-copy { grid-column: 2; }
.lede { margin: 0; font-size: clamp(22px, 2.6vw, 38px); line-height: 1.12; font-weight: 600; letter-spacing: -.035em; }
.lede em { font-style: normal; color: var(--yellow); }
.body-copy { margin: 0; max-width: 60ch; color: var(--ink-2); font-size: 16px; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line);
}
.stat { padding: 18px 0 0; border-right: 1px solid var(--line); padding-right: 16px; }
.stat + .stat { padding-left: 18px; }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: clamp(48px, 7vw, 112px); font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.stat span { color: var(--ink-2); }

.zones { margin-top: clamp(80px, 10vw, 160px); }
.zones-head { border-top: 1px solid var(--line); padding-top: 18px; }
.zone-list { list-style: none; margin: clamp(48px, 6vw, 88px) 0 0; padding: 0; }
.zone {
  display: grid; grid-template-columns: 1fr 1.6fr 1.4fr; gap: 24px;
  padding: 22px 0 28px; border-top: 1px solid var(--line);
}
.zone-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); margin-top: 12px; transition: background .3s; }
.zone:hover .zone-dot { background: var(--yellow); }
.zone h3 { margin: 0 0 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.03em; }
.zone p { margin: 0 0 16px; color: var(--ink-2); max-width: 44ch; }
.zone-link {
  display: inline-block; padding: 6px 10px; border-radius: 4px;
  background: rgba(255, 255, 255, .1); transition: background .25s, color .25s;
}
.zone-link:hover { background: var(--yellow); color: #000; }
.zone-media { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #111; }
.zone-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.zone:hover .zone-media img { transform: scale(1.04); }

.process { margin-top: clamp(80px, 10vw, 160px); border-top: 1px solid var(--line); padding-top: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps h3 { margin: 32px 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.steps p { margin: 0; color: var(--ink-2); }
.step-no { color: var(--yellow); }

.clients { margin-top: clamp(80px, 10vw, 160px); }
.clients-head { border-top: 1px solid var(--line); padding-top: 18px; }
.h2 { margin: 0; font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.045em; line-height: 1; text-transform: uppercase; }
.logo-grid {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.logo-grid li {
  aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 14% 16%; min-width: 0;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .3s;
}
.logo-grid li:hover { background: rgba(255, 255, 255, .04); }
.logo-grid img { max-width: 100%; max-height: clamp(28px, 4vw, 60px); width: auto; height: auto; object-fit: contain; opacity: .78; transition: opacity .3s; }
.logo-grid li:hover img { opacity: 1; }

.cta-band {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: clamp(80px, 10vw, 160px); padding: 18px 0 0; border-top: 1px solid var(--line);
}
.cta-text { font-size: clamp(40px, 7vw, 120px); font-weight: 800; letter-spacing: -.055em; line-height: .95; text-transform: uppercase; }
.cta-text .arrow { display: inline-block; color: var(--yellow); transition: transform .5s var(--ease); }
.cta-band:hover .arrow { transform: translateX(.2em); }

/* contact */
.contact-bg { position: fixed; inset: 0; z-index: -1; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,.2) 40%, #000); }
.view-contact { isolation: isolate; }
.contact-page { min-height: 100%; display: flex; flex-direction: column; }
.contact-title { max-width: 14ch; }
.contact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: clamp(48px, 8vw, 120px);
}
.contact-card {
  position: relative; display: flex; flex-direction: column; gap: 40px; justify-content: space-between;
  min-height: 170px; padding: 18px; border-radius: 14px;
  background: rgba(30, 30, 30, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.contact-card strong { font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; letter-spacing: -.03em; }
.contact-card .arrow { position: absolute; top: 14px; right: 18px; font-size: 20px; }
a.contact-card:hover { background: var(--yellow); color: #000; transform: translateY(-4px); }
a.contact-card:hover .mono { color: #000; }
.foot { margin-top: auto; padding-top: 80px; display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Project detail ---------- */
.detail {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg-2);
  transform: translateY(100%);
  transition: transform .8s var(--ease);
}
.detail.is-open { transform: none; }
.detail-scroll { height: 100%; overflow-y: auto; }
.detail-close {
  position: absolute; z-index: 2; top: 22px; right: var(--gutter);
  display: inline-flex; gap: 10px; align-items: center;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #000; font-weight: 500;
  transition: background .3s;
}
.detail-close:hover { background: var(--yellow); }
.d-head { padding: 26px var(--gutter) 0; }
.d-head .mono { color: var(--ink-2); }
.d-title {
  margin: clamp(60px, 9vw, 140px) 0 0;
  font-size: clamp(44px, 9vw, 160px); font-weight: 800; line-height: .88; letter-spacing: -.06em; text-transform: uppercase;
}
.d-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr 3fr; gap: 24px;
  margin-top: clamp(40px, 6vw, 80px); padding-top: 16px; border-top: 1px solid var(--line);
}
.d-meta dt { color: var(--ink-3); margin-bottom: 6px; }
.d-meta dd { margin: 0; font-weight: 600; }
.d-meta p { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.25; font-weight: 500; letter-spacing: -.02em; }
.d-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; }
.d-gallery figure { margin: 0; border-radius: 4px; overflow: hidden; background: #151515; }
.d-gallery figure.wide { grid-column: 1 / -1; }
.d-gallery figure.solo { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
.d-gallery img { width: 100%; height: auto; }
.d-next {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  margin: clamp(80px, 10vw, 160px) var(--gutter) 0; padding: 18px 0 140px; border-top: 1px solid var(--line);
}
.d-next strong { display: block; margin-top: 10px; font-size: clamp(32px, 5vw, 80px); font-weight: 800; letter-spacing: -.05em; line-height: .95; text-transform: uppercase; }
.d-next:hover strong { color: var(--yellow); }
.d-next img { width: min(32vw, 380px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }

/* films */
.d-films { padding: clamp(56px, 8vw, 120px) var(--gutter) 0; }
.d-films-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.d-films-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.045em; text-transform: uppercase; }
.v-grid { display: grid; gap: 28px 12px; margin-top: 24px; }
.v-grid.is-multi { grid-template-columns: 1fr 1fr; }
.v-grid.is-multi .v-card:first-child { grid-column: 1 / -1; }
.v-card { margin: 0; }
.v-card figcaption { margin-top: 10px; color: var(--ink-2); }
.v-facade, .v-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.v-facade img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: transform .8s var(--ease), filter .5s; }
.v-facade:hover img { transform: scale(1.03); filter: brightness(1); }
.v-play {
  position: absolute; left: 50%; top: 50%; width: clamp(64px, 7vw, 96px); aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--yellow); color: #000; transform: translate(-50%, -50%);
  transition: transform .4s var(--ease); box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.v-play svg { width: 38%; fill: currentColor; margin-left: 6%; }
.v-facade:hover .v-play { transform: translate(-50%, -50%) scale(1.08); }
.v-frame iframe, .reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.reel-box {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 72px var(--gutter) calc(32px + var(--safe-b));
  background: rgba(0, 0, 0, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.reel-box.is-open { opacity: 1; visibility: visible; }
.reel-frame {
  position: relative; width: min(100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9;
  border-radius: 6px; overflow: hidden; background: #000;
  transform: scale(.94); transition: transform .5s var(--ease);
}
.reel-box.is-open .reel-frame { transform: none; }
.reel-close {
  position: absolute; top: max(20px, env(safe-area-inset-top)); right: var(--gutter);
  display: inline-flex; gap: 10px; align-items: center;
  padding: 12px 18px; border-radius: 999px; background: var(--yellow); color: #000; font-weight: 500;
}
.reel-close:hover { background: var(--ink); }

/* ---------- Bottom controls ---------- */
.nav {
  position: fixed; z-index: 45; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%);
  display: flex; padding: 4px; border-radius: 999px;
  background: var(--glass-yellow); color: #fff;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.nav a {
  position: relative; z-index: 1; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: color .35s;
}
.nav a.is-on { color: #fff; }
.nav a, .filter-btn { text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.nav-pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 999px; background: #000;
  transition: transform .5s var(--ease), width .5s var(--ease);
}
.modes {
  position: fixed; z-index: 45; left: var(--gutter); bottom: calc(22px + var(--safe-b));
  display: grid; gap: 4px; padding: 4px; border-radius: 22px;
  background: var(--glass-yellow); color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: opacity .4s, visibility .4s;
}
.mode-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; transition: background .3s, color .3s; }
.mode-btn svg { width: 18px; fill: currentColor; }
.mode-btn.is-on { background: #000; color: #fff; }
.mode-btn svg { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .28)); }
.mode-btn:not(.is-on):hover { background: rgba(0, 0, 0, .12); }
.filter-wrap {
  position: fixed; z-index: 45; right: var(--gutter); bottom: calc(22px + var(--safe-b));
  display: grid; justify-items: end; gap: 8px;
  transition: opacity .4s, visibility .4s;
}
body:not([data-view="work"]) .modes,
body:not([data-view="work"]) .filter-wrap,
body.has-detail .modes,
body.has-detail .filter-wrap,
body.has-detail .nav { opacity: 0; visibility: hidden; }
.filter-btn {
  padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--glass-yellow); color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: background .3s, color .3s;
}
.filter-btn:hover, .filter-btn[aria-expanded="true"], .filter-btn.is-active { background: #000; color: #fff; }
.nav a:focus-visible, .mode-btn:focus-visible, .filter-btn:focus-visible { outline-color: #fff; }
.filter-panel {
  display: grid; gap: 2px; min-width: 240px; padding: 8px; border-radius: 18px;
  background: rgba(40, 40, 40, .82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform-origin: bottom right;
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96);
  transition: opacity .3s, visibility .3s, transform .4s var(--ease);
}
.filter-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.filter-panel button {
  display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; text-align: left;
}
.filter-panel button .mono { color: var(--ink-3); }
.filter-panel button:hover { background: rgba(255, 255, 255, .08); }
.filter-panel button[aria-selected="true"] { background: var(--ink); color: #000; }
.filter-panel button[aria-selected="true"] .mono { color: rgba(0, 0, 0, .5); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr auto auto auto; }
  .tagline { display: none; }
  .logo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .d-meta { grid-template-columns: 1fr 1fr 1fr; }
  .d-meta > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto auto; align-items: center; gap: 0 14px; padding-top: max(16px, env(safe-area-inset-top)); }
  .clock { display: none; }
  .reel { padding-top: 0; }
  .v-grid.is-multi { grid-template-columns: 1fr; }
  .brand img { width: 96px; }
  .talk { padding: 10px 16px; font-size: 14px; }
  .intro-grid, .zones-head, .process, .clients-head { grid-template-columns: 1fr; }
  .intro-grid .body-copy { grid-column: 1; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .zone { grid-template-columns: 1fr; gap: 14px; }
  .zone-dot { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps h3 { margin-top: 10px; }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 120px; }
  .foot { flex-direction: column; }
  .group { grid-template-columns: 1fr; padding-bottom: 36px; }
  .rows a { grid-template-columns: 1fr auto; }
  .rows a .mono { display: none; }
  .list-inner { padding-top: 100px; }
  .d-meta { grid-template-columns: 1fr 1fr; }
  .d-gallery { grid-template-columns: 1fr; }
  .d-gallery figure.solo { width: 100%; }
  .d-next { flex-direction: column; align-items: start; }
  .d-next img { width: 100%; }
  .nav { bottom: calc(16px + var(--safe-b)); }
  .nav a { padding: 9px 14px; font-size: 13px; }
  .modes { bottom: calc(74px + var(--safe-b)); display: flex; }
  .mode-btn { width: 34px; height: 34px; }
  .filter-wrap { bottom: calc(74px + var(--safe-b)); }
  .filter-btn { padding: 10px 16px; font-size: 13px; }
  .hint { bottom: calc(128px + var(--safe-b)); }
  .d-title { font-size: clamp(28px, 9vw, 64px); max-width: none; }
  .mega { font-size: min(12.8vw, 64px); }
  .detail-close { top: max(16px, env(safe-area-inset-top)); padding: 10px 16px; }
  .zone-link { padding: 11px 12px; }
  .zone h3 { margin-bottom: 6px; }
  .page { padding-top: 120px; padding-bottom: 170px; }
  .list-inner { padding-bottom: 180px; }
  .rows a { padding: 13px 0; }
  .card { padding: 10px 12px; }
  /* fade content under the floating controls */
  body::after {
    content: ""; position: fixed; z-index: 44; left: 0; right: 0; bottom: 0;
    height: calc(130px + var(--safe-b)); pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .85));
    opacity: 0; transition: opacity .4s;
  }
  body[data-view="about"]::after, body[data-view="contact"]::after, body[data-mode="list"][data-view="work"]::after { opacity: 1; }
  body.has-detail::after { opacity: 0; }
}
@media (max-width: 420px) {
  .topbar { gap: 0 10px; }
  .reel .dim { display: none; }
  .brand img { width: 84px; }
  .talk { padding: 9px 14px; font-size: 13px; }
}
@media (max-width: 480px) {
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-grid img { max-height: 40px; }
  .filter-panel { min-width: min(240px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
