/* ==========================================================================
   Bayu Aji Sadewa — portfolio
   Built from Figma "Eblek Workspace Pro" › Homepage (node 3022:171776).
   Desktop reference width: 1920px (60px gutters, 1800px content, 12px gap).
   ========================================================================== */

:root {
  /* colour */
  --c-black: #000;
  --c-ink: #111;
  --c-white: #fff;
  --c-line: rgb(225 225 225 / 0.1);
  --c-line-row: rgb(238 238 238 / 0.1);
  --c-line-strong: rgb(225 225 225 / 0.2);
  --c-glass-dark: rgb(17 17 17 / 0.4);
  --c-chip: rgb(255 255 255 / 0.1);
  --c-chip-hover: rgb(255 255 255 / 0.18);
  --c-panel: rgb(239 239 239 / 0.05);
  --c-panel-hover: rgb(239 239 239 / 0.1);

  /* type */
  --font-display: "Manrope", system-ui, sans-serif;
  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-alt: "Archivo", system-ui, sans-serif;

  /* layout */
  --gutter: clamp(16px, 3.125vw, 60px);
  --gap: 12px;
  --content: 1800px;
  --section-y: clamp(96px, 10.4167vw, 200px);
  --section-y-sm: clamp(64px, 5.2083vw, 100px);
  --stack: clamp(72px, 7.2917vw, 140px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-mono);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 14px;
  text-transform: uppercase;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.muted-30 { color: rgb(255 255 255 / 0.3); }
.muted-40 { color: rgb(255 255 255 / 0.4); }
.muted-50 { color: rgb(255 255 255 / 0.5); }

/* ---------- page background ----------
   Black canvas with the 1920×1239 pixel-grid texture tiled down the page
   (everything after the intro). The texture sits above the About photo (so
   the photo shows through the grid) but below every section's content.
   .page__rest is deliberately not a stacking context. Nor is .page: an
   isolated .page stops Chromium's backdrop-filter blurring what's behind
   the larger glass cards (the opening stage isolates its own blends). */

.page {
  position: relative;
}

.page__rest {
  position: relative;
}

.page__rest::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("../assets/img/texture.webp") center top / 1920px 1239px repeat;
  opacity: 0.5; /* the grid at half its design strength */
}

.section {
  position: relative;
}

.container {
  position: relative;
  z-index: 3;
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

/* ---------- shared text styles ---------- */

.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.label--regular { font-weight: 400; }
.label--muted { opacity: 0.5; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap);
  padding: 24px var(--gutter);
  pointer-events: none;
}

.nav > * {
  pointer-events: auto;
}

.glass-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding-block: 4px;
  border-radius: 8px;
  background: var(--c-glass-dark);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* inside stroke · inner glow · outer ring */
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.2),
    inset 0 0 24px 4px rgb(255 255 255 / 0.24),
    0 0 0 2px rgb(0 0 0 / 0.25);
  color: var(--c-white);
  font-family: var(--font-alt);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.36;
  letter-spacing: -0.28px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease);
}

a.glass-btn:hover {
  background: rgb(17 17 17 / 0.55);
}

.nav__brand,
.nav__talk {
  flex: 0 0 200px;
}

/* The bar opens out into the menu panel: its glass is drawn by ::before, which
   grows from the bar to the panel's size (--menu-w × --menu-h, set by
   js/main.js), and the panel's content fades in over it. The toggle stays in
   place on top, its lines turning into a cross. */
.nav__bar {
  flex: 0 1 592px;
  justify-content: space-between;
  padding: 4px 4px 4px 28px;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.nav__bar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--c-glass-dark);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.2),
    inset 0 0 24px 4px rgb(255 255 255 / 0.24),
    0 0 0 2px rgb(0 0 0 / 0.25);
  transition:
    width 0.55s cubic-bezier(0.65, 0, 0.35, 1) 0.1s,
    height 0.55s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
}

.nav__bar.is-open::before {
  width: var(--menu-w, 100%);
  height: var(--menu-h, 316px);
  transition-delay: 0s;
}

.nav__rates {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s var(--ease);
}

.nav__bar.is-open .nav__rates {
  opacity: 0;
}

.nav__menu-btn {
  position: relative;
  z-index: 2;
  flex: none;
  display: grid;
  place-items: center;
  height: 52px;
  padding: 8px 24px;
  border-radius: 68px;
  transition: background-color 0.25s var(--ease);
}

.nav__menu-btn:hover {
  background: rgb(255 255 255 / 0.1);
}

/* lines ↔ cross, both 40 wide in a 12px-tall slot, as in the design */
.nav__menu-icon {
  grid-area: 1 / 1;
  width: 40px;
  height: 13px;
  margin-block: -1px 0;
  transition:
    opacity 0.3s var(--ease),
    scale 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__menu-icon--close {
  height: 12px;
  margin: 0;
  opacity: 0;
  scale: 1 0.2;
}

.nav__bar.is-open .nav__menu-icon--open {
  opacity: 0;
  scale: 1 0.2;
}

.nav__bar.is-open .nav__menu-icon--close {
  opacity: 1;
  scale: 1;
}

/* the panel's content, laid over the grown glass */
.nav__menu {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: var(--menu-w, 100%);
  /* the top 52px (+ gap) is the toggle's row, so the links start below it */
  padding: 64px 4px 4px;
  visibility: hidden;
  transition: visibility 0s linear 0.65s;
}

.nav__bar.is-open .nav__menu {
  visibility: visible;
  transition-delay: 0s;
}

.nav__menu > * {
  opacity: 0;
  translate: 0 -6px;
  transition:
    opacity 0.2s var(--ease),
    translate 0.2s var(--ease);
}

.nav__bar.is-open .nav__menu > * {
  opacity: 1;
  translate: 0 0;
  transition-duration: 0.45s;
}

.nav__bar.is-open .nav__links { transition-delay: 0.2s; }
.nav__bar.is-open .nav__ctas { transition-delay: 0.3s; }

.nav__links a {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding-left: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.48px;
  text-transform: none;
  transition: background-color 0.2s var(--ease);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  background: rgb(255 255 255 / 0.06);
}

/* 6px white square in a faint 14px tile */
.nav__bullet {
  flex: none;
  padding: 4px;
  background: rgb(0 0 0 / 0.1);
}

.nav__bullet::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: var(--c-white);
}

