*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #05070a;
  --ink: #101215;
  --muted: #59616a;
  --line: rgba(8, 12, 16, .22);
  --accent: #00ff41;
  --accent-rgb: 0,255,65;
  /* Title/hover-text face — matches the credits title (Tom). Change here to reskin
     every heading + hover title at once. */
  --title-font: "DM Sans", Arial, sans-serif;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-anchor: none;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.colophon {
  display: none;
}

.intro-name {
  position: fixed;
  left: 50%;
  top: clamp(58px, 11vh, 118px);
  z-index: 2;
  margin: 0;
  color: var(--accent);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(70px, 15vw, 220px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: 50% 0%;
  white-space: nowrap;
}

.intro-name .nm {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.scroll-hint {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 70;
  color: var(--accent);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0;
  pointer-events: none;
  animation: hintblink 1.6s ease-in-out infinite;
}

.intro {
  position: relative;
  z-index: 3;
  height: 197vh;
}

.intro-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  perspective: 1300px;
  perspective-origin: 50% 50%;
}

.head {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 4;
  /* Scales with the tablet via --ui-scale; the overlap margin scales too so the head keeps
     the same seat over the (narrower) tablet. */
  width: calc(clamp(340px, 46vw, 670px) * var(--ui-scale, 0.95));
  max-width: none;
  margin-bottom: calc(-230px * var(--ui-scale, 0.95));
  pointer-events: none;
  user-select: none;
  transform: translateX(-50%) translateZ(calc(-1 * var(--half-depth)));
  transform-origin: 50% 100%;
}

@keyframes hintblink {

  0%,
  100% {
    opacity: .25;
  }

  50% {
    opacity: 1;
  }
}

.masthead {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: auto;
  height: calc(var(--masthead-h) + var(--header-shift, 0px));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--tablet-radius) var(--tablet-radius) 0 0;
  background: transparent;
  color: #171b1d;
  /* 2px in front of the tablet's front face: when the bezel grows past the tablet's top
     edge, the top wall + corner facets would otherwise depth-sort in front of it. */
  transform: translateZ(2px);
}

/* The inexpensive cover grows from the tablet top. Only the fixed-height strip below it
   pays for backdrop blur, so scroll depth no longer creates an enormous filtered surface. */
.masthead::before {
  content: "";
  position: absolute;
  inset: calc(-1 * min(var(--header-shift, 0px), var(--masthead-top-cover, 96px))) 0 var(--masthead-h);
  border-radius: var(--tablet-radius) var(--tablet-radius) 0 0;
  background: linear-gradient(#ffffff, #f4f8fc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96);
  pointer-events: none;
}

.masthead-glass {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 var(--masthead-h);
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-height: var(--masthead-h);
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(72, 88, 106, .24);
  border-radius:
    max(0px, calc(var(--tablet-radius) - var(--header-shift, 0px)))
    max(0px, calc(var(--tablet-radius) - var(--header-shift, 0px)))
    0 0;
    background: linear-gradient(#ffffff, #f4f8fc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 8px 22px rgba(96, 124, 158, .12);
}

.masthead-spacer {
  height: calc(var(--masthead-h) - var(--paper-pad));
  margin-bottom: 16px;
}

.urlbar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 3px 10px;
  border: 1px solid rgba(12, 14, 16, .7);
  border-radius: 4px;
  background: #ffffff;
  color: #1a1d1f;
}

.url-8bit {
  flex: 0 1 auto;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(7px, .78vw, 10px);
  line-height: 1;
  color: rgba(20, 24, 26, .84);
}

.url-name {
  position: relative;
  flex: 0 0 auto;
  margin: 0 .42em;
  color: var(--accent);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(18px, 2.1vw, 32px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: 0;
}

.url-sizer {
  visibility: hidden;
}

.url-live {
  position: absolute;
  inset: 0;
  white-space: nowrap;
}

.bookmarks {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1;
}

.bm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(20, 24, 26, .9);
}

.bm-ico {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(20, 24, 26, .72);
  border-radius: 3px;
  background: #ff9fd8;
}

.bm-callsheet {
  appearance: none;
  padding: 4px 7px;
  border: 1px solid rgba(0, 112, 32, .55);
  border-radius: 3px;
  background: rgba(var(--accent-rgb), .08);
  color: #008b2b;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.bm-callsheet:hover {
  border-color: #00b73c;
  background: rgba(var(--accent-rgb), .16);
  color: #006f22;
}

.bm-callsheet[aria-busy="true"] {
  cursor: progress;
}

/* ===== HANDS — TUNING (see also main.js banner) =====
   width clamp: overall hand size.
   --hand-art-rise: fixed upward lift, in px.
   --hand-edge-x: horizontal seat; left more negative = further out, right less negative = further out.
   --hand-rz: whole-hand rotation.
   .hand-art rotate: art orientation.
   right-hand tattoo --fx/--fy: finger position, kept inline in index.html. */
.hand {
  --hand-art-rise: clamp(48px, 6vw, 76px);
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(280px, 31vw, 430px);
  z-index: 62;
  pointer-events: none;
  /* Single transform (X grip + vertical + Z depth + hand tilt) — a nested vertical layer
     projects differently under tablet tilt and pulls the hands together as they travel, so
     the vertical stays in THIS transform. The compositor scroll-timeline animates the whole
     transform with the static parts baked in; --hand-local-y is the fallback when the
     scroll-timeline is unavailable. */
  transform: translate3d(var(--hand-edge-x, 0), calc(var(--hand-local-y, 22vh) - var(--hand-art-rise)), 40px) rotate(var(--hand-rz, 0deg));
  transform-origin: var(--hand-origin-x, 50%) 35%;
  transform-style: preserve-3d;
  will-change: transform;
}

.hand img {
  width: 100%;
  height: auto;
  user-select: none;
}

.hand-art {
  position: relative;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
}

.hand-frame {
  visibility: hidden;
  pointer-events: none;
}

.hand-frame:not(.hand-frame-sizer) {
  position: absolute;
  inset: 0;
}

.hand-frame.is-active {
  visibility: visible;
}

/* Left-hand seat/size/rotation routed through :root vars (baked defaults as fallbacks)
   so the dev panel can tune the V5 art live, same as the right. */
.hand-left {
  --hand-rz: -5deg;
  --hand-origin-x: var(--hand-l-origin, 34%);
  --hand-edge-x: var(--hand-l-edge, -53%);
  --hand-art-rise: calc(clamp(48px, 6vw, 76px) + var(--hand-l-y, 134px));
  /* Width stays FLUID with the viewport (like the head title) — the dev panel tunes a
     multiplier (--hand-l-scale), not a fixed px, so the size keeps scaling with the window
     instead of getting pinned. Cap ~340px tracks the head's clamp cap. */
  width: calc(var(--ui-scale, 0.95) * var(--hand-l-scale, 1.52) * clamp(207px, 23vw, 340px));
}

.hand-left .hand-art {
  /* scaleX flip defaults to 1 (no-op); the dev "flip horizontal" toggle drives it.
     It sits on .hand-art so the art AND the finger-hit boxes mirror together. */
  transform: scaleX(var(--hand-l-flip, 1)) rotate(var(--hand-l-rot, 10deg));
}

/* Right-hand seat/size/rotation routed through :root-level vars (with the baked
   defaults as fallbacks) so the dev panel can tune them live. Defined at :root, not
   here, or a local definition would shadow the value the dev tool sets. */
.hand-right {
  --hand-rz: 5deg;
  --hand-origin-x: var(--hand-r-origin, 60%);
  --hand-edge-x: var(--hand-r-edge, -47%);
  --hand-art-rise: calc(clamp(48px, 6vw, 76px) + var(--hand-r-y, 134px));
  left: 100%;
  /* Mirror the left hand's width (V5 right is the left's mirror). Fluid multiplier model
     (--hand-r-scale) so it scales with the window like the head. */
  width: calc(var(--ui-scale, 0.95) * var(--hand-r-scale, 1.52) * clamp(207px, 23vw, 340px));
}

.hand-right .hand-art {
  /* V5 right art is upright portrait (a proper mirror of the left), so it no longer
     needs the ~90° the old landscape art did — mirror the left's +10deg.
     The frames are NOT flipped (the art is already drawn as a right hand); the scaleX
     here is only the dev "flip horizontal" toggle, default 1 (no-op). It sits on
     .hand-art so art + hit boxes would mirror together if ever toggled. */
  transform: scaleX(var(--hand-r-flip, 1)) rotate(var(--hand-r-rot, -10deg));
}

/* NB: the V5 right art is already drawn as a right hand (readable BACK / EN·JP text),
   so it must NOT be mirrored again. The old scaleX(-1) here flipped it back to front,
   which reversed the tattoo text and put the finger hit-boxes (calibrated against the
   un-mirrored art) on the wrong side. Removed. */

.finger-hit {
  position: absolute;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  background: transparent;
  pointer-events: auto;
  transform: rotate(var(--finger-rotation, 0deg));
  transform-origin: center;
}

.finger-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tattoo {
  position: absolute;
  left: var(--fx, 50%);
  top: var(--fy);
  width: auto;
  white-space: nowrap;
  color: #101010;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(10px, 1.3vw, 15px);
  line-height: .95;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .18);
  pointer-events: auto;
  /* --unrot cancels the .hand-art ±90° so tattoo text reads horizontally */
  transform: translateX(-50%) rotate(var(--unrot, 0deg)) rotate(var(--rot));
}

