/* DK Productions — Cinema-first system
   Palette: near-black / off-white, no accents.
   Type: Inter Tight (grotesque) + JetBrains Mono (technical labels)
*/

:root {
  /* Theme: Obsidian (default) */
  --bg: #0a0a0a;
  --bg-1: #121212;
  --bg-2: #1a1a1a;
  --fg: #f2f0ec;
  --fg-2: #a8a5a0;
  --fg-3: #6a6863;
  --line: rgba(242, 240, 236, 0.12);
  --line-2: rgba(242, 240, 236, 0.06);

  /* Type pairing: Grotesque (default) */
  --font-display: 'Inter Tight', 'Söhne', 'GT America', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter Tight', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Söhne Mono', ui-monospace, Menlo, monospace;

  --density: 1; /* 1 = default, 0.66 = dense, 1.5 = airy */
}

[data-theme="paper"] {
  --bg: #ece8e1;
  --bg-1: #e4dfd5;
  --bg-2: #dcd6c9;
  --fg: #12110f;
  --fg-2: #555048;
  --fg-3: #8a847a;
  --line: rgba(18, 17, 15, 0.14);
  --line-2: rgba(18, 17, 15, 0.07);
}

[data-theme="steel"] {
  --bg: #0e1113;
  --bg-1: #151a1e;
  --bg-2: #1c2227;
  --fg: #e8ecef;
  --fg-2: #8e969c;
  --fg-3: #545c62;
  --line: rgba(232, 236, 239, 0.12);
  --line-2: rgba(232, 236, 239, 0.06);
}

[data-type="serif"] {
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter Tight', sans-serif;
}
[data-type="mono"] {
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter Tight', sans-serif;
}
[data-type="condensed"] {
  --font-display: 'Archivo Narrow', 'Inter Tight', sans-serif;
  --font-body: 'Inter Tight', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body {
  font-size: 15px; line-height: 1.5; letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.fg-2 { color: var(--fg-2); }
.fg-3 { color: var(--fg-3); }

/* ---------- Layout primitives ---------- */
.site {
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px 28px;
  pointer-events: none;
  mix-blend-mode: difference;
}
.nav > * { pointer-events: auto; }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff;
}
.nav-brand .mark {
  width: 22px; height: 22px; border: 1px solid #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: 12px; letter-spacing: 0;
}
.nav-center {
  display: flex; gap: 22px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff;
}
.nav-center a { position: relative; padding: 6px 2px; }
.nav-center a .dot {
  position: absolute; left: 50%; bottom: 0; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; transform: translate(-50%, 0) scale(0); transition: transform .2s ease;
}
.nav-center a.active .dot, .nav-center a:hover .dot { transform: translate(-50%, 0) scale(1); }

.nav-right {
  justify-self: end;
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff;
}

.pane {
  flex: 1;
  padding-top: 72px;
}

.container { padding: 0 28px; }
.container-wide { padding: 0 28px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 28px 28px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-2);
}
.footer h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--fg-3); margin-bottom: 14px; letter-spacing: 0.08em; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--fg); }
.footer .wordmark {
  font-family: var(--font-display);
  text-transform: none; letter-spacing: -0.02em; font-size: 42px; font-weight: 500; color: var(--fg);
  line-height: 0.95;
}
.footer .colophon {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-top: 28px; margin-top: 20px; border-top: 1px solid var(--line-2);
  font-size: 10px;
}

/* ---------- Hero: three-door entry ---------- */
.hero {
  position: relative; height: calc(100vh - 72px); min-height: 580px;
  margin-top: -72px; padding-top: 72px;
  overflow: hidden; background: #000;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
}
.hero-media .frame {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .6s ease;
}
.hero-media .frame.active { opacity: 1; }
.hero-media .frame .vid {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: grayscale(0.05) contrast(1.02);
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
.hero-scan {
  position: absolute; left: 0; right: 0; top: 72px; bottom: 0; z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0) 0px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.01) 3px, rgba(255,255,255,0) 4px);
}