.nav__ctas {
  display: flex;
  gap: 4px;
}

/* on the narrowest phones the two calls to action stack, so neither label
   is squeezed */
@media (max-width: 359px) {
  .nav__ctas {
    flex-direction: column;
  }

  .nav__ctas .nav__cta {
    flex: none;
  }
}

.nav__cta {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 60px;
  padding: 4px 16px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--font-mono);
  transition: background-color 0.25s var(--ease);
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: #ececec;
}

.nav__cta span {
  position: relative;
}

.nav__cta .nav__glow--right {
  right: 0;
}

.nav__cta .nav__glow--left {
  left: 0;
}

.nav__talk {
  gap: 8px;
  overflow: hidden;
  font-family: var(--font-mono); /* the Let's talk component's type */
}

/* hover state (Figma component, and the menu's two white buttons after it):
   the side grids at full strength, carried by
   the sweeping light. On hover a soft edge runs from the label side out to
   the button's edge with the light's own timing, lighting the squares just
   behind it (.is-lit). On leave the lit grid itself moves on out of the
   button, a column at a time so its squares stay on the button's grid
   (.is-unlit, nav-glow-out); then it resets, unseen.
   js/interactions.js sets the classes; the left grid is mirrored, so --out
   sends it the other way. */
.nav__glow--hover {
  --out: 1;
  /* the soft edge lies wholly past the grid once lit (so its outermost
     column, the brightest, stays fully lit) and wholly before it at rest */
  -webkit-mask-image: linear-gradient(to right, #000 50%, transparent calc(50% + 12px));
  mask-image: linear-gradient(to right, #000 50%, transparent calc(50% + 12px));
  -webkit-mask-size: 200% 100%;
  mask-size: 200% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: calc(100% - 12px) 0;
  mask-position: calc(100% - 12px) 0;
}

.nav__glow--left.nav__glow--hover {
  --out: -1;
}

:is(.nav__talk, .nav__cta, .platform-card):is(.is-lit, .is-unlit) .nav__glow--hover {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  transition:
    -webkit-mask-position 0.95s cubic-bezier(0.32, 0.05, 0.2, 1),
    mask-position 0.95s cubic-bezier(0.32, 0.05, 0.2, 1); /* the sweep's */
}

:is(.nav__talk, .nav__cta, .platform-card).is-unlit .nav__glow--hover {
  animation: nav-glow-out 0.8s steps(1, end) forwards;
}

/* a column (5.608 px) at a time, quick at first and easing out at the edge */
@keyframes nav-glow-out {
  0% {
    translate: calc(var(--out) * 0.00px) 0;
  }
  9.9% {
    translate: calc(var(--out) * 5.61px) 0;
  }
  14.9% {
    translate: calc(var(--out) * 11.22px) 0;
  }
  18.5% {
    translate: calc(var(--out) * 16.82px) 0;
  }
  21.5% {
    translate: calc(var(--out) * 22.43px) 0;
  }
  24.2% {
    translate: calc(var(--out) * 28.04px) 0;
  }
  26.9% {
    translate: calc(var(--out) * 33.65px) 0;
  }
  29.6% {
    translate: calc(var(--out) * 39.26px) 0;
  }
  32.6% {
    translate: calc(var(--out) * 44.86px) 0;
  }
  36% {
    translate: calc(var(--out) * 50.47px) 0;
  }
  39.9% {
    translate: calc(var(--out) * 56.08px) 0;
  }
  44.5% {
    translate: calc(var(--out) * 61.69px) 0;
  }
  50.4% {
    translate: calc(var(--out) * 67.30px) 0;
  }
  58.1% {
    translate: calc(var(--out) * 72.91px) 0;
  }
  69.9% {
    translate: calc(var(--out) * 78.51px) 0;
  }
  85%,
  100% {
    translate: calc(var(--out) * 84.12px) 0; /* and held there: it ends out of sight */
  }
}

.nav__glow {
  position: absolute;
  top: calc(50% - 0.5px);
  width: 83px;
  height: 59px;
  max-width: none;
  pointer-events: none;
}

.nav__glow--right {
  right: -1px;
  transform: translateY(-50%);
}

.nav__glow--left {
  left: -1px;
  transform: translateY(-50%) scaleX(-1);
}

.nav__talk span {
  position: relative;
}

/* ==========================================================================
   Opening: hero + scroll transition
   The stage pins for the length of .opening. js/main.js turns the scroll
   progress through that extra length into --p (0–1) and draws the glowing
   bell (canvas.opening__glow) growing up from the bottom edge; Portfolio
   slides up over the darkened stage while the glow sweeps out. The wave in the Figma file is a still of this effect.
   ========================================================================== */

.opening {
  --opening-scroll: 100vh;
  height: calc(100vh + var(--opening-scroll));
}

.opening__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  overflow: clip;
  isolation: isolate;
  background: var(--c-white);
}

/* multiplied over the hero, so the title stays readable through the light
   part of the glow and disappears only into the dark */
.opening__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* pixel grid on the dark parts only: lightening leaves white untouched, and
   anchoring to the bottom lines it up with the page texture below */
.opening__texture {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: url("../assets/img/texture.webp") center bottom / 1920px 1239px repeat;
  mix-blend-mode: lighten;
  opacity: 0.5; /* as the page texture */
}

/* Portfolio sits high over the pinned stage — hidden while the glow is light,
   then revealed in place (heading ~25% down) once the stage behind it is dark
   (.is-past, set by js/main.js), as in the reference. The overlapped strip
   carries no texture of its own; the stage's shows through. */
.page {
  --opening-overlap: calc(125vh + var(--section-y)); /* heading revealed ~35% down */
}

.opening.is-live + .page__rest {
  margin-top: calc(-1 * var(--opening-overlap));
}

.opening.is-live + .page__rest::before {
  top: var(--opening-overlap);
}

.opening.is-live:not(.is-past) + .page__rest {
  pointer-events: none; /* keep the hero clickable underneath */
}

.opening.is-live + .page__rest .section--portfolio > .container {
  transition: opacity 0.5s ease;
}

.opening.is-live:not(.is-past) + .page__rest .section--portfolio > .container {
  opacity: 0;
}

/* the hero title drifts up a little as the glow comes in */
@keyframes hero-drift {
  0% {
    transform: none;
    animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
  }
  35%,
  100% {
    transform: translateY(-7vh);
  }
}

.hero__title-row {
  animation: hero-drift 1s linear both paused;
  animation-delay: calc(var(--p, 0) * -1s);
}

/* without WebGL: plain fade to black over the same scroll distance */
.opening.no-glow .opening__glow {
  display: none;
}

.opening.no-glow .opening__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--c-black);
  opacity: clamp(0, calc(var(--p, 0) * 3.5 - 0.2), 1);
}