.hand-right .tattoo {
  --unrot: -90deg;
}

/* Universal EN/JP switch, worn on the right hand. pointer-events:auto keeps it
   clickable even while the hand rides in the fixed overlay (pointer-events:none).
   --unrot cancels the hand-art rotation so the label reads horizontally; position
   via --fx/--fy inline — tune to taste. */
.hand-lang {
  position: absolute;
  left: var(--fx, 40%);
  top: var(--fy, 30%);
  z-index: 3;
  padding: 2px 8px;
  border: 1.5px solid #101010;
  border-radius: 999px;
  background: rgba(244, 243, 238, .74);
  color: #101010;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(9px, 1.15vw, 13px);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(-50%) rotate(var(--unrot, 0deg)) rotate(var(--rot, 0deg));
}

.hand-right .hand-lang {
  --unrot: -90deg;
}

.hand-lang:hover {
  background: #fff;
}

.tattoo-goback {
  display: none;
}

body.is-promo-mode .tattoo-goback {
  display: block;
}

.paper-wrap {
  /* Generous top head-room: extends the clip box UPWARD so the head sits INSIDE the clip in
     every browser (Safari ignores overflow-clip-margin and would crop the head at the box
     edge). margin-top pulls the wrap back up by the same amount, so the tablet's on-screen
     position and the scroll range are unchanged — meaning an over-generous value costs
     nothing (unlike the old clip-margin, which could add to the scroll range). Fixed, because
     the head caps at its clamp() max width, so its overshoot is bounded. */
  --paper-head-room: 720px;
  --paper-wrap-pad: clamp(12px, 4vw, 48px);
  position: relative;
  z-index: 5;
  width: 100%;
  margin-top: calc(-100vh - var(--paper-head-room));
  padding: calc(var(--paper-wrap-pad) + var(--paper-head-room)) var(--paper-wrap-pad) var(--paper-wrap-pad);
  overflow: clip;
  perspective: 1300px;
  perspective-origin: 50% 50%;
}

.tablet-object {
  --half-depth: 23px;
  --depth: calc(var(--half-depth) * 2);
  --tablet-radius: 30px;
  position: relative;
  /* --ui-scale (dev "tablet size" slider, default 1 = unchanged) narrows the whole tablet;
     the head and hands multiply by the same var so they shrink with it. The name is fixed
     and untouched. Grid reflows automatically (its JS metrics read the tablet width). */
  width: min(calc(1180px * var(--ui-scale, 0.95)), 100%);
  margin: 0 auto;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
}