.hero-header {
  position: absolute; z-index: 3; top: 96px; left: 28px; right: 28px;
  display: flex; justify-content: space-between; align-items: flex-start;
  color: #fff;
}
.hero-header .ticker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  display: flex; gap: 18px; align-items: center;
}
.hero-header .ticker .rec {
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-statement {
  position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 180px;
  color: #fff;
}
.hero-statement h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 7.2vw, 108px);
  line-height: 0.94; letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero-statement h1 em {
  font-style: italic; font-family: 'Instrument Serif', serif; font-weight: 400;
  color: rgba(255,255,255,0.85);
}

.hero-doors {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.18);
}
.door {
  padding: 22px 28px 26px;
  color: #fff;
  display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background 0.25s ease;
  position: relative;
}
.door:last-child { border-right: 0; }
.door:hover { background: rgba(255,255,255,0.06); }
.door .idx {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.55);
}
.door .title {
  font-family: var(--font-display); font-size: 34px; font-weight: 400; letter-spacing: -0.02em;
  line-height: 1;
}
.door .meta {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 10px;
}
.door .arrow { opacity: 0.4; transition: transform .25s ease, opacity .25s ease; }
.door:hover .arrow { transform: translate(4px, -4px); opacity: 1; }

/* ---------- Reel strip (below hero) ---------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
.strip-track {
  display: flex; gap: 48px;
  animation: marquee 48s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-2);
}
.strip-track span { display: inline-flex; align-items: center; gap: 16px; }
.strip-track .dot { width: 4px; height: 4px; background: var(--fg-3); border-radius: 50%; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  padding: clamp(60px, 9vw, 128px) 28px;
  border-top: 1px solid var(--line);
}
.sec-head {
  display: grid; grid-template-columns: 80px 1fr; gap: 40px;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.sec-head .idx { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 8px; }
.sec-head h2 {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 68px); line-height: 0.96; letter-spacing: -0.03em; font-weight: 400;
  max-width: 20ch;
}

/* Work grid */
.work-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
}
.work-grid[data-density="dense"] { --cols: 3; gap: 16px; }
.work-grid[data-density="airy"] { --cols: 1; gap: 48px; }

.work-card {
  cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
}
.work-card .thumb {
  aspect-ratio: 16/9;
  background: var(--bg-1);
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2);
}
.work-card.vertical .thumb {
  aspect-ratio: 9/16;
  max-width: 320px;
}
.work-grid[data-density="dense"] .work-card.vertical .thumb { max-width: none; }
.work-grid[data-density="airy"] .work-card.vertical .thumb { max-width: 440px; }
.work-card .thumb .inner {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .4s ease;
  filter: grayscale(0.1) contrast(1);
}
.work-card:hover .thumb .inner { transform: scale(1.04); filter: grayscale(0) contrast(1.05); }
.work-card .thumb .badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.55); padding: 4px 8px;
  backdrop-filter: blur(8px);
}
.work-card .thumb .runtime {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: #fff;
  background: rgba(0,0,0,0.55); padding: 3px 7px;
}
.work-card .meta-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase;
}
.work-card .title {
  font-family: var(--font-display); font-size: 22px; line-height: 1.1; letter-spacing: -0.015em; font-weight: 500;
}
.work-grid[data-density="airy"] .work-card .title { font-size: 36px; letter-spacing: -0.025em; }
.work-grid[data-density="dense"] .work-card .title { font-size: 16px; }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font-mono); font-size: 11px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
}
.tweaks.open { display: block; }
.tweaks header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.tweaks .body { padding: 14px; display: flex; flex-direction: column; gap: 18px; }
.tweaks .group { display: flex; flex-direction: column; gap: 8px; }
.tweaks .group label { color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase; }
.tweaks .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tweaks .chip {
  padding: 6px 10px; border: 1px solid var(--line); font-family: var(--font-mono);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
  color: var(--fg-2); transition: all .15s ease;
}
.tweaks .chip:hover { color: var(--fg); border-color: var(--fg-2); }
.tweaks .chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Misc ---------- */
.crosshair {
  position: relative;
}
.crosshair::before, .crosshair::after {
  content: ""; position: absolute; background: var(--line);
}