@media (prefers-reduced-motion: reduce) {
  /* no pinning: the hero, then a still of the transition as a band */
  .opening {
    height: auto;
  }

  .opening__stage {
    position: relative;
    height: auto;
    min-height: 0;
  }

  .opening .hero {
    height: clamp(640px, 52.0833vw, 1000px);
  }

  .opening__glow {
    display: none;
  }

  .hero__title-row {
    animation: none;
  }

  .opening__stage::after {
    content: "";
    display: block;
    height: 36vh;
    /* the Figma wave's stepped halo, red rim and fall to black */
    background: linear-gradient(
      #fff 0 4%,
      #fff0ef 4% 8%,
      #ffdad8 8% 12%,
      #ffc9c5 12% 16%,
      #ffb4ae 16% 20%,
      #ff9b94 20% 24%,
      #ff8279 24% 28%,
      #ff6e64 28% 32%,
      #ff584d 32% 36%,
      #ff493c 36% 40%,
      #fd3f31 40% 44%,
      #fe1100 44% 56%,
      #b50c00 66%,
      #420400 80%,
      #000 92%
    );
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  background: var(--c-white);
  color: var(--c-ink);
}

/* Pixel cursor trail, part of the background (drawn by js/main.js on fine
   pointers): its white ink sits above the page grid texture (z-index 1) and
   below every section's content (.container, 3), so buttons, images and text
   stay in front of it. On the white hero its dark ink is drawn on a second
   canvas inside the hero, under the title and footer — and under the opening
   glow, which multiplies over the hero. */
.cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cursor-trail--hero {
  z-index: 0;
}

.hero__title-row,
.hero__sub,
.hero__footer {
  z-index: 1; /* in front of the hero's trail */
}

.hero__title-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero__rule {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 4px;
}

.hero__rule img {
  position: absolute;
  inset: -1px 0 0;
  width: 100%;
  height: calc(100% + 1px);
  max-width: none;
}

.hero__title {
  flex: none;
  width: 9.325em; /* 746px @ 80px */
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 4.1667vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  text-box: trim-both cap alphabetic;
}

/* the one line under the title */
.hero__sub {
  position: relative;
  margin-top: clamp(24px, 2.0833vw, 40px);
  padding-inline: var(--gutter);
  font-family: var(--font-mono);
  font-size: clamp(13px, 0.8333vw, 16px);
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.6;
}

.hero__footer {
  position: absolute;
  inset: auto 0 45px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 40px var(--gutter);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 60px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.28px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease);
}

.pills--dark .pill {
  background: rgb(17 17 17 / 0.1);
  color: var(--c-ink);
}

.pills--dark .pill:hover {
  background: rgb(17 17 17 / 0.18);
}

.pills--light .pill {
  background: rgb(239 239 239 / 0.1);
  color: var(--c-white);
}

.pills--light .pill:hover {
  background: rgb(239 239 239 / 0.18);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__scroll img {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.hero__scroll:hover img {
  transform: translateY(3px);
}

/* ==========================================================================
   Section scaffolding (heads + two-column intro)
   ========================================================================== */

.section .container {
  display: flex;
  flex-direction: column;
  gap: var(--stack);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding-block: 4px;
  border-bottom: 1px solid var(--c-line);
}

/* the 1px rule that sits 4px above the border in the design */
.section-head__line {
  position: relative;
  height: 0;
}

.section-head__line img {
  position: absolute;
  inset: -1px 0 0;
  width: 100%;
  height: 1px;
  max-width: none;
}

.section-head__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(56px, 6.25vw, 120px);
  line-height: normal;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
}

.section-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.intro__index {
  width: calc(50% - var(--gap) / 2);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
  opacity: 0.5;
}

.section-head__row .intro__index {
  width: auto;
}

.intro__index--solid {
  opacity: 1;
}

.intro__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  width: 100%;
  padding-top: 40px;
  border-top: 1px solid var(--c-line);
}

.intro__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 2.6042vw, 50px);
  line-height: normal;
  letter-spacing: -0.04em;
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.section--portfolio {
  padding-block: var(--section-y) var(--section-y-sm);
}

.work-list {
  container-type: inline-size;
}

.work-list > li {
  /* 4-col grid: 441 / 12 / 441 … at 1800px */
  --col: calc((100cqw - 3 * var(--gap)) / 4);
  --img-w: calc(var(--col) * 290 / 441);
  --arrow-w: calc(var(--col) - var(--img-w) - var(--gap));
  --title-w: calc(var(--col) * 2 + var(--gap));
  border-top: 1px solid var(--c-line-row);
}

.work-list > li:last-child {
  border-bottom: 1px solid var(--c-line-row);
}

.work-row {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  padding-block: 24px;
}

.work-row__info {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: var(--gap);
  min-width: 0;
}

.work-row__heading {
  display: flex;
  flex: none;
  align-items: flex-start;
  gap: var(--gap);
  width: var(--title-w);
}

.work-row__num {
  display: flex;
  flex: none;
  align-items: center;
  width: var(--arrow-w);
  height: 45px;
  font-size: 16px;
  line-height: normal;
  opacity: 0.5;
}

.work-row__titles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: var(--col);
  min-width: 0;
}

.work-row__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 1.6667vw, 32px);
  line-height: normal;
  letter-spacing: -0.03125em;
  white-space: nowrap;
}

.work-row__desc {
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 8px 16px;
  border-radius: 60px;
  background: var(--c-chip);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  white-space: nowrap;
}

.work-row__side {
  display: flex;
  flex: none;
  align-self: stretch;
  gap: var(--gap);
}

.work-row__media {
  display: flex;
  gap: var(--gap);
}

.work-row__media img {
  flex: none;
  width: var(--img-w);
  height: auto;
  aspect-ratio: 290 / 206;
  object-fit: cover;
  border-radius: 8px;
  background: var(--c-white);
  transition: transform 0.5s var(--ease);
}

