/* ===========================================================================
   SURIKATOS — light editorial system
   Schibsted Grotesk for display/body, Instrument Serif for editorial accents
   and Space Mono for navigation/catalog metadata.
   ========================================================================== */

:root {
  --bg: #EEEFF1;
  --bg-2: #F7F7F5;
  --ink: #16150F;
  --muted: #8A887F;
  --line: rgba(20, 19, 15, 0.14);
  --accent: #1d11ff;
  --beam: #1d11ff;
  --green:   #00d447;
  --cyan:    #00e1d2;
  --lime:    #87ff16;
  --red:     #f92100;
  --pink:    #d80069;
  --mx: clamp(20px, 4.5vw, 72px);
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --card-caption-shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
html { scroll-behavior: smooth; }
.hero-intro-pending .hero-title { opacity: 0; }

@property --hero-reveal-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

.hero-title.is-unified-intro-css {
  --hero-reveal-x: 0%;
  opacity: 1;
  clip-path: inset(0 100% 0 0);
  filter: blur(7px);
  transform: translateY(22px) rotateX(4deg);
  transform-origin: 50% 100%;
  transition:
    clip-path 0.68s cubic-bezier(0.77, 0, 0.18, 1),
    filter 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
    --hero-reveal-x 0.68s cubic-bezier(0.77, 0, 0.18, 1);
}
.hero-title.is-unified-intro-css .hm-letter-glyph,
.hero-title.is-unified-intro-css .verb-glyph {
  transform: none !important;
  transition: none !important;
}
.hero-title.is-unified-intro-gsap .hm-letter-glyph,
.hero-title.is-unified-intro-gsap .verb-glyph {
  transition: none;
}
body.text-reveal-ready .hero-title.is-unified-intro-css {
  opacity: 1;
  --hero-reveal-x: 104%;
  clip-path: inset(0 0 0 0);
  filter: blur(0);
  transform: translateY(0) rotateX(0);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* film grain — barely there */
.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 1.4s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* custom cursor — a small beam */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,194,255,0.95) 0%, rgba(185,194,255,0.18) 55%, transparent 72%);
  mix-blend-mode: screen;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.3s ease;
  opacity: 0;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
}
@media (pointer: coarse) { .cursor, .grain { display: none; } }

/* reveal */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed { opacity: 1; transform: none; }

[data-scroll-reveal] {
  will-change: opacity, transform, filter;
}
[data-scroll-reveal].revealed {
  transition:
    opacity 0.64s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.64s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-scroll-reveal].revealed:not(.scroll-visible) {
  opacity: 0;
  transform: translateY(22px) scale(0.992);
  filter: blur(3px);
}
[data-scroll-reveal].revealed.scroll-past:not(.scroll-visible) {
  transform: translateY(-14px) scale(0.996);
}
[data-scroll-reveal].revealed.scroll-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ============================== TOP BAR */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(16px, 2.4vw, 26px) var(--mx);
  mix-blend-mode: difference;
}
.brand { color: var(--ink); font-size: 12px; letter-spacing: 0.22em; }
.topnav { display: flex; gap: clamp(16px, 3vw, 36px); }
.topnav a { color: var(--ink); opacity: 0.72; transition: opacity 0.25s ease; }
.topnav a:hover { opacity: 1; }

/* ============================== HERO */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--mx) clamp(40px, 7vh, 84px);
  overflow: hidden; isolation: isolate;
}
.hero-copy { position: relative; z-index: 2; max-width: 1100px; }
.hero-title {
  --hero-reveal-x: 0%;
  position: relative;
  margin: 0;
  font-weight: 600;
  font-size: clamp(44px, 7.6vw, 118px);
  line-height: 0.97;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-title-visual { display: block; }
.hero-title.is-unified-intro-gsap::after,
.hero-title.is-unified-intro-css::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -0.06em;
  bottom: -0.08em;
  left: calc(var(--hero-reveal-x) - 2px);
  width: 2px;
  pointer-events: none;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(29, 17, 255, 0.52);
  opacity: 0.85;
}
.hero-title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}
.hm-letter {
  display: inline-block;
  white-space: pre;
  overflow: hidden;
  vertical-align: bottom;
  perspective: 900px;
  will-change: transform;
}
.hero-title .hm-letter { overflow: visible; }
.hm-letter-glyph {
  display: inline-block;
  opacity: 1;
  transform: translateY(108%) rotateX(60deg);
  transform-origin: 50% 100%;
  transition: transform 2.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--glyph-delay, 0ms);
  will-change: transform;
}
body.text-reveal-ready .hero-title .hm-letter-glyph {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}
.contact-statement-slide .hm-letter-glyph {
  transform: none;
  transition: none;
}
.hm-space { width: 0.28em; }
.hero-title em { letter-spacing: -0.01em; color: var(--beam); }
.verb-slot {
  display: inline-flex; position: relative; min-width: 7.2ch;
  align-items: baseline;
  color: var(--beam);
  text-shadow: 0 0 28px rgba(120, 110, 255, 0.45);
  vertical-align: baseline;
  line-height: inherit;
}
.verb {
  display: block;
  overflow: hidden;
  vertical-align: baseline;
  perspective: 900px;
  line-height: inherit;
  padding: 0 0.04em 0.08em 0;
  margin: 0 -0.04em -0.08em 0;
}
.verb-glyph {
  display: inline-block;
  transform: translateY(112%) rotateX(45deg);
  transform-origin: 50% 100%;
  opacity: 1;
  filter: blur(0);
  transition:
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.42s ease,
    filter 0.5s ease;
  transition-delay: 0.08s;
  will-change: transform, opacity, filter;
}
body.text-reveal-ready .verb.is-in .verb-glyph { transform: translateY(0) rotateX(0); }
body.text-reveal-ready .verb.is-out .verb-glyph {
  transform: translateY(125%) rotateX(32deg);
  opacity: 0;
  filter: blur(4px);
  transition-delay: 0s;
}
body.text-reveal-ready .verb.is-prep .verb-glyph {
  transform: translateY(120%) rotateX(38deg);
  opacity: 0;
  filter: blur(4px);
  transition: none;
}
body.text-reveal-gsap .verb-glyph { transition: none !important; }