.case-hero {
  height: 80vh; min-height: 520px; position: relative; overflow: hidden;
  background: #000;
}
.case-hero .bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: grayscale(0.15);
}
.case-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.8) 100%);
}
.case-hero .content {
  position: absolute; z-index: 2; bottom: 40px; left: 28px; right: 28px; color: #fff;
  display: grid; grid-template-columns: 80px 1fr auto; gap: 40px; align-items: end;
}
.case-hero h1 {
  font-family: var(--font-display); font-size: clamp(40px, 6vw, 96px); line-height: 0.96;
  letter-spacing: -0.03em; font-weight: 400;
  max-width: 18ch;
}

.credits {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.credits .cell .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.credits .cell .v { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; font-weight: 500; }

.prose {
  max-width: 720px; margin: 0 auto;
  font-size: 17px; line-height: 1.6; color: var(--fg);
}
.prose p { margin-bottom: 1.2em; }
.prose p:first-child::first-letter {
  font-family: var(--font-display); font-size: 54px; float: left; line-height: 0.9; padding: 4px 10px 0 0; font-weight: 500;
}

/* Services */
.services-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.service {
  display: grid; grid-template-columns: 80px 1.2fr 2fr auto; gap: 32px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .25s ease;
  align-items: baseline;
}
.service:hover { background: var(--bg-1); }
.service .idx { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; }
.service h3 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 40px); font-weight: 400; letter-spacing: -0.02em; }
.service .desc { color: var(--fg-2); max-width: 46ch; }
.service .tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.service .tags span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); border: 1px solid var(--line); padding: 4px 8px; }

/* Team */
.team {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.team .member .portrait {
  aspect-ratio: 3/4; background: var(--bg-1); border: 1px solid var(--line-2);
  position: relative; overflow: hidden; margin-bottom: 14px;
}
.team .member .portrait .ph {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: grayscale(1) contrast(1.05);
}
.team .member h4 { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.team .member .role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); margin-top: 2px; }

/* Contact */
.contact-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px;
}
.contact-big {
  font-family: var(--font-display); font-size: clamp(36px, 5vw, 72px); line-height: 1;
  letter-spacing: -0.03em; font-weight: 400;
}
.contact-big a { border-bottom: 1px solid var(--line); transition: border-color .2s ease; }
.contact-big a:hover { border-color: var(--fg); }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; align-content: start; padding-top: 14px; }
.contact-info .cell .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.contact-info .cell .v { font-family: var(--font-display); font-size: 16px; font-weight: 500; }

/* Pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-2);
}
.pill .live { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulse 1.4s infinite; }

/* Sub-page hero (smaller) */
.sub-hero {
  padding: clamp(40px, 6vw, 88px) 28px clamp(20px, 3vw, 44px);
  display: grid; grid-template-columns: 80px 1fr 1fr; gap: 40px;
  border-bottom: 1px solid var(--line);
}
.sub-hero .idx { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 8px; }
.sub-hero h1 { font-family: var(--font-display); font-size: clamp(40px, 6vw, 88px); line-height: 0.94; letter-spacing: -0.03em; font-weight: 400; }
.sub-hero .intro { color: var(--fg-2); font-size: 16px; line-height: 1.55; padding-top: 12px; max-width: 44ch; }

/* Cursor label */
.cursor-tag {
  position: fixed; z-index: 300; pointer-events: none;
  transform: translate(-50%, -50%);
  padding: 6px 10px; background: var(--fg); color: var(--bg);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0; transition: opacity .18s ease;
  white-space: nowrap;
}
.cursor-tag.show { opacity: 1; }

/* =========================================================
   MOTION SYSTEM
   - .ml  = MaskLine wrapper: overflow hidden, line-clip
   - .tech-ph = loading placeholder → image reveal
   - .scroll-bar = top-of-viewport progress
   - hero load-in: staggered door draw + mask title settle
   ========================================================= */

/* MaskLine: text clipped to its baseline box, inner translated up */
.ml { display: inline; }
.ml .ml-line {
  display: block;
  overflow: hidden;
  line-height: inherit;
  padding-bottom: 0.04em; /* give descenders room so they aren't clipped */
}
.ml .ml-inner {
  display: inline-block;
  will-change: transform;
}
/* When MaskLine is used as a full-heading wrapper, preserve block-level */
h1 .ml, h2 .ml, h3 .ml { display: block; }