.work-row__arrow {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  width: var(--arrow-w);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 8px 24px;
  border-radius: 8px;
  background: var(--c-chip);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.25s var(--ease);
}

.icon-btn img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s var(--ease);
}

.work-row:hover .icon-btn {
  background: var(--c-chip-hover);
}

.work-row:hover .icon-btn img {
  transform: translateX(3px);
}

/* Nexora row: lined up with the others at rest; its extra screens open out
   beside the first on hover (the design's hover state, see Interactions),
   so its heading may give way to them */
.work-row--more .work-row__heading {
  flex: 0 1 var(--title-w);
  width: auto;
  min-width: 0;
}

.work-row--more .work-row__titles {
  flex: 0 1 var(--col);
  width: auto;
  min-width: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: 12px;
  height: 60px;
  padding: 4px 24px;
  border-radius: 8px;
  background: var(--c-chip);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.32px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease);
}

.btn-ghost span {
  text-box: trim-both cap alphabetic;
}

.btn-ghost img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s var(--ease);
}

.btn-ghost:hover {
  background: var(--c-chip-hover);
}

.btn-ghost:hover img {
  transform: translateX(3px);
}

/* ==========================================================================
   Portfolio page (portfolio.html; Figma: Portfolio, node 5707:495974)
   ========================================================================== */

.section--work {
  padding-block: clamp(160px, 23.9583vw, 460px) var(--section-y-sm);
}

.section-head__title--page {
  font-size: clamp(72px, 10.4167vw, 200px);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 4px 24px;
  border-radius: 50px;
  background: var(--c-chip);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.28px;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.filter-chip:hover {
  background: var(--c-chip-hover);
}

.filter-chip[aria-pressed="true"] {
  background: #f5f5f5;
  color: var(--c-black);
}

/* 3 columns: 592 / 12 / 592 / 12 / 592 at 1800px */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px var(--gap);
}

.projects[hidden],
.project[hidden] {
  display: none;
}

.project__link {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* the picture sits inset in its card. Card and inset are both 4:3, the
   pictures' own shape (Figma: 592 × 480, inset 80), so neither the resting
   inset nor the hover fill crops them */
.project__media {
  position: relative;
  display: flex;
  aspect-ratio: 4 / 3;
  padding: calc(60 / 592 * 100%) calc(80 / 592 * 100%);
  overflow: hidden;
  border-radius: 8px;
  background: var(--c-ink);
}

.project__media img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.project__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.project__titles {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 12px;
}

.project__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 1.6667vw, 32px);
  line-height: normal;
  letter-spacing: -0.03125em;
}

.project__desc {
  max-width: 441px;
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
}

/* ==========================================================================
   Project page (project-evenly.html; Figma: Product Detail, node 6240:233804)
   ========================================================================== */

.section--case {
  padding-block: var(--section-y) var(--section-y-sm);
}

/* 722 / 12 / 1066 at 1800px: the facts beside the pictures */
.case {
  display: grid;
  grid-template-columns: minmax(0, 722fr) minmax(0, 1066fr);
  align-items: start;
  gap: var(--gap);
}

/* as tall as the first picture's card, and kept in view beside the long
   page as it scrolls by */
.case__aside {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  aspect-ratio: 722 / 808;
  container: case-aside / inline-size;
}

.case__intro {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--c-line);
}

.case__back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.case__back img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}

.case__back:hover img {
  transform: translateX(-3px);
}

.case__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 1.6667vw, 32px);
  line-height: normal;
  letter-spacing: -0.0625em;
}

/* the facts (theme, year, services) in a row along the bottom, each under
   its own rule: label at half strength over the value. Where the aside is
   wide enough, the columns keep Figma's 274 / 111 / 132; narrower, each
   takes its words' width and shares what's left; where they don't fit in a
   row with room between them, the theme goes on top of the other two. */
.case__facts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: auto;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
}

@container case-aside (min-width: 640px) {
  .case__facts {
    grid-template-columns: minmax(0, 274fr) minmax(0, 111fr) minmax(0, 132fr);
    padding-right: 40px;
  }
}

@container case-aside (max-width: 449px) {
  .case__facts {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0;
  }

  /* the theme, the longest, across the top; year and services under it */
  .case__fact:first-child {
    grid-column: 1 / -1;
  }

  /* nothing comes after these to keep room from */
  .case__fact:first-child,
  .case__fact:last-child {
    padding-right: 0;
  }
}

/* the room after each column's words stays at every width */
.case__fact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 20px;
  padding-right: 24px;
  border-top: 1px solid var(--c-line-strong);
}

.case__fact dt {
  opacity: 0.5;
}

.case__fact dd {
  margin: 0;
  font-weight: 600;
}

.case__media {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* each picture inset in a dark card (1066 wide, 24 in, 12 round) */
.case__shot {
  margin: 0;
  padding: 24px;
  border-radius: 12px;
  background: var(--c-ink);
}

.case__shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* the full landing page, in sections stacked without seams */
.case__page {
  overflow: hidden;
  border-radius: 12px;
}

.case__page img {
  border-radius: 0;
}

.section--others {
  padding-block: var(--section-y-sm);
}

/* ==========================================================================
   Inquiry modal (Figma: CTA, node 6240:235911; js/inquiry.js)
   ========================================================================== */

html.has-modal {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* the dialog fills the screen and centres the panel; the page behind is
   frosted (blur 12 + 40% ink) */
.inquiry {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--c-white);
}

.inquiry[open] {
  display: grid;
  place-items: center;
}

.inquiry::backdrop {
  background: rgb(17 17 17 / 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.inquiry__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(862px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 12px 0 24px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 8px;
  background: var(--c-glass-dark);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 24px 0 rgb(255 255 255 / 0.24);
}

.inquiry__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-left: 24px;
}

.inquiry__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 1.6667vw, 32px);
  line-height: 1.36;
  letter-spacing: -0.02em;
}

/* as the nav's menu toggle: a soft pill lights up behind the cross */
.inquiry__close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 8px 24px;
  border-radius: 68px;
  transition: background-color 0.25s var(--ease);
}

.inquiry__close:hover {
  background: rgb(255 255 255 / 0.1);
}

.inquiry__close img {
  width: 40px;
  height: 12px;
}

.inquiry__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-inline: 24px;
}

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

.inquiry__field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: none;
  color: var(--c-white);
  font: 400 16px / normal var(--font-mono);
  transition: border-color 0.25s var(--ease);
}