.scroll-hint {
  position: absolute; right: var(--mx); bottom: clamp(40px, 7vh, 84px);
  z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  color: var(--beam);
  writing-mode: horizontal-tb;
}
.hint-line {
  position: relative;
  width: 42px; height: 42px;
  background: none;
  animation: hintArrow 1.8s ease-in-out infinite;
  transform-origin: center;
  writing-mode: horizontal-tb;
}
.hint-line::before {
  content: "↓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--beam);
  font-family: var(--sans);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}
.hint-line::after {
  content: none;
}
@keyframes hintArrow { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }

/* ============================== SECTION HEADS */
.sec-head {
  display: flex; align-items: baseline; gap: clamp(16px, 2.5vw, 32px);
  flex-wrap: wrap;
  padding-top: clamp(28px, 5vh, 56px);
  border-top: 1px solid var(--line);
}
.sec-title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 62px);
  letter-spacing: -0.02em; line-height: 1.02;
}
.sec-title em { color: var(--beam); }
.sec-note { margin-left: auto; }

/* ============================== SERVICES / FILTER RAIL */
.services { padding: clamp(70px, 12vh, 150px) var(--mx) 0; }
.filter-rail {
  display: flex; flex-wrap: wrap; gap: 10px 10px;
  margin-top: clamp(28px, 5vh, 52px);
  --chip-pad-x: clamp(18px, 2vw, 28px);
  margin-left: calc(-1 * var(--chip-pad-x));
  width: calc(100% + var(--chip-pad-x));
}
.chip {
  appearance: none; cursor: pointer;
  border: 1px solid rgba(20, 19, 15, 0.12); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(22px, 1.85vw, 27px);
  letter-spacing: -0.01em;
  padding: 14px var(--chip-pad-x);
  display: inline-flex; align-items: baseline; gap: 10px;
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}
.chip .n { font-family: var(--mono); font-size: 11px; color: var(--muted); transition: color 0.3s ease; }
.chip:hover {
  border-color: var(--beam);
  background: var(--beam);
  color: #fff;
  transform: translateY(-2px);
}
.chip:hover .n { color: rgba(255,255,255,0.75); }
.chip:focus-visible { outline: 2px solid var(--beam); outline-offset: 3px; }
.chip.is-active {
  border-color: var(--beam); color: #fff;
  background: rgba(29, 17, 255, 0.18);
  box-shadow: 0 0 24px rgba(29, 17, 255, 0.35), inset 0 0 14px rgba(29, 17, 255, 0.18);
}
.chip.is-active .n { color: var(--beam); }