/* Fine horizontal divider that draws itself */
.draw-line {
  display: block; height: 1px; background: currentColor; opacity: 0.2;
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.draw-line.in { transform: scaleX(1); }

/* Top-of-viewport progress bar */
.scroll-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 2px; background: rgba(255,255,255,0.05); pointer-events: none;
}
[data-theme="paper"] .scroll-bar { background: rgba(0,0,0,0.08); }
.scroll-bar .fill {
  height: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
}

/* =========================================================
   Tech Placeholder: "LOADING 62%" frame → image reveal
   ========================================================= */
.tech-ph {
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
}
.tech-ph-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.08);
  filter: grayscale(0.35) contrast(1.05);
  transition:
    opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tech-ph.done .tech-ph-img {
  opacity: 1;
  transform: scale(1);
  filter: grayscale(0.1) contrast(1);
}
.tech-ph-overlay {
  position: absolute; inset: 0;
  color: #fff; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  pointer-events: none;
  transition: opacity 600ms ease 200ms;
}
.tech-ph.done .tech-ph-overlay { opacity: 0; }
.tech-ph-corners span {
  position: absolute; width: 14px; height: 14px; border: 1px solid rgba(255,255,255,0.7);
}
.tech-ph-corners span:nth-child(1) { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.tech-ph-corners span:nth-child(2) { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.tech-ph-corners span:nth-child(3) { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.tech-ph-corners span:nth-child(4) { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.tech-ph-meta {
  position: absolute; top: 14px; left: 30px; right: 30px;
  display: flex; justify-content: space-between; color: rgba(255,255,255,0.85);
}
.tech-ph-bar {
  position: absolute; left: 30px; right: 30px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.9);
}
.tech-ph-bar::before {
  content: ""; flex: 1; height: 1px;
  background: rgba(255,255,255,0.2); position: relative;
}
.tech-ph-bar .fill {
  position: absolute; left: 30px; bottom: 22px;
  height: 1px; width: calc(100% - 82px);
  background: #fff;
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 80ms linear;
}
.tech-ph-bar .pct {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
/* Subtle noise layer while loading */
.tech-ph:not(.done)::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,0.015) 0 1px,
      transparent 1px 3px);
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* =========================================================
   Hero load-in (plays once when App mounts)
   ========================================================= */
.hero-statement .ml-inner,
.door .hero-door-inner,
.hero-header .hero-ticker-inner { will-change: transform, opacity; }

.hero-doors .door {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 1100ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.loaded .hero-doors .door { opacity: 1; transform: translate3d(0, 0, 0); }
.loaded .hero-doors .door:nth-child(1) { transition-delay: 700ms, 700ms; }
.loaded .hero-doors .door:nth-child(2) { transition-delay: 820ms, 820ms; }
.loaded .hero-doors .door:nth-child(3) { transition-delay: 940ms, 940ms; }

/* Top border of doors draws itself (keep position from base rule) */
.hero-doors::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: rgba(255,255,255,0.18);
  transform-origin: 0 50%; transform: scaleX(0);
  transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1) 500ms;
}
.loaded .hero-doors::before { transform: scaleX(1); }

/* Internal vertical dividers between doors draw on load */
.hero-doors .door { border-right: 0; position: relative; }
.hero-doors .door:not(:last-child)::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0;
  width: 1px; background: rgba(255,255,255,0.1);
  transform-origin: 50% 0; transform: scaleY(0);
  transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1);
}
.loaded .hero-doors .door:nth-child(1)::after { transition-delay: 1000ms; transform: scaleY(1); }
.loaded .hero-doors .door:nth-child(2)::after { transition-delay: 1100ms; transform: scaleY(1); }

/* Hero header ticker fades in */
.hero-header { opacity: 0; transform: translate3d(0, -8px, 0); transition: opacity 900ms ease 200ms, transform 900ms ease 200ms; }
.loaded .hero-header { opacity: 1; transform: translate3d(0, 0, 0); }

/* =========================================================
   Service row: hover-reveals imagery on the right
   ========================================================= */