.inquiry__field::placeholder {
  color: rgb(255 255 255 / 0.6);
}

.inquiry__field:hover {
  border-color: rgb(255 255 255 / 0.2);
}

.inquiry__field:focus {
  outline: none;
  border-color: rgb(255 255 255 / 0.5);
}

/* browser autofill keeps the field's own look: Chrome's light fill can't be
   overridden, so its fade-in is held off indefinitely, and the text stays
   white in the field's font */
.inquiry__field:-webkit-autofill,
.inquiry__field:-webkit-autofill:hover,
.inquiry__field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--c-white);
  caret-color: var(--c-white);
  transition:
    border-color 0.25s var(--ease),
    background-color 0s 600000s,
    color 0s 600000s;
}

.inquiry__field:-webkit-autofill::first-line {
  font: 400 16px / normal var(--font-mono);
}

.inquiry__field:autofill {
  -webkit-text-fill-color: var(--c-white);
}

.inquiry__field--message {
  height: 127px;
  resize: vertical;
}

.inquiry__status {
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0.7;
}

.inquiry__status a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
}

/* while the inquiry is on its way */
.inquiry__send:disabled {
  opacity: 0.6;
  cursor: progress;
}

.inquiry__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* the menu's white call to action and the Let's talk button, full width */
.inquiry .nav__cta,
.inquiry .nav__talk {
  display: flex;
  flex: none;
  width: 100%;
  border-radius: 8px;
}

.inquiry .nav__cta {
  text-transform: uppercase;
}

.inquiry__or {
  font-size: 12px;
  line-height: normal;
}

/* in: the backdrop frosts over as the panel rises into place; out, the same
   backwards */
.inquiry[open] .inquiry__panel {
  animation: inquiry-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.inquiry[open]::backdrop {
  animation: inquiry-fade 0.4s var(--ease);
}

.inquiry.is-closing .inquiry__panel {
  animation: inquiry-out 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.inquiry.is-closing::backdrop {
  animation: inquiry-fade 0.3s var(--ease) reverse forwards;
}

@keyframes inquiry-in {
  from {
    opacity: 0;
    translate: 0 24px;
    scale: 0.98;
  }
}

@keyframes inquiry-out {
  to {
    opacity: 0;
    translate: 0 16px;
    scale: 0.98;
  }
}

@keyframes inquiry-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inquiry[open] .inquiry__panel,
  .inquiry[open]::backdrop {
    animation: none;
  }
}

/* ==========================================================================
   About
   ========================================================================== */

.section--about {
  padding-block: var(--section-y);
}

/* looping video behind the copy — below the page grid texture (played by
   js/main.js while the section is near the viewport; its first frame is the
   poster) */
.about__media {
  position: absolute;
  inset: 349px 0 auto;
  z-index: 0;
  height: 1355px;
  overflow: hidden;
}

.about__media video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.2;
}

.about__media::before,
.about__media::after {
  content: "";
  position: absolute;
  z-index: 1; /* above the video, which paints on the positioned layer due to opacity */
  inset-inline: 0;
}

.about__media::before {
  top: 0;
  height: 220px;
  background: linear-gradient(var(--c-black), rgb(0 0 0 / 0));
}

.about__media::after {
  bottom: 0;
  height: 201px;
  background: linear-gradient(rgb(0 0 0 / 0), var(--c-black));
}

.about__aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.about__social {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.about__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 3.4896vw, 67px);
  line-height: normal;
  letter-spacing: -0.0597em;
}

.about__body {
  max-width: calc(821 / 894 * 100%);
  font-size: clamp(16px, 1.0417vw, 20px);
  line-height: normal;
  text-transform: uppercase;
  opacity: 0.5;
}

.about__body p + p {
  margin-top: 1lh;
}

.platforms {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.platforms__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.platform-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 170px;
  border-radius: 10px;
  background: var(--c-panel);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-alt);
  font-weight: 500;
  font-size: 24px;
  line-height: normal;
  text-transform: capitalize;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease);
}

.platform-card:hover {
  background: var(--c-panel-hover);
}

.platform-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 40px;
}

.platform-card__icon img {
  width: 32px;
  height: 32px;
}

/* ==========================================================================
   Services
   ========================================================================== */

.section--services {
  padding-block: var(--section-y-sm);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* side by side, the services share their rows, so the cards line up however
   many lines each description takes */
@supports (grid-template-rows: subgrid) {
  .service {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 24px;
  }
}

.service__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line);
}

.service__label {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 20px;
  line-height: normal;
  text-transform: uppercase; /* a long title wraps rather than widen its column */
}

.service__slash {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 10.285px;
  height: 12.257px;
}

.service__slash img {
  flex: none;
  width: 16px;
  height: 1px;
  max-width: none;
  transform: rotate(-50deg);
}

.service__num {
  font-size: 16px;
  opacity: 0.5;
}

/* Builds on: the platforms, a quiet row of marks under the services */
.builds-on {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line);
}

.builds-on__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
}

.builds-on__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: normal;
  text-transform: uppercase;
  opacity: 0.7;
}

.builds-on__list img {
  width: 24px;
  height: 24px;
}

.service__desc {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.6;
}

.service__card {
  display: flex;
  /* 4:3 card and 4:3 inset, the pictures' own shape (Figma: 592 × 489,
     inset 80), so neither the resting inset nor the hover fill crops them */
  aspect-ratio: 4 / 3;
  padding: calc(60 / 592 * 100%) calc(80 / 592 * 100%);
  border-radius: 10px;
  /* frosted: the design's light panel tint over a blurred backdrop (a
     stronger blur, so the page grid melts away); no stroke or glow */
  background: var(--c-panel);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.service__card img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* ==========================================================================
   Contact + footer
   ========================================================================== */

.section--contact {
  min-height: 1052px;
  padding-block: var(--section-y-sm) 24px;
  overflow: hidden;
}

/* Dithered dot-terrain. The design's 1920×865 frame, whose top 315px peek
   above the fold of the section (design: top 737 of a 1052-tall section),
   extended 737px upward so the frame reaches the top of the section: the
   terrain's dots start out scattered up through the whole section before
   they gather into the waves (js/dither-host.js). 1920×1602, bottom 550
   below the section. Screened onto the page, so its black drops out and only
   the dots light the background. */
.contact__fx {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  mix-blend-mode: screen;
  aspect-ratio: 1920 / 1602;
  transform: translateY(calc(550 / 1602 * 100%));
  pointer-events: none;
}

.contact__fx-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* the design's image box (top -216, 1081 tall in the 865 frame), moved down
   by the 737px extension */
.contact__fx-frame > img {
  position: absolute;
  top: calc(521 / 1602 * 100%);
  left: -0.01%;
  width: 100.02%;
  height: calc(1081 / 1602 * 100%);
  max-width: none;
  object-fit: cover;
  opacity: 0.5;
}

.contact__fx-frame > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.contact__fx-frame.is-dithered > img {
  visibility: hidden;
}

.section--contact .contact__inner {
  justify-content: space-between;
  min-height: calc(1052px - var(--section-y-sm) - 24px);
  gap: 64px;
}

.contact__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 96px;
  min-height: 434px;
}