.paper {
  --paper-pad: clamp(14px, 2.3vw, 26px);
  position: relative;
  width: 100%;
  margin: 0;
  padding: var(--paper-pad);
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: var(--tablet-radius);
  background: transparent;
  box-shadow:
    inset 0 0 34px rgba(214, 241, 255, .18),
    inset 0 0 2px rgba(255, 255, 255, .92),
    0 24px 70px rgba(0, 0, 0, .42);
  transform: translateZ(var(--half-depth));
  transform-style: preserve-3d;
}

.tablet-face {
  position: absolute;
  inset: 0;
  border-radius: var(--tablet-radius);
  pointer-events: none;
}

.tablet-interior-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--tablet-radius);
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, .62) 0 12%, transparent 56%),
    radial-gradient(circle at 4% 88%, rgba(190, 205, 225, .35), transparent 44%),
    radial-gradient(circle at 96% 24%, rgba(190, 205, 225, .30), transparent 42%),
    linear-gradient(135deg, #e8edf2, #d7dee6);
  box-shadow:
    inset 0 0 48px rgba(255, 255, 255, .38),
    inset 0 0 120px rgba(130, 156, 190, .12);
  transform: translateZ(calc(-1 * var(--half-depth) + 1px));
}

/* viewport-sized polychromatic grain on the recessed tablet interior */
.tablet-noise {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 160vh;
  overflow: hidden;
  border-radius: var(--tablet-radius);
  pointer-events: none;
  transform: translate3d(0, var(--viewport-plane-y, 0px), calc(-1 * var(--half-depth) + 4px));
}

.tablet-noise::before {
  content: "";
  position: absolute;
  inset: -60px;
  background-image: var(--noise-tile, none);
  background-repeat: repeat;
  will-change: transform;
  animation: noiseflicker .5s steps(3, end) infinite;
}

@keyframes noiseflicker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  33% {
    transform: translate3d(43px, -31px, 0);
  }

  66% {
    transform: translate3d(-27px, 37px, 0);
  }

  100% {
    transform: translate3d(19px, 14px, 0);
  }
}

.tablet-back {
  background:
    radial-gradient(circle at 52% 34%, rgba(255, 255, 255, .54), transparent 54%),
    linear-gradient(145deg, #eef3f7 0%, #d8e0e8 54%, #bcc8d4 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    inset 0 0 42px rgba(207, 247, 255, .22),
    0 0 40px rgba(255, 255, 255, .30),
    0 0 90px rgba(210, 225, 245, .22);
  transform: translateZ(calc(-1 * var(--half-depth)));
}

.tablet-side {
  border-radius: 0;
  background: linear-gradient(180deg, #f4f8fb, #dde5ec);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .92),
    inset 0 0 18px rgba(255, 255, 255, .62);
}

.tablet-side-top {
  inset: 0 var(--tablet-radius) auto;
  height: var(--depth);
  transform: translateZ(var(--half-depth)) rotateX(-90deg);
  transform-origin: top center;
}

.tablet-side-right {
  inset: var(--tablet-radius) 0 var(--tablet-radius) auto;
  width: var(--depth);
  transform: translateZ(var(--half-depth)) rotateY(-90deg);
  transform-origin: right center;
}

.tablet-side-bottom {
  inset: auto var(--tablet-radius) 0;
  height: var(--depth);
  transform: translateZ(var(--half-depth)) rotateX(90deg);
  transform-origin: bottom center;
}

.tablet-side-left {
  inset: var(--tablet-radius) auto var(--tablet-radius) 0;
  width: var(--depth);
  transform: translateZ(var(--half-depth)) rotateY(90deg);
  transform-origin: left center;
}

.tablet-corner {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.tablet-corner-bl {
  left: var(--tablet-radius);
  bottom: var(--tablet-radius);
  transform: translateZ(calc(-1 * var(--half-depth)));
}

.tablet-corner-br {
  right: var(--tablet-radius);
  bottom: var(--tablet-radius);
  transform: translateZ(calc(-1 * var(--half-depth))) scaleX(-1);
}

.tablet-corner-tl {
  left: var(--tablet-radius);
  top: var(--tablet-radius);
  transform: translateZ(calc(-1 * var(--half-depth))) scaleY(-1);
}

.tablet-corner-tr {
  right: var(--tablet-radius);
  top: var(--tablet-radius);
  transform: translateZ(calc(-1 * var(--half-depth))) scale(-1, -1);
}

.tablet-corner-seg {
  position: absolute;
  left: -4.5px;
  top: 0;
  width: 9px;
  height: var(--depth);
  background: linear-gradient(180deg, #f4f8fb, #dde5ec);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .92),
    inset 0 0 18px rgba(255, 255, 255, .62);
  transform: rotateZ(var(--seg-angle)) translateY(var(--tablet-radius)) rotateX(90deg);
  transform-origin: 50% 0;
}

.tablet-corner-seg:nth-child(1) {
  --seg-angle: 7.5deg;
}

.tablet-corner-seg:nth-child(2) {
  --seg-angle: 22.5deg;
}

.tablet-corner-seg:nth-child(3) {
  --seg-angle: 37.5deg;
}

.tablet-corner-seg:nth-child(4) {
  --seg-angle: 52.5deg;
}

.tablet-corner-seg:nth-child(5) {
  --seg-angle: 67.5deg;
}

.tablet-corner-seg:nth-child(6) {
  --seg-angle: 82.5deg;
}

.grid {
  --grid-cols: 3;
  --grid-unit: 170px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  grid-auto-rows: var(--grid-unit);
  grid-auto-flow: row dense;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(10px, 1.5vw, 16px);
  transform-style: preserve-3d;
}

#spatial {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  height: 135vh;
  pointer-events: none;
  background: transparent;
  transform: translate3d(0, var(--spatial-y, 0px), 1px);
}

.frame {
  --glow-a: #93a4b4;
  --glow-b: #d7e4ed;
  --glow-c: #7f92a8;
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: visible;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  transform: translateZ(var(--focus-z, 0px)) scale(var(--focus-scale, 1));
  transform-style: preserve-3d;
  transition: transform .28s ease;
}

.frame--2x2 {
  grid-column: span 2;
  grid-row: span 2;
}

.frame--tall {
  grid-row: span 2;
}

.frame--wide3 {
  grid-column: span 3;
}

@media (max-width: 887px) {
  .frame--wide3 {
    grid-column: span 2;
  }
}

@media (max-width: 591px) {
  .frame--2x2,
  .frame--wide3 {
    grid-column: span 1;
  }
}

.frame-box {
  --frame-depth: 8px;
  position: relative;
  height: 100%;
  overflow: visible;
  border-radius: 8px;
  transform: translateZ(0);
  transform-style: preserve-3d;
}

.frame-glow {
  --glow-spread: 25%;
  position: absolute;
  inset: calc(-1 * var(--glow-spread));
  border-radius: 32px;
  background-image:
    var(--glow-photo, none),
    radial-gradient(ellipse at 20% 50%, rgba(147, 164, 180, .72), transparent 58%),
    radial-gradient(ellipse at 78% 50%, rgba(215, 228, 237, .72), transparent 58%);
  background-image:
    var(--glow-photo, none),
    radial-gradient(ellipse 26% 50% at 26% 50%, color-mix(in srgb, var(--glow-a) 82%, white 18%) 0 5%, transparent 100%),
    radial-gradient(ellipse 32% 50% at 50% 50%, color-mix(in srgb, var(--glow-b) 82%, white 18%) 0 7%, transparent 100%),
    radial-gradient(ellipse 26% 50% at 74% 50%, color-mix(in srgb, var(--glow-c) 82%, white 18%) 0 5%, transparent 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: .94;
  pointer-events: none;
  transform: translateZ(-39px);
}

.frame-project .frame-glow {
  background-image: var(--glow-photo, none);
}

.frame-project {
  cursor: pointer;
}

.frame-plane {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 8px;
  pointer-events: none;
}

.frame-inner {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 0 22px rgba(226, 250, 255, .24),
    0 0 12px rgba(174, 226, 255, .10);
  transform: translateZ(0);
  /* Drives BOTH halves of the hover cross-fade: the hovered tile to brightness(1.3)
     and every other tile to brightness(.7). */
  transition: filter 1.2s ease;
}

.frame-project .frame-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 24%),
    radial-gradient(120% 100% at 50% 42%, rgba(255, 255, 255, .16) 0 24%, transparent 55%),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, .28) 100%);
}