.service { position: relative; }
.service .reveal-img {
  position: absolute;
  right: 0; top: 50%;
  width: 220px; aspect-ratio: 3/2;
  transform: translate(40px, -50%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 400ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  background-size: cover; background-position: center;
  filter: grayscale(0.3);
  z-index: 5;
  border: 1px solid var(--line-2);
}
.service:hover .reveal-img {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}
.service .desc, .service h3, .service .idx, .service .tags {
  transition: opacity 300ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.services-list:hover .service:not(:hover) h3 { opacity: 0.35; }

/* Big service number (for animated counter inside rows) */
.service .idx {
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Work card reveal (mask + scale-from-96)
   ========================================================= */
.work-reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.96);
  transition:
    opacity 1100ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1300ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.work-reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* =========================================================
   Horizontal-scroll clients strip
   ========================================================= */
.hscroll-sec {
  position: relative;
}
.hscroll-sticky {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex; align-items: center;
}
.hscroll-track {
  display: flex; gap: 0;
  will-change: transform;
  padding: 0 12vw;
  transition: transform 80ms linear;
}
.logo-tile {
  flex: 0 0 auto;
  width: 280px;
  height: 220px;
  border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg);
}
.logo-tile:first-child { border-left: 1px solid var(--line-2); }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  height: 80px;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500;
  color: var(--fg-2);
  letter-spacing: -0.005em;
  text-align: center;
  white-space: nowrap;
}
/* Treatment 0: monogram in a circle */
.mono-circle {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1.25px solid var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--fg);
}
/* Treatment 1: monogram in a square block */
.mono-square {
  width: 72px; height: 72px;
  background: var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--bg);
}
/* Treatment 2: stacked initials */
.mono-stack {
  display: flex; flex-direction: column;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 400; letter-spacing: -0.04em;
  line-height: 0.8;
  color: var(--fg);
}
.mono-stack i { font-style: normal; display: block; }
/* Treatment 3: wordmark with a dot */
.mono-line {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 400; letter-spacing: -0.03em;
  color: var(--fg);
}
.mono-line .dot {
  width: 8px; height: 8px; background: var(--fg); border-radius: 50%;
  display: inline-block;
}

/* Legacy hscroll-item rules — no longer used (replaced by .logo-tile) */

/* =========================================================
   Case study pinned scroll
   ========================================================= */
.pinned-sec {
  position: relative;
}
.pinned-stage {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pinned-caption {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; padding: 0 28px 80px;
  color: var(--fg);
  pointer-events: none;
}
.pinned-caption h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.025em; line-height: 1;
  max-width: 22ch;
}

/* =========================================================
   Portrait grayscale → color on reveal
   ========================================================= */