.contact__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(44px, 4.6875vw, 90px);
  line-height: 1;
  letter-spacing: -0.0444em;
}

.contact__cta {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 4px;
  border-bottom: 1px solid var(--c-line-strong);
}

.contact__cta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.contact__cta-text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 2.0833vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-box: trim-both cap alphabetic;
}

.contact__cta-row img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s var(--ease);
}

.contact__cta:hover .contact__cta-row img {
  transform: translateX(4px);
}

.contact__cta-line {
  width: 100%;
  height: 1px;
  margin-top: -1px;
  max-width: none;
}

/* ==========================================================================
   Scroll reveal (classes set by js/main.js; content stays visible without JS)
   Text rises out of a mask per word and brightens from dim to full, left to
   right, as in the reference transition; blocks fade up.
   ========================================================================== */

.reveal-word {
  display: inline-block;
  /* mask: generous on the sides and below so descenders and kerning survive */
  clip-path: inset(-0.2em -0.15em -0.3em -0.15em);
}

.reveal-word__inner {
  display: inline-block;
}

[data-reveal="text"]:not(.is-revealed) .reveal-word__inner,
[data-reveal="block"]:not(.is-revealed) {
  opacity: 0;
}

[data-reveal="text"]:not(.is-revealed) .reveal-word__inner {
  transform: translateY(110%);
}

[data-reveal="text"].is-revealed .reveal-word__inner {
  --d: calc(var(--reveal-delay, 0ms) + var(--word-delay, 0ms));
  animation:
    reveal-rise 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) var(--d) both,
    reveal-brighten 1.1s cubic-bezier(0.4, 0, 0.3, 1) var(--d) both;
}

/* lead paragraphs: each word's brightness follows the scroll (--lit, set by
   js/main.js); the design's muted part becomes the starting dim */
[data-scrub] .reveal-word {
  opacity: var(--lit, 1);
  transition: opacity 0.2s linear;
}

[data-scrub] :is(.muted-30, .muted-40) {
  color: inherit;
}

[data-reveal="block"].is-revealed {
  animation:
    reveal-up 1s cubic-bezier(0.2, 0.75, 0.2, 1) var(--reveal-delay, 0ms) both,
    reveal-brighten 1.1s ease-out var(--reveal-delay, 0ms) both;
}

/* once played, the block lets go of its animation (it ends where it rests).
   A finished animation that keeps filling opacity makes the block a
   backdrop root in Chromium, and glass cards inside it (platforms, filter
   chips) could no longer blur the page behind them. */
[data-reveal="block"].is-settled {
  animation: none;
}

@keyframes reveal-rise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

/* dim grey first, then full brightness */
@keyframes reveal-brighten {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

@keyframes reveal-up {
  from {
    transform: translateY(48px);
  }
  to {
    transform: none;
  }
}

/* ==========================================================================
   Intro (page load) — only with .motion-ok, set in <head> unless the user
   prefers reduced motion. Fills are "backwards" so nothing is held after the
   intro and hover transforms stay free.
   ========================================================================== */

@keyframes intro-drop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
}

@keyframes intro-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes intro-fade {
  from {
    opacity: 0;
  }
}

@keyframes line-draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 4px;
  }
}

.motion-ok .nav > * {
  animation: intro-drop 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) backwards;
}

.motion-ok .nav > :nth-child(1) { animation-delay: 0.1s; }
.motion-ok .nav > :nth-child(2) { animation-delay: 0.18s; }
.motion-ok .nav > :nth-child(3) { animation-delay: 0.26s; }

/* the double rules draw outward from the title */
.motion-ok .hero__rule {
  animation: line-draw 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.45s backwards;
}

.hero__rule:first-child { transform-origin: right center; }
.hero__rule:last-child { transform-origin: left center; }

/* if the script never splits the title, it still fades in */
.motion-ok .hero__title:not([data-reveal]) {
  animation: intro-fade 0.6s ease 1.2s backwards;
}

.motion-ok .hero__sub {
  animation: intro-rise 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 0.7s backwards;
}

.motion-ok .hero__footer .pills li,
.motion-ok .hero__scroll {
  animation: intro-rise 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) backwards;
}

.motion-ok .hero__footer .pills li:nth-child(1) { animation-delay: 0.8s; }
.motion-ok .hero__footer .pills li:nth-child(2) { animation-delay: 0.87s; }
.motion-ok .hero__footer .pills li:nth-child(3) { animation-delay: 0.94s; }
.motion-ok .hero__scroll { animation-delay: 1s; }

.motion-ok .hero__scroll img {
  animation: bob 2.4s ease-in-out 2s infinite;
}

/* ==========================================================================
   Reveal extras: lines draw, images wipe up out of a slight zoom
   ========================================================================== */

/* project rows: borders become drawable lines (same 1px, same place) */
.work-list > li {
  position: relative;
  border-top-color: transparent;
}

.work-list > li:last-child {
  border-bottom-color: transparent;
}

.work-list > li::before,
.work-list > li:last-child::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: var(--c-line-row);
  transform-origin: left center;
}

.work-list > li::before { top: -1px; }
.work-list > li:last-child::after { bottom: -1px; }

.work-list > li[data-reveal]:not(.is-revealed)::before,
.work-list > li[data-reveal]:not(.is-revealed)::after {
  transform: scaleX(0);
}

.work-list > li.is-revealed::before,
.work-list > li.is-revealed::after {
  animation: line-draw 1.2s cubic-bezier(0.65, 0, 0.35, 1) var(--reveal-delay, 0ms) backwards;
}