.frame-project.is-hovered .frame-inner {
  filter: brightness(1.3);
}

#grid.has-focus .frame-project:not(.is-hovered) .frame-inner {
  filter: brightness(.7);
}

.frame-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-inner picture {
  display: block;
  height: 100%;
}

.frame-title {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 100%;
  color: var(--accent);
  font-family: var(--title-font);
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 4.5rem);
  line-height: .9;
  letter-spacing: -.04em;
  text-align: center;
  text-shadow:
    0 0 7px rgba(var(--accent-rgb), .82),
    0 0 20px rgba(var(--accent-rgb), .46);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) translateZ(200px);
  transition: opacity 1.2s ease-in-out;
}

.frame-title::before,
.frame-title::after {
  content: attr(data-holo-title);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
}

.frame-title::before {
  color: rgb(255, 42, 74);
  transform: translateX(-2px);
}

.frame-title::after {
  color: rgb(46, 231, 255);
  transform: translateX(2px);
}

.frame.is-hovered .frame-title {
  animation: frame-title-halogen .72s steps(1, end) .3s both;
}

@keyframes frame-title-halogen {
  0% {
    opacity: 0;
    text-shadow: 0 0 2px rgba(var(--accent-rgb), .12);
  }

  5% {
    opacity: .9;
    text-shadow: 0 0 8px rgba(var(--accent-rgb), .75), 0 0 22px rgba(var(--accent-rgb), .38);
  }

  12% {
    opacity: .05;
  }

  22% {
    opacity: 1;
  }

  29% {
    opacity: .18;
  }

  39% {
    opacity: .86;
  }

  46% {
    opacity: .08;
  }

  58% {
    opacity: 1;
  }

  66% {
    opacity: .24;
  }

  78% {
    opacity: .92;
  }

  85% {
    opacity: .12;
  }

  100% {
    opacity: 1;
    text-shadow: 0 0 7px rgba(var(--accent-rgb), .82), 0 0 20px rgba(var(--accent-rgb), .46);
  }
}

.frame.is-derezzing .frame-title {
  opacity: 0;
}

.frame.is-derezzing .frame-glow {
  -webkit-mask-image: linear-gradient(to top, black 0, black var(--derez-solid), transparent var(--derez-fade));
  mask-image: linear-gradient(to top, black 0, black var(--derez-solid), transparent var(--derez-fade));
}

.frame.is-derezzing .frame-side-top {
  visibility: hidden;
}

.frame-back {
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(218, 249, 255, .24), transparent 55%),
    #d8dee2;
  box-shadow:
    inset 0 0 0 1px rgba(20, 24, 28, .18),
    inset 0 0 18px rgba(205, 243, 255, .20);
  transform: translateZ(calc(-1 * var(--frame-depth)));
}

.frame-side {
  border-radius: 0;
  background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .30));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78);
}

.frame-side-top {
  inset: 0 8px auto;
  height: var(--frame-depth);
  transform: rotateX(-90deg);
  transform-origin: top center;
}

.frame-side-right {
  inset: 8px 0 8px auto;
  width: var(--frame-depth);
  transform: rotateY(-90deg);
  transform-origin: right center;
}