.team .member .portrait .ph {
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.05);
  transition:
    filter 1500ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.team .member.in .portrait .ph {
  filter: grayscale(0) contrast(1);
  transform: scale(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ml .ml-inner { transform: none !important; transition: none !important; }
  .tech-ph-img { opacity: 1 !important; transform: none !important; filter: none !important; }
  .tech-ph-overlay { display: none; }
  .work-reveal { opacity: 1 !important; transform: none !important; }
  .hero-doors .door, .hero-header { opacity: 1 !important; transform: none !important; }
  .hero-doors::before, .hero-doors .door::after { transform: scaleX(1) scaleY(1) !important; }
  .team .member .portrait .ph { filter: grayscale(0) !important; transform: none !important; }
}

/* ---------- Mobile nav (hamburger) ---------- */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  align-items: center; justify-content: center;
  color: #fff;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 8px; right: 8px; height: 1px; background: #fff;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 18px; }
.nav-toggle span:nth-child(3) { top: 23px; }
.nav-toggle.open span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 49;
  background: #000;
  padding: 80px 28px 28px;
  display: none; flex-direction: column; gap: 2px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-menu.open { display: flex; opacity: 1; pointer-events: auto; }
.mobile-menu a {
  color: #fff;
  font-family: var(--font-display); font-weight: 400;
  font-size: 44px; letter-spacing: -0.02em; line-height: 1.05;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu a .num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4); text-transform: uppercase;
}
.mobile-menu .foot {
  margin-top: auto;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5); text-transform: uppercase;
  display: flex; justify-content: space-between;
  padding-top: 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .container, .container-wide { padding: 0 20px; }
  .section { padding: clamp(48px, 12vw, 96px) 20px; }

  /* Nav */
  .nav { grid-template-columns: 1fr auto; padding: 14px 20px; mix-blend-mode: normal; background: transparent; }
  .nav-center { display: none; }
  .nav-right { gap: 10px; }
  .nav-right .pill { display: none; }
  .nav-right a { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-brand span:last-child { display: none; } /* wordmark hidden, keep DK mark */

  /* Hero */
  .hero { height: auto; min-height: 0; padding-top: 72px; margin-top: -72px; }
  .hero-header { top: 80px; left: 20px; right: 20px; flex-direction: column; gap: 12px; align-items: flex-start; }
  .hero-header .ticker { font-size: 10px; flex-wrap: wrap; gap: 10px; }
  .hero-statement {
    position: relative; left: 0; right: 0; bottom: auto; top: auto;
    padding: 140px 20px 40px;
  }
  .hero-statement h1 {
    font-size: clamp(44px, 11vw, 72px);
    max-width: none;
  }
  .hero-doors {
    position: relative; grid-template-columns: 1fr;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .door { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 20px; }
  .door:last-child { border-bottom: 0; }
  .door .title { font-size: 28px; }

  /* Section heads */
  .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
  .sec-head .idx { padding-top: 0; }
  .sec-head h2 { font-size: clamp(32px, 9vw, 48px); max-width: none; }

  /* Work grid */
  .work-grid,
  .work-grid[data-density="dense"],
  .work-grid[data-density="airy"] {
    grid-template-columns: 1fr;
    --cols: 1;
    gap: 28px;
  }
  .work-card.vertical .thumb { max-width: 100%; }
  .work-grid[data-density="dense"] .work-card .title { font-size: 20px; }
  .work-grid[data-density="airy"] .work-card .title { font-size: 26px; }

  /* Services */
  .service {
    grid-template-columns: 36px 1fr;
    gap: 10px 16px;
    padding: 22px 0;
  }
  .service h3 { font-size: 24px; grid-column: 2; }
  .service .desc, .service .tags {
    grid-column: 2;
    justify-content: flex-start;
    max-width: none;
  }

  /* Team */
  .team { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-big { font-size: clamp(32px, 8vw, 48px); }
  .contact-info { grid-template-columns: 1fr 1fr; gap: 20px 16px; }

  /* Footer */
  .footer {
    grid-template-columns: 1fr 1fr; gap: 28px 20px;
    padding: 32px 20px 24px;
  }
  .footer .wordmark { font-size: 32px; }
  .footer > div:first-child { grid-column: 1 / -1; }
  .footer .colophon {
    flex-direction: column; gap: 6px; align-items: flex-start;
    text-align: left;
  }

  /* Sub-page hero */
  .sub-hero {
    grid-template-columns: 1fr; gap: 14px;
    padding: 32px 20px 28px;
  }
  .sub-hero h1 { font-size: clamp(36px, 10vw, 56px); }
  .sub-hero .intro { max-width: none; padding-top: 0; }

  /* Case study */
  .case-hero { height: 70vh; min-height: 420px; }
  .case-hero .content {
    grid-template-columns: 1fr; gap: 14px;
    left: 20px; right: 20px; bottom: 24px;
  }
  .case-hero h1 { font-size: clamp(36px, 10vw, 60px); }
  .credits { grid-template-columns: 1fr 1fr; gap: 18px; padding: 28px 0; }

  /* Prose / drop-cap */
  .prose { font-size: 16px; }
  .prose p:first-child::first-letter { font-size: 42px; }

  /* Tweaks panel on mobile */
  .tweaks {
    right: 12px; left: 12px; bottom: 12px; width: auto;
    max-height: 70vh; overflow-y: auto;
  }

  /* Cursor label — hide on touch */
  .cursor-tag { display: none; }
}

@media (max-width: 480px) {
  .team { grid-template-columns: 1fr; }
  .credits { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; }
  .footer > div:first-child { grid-column: 1; }
  .hero-statement h1 { font-size: clamp(38px, 12vw, 56px); }
  .door .title { font-size: 24px; }
}