.section-head:has(.section-head__title[data-reveal]:not(.is-revealed)) .section-head__line img {
  transform: scaleX(0);
}

.section-head:has(.section-head__title.is-revealed) .section-head__line img {
  transform-origin: left center;
  animation: line-draw 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s backwards;
}

@keyframes img-wipe {
  from {
    clip-path: inset(100% 0 0 0 round 8px);
    scale: 1.15;
  }
  to {
    clip-path: inset(0 round 8px);
    scale: 1;
  }
}

:is(.work-row__media, .service__card, .project__media) img {
  --img-delay: 0ms;
}

.work-row__media img:nth-child(2) { --img-delay: 90ms; }
.work-row__media img:nth-child(3) { --img-delay: 180ms; }

[data-reveal="block"]:not(.is-revealed) :is(.work-row__media, .service__card, .project__media) img {
  clip-path: inset(100% 0 0 0 round 8px);
}

[data-reveal="block"].is-revealed :is(.work-row__media, .service__card, .project__media) img {
  animation: img-wipe 1.3s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--reveal-delay, 0ms) + 150ms + var(--img-delay)) backwards;
}

/* ==========================================================================
   Interactions (pointer only; the script parts are in js/interactions.js)
   ========================================================================== */

.work-row {
  transition: opacity 0.4s var(--ease);
}

.work-row__name,
.contact__cta-text {
  transition: translate 0.5s var(--ease);
}

/* on hover the picture opens out to fill its card (the design's hover state;
   the portfolio page's project cards do the same) */
.service__card,
.project__media {
  transition: padding 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

:is(.service__card, .project__media) img {
  transition: border-radius 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.project__name {
  transition: translate 0.5s var(--ease);
}

/* Let's talk and the menu's call-to-action buttons (after componine.com's
   intro-call button; markup added by js/interactions.js): the button gives a
   little, the label rolls up letter by letter, and a light runs out through
   the pixel grids on either side — a dark one on the white buttons. The
   About platform cards do the same (their grids are built in CSS, the
   card's full height) */
.nav__talk,
.nav__cta,
.platform-card {
  transition:
    background-color 0.25s var(--ease),
    scale 0.5s cubic-bezier(0.77, 0, 0.18, 1);
}

.roll {
  display: inline-flex;
}

.roll__char {
  height: 1.36em; /* one line */
  overflow: hidden;
  white-space: pre;
}

.roll__inner {
  display: flex;
  flex-direction: column;
  transition: translate 0.35s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--i) * 20ms);
}

:is(.nav__talk, .nav__cta, .platform-card) .nav__sweep {
  position: absolute;
  top: calc(50% - 0.5px);
  width: 83px;
  height: 59px;
  pointer-events: none;
  /* the grid, faded in from the label side and out at the button's edge so
     the light comes and goes softly instead of being cut off */
  -webkit-mask:
    url("../assets/svg/nav-sweep-mask.svg") 0 0 / 83px 59px no-repeat,
    linear-gradient(to right, transparent, #000 30%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask:
    url("../assets/svg/nav-sweep-mask.svg") 0 0 / 83px 59px no-repeat,
    linear-gradient(to right, transparent, #000 30%, #000 80%, transparent);
  mask-composite: intersect;
}

.nav__sweep--right {
  right: -1px;
  transform: translateY(-50%);
}

/* mirrored, so its light also runs outward */
.nav__sweep--left {
  left: -1px;
  transform: translateY(-50%) scaleX(-1);
}

/* the white buttons' grids sit flush with their edges */
.nav__cta .nav__sweep--right {
  right: 0;
}

.nav__cta .nav__sweep--left {
  left: 0;
}

.nav__sweep::before {
  /* a soft upright glow that lights the grid a column at a time */
  content: "";
  position: absolute;
  top: calc(50% - 40px);
  left: 0;
  width: 66px;
  height: 84px;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.2) 55%, transparent);
  opacity: 0;
}

.nav__cta .nav__sweep::before {
  background: radial-gradient(closest-side, rgb(17 17 17 / 0.4), rgb(17 17 17 / 0.13) 55%, transparent);
}

/* platform cards: the light and the hover grid run the card's full height,
   in the same cells as the buttons' grids (assets/svg/pixel-cell.svg) */
.platform-card .nav__sweep {
  top: 0;
  right: auto;
  left: auto;
  height: 100%;
  width: 84.12px;
  -webkit-mask:
    url("../assets/svg/pixel-cell.svg") 0 0 / 5.60811px 5px repeat,
    linear-gradient(to right, transparent, #000 30%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask:
    url("../assets/svg/pixel-cell.svg") 0 0 / 5.60811px 5px repeat,
    linear-gradient(to right, transparent, #000 30%, #000 80%, transparent);
  mask-composite: intersect;
}

.platform-card .nav__sweep--right {
  right: 0;
  transform: none;
}

.platform-card .nav__sweep--left {
  left: 0;
  transform: scaleX(-1);
}

.platform-card .nav__sweep::before {
  top: calc(50% - 75px);
  height: 150px;
}

.platform-card__grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 84.12px;
  pointer-events: none;
}

.platform-card__grid--right {
  right: 0;
}

.platform-card__grid--left {
  --out: -1;
  left: 0;
  transform: scaleX(-1);
}

/* the Let's talk hover grid's glow, from the card's outer edge */
.platform-card__grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80px 120px at 100% 50%, #fff, rgb(255 255 255 / 0.3) 32%, rgb(255 255 255 / 0.1) 63%, transparent);
  -webkit-mask: url("../assets/svg/pixel-cell.svg") 0 0 / 5.60811px 5px repeat;
  mask: url("../assets/svg/pixel-cell.svg") 0 0 / 5.60811px 5px repeat;
}

.platform-card__icon,
.platform-card__label {
  position: relative; /* over the grids and the light */
}

.platform-card .roll {
  line-height: 1.36;
  text-transform: none;
}

/* a pinpoint by the label that swells as it travels out to the edge (the
   left one is mirrored); js/interactions.js lets it finish once started */
:is(.nav__talk, .nav__cta, .platform-card).is-sweeping .nav__sweep::before {
  animation: nav-sweep 0.95s cubic-bezier(0.32, 0.05, 0.2, 1);
}