.frame-side-bottom {
  inset: auto 8px 0;
  height: var(--frame-depth);
  transform: rotateX(90deg);
  transform-origin: bottom center;
}

.frame-side-left {
  inset: 8px auto 8px 0;
  width: var(--frame-depth);
  transform: rotateY(90deg);
  transform-origin: left center;
}

.frame-inner a {
  display: block;
}

.frame-project .frame-inner img {
  /* cover, not contain: the grid rows are a fixed unit + gap, so spanned tiles drift a few
     percent off 16:9 at many viewport widths. contain letterboxed those with grey bands;
     cover fills the frame at every size. Thumbs are all ~16:9, so the crop is only ~3% off
     the long edge — well within the scale(1.07) overscan the parallax already uses. */
  object-fit: cover;
  aspect-ratio: auto 16 / 9;
  transform: scale(1.07) translate3d(var(--dio-x, 0px), var(--dio-y, 0px), 0);
  transform-origin: 50% 50%;
  will-change: transform;
}

/* Wide 3×1 tiles (e.g. Yamagata): fill the wide frame instead of letterboxing. */
.frame-project.frame--wide3 .frame-inner img {
  object-fit: cover;
}

.frame-project.is-spatial .frame-inner img {
  visibility: hidden;
}

.frame-essay .frame-inner,
.frame-insta .frame-inner {
  min-height: 260px;
  padding: clamp(18px, 2vw, 26px);
}

.essay-head,
.insta-bar {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #1e2a22;
}

.essay-body {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.45;
}

.insta-ph {
  display: grid;
  min-height: 200px;
  place-items: center;
  border: 1px dashed rgba(20, 24, 28, .3);
  color: #1e2a22;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1;
  text-align: center;
}

#derez {
  position: fixed;
  inset: 0;
  z-index: 6;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.frame.is-promo-hidden {
  visibility: hidden;
}

.grid.is-promo-grid-hidden {
  display: none;
}

body.is-promo-mode #spatial,
.feature-frame .frame-glow {
  display: none;
}

.feature-frame {
  position: relative;
  display: none;
  width: calc(100% - 32px);
  margin: 16px;
  border-radius: 8px;
  transform-style: preserve-3d;
}

.feature-frame.is-active {
  display: block;
}

.feature-frame .frame-box {
  min-height: clamp(440px, 68vh, 680px);
}

.feature-frame .frame-inner {
  min-height: clamp(440px, 68vh, 680px);
  overflow: visible;
  background: #f5f7f8;
  transform-style: preserve-3d;
}

.feature-frame.is-project-profile .frame-inner {
  background: #000;
}

.feature-frame.is-info-panel {
  position: absolute;
  top: var(--info-panel-top, 0px);
  left: 50%;
  z-index: 10;
  width: min(760px, calc(100% - 48px));
  margin: 0;
  transform: translateX(-50%) translateZ(210px) scale(.8);
  transform-origin: 50% 0;
}

.feature-frame.is-info-panel .frame-box,
.feature-frame.is-info-panel .frame-inner {
  min-height: 0;
}

.feature-frame.is-info-panel .frame-inner {
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}

.feature-content {
  min-height: inherit;
  transform-style: preserve-3d;
}

.feature-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  min-height: inherit;
}

.feature-media {
  display: grid;
  min-height: 360px;
  padding: clamp(18px, 3vw, 42px);
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .8), transparent 58%),
    linear-gradient(135deg, #ffe8f0, #edf4f8);
}

.feature-media img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(12, 16, 20, .16);
  box-shadow:
    0 24px 50px rgba(174, 73, 112, .18),
    0 0 30px rgba(255, 255, 255, .72);
}

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 72px);
  background:
    radial-gradient(circle at 8% 12%, rgba(var(--accent-rgb), .1), transparent 34%),
    #f8fafb;
}

.feature-kicker {
  color: #008d2b;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(7px, .8vw, 10px);
  line-height: 1.5;
}

.feature-copy h2 {
  margin: 14px 0 12px;
  color: #101315;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 400;
  line-height: .82;
}

.feature-copy p {
  max-width: 58ch;
  margin: 0 0 14px;
  color: #4d555d;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.45;
}

.feature-cta {
  align-self: flex-start;
  margin-top: 16px;
  padding: 15px 18px 13px;
  border: 1px solid #006d22;
  background: var(--accent);
  color: #07130a;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(9px, 1vw, 13px);
  line-height: 1;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), .34);
}

.project-profile {
  position: relative;
  overflow: visible;
  background: #000;
  color: #fff;
  transform-style: preserve-3d;
}

.project-profile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--noise-tile);
  opacity: .1;
  pointer-events: none;
}

.project-profile > * {
  position: relative;
  z-index: 1;
}

.info-panel {
  position: relative;
  box-sizing: border-box;
  max-height: calc(100vh - 140px);
  padding: clamp(74px, 9vw, 116px) clamp(28px, 7vw, 84px) clamp(42px, 6vw, 72px);
  overflow: auto;
  border: 1px solid rgba(var(--accent-rgb), .64);
  border-radius: 22px;
  background: #000;
  color: #fff;
}

.info-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise-tile);
  opacity: .1;
  pointer-events: none;
}

.info-panel > * {
  position: relative;
  z-index: 1;
}

.info-panel h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: var(--accent);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(72px, 13vw, 148px);
  font-weight: 400;
  line-height: .8;
  text-shadow:
    0 0 7px rgba(var(--accent-rgb), .82),
    0 0 20px rgba(var(--accent-rgb), .46);
}