/* ============================== WORK GRID */
.work-experience { position: relative; background: var(--bg); }
.work { padding: clamp(48px, 8vh, 90px) var(--mx) clamp(70px, 12vh, 150px); }
.work-head {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
#work-filter-label { color: var(--beam); }
#work-count { display: none !important; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: 4px;
  column-gap: clamp(14px, 2vw, 26px);
  row-gap: 12px;
  align-items: start;
  margin-top: clamp(24px, 4vh, 44px);
}
.card {
  grid-column: span 4;
  align-self: start;
  cursor: pointer; border: 0; padding: 0; text-align: left;
  background: transparent; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.card.in { opacity: 1; transform: none; }
.card.hide { display: none; }
/* Editorial rhythm: 8/4 widths pack densely; wide accents stay shallow, never poster-tall. */
.card:nth-child(6n + 1) { grid-column: span 8; }
.card:nth-child(9n + 2) .card-media { aspect-ratio: 4 / 5; }
.card:nth-child(9n + 3) .card-media { aspect-ratio: 1 / 1; }
.card:nth-child(9n + 4) .card-media { aspect-ratio: 5 / 4; }
.card:nth-child(9n + 5) .card-media { aspect-ratio: 3 / 4; }
.card:nth-child(9n + 6) { grid-column: span 8; }
.card:nth-child(12n + 8) .card-media { aspect-ratio: 6 / 7; }
.card:nth-child(12n + 10) .card-media { aspect-ratio: 16 / 10; }
/* Keep width accents panoramic even when another nth-pattern also matches the card. */
.card:nth-child(6n + 1) .card-media { aspect-ratio: 21 / 10; }
.card:nth-child(9n + 6) .card-media { aspect-ratio: 16 / 9; }

.card-media {
  position: relative; overflow: hidden; border-radius: 14px;
  width: 100%; min-width: 0; flex: 0 0 auto;
  aspect-ratio: 4 / 3; background: var(--bg-2);
  border: 1px solid var(--line);
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.55) brightness(0.78) contrast(1.04);
  transform: scale(1.015);
  transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-media img,
.card:focus-visible .card-media img {
  filter: grayscale(0) brightness(1) contrast(1);
  transform: scale(1.05);
}
.card-media::after {           /* projector light sweep on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 24%, rgba(255,255,255,0.12) 38%, rgba(255,255,255,0.82) 50%, rgba(255,255,255,0.18) 61%, transparent 72%);
  transform: translateX(-110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  mix-blend-mode: screen;
}
.card:hover .card-media::after { transform: translateX(110%); }
.card-idx {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: rgba(236, 238, 242, 0.65);
  display: none !important;
}
.card-tag {
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(236, 238, 242, 0.7);
  display: none !important;
}
.card-title {
  margin: 0; font-weight: 600;
  font-size: clamp(16px, 1.55vw, 21px);
  letter-spacing: -0.015em; line-height: 1.18;
  transition: color 0.3s ease;
}
.card:hover .card-title { color: var(--beam); }
/* ============================== ABOUT / WHY US */
.about {
  padding: 0 var(--mx) clamp(70px, 12vh, 150px);
  scroll-margin-top: clamp(76px, 8vw, 96px);
}
.about > .sec-head { border-top: 0; }
.about-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(28px, 5vh, 56px);
}
.about-text {
  margin: 0;
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.45; letter-spacing: -0.01em;
  color: var(--ink);
}
.about-text .hl { color: var(--beam); font-family: var(--serif); font-style: italic; }
/* ============================== SERVICES OVERVIEW */
.service-overview {
  padding: 0 var(--mx) clamp(70px, 12vh, 150px);
  background: var(--bg);
}
.service-overview-list {
  width: min(100%, 1180px);
  margin-top: clamp(42px, 7vh, 84px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.7vw, 36px);
}
.service-capability {
  width: 100%;
  display: block;
}
.service-capability-trigger {
  appearance: none;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(22px, 1.85vw, 27px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: color 0.35s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-capability-trigger:hover,
.service-capability.is-active .service-capability-trigger {
  color: var(--accent);
  transform: translateX(clamp(8px, 1.2vw, 18px));
}
.service-capability-trigger:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 7px;
}
.service-capability-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    grid-template-rows 0.58s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.32s ease,
    transform 0.58s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.58s;
}
.service-capability-panel-inner {
  overflow: hidden;
}
.service-capability-panel p {
  width: min(100%, 740px);
  margin: clamp(14px, 2vw, 26px) 0 0 clamp(8px, 1.2vw, 18px);
  color: var(--ink);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.38;
  letter-spacing: -0.015em;
}
.service-capability.is-active .service-capability-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

/* ============================== CONTACT */
.contact {
  padding: clamp(80px, 14vh, 170px) var(--mx) clamp(30px, 5vh, 52px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 90% at 50% 115%, rgba(29, 17, 255, 0.32) 0%, transparent 70%),
    var(--bg);
  display: flex; flex-direction: column; gap: clamp(26px, 5vh, 48px);
}
.contact-mail {
  font-weight: 600;
  font-size: clamp(30px, 6.4vw, 96px);
  letter-spacing: -0.03em; line-height: 1;
  width: max-content; max-width: 100%;
  word-break: break-all;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.contact-mail .at { color: var(--beam); font-family: var(--serif); font-style: italic; }
.contact-mail:hover { color: #fff; text-shadow: 0 0 36px rgba(120, 110, 255, 0.55); }
.contact-row {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.socials { display: inline-flex; gap: 22px; }
.socials a { color: var(--ink); opacity: 0.8; }
.socials a:hover { opacity: 1; }

/* ============================== PROJECT OVERLAY */
.proj-overlay { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.proj-overlay.open { visibility: visible; }
.proj-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 7, 10, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.4s ease;
}
.proj-overlay.open .proj-backdrop { opacity: 1; }
.proj-sheet {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(640px, 100%);
  background: var(--bg-2); border-left: 1px solid var(--line);
  overflow-y: auto;
  transform: translateX(40px); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.proj-overlay.open .proj-sheet { transform: none; opacity: 1; }
.proj-close {
  position: sticky; top: 0; z-index: 2; float: right;
  margin: 18px 22px 0 0;
  appearance: none; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(10, 11, 14, 0.7); color: var(--ink);
  padding: 9px 16px; cursor: pointer;
}
.proj-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.proj-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-video-strip {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.proj-video-strip iframe,
.proj-video-strip video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}
.proj-body { padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px; }
.proj-tag { color: var(--beam); margin: 0; }
.proj-headline {
  margin: 0; font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em; line-height: 1.12;
}
.proj-story { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.proj-credits {
  margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 8px 22px;
}
.proj-credits dt { color: var(--muted); }
.proj-credits dd { margin: 0; color: var(--ink); }
body.modal-open { overflow: hidden; }

/* ============================== RESPONSIVE */
@media (max-width: 1020px) {
  .card { grid-column: span 6; }
  .card:nth-child(6n + 1),
  .card:nth-child(9n + 6) { grid-column: span 12; }
}
@media (max-width: 640px) {
  .grid {
    grid-auto-rows: auto;
    row-gap: clamp(18px, 6vw, 28px);
  }
  .card,
  .card:nth-child(6n + 1),
  .card:nth-child(9n + 6) { grid-column: span 12; }
  .card:nth-child(6n + 1) .card-media,
  .card:nth-child(9n + 2) .card-media,
  .card:nth-child(9n + 3) .card-media,
  .card:nth-child(9n + 4) .card-media,
  .card:nth-child(9n + 5) .card-media,
  .card:nth-child(9n + 6) .card-media,
  .card:nth-child(12n + 8) .card-media,
  .card:nth-child(12n + 10) .card-media { aspect-ratio: 4 / 3; }
  .about-grid { grid-template-columns: 1fr; }
  .topnav { gap: 14px; }
  .scroll-hint { display: none; }
  .hero { padding-bottom: 56px; }
}

/* ============================== REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .card { opacity: 1; transform: none; }
  .grain, .cursor { display: none; }
}

/* ============================== LIGHT EDITORIAL SURFACE */

body {
  background: var(--bg);
  color: var(--ink);
}

.mono {
  letter-spacing: 0.14em;
}

.grain {
  opacity: 0.03;
  mix-blend-mode: multiply;
}

.cursor {
  display: none;
}

.topbar {
  mix-blend-mode: normal;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.brand-terminal {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  animation: terminalGlyphBlink 1.1s steps(2, end) infinite;
}

@keyframes terminalGlyphBlink {
  50% { color: transparent; }
}

.topnav a {
  color: var(--accent);
  opacity: 0.9;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.topnav a:hover {
  color: var(--ink);
  opacity: 1;
}

.hero {
  background: var(--bg);
}

#hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform-origin: center center;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.particle-fallback .particle-canvas {
  display: none;
}

.particle-fallback .hero-fallback {
  display: flex;
}

.hero-fallback img {
  width: min(46vw, 520px);
  height: auto;
  opacity: 0.9;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(238,239,241,0.62) 0%, rgba(238,239,241,0) 22%);
}

.hero-copy {
  z-index: 2;
  max-width: 1180px;
}

#work-filter-label,
.proj-tag {
  color: var(--accent);
}

.hero-title {
  color: var(--ink);
  font-size: clamp(48px, 8.2vw, 132px);
  line-height: 0.92;
}

.hero-title em,
.verb-slot {
  color: var(--accent);
  text-shadow: none;
}

.scroll-hint {
  color: var(--accent);
}

.hint-line {
  background: none;
}

.services,
.work,
.about {
  background: var(--bg);
}

.sec-head,
.work-head,
.contact-row,
.proj-credits {
  border-color: var(--line);
}

.chip {
  border-color: rgba(20, 19, 15, 0.12);
  color: var(--ink);
  background: transparent;
  font-weight: 500;
}

.chip:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.chip:hover .n {
  color: rgba(255,255,255,0.75);
}

.chip.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.chip.is-active .n {
  color: rgba(255,255,255,0.75);
}

.card-media {
  border-radius: 8px;
  background: var(--bg-2);
  border-color: var(--line);
}

.card-media img {
  filter: grayscale(0.16) brightness(0.96) contrast(1.02);
}

.card:hover .card-media img,
.card:focus-visible .card-media img {
  filter: grayscale(0) brightness(1.08) contrast(1.03);
}

.card-media::after {
  background: linear-gradient(115deg, transparent 24%, rgba(255,255,255,0.12) 38%, rgba(255,255,255,0.82) 50%, rgba(255,255,255,0.18) 61%, transparent 72%);
  mix-blend-mode: screen;
}

.card:hover .card-title {
  color: var(--accent);
}

.card-idx,
.card-tag {
  color: rgba(255,255,255,0.74);
}

.about-text,
.proj-credits dd {
  color: var(--ink);
}

.about-text .hl {
  color: var(--accent);
}

.contact {
  background: var(--accent);
  color: #EEEFF1;
  border-top: 0;
}

.contact .mono {
  color: rgba(238,239,241,0.72);
}

.contact-mail .at,
.socials a {
  color: #EEEFF1;
}

.contact-mail:hover {
  color: #fff;
  text-shadow: none;
}

.proj-backdrop {
  background: rgba(238, 239, 241, 0.72);
}

.proj-sheet {
  background: var(--bg);
  border-left-color: var(--line);
}

.proj-close {
  background: rgba(238,239,241,0.9);
  color: var(--accent);
}

.proj-story,
.proj-credits dt {
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 38px;
    line-height: 0.96;
  }

  .hero-title-line {
    width: auto;
    max-width: calc(100vw - (var(--mx) * 2));
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 35px;
  }
}

/* V2 composition pass: header, hero, footer, project sheet */
.topbar {
  align-items: center;
}

.brand,
.topnav,
.topnav a {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.brand,
.chip,
.service-capability-trigger,
.proj-project-nav,
.proj-gallery-nav,
.socials a {
  min-height: 44px;
  align-items: center;
}

.proj-project-nav,
.proj-gallery-nav,
.socials a {
  display: inline-flex;
}

.hero {
  padding-bottom: clamp(10px, 2vh, 28px);
}

.hero-copy {
  transform: none;
}

.sec-head {
  gap: 0;
}

.about-grid {
  grid-template-columns: minmax(0, 1fr);
}

.about-text {
  max-width: 44em;
}

.contact {
  min-height: min(760px, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  grid-template-rows: 1fr auto;
  gap: clamp(32px, 5vw, 84px);
  padding: clamp(54px, 7vw, 92px) var(--mx) clamp(34px, 5vw, 62px);
  background: var(--accent);
}

.contact-statement {
  align-self: start;
  display: grid;
  color: #EEEFF1;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(42px, 5.2vw, 88px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.contact-statement-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.contact-statement-slide.is-active,
.contact-statement-slide.is-leaving {
  visibility: visible;
}

.contact-statement-slide > span {
  opacity: 1;
  transform: none;
}

.contact-statement-slide.is-entering {
  animation: footer-wipe-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-statement-slide.is-leaving {
  animation: footer-wipe-out 0.6s cubic-bezier(0.55, 0, 0.55, 0.2) both;
}

@keyframes footer-wipe-in {
  from { transform: translateY(100%); opacity: 0; filter: blur(4px); }
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes footer-wipe-out {
  from { transform: translateY(0); opacity: 1; filter: blur(0); }
  to { transform: translateY(100%); opacity: 0; filter: blur(4px); }
}

.contact-main {
  align-self: start;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: clamp(44px, 6vh, 72px);
  color: #EEEFF1;
  margin-top: 0.12em;
}

.contact-reach {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-label,
.contact-info h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,239,241,0.68);
}

.contact-mail,
.contact-person {
  width: auto;
  max-width: none;
  font-family: var(--sans);
  font-size: clamp(18px, 1.7vw, 30px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  word-break: normal;
  text-transform: none;
}

.contact-person {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-transform: none;
}

.contact-person + .contact-person {
  margin-top: clamp(12px, 1.4vw, 20px);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 64px);
}

.contact-info h3 {
  margin-bottom: 12px;
}

.contact-info p {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 1.45;
}

.proj-project-controls {
  margin-top: auto;
  padding-top: clamp(36px, 6vh, 72px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
}

.proj-project-nav {
  appearance: none;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  font: 400 11px/1.3 var(--mono);
  letter-spacing: 0.13em;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.proj-project-nav:hover,
.proj-project-nav:focus-visible {
  color: var(--accent);
  border-color: currentColor;
  outline: none;
}

.contact-row {
  grid-column: 1;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 0;
  padding-top: 0;
  color: rgba(238,239,241,0.72);
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-self: start;
}

.socials a {
  color: #EEEFF1;
  font-size: clamp(15px, 1.35vw, 24px);
  line-height: 1.08;
  letter-spacing: 0;
  font-family: var(--sans);
}

.proj-sheet {
  width: min(880px, 74vw);
}

.proj-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  float: none;
  margin: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  letter-spacing: 0;
  background: rgba(238,239,241,0.88);
  border-color: rgba(20,19,15,0.16);
}

.proj-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
}

.proj-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.proj-video-strip {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.proj-video-strip iframe,
.proj-video-strip video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.proj-body {
  padding: clamp(26px, 4vw, 54px);
}

@media (max-width: 760px) {
  .topbar {
    gap: 18px;
  }

  .brand,
  .topnav,
  .topnav a {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .topnav {
    gap: clamp(9px, 3vw, 14px);
    align-items: center;
  }

  .topnav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .brand {
    display: inline-grid;
    grid-template-columns: 22px auto;
    grid-template-rows: 44px;
    align-items: center;
    column-gap: 6px;
    row-gap: 0;
    min-height: 44px;
  }

  .brand-name {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    line-height: 1;
  }

  .brand-terminal {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    width: 22px;
    height: 16px;
    font-size: inherit;
  }

  .hero-copy {
    transform: none;
  }

  .hero {
    padding-bottom: clamp(42px, 8vh, 70px);
  }

  .hero-title {
    font-size: 38px;
    line-height: 0.96;
  }

  .hero-title-line:nth-child(3) em {
    display: block;
  }

  .chip {
    font-size: clamp(17px, 5.2vw, 22px);
    padding: 12px var(--chip-pad-x);
  }

  .filter-rail {
    --chip-pad-x: 16px;
  }

  .service-overview-list {
    margin-top: 34px;
    gap: 20px;
  }

  .service-capability-trigger {
    font-size: clamp(17px, 5.2vw, 22px);
    line-height: 1.15;
  }

  .service-capability-panel p {
    margin-top: 13px;
    margin-left: 0;
    font-size: 17px;
  }

  .service-capability-trigger:hover,
  .service-capability.is-active .service-capability-trigger {
    transform: translateX(0);
  }

  .contact {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .contact-statement {
    font-size: clamp(30px, 8.8vw, 38px);
  }

  .contact-statement [data-repel-line] {
    white-space: nowrap;
  }

  .contact-row,
  .contact-info {
    grid-template-columns: 1fr;
  }

  .proj-sheet {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .topbar {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    grid-template-columns: 22px;
    grid-template-rows: 44px;
    min-width: 22px;
  }

  .brand-name {
    display: none;
  }

  .topnav {
    margin-left: auto;
    gap: 8px;
  }

  .topnav a {
    font-size: 11px;
    letter-spacing: 0.05em;
  }
}

/* Work filters: open text links with an animated leading rule.
   Interaction remains owned by the existing JS hover/click filter logic. */
.filter-rail {
  --filter-rule-width: 30px;
  --filter-rule-gap: 12px;
  column-gap: clamp(24px, 3vw, 44px);
  row-gap: 10px;
  margin-left: 0;
  width: auto;
}

.chip {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 5px 0;
  gap: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  transform: none;
  transition: color 0.28s ease, padding-left 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip .n {
  display: none;
}

.chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: auto;
  width: var(--filter-rule-width);
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.chip:hover,
.chip.is-active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  transform: none;
  padding-left: calc(var(--filter-rule-width) + var(--filter-rule-gap));
}

.chip:hover::before,
.chip.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

.chip:hover:not(.is-active) {
  padding-left: 0;
}

.chip:hover:not(.is-active)::before {
  opacity: 0;
  transform: scaleX(0);
}

.chip:hover .n,
.chip.is-active .n {
  color: var(--accent);
}

.chip:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}

@media (max-width: 760px) {
  .filter-rail {
    --filter-rule-width: 30px;
    --filter-rule-gap: 10px;
    column-gap: 28px;
    row-gap: 7px;
  }

  .chip {
    padding: 4px 0;
    min-height: 44px;
  }
}

/* Contact block rhythm: each content row has an explicit, predictable gap. */
.contact-reach {
  gap: 0;
}

.contact-reach .contact-label {
  margin-bottom: 14px;
}

.contact-reach .contact-mail {
  margin-bottom: clamp(16px, 1.6vw, 24px);
}

.contact-reach .contact-person {
  gap: 3px;
  line-height: 1.16;
}

@media (max-width: 760px) {
  .contact-reach .contact-label {
    margin-bottom: 12px;
  }

  .contact-reach .contact-mail {
    margin-bottom: 16px;
  }
}

/* ==========================================================================
   Project detail — light editorial split view
   Sticky project narrative on the left, scrolling media stream on the right.
   ========================================================================== */
.proj-overlay {
  background: var(--bg);
}

.proj-backdrop {
  display: none;
}

.proj-sheet {
  inset: 0;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
  align-items: start;
  background: var(--bg);
  border: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.58s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.42s ease;
}

.proj-overlay.open .proj-sheet {
  transform: translateY(0);
  opacity: 1;
}

.proj-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 110;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(238, 239, 241, 0.9);
  color: var(--ink);
  backdrop-filter: blur(12px);
}

.proj-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.proj-body {
  grid-column: 1;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100svh;
  padding: clamp(92px, 11vh, 148px) clamp(34px, 5vw, 86px) clamp(42px, 6vw, 82px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
}

.proj-tag {
  margin: 0 0 clamp(26px, 4vh, 44px);
  color: var(--accent);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.13em;
}

.proj-headline {
  max-width: 10.5em;
  margin: 0;
  font-size: clamp(38px, 4.15vw, 68px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.proj-story {
  max-width: 34em;
  margin: clamp(38px, 6vh, 72px) 0 0;
  color: var(--ink);
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.48;
  letter-spacing: -0.01em;
}

.proj-credits {
  width: 100%;
  max-width: 34em;
  margin: clamp(34px, 5vh, 62px) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: 9px 24px;
  font-size: 11px;
  line-height: 1.45;
}

.proj-visuals {
  grid-column: 2;
  min-width: 0;
  background: var(--bg-2);
}

.proj-media {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  overflow: visible;
  background: var(--bg-2);
}

.proj-gallery-stream {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.proj-gallery-frame {
  position: relative;
  width: 100%;
  min-height: 28vw;
  margin: 0;
  overflow: hidden;
  background: #dfe1e5;
  opacity: 0;
  transform: translateY(28px) scale(0.988);
  transform-origin: 50% 50%;
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-frame.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.proj-gallery-frame img {
  width: 100%;
  height: auto;
  min-height: 28vw;
  display: block;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.98);
  transform: scale(1.012);
  transition: filter 0.8s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-frame.is-visible img {
  filter: saturate(1) contrast(1);
  transform: scale(1);
}

.proj-media.is-carousel {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dfe1e5;
}

.proj-gallery-stream.is-carousel {
  position: absolute;
  inset: 0;
  display: block;
}

.proj-gallery-stream.is-carousel .proj-gallery-frame {
  position: absolute;
  inset: 0;
  min-height: 0;
  opacity: 0;
  transform: translateX(4%) scale(1.01);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-stream.is-carousel .proj-gallery-frame.is-current {
  z-index: 2;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.proj-gallery-stream.is-carousel .proj-gallery-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.proj-gallery-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  background: rgba(20,19,15,0.66);
  color: #fff;
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.proj-gallery-controls[hidden] { display: none; }

.proj-gallery-nav {
  appearance: none;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 0.25s ease;
}

.proj-gallery-nav:hover,
.proj-gallery-nav:focus-visible {
  color: #a9a2ff;
  outline: none;
}

.proj-gallery-count {
  min-width: 56px;
  text-align: center;
  color: rgba(255,255,255,0.78);
}

.proj-video-strip {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  opacity: 0;
  transform: translateY(28px) scale(0.988);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-video-strip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 820px) {
  .proj-sheet {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .proj-body {
    display: contents;
    position: static;
    min-height: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .proj-tag {
    order: 1;
    margin: 0 0 clamp(18px, 4vh, 28px);
    padding: 92px var(--mx) 0;
  }

  .proj-headline {
    order: 2;
    max-width: 11em;
    padding: 0 var(--mx);
    font-size: clamp(38px, 11vw, 58px);
  }

  .proj-visuals {
    order: 3;
    width: 100%;
    margin-top: clamp(24px, 6vh, 38px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .proj-visuals.is-vertical {
    display: contents;
    margin-top: 0;
    border: 0;
  }

  .proj-visuals.is-vertical .proj-media,
  .proj-visuals.is-vertical .proj-gallery-stream {
    display: contents;
  }

  .proj-visuals.is-vertical .proj-gallery-frame:first-child {
    order: 3;
    margin-top: clamp(24px, 6vh, 38px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .proj-visuals.is-vertical .proj-gallery-frame:not(:first-child) {
    order: 7;
    margin-top: 1px;
  }

  .proj-visuals.is-vertical .proj-video-strip {
    order: 8;
  }

  .proj-story {
    order: 4;
    max-width: none;
    margin: 0;
    padding: 38px var(--mx) 0;
    font-size: 17px;
  }

  .proj-credits {
    order: 5;
    width: auto;
    max-width: none;
    margin: 32px var(--mx) 0;
  }

  .proj-gallery-frame,
  .proj-gallery-frame img {
    min-height: 56vw;
  }

  .proj-media.is-carousel {
    aspect-ratio: 4 / 3;
  }

  .proj-gallery-stream.is-carousel .proj-gallery-frame,
  .proj-gallery-stream.is-carousel .proj-gallery-frame img {
    min-height: 0;
  }

  .proj-project-controls {
    order: 6;
    margin: 0;
    padding: 44px var(--mx) clamp(38px, 8vh, 64px);
    gap: 18px 24px;
  }
}

/* ==========================================================================
   2026-06 polish pass — shared motion language and responsive Work geometry
   ========================================================================== */
[hidden] { display: none !important; }

.direction-arrow {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-title,
.hero-title-line,
.verb-slot,
.hero-title em {
  overflow: visible;
}

.hero {
  padding-bottom: clamp(90px, 10.5vh, 118px);
}

body.text-reveal-complete .hero-title .hm-letter {
  overflow: visible;
}

.verb-slot {
  width: var(--verb-slot-width, 7.2ch);
  min-width: var(--verb-slot-width, 7.2ch);
}

.contact-statement-slide .hm-letter-glyph {
  transition-duration: 0.82s;
}

/* GSAP writes a transform every frame. Leaving the CSS transition active at
   the same time makes the rendered glyph lag behind and briefly reverse after
   GSAP clears its inline transform. The CSS transition remains the fallback
   when GSAP is unavailable. */
.contact-statement.has-gsap-motion .hm-letter-glyph {
  transition: none;
}

.hint-line {
  display: grid;
  place-items: center;
}

.hint-line::before { content: none; }
.hint-line .direction-arrow { width: 34px; height: 34px; }

#studio-address,
#company-details {
  white-space: pre-line;
}

/* Quick full-sheet mask reveal keeps keyboard/project-to-project opens immediate. */
.proj-sheet {
  transform: none;
  opacity: 1;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 0.56s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-overlay.open .proj-sheet {
  transform: none;
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.proj-overlay.is-source-opening .proj-sheet {
  clip-path: inset(0 0 0 0);
  transition: none;
}

.project-open-transition {
  position: fixed;
  z-index: 170;
  display: block;
  margin: 0;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  box-shadow: 0 18px 54px rgba(20, 19, 15, 0.18);
  will-change: left, top, width, height, border-radius, box-shadow;
}

.proj-overlay.is-source-opening .proj-gallery-frame:first-child img {
  opacity: 0;
}

.proj-close {
  left: 20px;
  right: auto;
  width: auto;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255,255,255,0.91);
  box-shadow: 0 8px 24px rgba(20,19,15,0.08);
}

.proj-close .direction-arrow {
  width: 18px;
  height: 18px;
}

.proj-close:hover,
.proj-close:focus-visible {
  border-color: rgba(29,17,255,0.42);
  color: var(--accent);
  transform: translateX(-2px);
  outline: none;
}

.proj-gallery-frame {
  isolation: isolate;
  opacity: 1;
  transform: translateY(18px) scale(0.992);
  transition:
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-frame::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -16% 0 auto;
  height: 18%;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(90deg, rgba(29,17,255,0.6) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(29,17,255,0.24) 0 2px, transparent 2px 7px);
  mask-image: linear-gradient(to bottom, transparent, #000 24%, #000 66%, transparent);
  mix-blend-mode: multiply;
}

.proj-gallery-frame.is-visible {
  transform: translateY(0) scale(1);
}

.proj-gallery-frame.uses-css-reveal.is-visible::after {
  animation: projectPixelTrail 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes projectPixelTrail {
  0% { transform: translateY(0); opacity: 0; }
  16% { opacity: 0.66; }
  72% { opacity: 0.34; }
  100% { transform: translateY(650%); opacity: 0; }
}

.proj-gallery-frame img {
  clip-path: none;
  transform: none;
  transition:
    opacity 0.3s ease,
    filter 0.54s ease,
    transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-frame:not(.is-reveal-complete):not(.uses-css-reveal) img {
  opacity: 0;
}

.proj-gallery-frame.uses-css-reveal:not(.is-visible) img {
  clip-path: inset(0 0 100% 0);
  transform: translateY(-1.5%) scale(1.025);
}

.proj-gallery-frame.uses-css-reveal.is-visible img {
  clip-path: inset(0 0 0 0);
  transform: translateY(0) scale(1);
  transition: clip-path 0.46s cubic-bezier(0.16, 1, 0.3, 1), transform 0.54s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-gallery-frame.has-webgl-reveal:not(.is-reveal-complete) img {
  opacity: 0;
}

.proj-reveal-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.proj-reveal-canvas.is-finished {
  opacity: 0;
}

.proj-gallery-stream.is-carousel .proj-gallery-frame {
  clip-path: none;
}

.proj-gallery-stream.is-carousel .proj-gallery-frame img { clip-path: none; }

.proj-gallery-stream.is-carousel .proj-gallery-frame::after {
  display: none;
}

@media (max-width: 760px) {
  .hero { padding-bottom: clamp(60px, 8vh, 78px); }
  .topnav a:nth-child(2) { display: inline-flex; }
  .proj-close { left: var(--mx); top: 16px; }
}

@media (max-width: 820px) {
  .card-idx,
  .card-tag { display: none !important; }
}

@media (max-width: 760px) {
  #work .sec-title em,
  #work-instruction {
    white-space: nowrap;
  }

  #work-instruction {
    font-size: 9.5px;
    letter-spacing: 0.1em;
  }

  .socials {
    gap: 3px;
  }
}

/* Final interaction/accessibility pass. */
.contact-mail:focus-visible,
.contact-person:focus-visible,
.socials a:focus-visible,
.topnav a:focus-visible,
.brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.contact-person {
  transition: opacity 0.24s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-person:hover,
.contact-person:focus-visible {
  opacity: 0.82;
  transform: translateX(3px);
}

/* ===========================================================================
   Universal Work masonry
   The archive always follows normal document scrolling. JavaScript chooses
   the largest column count that keeps cards near a 280px editorial width,
   with two columns as the hard minimum.
   ========================================================================== */
html { scroll-snap-type: none; }

.work-experience,
.has-coarse-pointer .work-experience {
  height: auto;
  min-height: 0;
  display: block;
  overflow: visible;
  scroll-snap-align: none;
}

.work {
  min-height: 0;
  padding: clamp(48px, 7vh, 84px) var(--mx) clamp(80px, 12vh, 150px);
}

.work-head { display: flex; }

.grid {
  --work-column-count: 2;
  display: grid;
  grid-template-columns: repeat(var(--work-column-count), minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 3px;
  column-gap: clamp(12px, 1.7vw, 24px);
  row-gap: clamp(12px, 1.7vw, 22px);
  align-items: start;
  width: 100%;
  margin-top: clamp(24px, 4vh, 44px);
}

.grid .card,
.grid .card:nth-child(6n + 1),
.grid .card:nth-child(9n + 6) {
  position: relative;
  width: auto;
  min-width: 0;
  grid-column: auto;
  align-self: start;
  margin: 0;
}

.work .grid .card .card-media {
  aspect-ratio: 4 / 3 !important;
}

.work .grid .card:nth-child(8n + 2) .card-media { aspect-ratio: 4 / 5 !important; }
.work .grid .card:nth-child(8n + 3) .card-media { aspect-ratio: 1 / 1 !important; }
.work .grid .card:nth-child(8n + 4) .card-media { aspect-ratio: 16 / 10 !important; }
.work .grid .card:nth-child(8n + 6) .card-media { aspect-ratio: 3 / 4 !important; }
.work .grid .card:nth-child(8n + 7) .card-media { aspect-ratio: 5 / 4 !important; }

.card:focus-visible {
  border-radius: 14px;
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.proj-project-controls { flex-wrap: wrap; }
.proj-share { margin-left: auto; }
.proj-share[data-copied="true"] { color: var(--accent); }

#tilt-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 28px;
  border: 1px solid rgba(29, 17, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: tilt-hint-pulse 2.4s ease-in-out infinite;
}

#tilt-hint:hover { background: rgba(29, 17, 255, 0.08); }

@keyframes tilt-hint-pulse {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

@media (max-width: 760px) {
  #tilt-hint { font-size: 10px; padding: 7px 16px; }
}

@media (max-width: 640px) {
  .grid {
    column-gap: 10px;
    row-gap: 14px;
  }

  .card { gap: 8px; }
  .card-media { border-radius: 10px; }
  .card-title {
    font-size: clamp(13px, 3.7vw, 15px);
    line-height: 1.16;
  }

  .proj-share {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
}