@keyframes nav-sweep {
  0% {
    translate: -29px 0;
    scale: 0.2;
    opacity: 0;
  }
  18%,
  40% {
    opacity: 1;
  }
  100% {
    translate: 53px 0;
    scale: 1.15;
    /* it dims out over the second half of its run, while still travelling,
       handing over to the lit grid behind it: no flare left to fade on the
       spot at the edge, and no pop at its end */
    opacity: 0;
  }
}

/* white underline sweeps across the contact link */
.contact__cta {
  position: relative;
}

.contact__cta::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: var(--c-white);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact__cta:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* card spotlight (position set by js/interactions.js) */
.platform-card,
.service__card {
  position: relative;
  overflow: hidden;
}

.service__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.09), transparent 70%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  transition: opacity 0.45s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  /* the hovered project stays lit, the rest step back */
  .work-list:has(.work-row:hover) .work-row:not(:hover) {
    opacity: 0.35;
  }

  .work-row:hover .work-row__name {
    translate: 8px 0;
  }

  /* extra screens: folded away beside the first until the row is hovered,
     then they open out and push the tag left (touch shows them all). Each
     opens like a curtain from its left edge (pinned there, so the picture
     keeps its scale instead of squeezing), on a long ease-out both ways;
     on the way back they fade as they fold. */
  .work-row--more {
    --row-ease: cubic-bezier(0.25, 1, 0.5, 1);
  }

  .work-row__media .work-row__extra {
    width: 0;
    margin-left: calc(-1 * var(--gap));
    opacity: 0;
    object-position: 0 50%; /* pinned left, centred as before vertically */
    transition:
      width 0.7s var(--row-ease),
      margin-left 0.7s var(--row-ease),
      opacity 0.3s var(--ease);
  }

  .work-row:hover .work-row__media .work-row__extra {
    width: var(--img-w);
    margin-left: 0;
    opacity: 1;
    transition-delay: 0s, 0s, 0.1s;
  }

  .work-row:hover .work-row__extra:nth-child(3) {
    transition-delay: 0s, 0s, 0.2s;
  }

  /* and the row opens up the space before the pictures as in the design's
     hover state (the tag keeps its spacing, so it glides one way only) */
  .work-row--more {
    transition: gap 0.7s var(--row-ease), opacity 0.4s var(--ease);
  }

  .work-row--more:hover {
    gap: 40px;
  }

  /* the hover layout, held still for js/interactions.js to measure */
  .work-row--more.is-still,
  .work-row--more.is-still * {
    transition: none !important;
  }

  .work-row--more.is-measuring {
    gap: 40px;
  }

  .work-row--more.is-measuring .work-row__media .work-row__extra {
    width: var(--img-w);
    margin-left: 0;
    transition: none;
  }

  /* the description keeps its hover-state line breaks at rest too, so its
     words never jump between lines while the row opens or closes */
  .work-row--more .work-row__desc {
    max-width: var(--desc-w, none);
  }

  .work-row:hover .icon-btn {
    background: var(--c-white);
  }

  .work-row:hover .icon-btn img {
    filter: invert(1);
  }

  .service__card:hover::after {
    opacity: 1;
  }

  .service__card:hover,
  .project__link:hover .project__media {
    padding: 0;
  }

  .project__link:hover .project__name {
    translate: 8px 0;
  }

  /* pixel-block change to the next design (js/service-gallery.js) */
  .service__swap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    visibility: hidden;
  }

  .service__swap.is-on {
    visibility: visible;
  }

  .service__card:hover img {
    border-radius: 10px;
  }

  .nav__talk:hover,
  .nav__cta:hover,
  a.platform-card:hover {
    scale: 0.99;
  }

  :is(.nav__talk, .nav__cta, .platform-card):hover .roll__inner {
    translate: 0 -50%;
  }

  .contact__cta:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }

  .contact__cta:hover .contact__cta-text {
    translate: 6px 0;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .nav__brand,
  .nav__talk {
    flex-basis: 168px;
  }

  .nav__bar {
    padding-left: 20px;
  }
}

@media (max-width: 960px) {
  .nav__rates {
    display: none;
  }

  .nav__bar {
    flex: none;
    padding-left: 4px;
    margin-left: auto;
  }

  .nav__brand,
  .nav__talk {
    flex-basis: auto;
    padding-inline: 20px;
  }

  .intro__index {
    width: auto;
    align-self: flex-start;
  }

  .intro__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }

  .about__aside {
    gap: 40px;
  }

  .about__social {
    order: 2;
  }

  .about__body {
    max-width: none;
  }

  .about__copy {
    gap: 48px;
  }

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

  .platform-card {
    height: 120px;
    font-size: 20px;
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }

  /* project page: facts above the pictures */
  .case {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .case__aside {
    position: static;
    aspect-ratio: auto;
  }

  .case__shot {
    padding: 12px;
  }


  /* work rows stack: heading + tag, then thumbnails + arrow */
  .work-list > li {
    --img-w: min(290px, calc((100cqw - 2 * var(--gap)) / 3 * 1.6));
  }

  .work-row {
    flex-direction: column;
    gap: 20px;
  }

  .work-row__info {
    flex: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
  }

  .work-row__heading,
  .work-row--more .work-row__heading {
    flex: 1 1 auto;
    width: auto;
  }

  .work-row__num {
    width: 48px;
    height: auto;
    align-self: stretch;
    align-items: flex-start;
    padding-top: 0.5em;
  }

  .work-row__titles {
    width: auto;
  }

  .work-row__name {
    white-space: normal;
  }

  .work-row__side {
    width: 100%;
    align-items: flex-end;
    justify-content: space-between;
  }

  .work-row__media {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .work-row__arrow {
    width: auto;
  }

  .contact__copy {
    min-height: 0;
  }

  .section--contact {
    min-height: 0;
    padding-bottom: calc(315 / 1920 * 100vw + 24px);
  }

  .section--contact .contact__inner {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .nav {
    padding-block: 16px;
  }



  .nav__talk {
    display: none;
  }

  .inquiry .nav__talk {
    display: flex;
  }

  .glass-btn {
    height: 52px;
  }

  .nav__menu-btn {
    height: 44px;
  }

  .hero__footer {
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .platform-card {
    height: 96px;
  }

  .service__label {
    font-size: 16px;
  }

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

  /* a long heading and its button share a row only while they fit */
  .section-head__row {
    flex-wrap: wrap;
  }

  .section-head__row .section-head__title {
    white-space: normal;
  }
}