.info-panel-copy {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.info-panel-copy p {
  margin: 0 0 1em;
}

.info-panel-copy strong {
  color: var(--accent);
}

.info-panel-links {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.info-panel-links a {
  color: var(--accent);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(30px, 5vw, 52px);
  line-height: .9;
  text-decoration: none;
  text-shadow: 0 0 13px rgba(var(--accent-rgb), .4);
}

.info-panel-links a:hover,
.info-panel-links a:focus-visible {
  color: #fff;
}

.project-profile-header {
  /* Video overlap: more negative = pull video further under the floating title. */
  margin-bottom: -35px;
  padding: clamp(38px, 6vw, 80px) clamp(24px, 5vw, 72px) 0;
  pointer-events: none;
  transform: translateZ(100px);
}

.project-profile-header h2 {
  position: relative;
  max-width: none;
  margin: 0;
  color: var(--accent);
  font-family: var(--title-font);
  font-size: clamp(58px, 10vw, 148px);
  font-weight: 700;
  line-height: .84;
  letter-spacing: -.05em;
  text-shadow:
    0 0 7px rgba(var(--accent-rgb), .82),
    0 0 20px rgba(var(--accent-rgb), .46);
}

.project-profile-header h2::before,
.project-profile-header h2::after {
  content: attr(data-holo-title);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
}

.project-profile-header h2::before {
  color: rgb(255, 42, 74);
  transform: translateX(-2px);
}

.project-profile-header h2::after {
  color: rgb(46, 231, 255);
  transform: translateX(2px);
}


.feature-videos {
  padding: 0 clamp(24px, 5vw, 72px);
}

.feature-video-grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

.feature-video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  background: #080b0d;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .48);
}

.feature-video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-profile-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(34px, 5vw, 72px);
}

.project-profile-writeup p,
.project-profile-credits p {
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.55;
}

.project-profile-credits p {
  white-space: pre-line;
}

/* ── Structured project copy (job / diary) ───────────────────────────────────
   Reusable pattern for long-form write-ups; see renderJobSection/renderDiarySection.
   Headings + labels borrow the hover-title voice (Bebas Neue + glow) but in white
   rather than the accent, and without the red/cyan holo fringing, so the section
   reads as one white palette. Body copy stays in the page serif with only a very
   soft glow — enough to sit in the same light, not enough to hurt legibility at
   paragraph length. */
.project-profile-copy.is-stacked {
  grid-template-columns: minmax(0, 1fr);
}

/* The copy chain must preserve 3D or --pj-label-z is silently flattened: .project-profile
   preserves it, but .project-profile-copy defaults to flat, which severs the context —
   the same trap that made a translateZ on .project-profile-header's h2 do nothing. */
.project-profile-copy,
.project-profile-writeup,
.project-profile-credits,
.pj-section,
.pj-group,
.cr-group {
  transform-style: preserve-3d;
}

.pj-section--center {
  text-align: center;
}

.pj-section {
  margin: 0 0 clamp(38px, 5.5vw, 76px);
}

.pj-section:last-child {
  margin-bottom: 0;
}

/* ── Job section: the teva-kammui grid mockup ──────────────────────────────────
   THE JOB centred on top with a mono subtitle, then two columns hugging a centre
   gutter (left right-aligned, right left-aligned). Body type is DM Sans (per the
   mockup); column heads use the site's hover-text voice — Bebas in the accent
   colour with the holo glow. Metrics ported from the mockup CSS, adapted to the
   dark modal: ink→white, the mockup's grey detail→a soft off-white. */
/* Job <p> rules are scoped under .pj-section--job to outrank the legacy
   `.project-profile-writeup p` rule (0,1,1) that styles fallback text blobs and
   would otherwise clobber the mockup's detail/large sizing and colour. */
.pj-section--job .jb-subtitle {
  margin: 1.1em 0 0;
  color: rgba(255, 255, 255, .5);
  font: 500 clamp(10px, 1.05vw, 12px)/1.3 "DM Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.jb-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(16px, 2.4vw, 34px);
  align-items: start;
  margin-top: clamp(34px, 5vw, 68px);
}

.jb-col--left {
  text-align: right;
}

.jb-col--right {
  text-align: left;
}

/* Column head — hover-text: Bebas, accent, glow. Bebas is caps-only, so "the film"
   renders as THE FILM. */
.jb-head {
  margin: clamp(26px, 3vw, 40px) 0 clamp(3px, .5vw, 7px);
  color: var(--accent);
  font-family: var(--title-font);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.9rem);
  line-height: .9;
  letter-spacing: -.04em;
  text-shadow:
    0 0 7px rgba(var(--accent-rgb), .82),
    0 0 20px rgba(var(--accent-rgb), .46);
}

/* First head in a column shouldn't push a big gap above itself. */
.jb-col > .jb-head:first-child {
  margin-top: 0;
}

.jb-block {
  margin: 0 0 clamp(9px, 1.2vw, 16px);
}

.jb-block:last-child {
  margin-bottom: 0;
}

