/* =========================================================
   Site design system — shared by every page
   (tokens, type, nav + signature, sound toggle, hairline bands,
   cursor pill/trail, contact + footer, phone gate)
   ========================================================= */

@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Awesome Serif Italic";
  src: url("fonts/AwesomeSerifItalic-VF.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Geist Pixel";
  src: url("fonts/GeistPixel-VF.woff2") format("woff2");
  font-display: block;
}
@font-face {
  font-family: "Digital Planers";
  src: url("fonts/DigitalPlaners.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #000;
  --muted: rgba(0, 0, 0, 0.6);
  --muted-2: rgba(0, 0, 0, 0.5);
  --line: #e2e2e2;
  --tile: #ebebeb;
  --bg: #fff;

  --max: 1340px;
  --gutter: 50px;
  --pad-x: max(var(--gutter), calc((100vw - var(--max)) / 2));

  --band: 100px;       /* vertical rhythm between rules */
  --band-sm: 50px;

  --ease-liquid: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Aeonik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
/* Arrow over plain text; links, buttons and clickable rows set their own pointer */
html { cursor: default; }
input, textarea, select, [contenteditable] { cursor: auto; }
p, h1, h2, h3, dl, dd, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.muted { color: var(--muted); }

/* ---------- Loader (Figma "Loader"): signature fills black over a grey ghost ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  will-change: transform;
}
html:not(.js) .loader { display: none; }
.loader__sig { position: relative; }
.loader__sig .signature { height: 82px; } /* ~116px wide, as in the Figma frame */
.loader__sig .signature__pen { display: none; }
.loader__ghost .signature__ink { fill: #d9d9d9; }
.loader__fill {
  position: absolute;
  inset: 0;
  clip-path: inset(-10% calc(100% - var(--p, 0%)) -10% -10%);
}
html.is-loading, html.is-loading body { overflow: hidden; }
/* Page transition sheet: dark, full screen, the case study's name in pixel type (see setupLiquidNav) */
.page-cover {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  will-change: transform;
}
/* The WebGL liquid (see liquidSheet in site.js) paints the sheet; the flat backdrop steps aside */
.page-cover.is-liquid { background: transparent; }
.page-cover__liquid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.page-cover__word { position: relative; z-index: 1; }
.page-cover__word {
  font-family: "Aeonik", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
}
.page-cover__count {
  z-index: 1;
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: "Geist Pixel", monospace;
  font-size: 150px;
  line-height: 1;
  color: #494949;
  font-variant-numeric: tabular-nums;
}
/* Before any script runs on arrival, the loader stands in for the sheet so there is no white flash */
html.is-arriving .loader { background: #000; }
html.is-arriving .loader__sig { display: none; }
html.is-arriving .loader::before {
  content: var(--arrive-word, "");
  font-family: "Aeonik", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  color: #fff;
}
html.is-arriving .loader::after {
  content: var(--arrive-count, "000");
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: "Geist Pixel", monospace;
  font-size: 150px;
  line-height: 1;
  color: #494949;
}

/* ---------- Full-page lens (see setupPageLens in site.js) ---------- */
.lens-layer {
  position: fixed;
  inset: 0;
  z-index: 90;            /* above the page + WebGL, below cursor trail/pill and loader */
  pointer-events: none;
}
.lens-layer.is-on {
  backdrop-filter: url(#page-lens);
  -webkit-backdrop-filter: url(#page-lens);
}

/* ---------- WebGL stage (sits behind the page) ---------- */
.liquid-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.site { position: relative; z-index: 1; }

/* ---------- Layout primitives ---------- */
.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Full-bleed hairline under a band. Drawn with a pseudo element so it can animate. */
.band, .hero { position: relative; }
.band::after, .hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
  transform: scaleX(var(--draw, 1));
}

.display {
  font-family: "Awesome Serif Italic", serif;
  font-weight: 580;
  font-variation-settings: "wght" 580, "hght" 500;
  font-size: 52px;
  line-height: 1.2;
  letter-spacing: 0;
}

/* ---------- Fixed navbar ----------
   At the top it looks exactly like the in-flow nav; once the page scrolls it
   tightens and gains a frosted white backing + hairline. Sits above the page
   lens (z 90) so it never warps; the spacer (sized by site.js) keeps layout. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 92;
  transition: padding-bottom 0.5s var(--ease-liquid);
}
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  opacity: 0;
  transition: opacity 0.4s var(--ease-liquid);
}
.navbar:not(.band)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.4s var(--ease-liquid);
}
.navbar .nav { transition: margin-top 0.5s var(--ease-liquid); }
.navbar.is-scrolled::before,
.navbar.is-scrolled::after { opacity: 1; }
.navbar.is-scrolled .nav { margin-top: 16px; }
.navbar.is-scrolled,
.navbar.is-scrolled.ce-navband { padding-bottom: 16px; }
.navbar-spacer { height: 86px; } /* replaced with the measured height by site.js */
.ce-page .navbar-spacer, .mem-page .navbar-spacer { height: 132px; }

/* ---------- Nav ---------- */
.nav {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 50px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* keeps the links centred whatever sits either side */
  align-items: center;
  position: relative;
  z-index: 2;
}
.nav__brand {
  font-family: "Digital Planers", cursive;
  font-size: 32px;
  line-height: 1;
  white-space: nowrap;
}
.signature {
  display: block;
  height: 36px; /* matches the 32px text logo's glyph size */
  width: auto;
  overflow: visible;
}
.signature__ink { fill: currentColor; }
.signature__pen {
  fill: none;
  stroke: currentColor;
  stroke-width: 22; /* font units ≈ 0.7px */
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav > .nav__brand { justify-self: start; }

/* ---------- Sound toggle: round button with a travelling wave ---------- */
.sound-toggle {
  justify-self: end;
  position: relative;
  width: 48px;
  height: 48px;
  margin-block: -8px; /* keep the nav row at its original height */
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  visibility: hidden; /* useless without JS */
  transition: background-color 0.3s var(--ease-liquid);
}
.js .sound-toggle { visibility: visible; }
.sound-toggle:hover { background: rgba(0, 0, 0, 0.1); }
/* Hover/press motion lives on the icon, never on the button (GSAP animates the button in) */
.sound-toggle:hover .sound-toggle__wave { transform: scale(1.12); }
.sound-toggle:active .sound-toggle__wave { transform: scale(0.9); }
/* The label stays for screen readers (it reads Sound on / off / Click for sound) */
.sound-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.sound-toggle__wave {
  width: 26px;
  height: 26px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-liquid);
  /* Soft ends: an eased fade (stays near-clear before ramping up), so the steep parts of the
     wave never leave faint vertical slivers at the edges */
  --wave-fade: transparent 10%, rgb(0 0 0 / 0.04) 15%, rgb(0 0 0 / 0.16) 20%, rgb(0 0 0 / 0.42) 25%,
    rgb(0 0 0 / 0.75) 30%, #000 36%, #000 64%, rgb(0 0 0 / 0.75) 70%, rgb(0 0 0 / 0.42) 75%,
    rgb(0 0 0 / 0.16) 80%, rgb(0 0 0 / 0.04) 85%, transparent 90%;
  -webkit-mask-image: linear-gradient(90deg, var(--wave-fade));
  mask-image: linear-gradient(90deg, var(--wave-fade));
}
.sound-toggle__path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: sound-wave-travel 1.1s linear infinite;
  animation-play-state: paused;
}
/* Amplitude: full travelling wave when sound is playing, a flat line when off
   (and while the browser still holds audio back until the first click) */
.sound-toggle__amp {
  transform-origin: 12px 12px;
  transform: scaleY(0.08);
  transition: transform 0.6s var(--ease-liquid), opacity 0.4s;
}
.sound-toggle[aria-pressed="true"] .sound-toggle__amp { transform: scaleY(1); }
.sound-toggle[aria-pressed="true"] .sound-toggle__path { animation-play-state: running; }
@keyframes sound-wave-travel {
  from { transform: translateX(0); }
  to { transform: translateX(-12px); } /* one full period, so the loop is seamless */
}
@media (prefers-reduced-motion: reduce) {
  .sound-toggle__path { animation: none; }
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  color: var(--muted);
  transition: color 0.3s var(--ease-liquid);
}
.nav__links a:hover { color: var(--ink); }

/* ---------- Section heads ---------- */
.section-head { padding-block: var(--band); }
.section-head--center .display {
  width: min(888px, 100% - 2 * var(--gutter));
  text-align: center;
}

.fact dt { font-weight: 500; }
.fact dd { color: var(--muted); }
.fact { display: flex; flex-direction: column; gap: 8px; }
/* Tool chips: small cousins of the pillar icon tiles */
.tools { display: flex; gap: 6px; align-items: flex-start; }
.tool {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tile);
  color: rgba(0, 0, 0, 0.72);
  transition: background-color 0.4s var(--ease-liquid), color 0.4s var(--ease-liquid), border-radius 0.4s var(--ease-liquid);
}
.tool svg { width: 15px; height: 15px; fill: currentColor; }
.tool[data-cursor-pill="Metabase"] svg { width: 19px; height: 19px; } /* dot-grid mark reads light; size up to match weight */
.tool:hover { background: #dcdcdc; color: var(--ink); border-radius: 16px; }

/* ---------- Cursor pill (replaces the pointer over [data-cursor-pill]) ---------- */
@media (hover: hover) and (pointer: fine) {
  [data-cursor-pill] { cursor: none; }
}
/* White + difference blend: reads black on the page, inverts over media */
.cursor-trail {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  padding: 9px 14px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform-origin: 0 0;
  will-change: transform;
  visibility: hidden;
}
/* Pixel titles ("Jithin RP", case study titles) melt on hover, so don't let that select them */
[data-pixel-title] { -webkit-user-select: none; user-select: none; }

/* Two-line pill: name on top, a short note underneath (tool chips) */
.cursor-pill.has-note { padding: 11px 16px 12px; border-radius: 18px; }
.cursor-pill__note {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Contact ---------- */
.contact { padding-block: var(--band); }
.contact__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact .display { max-width: 888px; }
.contact__sub { font-size: 20px; margin-top: 24px; max-width: 691px; }
.contact__links {
  margin-top: 50px;
  width: min(688px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.contact__links a {
  position: relative;
  height: 66px;
  display: grid;
  place-items: center;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-liquid);
}
.contact__links a + a { border-left: 1px solid var(--line); }
/* Liquid fill: a blob rises and flattens into the cell */
.contact__links a::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  background: var(--ink);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  transform: translateY(105%);
  transition: transform 0.7s var(--ease-liquid), border-radius 0.7s var(--ease-liquid);
  z-index: -1;
}
.contact__links a:hover { color: #fff; }
.contact__links a:hover::before { transform: translateY(0); border-radius: 0; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 50px;
  text-align: center;
  font-size: 20px;
}
.footer p { width: min(691px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 44px;
  padding: 22px max(var(--gutter), calc((100% - var(--max)) / 2)) 0;   /* divider edge to edge, text on the grid */
  border-top: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__time { font-variant-numeric: tabular-nums; }
.footer__top { color: var(--muted); transition: color 0.3s var(--ease-liquid); }
.footer__top span { display: inline-block; transition: transform 0.45s var(--ease-liquid); }
.footer__top:hover { color: var(--ink); }
.footer__top:hover span { transform: translateY(-4px); }



/* ---------- WebGL handoff: DOM media hides once its plane is live ---------- */
.is-gl { background: none !important; }
.is-gl > :is(img, video):first-child { opacity: 0; }

/* ---------- Reveal defaults (JS only) ---------- */
.js [data-reveal] { opacity: 0; }
.js.no-motion [data-reveal] { opacity: 1; }

/* =========================================================
   Responsive (shared)
   ========================================================= */
@media (max-width: 1100px) {
  :root { --gutter: 32px; --band: 80px; }
  .display { font-size: 44px; }
}

/* ---------- Phones: Figma "Switch to desktop" (440 frame) ---------- */
.mobile-gate { display: none; }
@media (max-width: 767px) {
  .site, .liquid-stage { display: none; }
  .mobile-gate {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 100px 32px 44px;
    text-align: center;
  }
  .mobile-gate__brand .signature { height: 58px; } /* 52px signature in the design */
  .mobile-gate__body { display: flex; flex-direction: column; gap: 24px; max-width: 376px; }
  .mobile-gate__title {
    font-weight: 500;
    font-size: clamp(30px, 9.1vw, 40px);
    line-height: 1.3;
  }
  .mobile-gate__sub { font-size: clamp(19px, 5.5vw, 24px); line-height: 1.5; }
  /* LinkedIn · Resume · Email: three equal cells under a full-width divider */
  .mobile-gate__links {
    align-self: stretch;
    margin: 0 -32px -44px;               /* the rule and the dividers run edge to edge, down to the bottom */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
  }
  .mobile-gate__links a {
    display: flex;
    align-items: center;
    justify-content: center;              /* each label sits in the middle of its cell */
    min-height: 88px;
    padding: 0 4px env(safe-area-inset-bottom);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.1;
    text-transform: uppercase;
    transition: opacity 0.3s var(--ease-liquid);
  }
  .mobile-gate__links a + a { border-left: 1px solid var(--line); }
  .mobile-gate__links a:active { opacity: 0.5; }
}

/* Draw a circle on the water to enter (first visit; see holdToEnter in site.js) */
.loader__water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.loader__hint {
  position: absolute;
  left: 50%;
  bottom: 44px;
  translate: -50% 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #494949;
  opacity: 0.55;
  white-space: nowrap;
  pointer-events: none;
}
.loader__hint span { font-size: 11px; color: #9a9a9a; letter-spacing: 0.04em; }
/* the guide: a Z in the middle of the water (after the signature fades); its fill follows the gesture stroke by stroke */
.loader__guide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(280px, 60vw);
  aspect-ratio: 200 / 140;
  translate: -50% -50%;
  overflow: visible;
  pointer-events: none;
}
.loader__guide path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* a thick, soft watermark in the water; the drawn part deepens inside it */
.loader__guide-track { stroke: rgba(0, 0, 0, 0.09); stroke-width: 17; }
.loader__guide-fill { stroke: rgba(0, 0, 0, 0.32); stroke-width: 11; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.loader { touch-action: none; user-select: none; -webkit-user-select: none; }

/* Hold to open (case studies): a line fills along the bottom of the cursor pill */
.cursor-pill::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(var(--hold, 0));
  transform-origin: 0 50%;
}

/* Arriving through a tear (hold to open): no loader, the page rises straight in */
html.is-torn .loader { display: none; }

/* Hold to open: the case study waits behind the card, under the WebGL canvas, clipped to the card */
.tear-behind {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: 0;
  z-index: -1;
  pointer-events: none;
  background: #fff;
  visibility: hidden;                  /* never seen on the landing page… */
}
.tear-behind.is-shown { visibility: visible; }   /* …only once the bubble bursts over it */

/* ---------- Grain: a fine film over everything, like light on moving water ----------
   A static noise tile on an oversized layer, nudged a few times a second by transform only
   (compositor work, no repaint). Monochrome, very faint. Still when motion is reduced. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1002;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: grain 0.9s steps(6) infinite;
  will-change: transform;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  17%  { transform: translate(-3%, 2%); }
  33%  { transform: translate(2%, -4%); }
  50%  { transform: translate(-4%, -1%); }
  67%  { transform: translate(3%, 3%); }
  83%  { transform: translate(-1%, 4%); }
  100% { transform: translate(1%, -2%); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* About: the photo trail (see setupAboutTrail in site.js) */
.about-trail { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.about-trail img {
  position: absolute;
  left: 0;
  top: 0;
  width: 170px;
  height: 226px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  will-change: transform, opacity;
}


/* Bubble burst mist (burstMist in site.js) */
.burst-mist { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1003; }
/* A case study promoted from the frame behind a burst bubble: it is the page now */
.tear-behind.is-page { z-index: 2147483000; pointer-events: auto; visibility: visible; }
html.is-promoted, html.is-promoted body { overflow: hidden; }
html.is-promoted body > *:not(.tear-behind):not(.burst-mist) { visibility: hidden !important; }
/* Pool light on the Z screen (poolLight in site.js): multiplied, so the lines are the sheet itself */
.pool-light { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: multiply; }
/* The light version (?lite): a way in from the Z screen, and a way back once inside */
.loader__lite {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; z-index: 2;
  font-size: 11px; letter-spacing: 0.04em; color: #8a8a8a; text-decoration: underline; text-underline-offset: 3px;
  opacity: 0; pointer-events: auto; cursor: pointer;
}
.loader__lite:hover { color: #222; }
.lite-chip {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; display: inline-flex; gap: 10px; align-items: center;
  padding: 8px 14px; border-radius: 999px; background: #111; color: #fff; font-size: 12px; text-decoration: none;
}
.lite-chip span { color: #bdbdbd; text-decoration: underline; text-underline-offset: 3px; }
/* With motion off (light version, reduced motion) the ticker can't run, so it isn't shown cut off */
.no-motion [data-marquee] { display: none; }
.is-lite [data-sound-toggle] { display: none !important; }   /* no music in the light version */
/* Selected Works, sideways (horizontalWorks in site.js) */
.works__view { overflow: hidden; }
.works__track { display: flex; width: max-content; will-change: transform; }
.works__track > .work { flex: 0 0 100vw; width: 100vw; }
/* Reading progress (readingProgress in site.js): white + difference reads on the page and over pictures */
.progress {
  position: fixed; right: 16px; top: 50%; translate: 0 -50%; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  color: #fff; mix-blend-mode: difference; pointer-events: none;
}
.progress__value { font-size: 11px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; opacity: 0.8; }
.progress__line { position: relative; width: 1px; height: 120px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.progress__fill { position: absolute; inset: 0; background: #fff; transform-origin: 50% 0; transform: scaleY(0); }
/* Project modal (setupProjectModals in site.js) */
html.is-modal, html.is-modal body { overflow: hidden; }
.pmodal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 32px 16px; }
.pmodal[hidden] { display: none; }
.pmodal__backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pmodal__panel {
  position: relative; width: min(860px, 100%); max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
  background: #fafafa; color: #111; border-radius: 20px; padding: 56px 64px 64px; outline: none;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.25); cursor: auto;
  clip-path: inset(0 round 20px);                                     /* the scrollbar too: four equal corners */
  scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}
.pmodal__close {
  position: sticky; top: 0; float: right; margin: -32px -40px 0 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line, #e5e5e5); background: #fff; display: grid; place-items: center; cursor: pointer; z-index: 1;
}
.pmodal__close svg { width: 18px; height: 18px; fill: none; stroke: #111; stroke-width: 1.6; stroke-linecap: round; }
.pmodal__close:hover { background: #111; }
.pmodal__close:hover svg { stroke: #fff; }
.pmodal__eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8a8a; margin: 0 0 14px; }
.pmodal__title { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 18px; }
.pmodal__lede { font-size: 20px; line-height: 1.5; color: #333; max-width: 640px; margin: 0 0 36px; }
.pmodal__media { border-radius: 14px; overflow: hidden; background: #eee; margin: 0 auto 48px; width: fit-content; max-width: 100%; }
.pmodal__media video { display: block; max-width: 100%; height: auto; max-height: 560px; }
.pmodal__media--tall video { max-height: 640px; }                    /* a phone trailer, upright */
.pmodal__media--wide { width: 100%; }
.pmodal__media--wide video { width: 100%; max-height: none; }      /* a landscape game trailer, full width */
.pmodal__section { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--line, #e5e5e5); }
.pmodal__section h3 { font-size: 17px; font-weight: 500; line-height: 1.35; margin: 0; }
.pmodal__section p { font-size: 16px; line-height: 1.65; color: #555; margin: 0; }
.pmodal__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.pmodal__gallery:empty { display: none; }
.pmodal__gallery img { width: 100%; height: auto; border-radius: 12px; display: block; background: #eee; }
@media (max-width: 767px) {
  .pmodal__panel { padding: 40px 22px 32px; }
  .pmodal__close { margin: -24px -10px 0 0; }
  .pmodal__section { grid-template-columns: 1fr; gap: 10px; }
  .pmodal__gallery { grid-template-columns: 1fr; }
}
/* Phones get the "open this on a desktop" message straight away: no loader over it, no waiting on scripts */
@media (max-width: 767px) { .loader { display: none !important; } }