/* Label — heavier, uppercase. */
.jb-role {
  margin: 0 0 2px;
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 1.68vw, 21px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

/* Detail — lighter; the mockup caps its measure and hugs it to the gutter side. */
.pj-section--job .jb-detail {
  max-width: 31ch;
  margin: 0 0 0 auto;
  color: rgba(255, 255, 255, .62);
  font-family: "DM Sans", Arial, sans-serif;
  font-weight: 300;
  font-size: clamp(13px, 1.38vw, 17px);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.pj-section--job .jb-col--right .jb-detail {
  margin: 0 auto 0 0;
}

/* Display line ("Teva ×/Kammui", "Adventure./Not an ad.") — big, tight, white. */
.pj-section--job .jb-large {
  max-width: 9ch;
  margin: 0;
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 5vw, 62px);
  line-height: .82;
  letter-spacing: -.06em;
}

.pj-section--job .jb-col--left .jb-large {
  margin-left: auto;
}

.pj-section--job .jb-large + .jb-detail {
  margin-top: 6px;
}

.pj-section--job .jb-footer {
  margin: clamp(30px, 5vw, 64px) 0 0;
  color: rgba(255, 255, 255, .42);
  font: 500 clamp(10px, 1.05vw, 12px)/1.3 "DM Mono", ui-monospace, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

/* Forward-Z lift (dev-tunable via --pj-label-z) — the section headings only. */
.pj-heading,
.cr-heading {
  transform: translateZ(var(--pj-label-z, 135px));
}

.pj-heading {
  margin: 0 0 clamp(18px, 2.2vw, 30px);
  color: #fff;
  font-family: var(--title-font);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: .92;
  letter-spacing: -.05em;
  text-shadow:
    0 0 7px rgba(255, 255, 255, .5),
    0 0 22px rgba(255, 255, 255, .26);
}

/* "Production Diary" — Tom asked for this one noticeably bigger than THE JOB. */
/* Production Diary heading — centred and larger (the body stays left-aligned for
   readability). */
/* Production Diary shares THE JOB's size + overlap vars, so the dev sliders drive
   both headings together (Tom: "use these settings for both"). */
.pj-heading--lg {
  font-size: var(--pj-job-size, 8.25rem);
  line-height: .82;
  margin-bottom: var(--pj-job-overlap, 0em);
  text-align: center;
}

/* THE JOB — white (inherits the base heading colour + glow), same size as Production
   Diary, nudged down (top margin) so it sits lower and its glyphs slightly overlap the
   columns beneath. The overlap is set by a positive margin-bottom in `em`: the tight
   line-height means the glyphs overhang the box, so this counter-pushes the columns
   down to leave a small ~1-line overlap — and being em-relative it scales with the
   responsive font size rather than a fixed px that would drift on other screens. */
.pj-section--job .pj-heading {
  font-size: var(--pj-job-size, 8.25rem);
  line-height: .82;
  margin: clamp(24px, 4vw, 56px) 0 var(--pj-job-overlap, 0em);
}

.pj-section--job .jb-columns {
  margin-top: 0;
}

/* ── Credits: inline running list in an Avant Garde-style face ──────────────────
   ITC Avant Garde Gothic Pro is licensed and can't be webfont-loaded, so the stack
   tries a locally-installed copy first, then falls back to Poppins (loaded in
   index.html) — geometric, and it ships the exact weights: 600 for the demi group
   heading, 500 medium for roles, 200 extra-light for names. */
:root {
  --avant: "ITC Avant Garde Gothic Pro", "ITC Avant Garde Gothic",
           "Poppins", "Century Gothic", "Futura", sans-serif;
}

.cr-group {
  margin: 0 0 clamp(30px, 4vw, 58px);
}

.cr-group:last-child {
  margin-bottom: 0;
}

/* Group heading ("Cast & Talent") — demi oblique. */
.cr-heading {
  margin: 0 0 clamp(12px, 1.5vw, 22px);
  color: #fff;
  font-family: var(--avant);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: .005em;
  text-shadow:
    0 0 8px rgba(255, 255, 255, .46),
    0 0 24px rgba(255, 255, 255, .24);
}

/* The running flow of ROLE + name pairs, centred and wrapping like text.
   Centred via the parent's text-align + inline-block, NOT `margin: 0 auto`: the
   inline-block items can push the block a hair past its own max-width, and a
   width-constrained block whose content overflows collapses auto side-margins to 0,
   pinning it left (measured 94px off). inline-block shrink-to-fit sidesteps that. */
.cr-flow {
  display: inline-block;
  max-width: 66ch;
  font-family: var(--avant);
  line-height: 1.75;
}

/* Keep a role glued to its name; allow wrapping BETWEEN pairs. */
.cr-item {
  display: inline-block;
  margin: 0 clamp(9px, 1vw, 16px);
}

/* Position title — medium, all caps. */
.cr-role {
  color: #fff;
  font-weight: 500;
  font-size: clamp(.92rem, 1.15vw, 1.12rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Name — extra light, with a very soft glow. */
.cr-name {
  color: #fff;
  font-weight: 200;
  font-size: clamp(.98rem, 1.25vw, 1.2rem);
  text-shadow: 0 0 9px rgba(255, 255, 255, .16);
}

/* ── Bilingual credits (teva-kammui-credits-final mockup) ──────────────────────
   Each credit layers the selected language over the other language's given name as a
   big grey shadow; the .cr2-lang button toggles .is-japanese. Row centring + gap
   alignment run in JS (setupCreditsBilingual). Ported from the mockup, scoped here. */
/* Credit tunables live on :root, NOT on .pj-section--credits2 — a scoped redefinition
   would shadow the value the dev tool sets on :root and the sliders wouldn't take. */
:root {
  --cr2-name: .64em;      /* white selected name */
  --cr2-role: .72em;      /* job title (role label) */
  --cr2-shadow: 1.75em;   /* grey shadow = the other language */
  --cr2-h2: 52px;         /* section header */
  --cr2-line: 155;        /* characters per line (list width) */
  --cr2-leading: .74;     /* leading for the name/title rows */
  --cr2-rowgap: .18em;
  --cr2-set-gap: 8px;     /* between credit sets (read by the JS layout) */
  --cr2-white: #fff;      /* pure white front text */
  --cr2-grey: #343434;
  --cr2-soft: #969696;
}

.pj-section--credits2 {
  text-align: center;
}

.cr2-topline {
  display: flex;
  justify-content: flex-end;
}

.cr2-lang {
  border: 1px solid var(--cr2-soft);
  padding: 8px 12px;
  background: transparent;
  color: var(--cr2-white);
  cursor: pointer;
  font: 500 10px/1 "DM Mono", ui-monospace, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
  pointer-events: auto;
}

.cr2-lang:hover {
  background: var(--cr2-white);
  color: #050505;
}

/* CREDITS — the one hover-text element here (accent + glow), at the mockup's display size. */
.pj-section--credits2 .pj-heading {
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(62px, 12vw, 168px);
  line-height: .76;
  letter-spacing: -.11em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 255, 255, .55),
    0 0 30px rgba(255, 255, 255, .28);
}

.pj-section--credits2 .credit-section {
  margin-top: clamp(48px, 7vw, 110px);
}

.pj-section--credits2 .credit-section h2 {
  margin: 0 0 clamp(20px, 2.6vw, 34px);
  color: var(--cr2-white);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: var(--cr2-h2);
  font-weight: 700;
  line-height: .75;
  letter-spacing: -.1em;
  text-transform: uppercase;
}

.pj-section--credits2 .credit-section h2 small {
  display: block;
  margin-top: 14px;
  color: var(--cr2-soft);
  font-size: .31em;
  font-weight: 400;
  letter-spacing: -.04em;
}

.pj-section--credits2 .credit-list {
  display: flex;
  width: min(calc(var(--cr2-line) * 1ch), 100%);
  margin: 0 auto;
  justify-content: center;
  align-items: baseline;
  gap: var(--cr2-rowgap) 0;
  flex-wrap: wrap;
}

.pj-section--credits2 .credit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  white-space: nowrap;
  font-size: clamp(16px, 1.85vw, 25px);
  line-height: var(--cr2-leading);
  letter-spacing: -.05em;
}

.pj-section--credits2 .credit b {
  position: relative;
  z-index: 3;
  color: var(--cr2-white);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: var(--cr2-role);
  font-weight: 700;
  text-transform: uppercase;
}

.pj-section--credits2 .name {
  display: inline-grid;
  grid-template-areas: "overlay";
  justify-items: center;
  align-items: center;
  min-width: max-content;
  letter-spacing: -.025em;
}

.pj-section--credits2 .name > span {
  grid-area: overlay;
}

.pj-section--credits2 .english {
  display: inline-grid;
  grid-template-areas: "name";
  justify-self: center;
  z-index: 2;
  color: var(--cr2-white);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: var(--cr2-name);
  font-weight: 300;
}

.pj-section--credits2 .english-full,
.pj-section--credits2 .english-first,
.pj-section--credits2 .japanese-full,
.pj-section--credits2 .japanese-first {
  grid-area: name;
  justify-self: center;
}

.pj-section--credits2 .english-first {
  visibility: hidden;
}

.pj-section--credits2 .japanese {
  display: inline-grid;
  grid-template-areas: "name";
  justify-self: center;
  z-index: 1;
  color: var(--cr2-grey);
  font-family: "Dela Gothic One", "Noto Sans JP", sans-serif;
  font-size: var(--cr2-shadow);
  letter-spacing: -.08em;
  transform: scaleX(.9);
  transform-origin: center;
}

.pj-section--credits2 .japanese-full {
  visibility: hidden;
}

.pj-section--credits2.is-japanese .english {
  z-index: 1;
  color: var(--cr2-grey);
  font-family: "Climate Crisis", sans-serif;
  font-size: var(--cr2-shadow);
  letter-spacing: -.05em;
  transform: scaleX(.88);
  transform-origin: center;
}

.pj-section--credits2.is-japanese .english-full {
  visibility: hidden;
}

.pj-section--credits2.is-japanese .english-first {
  visibility: visible;
}

.pj-section--credits2.is-japanese .japanese {
  z-index: 2;
  color: var(--cr2-white);
  font-family: "Noto Sans JP", sans-serif;
  font-size: var(--cr2-name);
  font-weight: 100;
  letter-spacing: -.025em;
  transform: none;
}

.pj-section--credits2.is-japanese .japanese-full {
  visibility: visible;
}

.pj-section--credits2.is-japanese .japanese-first {
  visibility: hidden;
}

.pj-body p {
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.55;
  text-shadow: 0 0 9px rgba(255, 255, 255, .15);
}

.pj-body p + p {
  margin-top: 1.05em;
}

@media (max-width: 640px) {
  /* Two columns get too cramped on a phone — collapse to one centred column. The left
     column's blocks stack first, then the right column's, which reads fine. */
  .jb-columns {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(4px, 2vw, 12px);
    margin-top: clamp(26px, 8vw, 40px);
  }

  .jb-col--left,
  .jb-col--right {
    text-align: center;
  }

  .jb-col--left .jb-detail,
  .jb-col--right .jb-detail,
  .jb-col--left .jb-large {
    margin-left: auto;
    margin-right: auto;
  }
}

.project-profile-gallery {
  padding: 0 clamp(24px, 5vw, 72px) clamp(38px, 6vw, 82px);
}

.feature-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 20px);
}

.feature-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #161616;
}

.feature-close {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 4;
  width: auto;
  height: auto;
  padding: 8px 18px;
  border: 1px solid rgba(12, 16, 20, .4);
  border-radius: 6px;
  background: rgba(255, 255, 255, .9);
  color: #101315;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: 1;
  transform: translateX(-50%);
  cursor: pointer;
}

.feature-frame.is-project-profile .feature-close {
  border-color: var(--accent);
  background: #000;
  color: #fff;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), .38);
}

.feature-frame.is-info-panel .feature-close {
  border-color: var(--accent);
  background: #000;
  color: #fff;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), .38);
}

@media (max-width: 760px) {
  .project-profile-copy {
    grid-template-columns: 1fr;
  }

  .feature-gallery {
    grid-template-columns: 1fr;
  }

}

.promo-flash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

body.is-promo-flicker .promo-flash {
  animation: promoFlash .36s linear 1;
}

body.is-promo-flicker .tablet-noise::before {
  animation: promoNoiseBurst .36s steps(5, end) 1;
}

@keyframes promoFlash {

  0%,
  22%,
  48%,
  78%,
  100% {
    opacity: 0;
  }

  10% {
    opacity: .5;
  }

  36% {
    opacity: .34;
  }

  66% {
    opacity: .46;
  }
}

@keyframes promoNoiseBurst {

  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  20% {
    transform: translate3d(52px, -41px, 0);
  }

  40% {
    transform: translate3d(-49px, 44px, 0);
  }

  60% {
    transform: translate3d(55px, 37px, 0);
  }

  80% {
    transform: translate3d(-46px, -52px, 0);
  }
}
