/* ==================================================================
   WALL: the home hero, v3 (preview branch, 4 Oct 2026)
   Every site on /work, live and concept, as tiles in five slow
   columns behind the copy. Real captures
   (tools/portfolio-capture/masters); no video, no library. Each
   column is one CSS transform loop and the whole row drifts right
   (Salvo, 4 Oct: every site must pass into clear view), all run by
   the compositor; JS only pauses them when the hero is off screen.
   ================================================================== */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dm-mono-400-latin-fd7521f3.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/dm-mono-500-latin-0e263db5.woff2) format('woff2');
}
:root {
  --mono: 'DM Mono', ui-monospace, monospace;
  /* never under a fifth of the screen: one set of five columns must span the viewport,
     or the rightward drift would open a gap on very wide screens */
  --col: max(clamp(230px, 21vw, 330px), calc(20vw - var(--gap) + 2px));
  --gap: 18px;
  --tile-h: calc(var(--col) * 0.625 + 26px);
  --live: #34d399;
}

/* ---------- HERO ---------- */
.wall.hero {
  min-height: max(700px, 100svh);
  padding: 120px 24px 56px;
  justify-content: center;
  background: var(--navy-deep);
  isolation: isolate;
  overflow: hidden;
}
.wall.hero::after {
  display: none;
}
/* the scrim: solid behind the words, gone by 62%, so the sites on the right are never dimmed */
.wall.hero::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  translate: none;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  filter: none;
  transform: none;
  animation: none;
  background:
    linear-gradient(180deg, var(--navy-deep) 0, rgba(8, 15, 24, 0) 130px),
    linear-gradient(0deg, var(--navy-deep) 0, rgba(8, 15, 24, 0) 110px),
    linear-gradient(
      90deg,
      var(--navy-deep) 0,
      var(--navy-deep) 30%,
      rgba(8, 15, 24, 0.75) 44%,
      rgba(8, 15, 24, 0) 62%
    );
}

/* the grid: the five columns twice over, drifting right by exactly one set (half the row
   plus half a gap) and repeating, so every site comes out from behind the words */
.wall > .wall-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: max-content;
  display: flex;
  gap: var(--gap);
  z-index: 0;
  animation: wall-right 110s linear infinite;
  will-change: transform;
}
@keyframes wall-right {
  from {
    transform: translate3d(calc(-50% - var(--gap) / 2), 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.wall-col {
  flex: 0 0 var(--col);
  min-width: 0; /* a long name in a tile bar must never widen the column */
  align-self: flex-start; /* the box must be as tall as its tiles: -50% is measured on it */
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  /* one list, shown twice: moving it by half its height lands on the same frame */
  animation: wall-up calc(var(--n) * 11s) linear infinite;
  will-change: transform;
}
.wall-col.is-down {
  animation-name: wall-down;
  animation-duration: calc(var(--n) * 13s);
}
.wall-col:nth-child(5n + 3) {
  margin-top: calc(var(--tile-h) * -0.4);
}
.wall-col:nth-child(5n) {
  margin-top: calc(var(--tile-h) * -0.7);
}
@keyframes wall-up {
  to {
    transform: translate3d(0, calc(-50% - var(--gap) / 2), 0);
  }
}
@keyframes wall-down {
  from {
    transform: translate3d(0, calc(-50% - var(--gap) / 2), 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}
.wall-grid:hover,
.wall-grid:hover .wall-col,
.wall.is-off .wall-grid,
.wall.is-off .wall-col {
  animation-play-state: paused;
}

/* a tile: a browser window with the site in it */
.wall-tile {
  display: block;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy-card);
  border: 1px solid rgba(165, 179, 199, 0.16);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}
.wall-tile:hover {
  transform: scale(1.03);
  border-color: rgba(96, 165, 250, 0.6);
}
.wall-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.wall-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: #0b1726;
  border-bottom: 1px solid rgba(165, 179, 199, 0.1);
}
.wall-bar i {
  flex: none;
  width: 22px;
  height: 6px;
  background: radial-gradient(circle, rgba(165, 179, 199, 0.4) 2.5px, transparent 3px) 0 0 / 8px 6px repeat-x;
}
.wall-bar b {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-bar em {
  flex: none;
  font-style: normal;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
}
.wall-bar em.is-live {
  color: var(--live);
}
.wall-bar em.is-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--live);
  vertical-align: 1px;
}

/* copy: the existing hero words, left column; only the words take the pointer */
.wall > .wall-copy {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 2;
  pointer-events: none;
}
.wall .hero-copy {
  max-width: min(620px, 44vw);
  text-align: left;
  pointer-events: auto;
}
.wall .hero-btns {
  justify-content: flex-start;
  margin-bottom: 30px;
}
.wall h1 {
  font-size: clamp(2.2rem, 3.6vw, 3.45rem);
  text-wrap: balance;
}

/* the key: what Live and Concept mean */
.wall > .wall-key {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: rgba(8, 15, 24, 0.9);
  border: 1px solid rgba(165, 179, 199, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.wall-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.wall-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--subtle);
}
.wall-key i.is-live {
  background: var(--live);
  border-color: var(--live);
}
.wall-key a {
  color: var(--blue-glow);
  text-decoration: none;
}
.wall-key a::after {
  content: ' \2192';
}
.wall-key a:hover {
  text-decoration: underline;
}

/* reduced motion: nothing moves; one still set of five, right-aligned as before */
@media (prefers-reduced-motion: reduce) {
  .wall > .wall-grid,
  .wall-col,
  .wall-col.is-down {
    animation: none;
  }
  .wall > .wall-grid {
    left: auto;
    right: -40px;
  }
  .wall-col.is-copy {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) and (min-width: 1760px) {
  .wall > .wall-grid {
    right: 0;
  }
}

/* ---------- phones and tablets: copy, then the wall below it ---------- */
@media (max-width: 960px) {
  :root {
    --col: 46vw;
    --gap: 12px;
  }
  .wall.hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 112px 20px 0;
  }
  .wall.hero::before {
    display: none;
  }
  .wall .hero-copy {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
  }
  .wall .hero-btns {
    justify-content: center;
  }
  .wall > .wall-grid {
    position: relative;
    order: 1; /* copy first on a phone, then the sites */
    right: auto;
    left: auto;
    align-self: flex-start;
    height: min(150vw, 640px);
    margin: 28px -20px 0;
    width: max-content;
    animation-duration: 80s;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent);
    mask-image: linear-gradient(180deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent);
  }
  .wall > .wall-grid::after {
    display: none;
  }
  .wall-bar {
    gap: 6px;
    padding: 0 8px;
    font-size: 9.5px;
  }
  .wall-bar i {
    display: none;
  }
  .wall > .wall-key {
    position: relative;
    order: 2;
    right: auto;
    bottom: auto;
    align-self: center;
    justify-content: center;
    margin: 4px 0 28px;
    border-radius: 14px;
  }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .wall > .wall-grid {
    align-self: auto;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ---------- HOW IT WORKS on a 48-hour line ---------- */
.how48-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}
.how48-head .tag {
  margin-bottom: 18px;
}
.how48-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.how48-tc {
  margin: 0;
  text-align: right;
}
.how48-tc span {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(3.2rem, 7.5vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.how48-tc small {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.how48-steps {
  --fill: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 44px 0 0;
}
/* the line, and its fill */
.how48-steps::before,
.how48-steps::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
}
.how48-steps::before {
  background: rgba(255, 255, 255, 0.1);
}
.how48-steps::after {
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-glow) 70%, var(--amber) 100%);
  transform: scaleX(var(--fill));
  transform-origin: 0 50%;
}
.how48-steps li {
  position: relative;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.how48-steps li::before {
  content: '';
  position: absolute;
  top: -44px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--blue-glow);
  box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.15);
  z-index: 1;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.how48-steps li:nth-child(2)::before {
  background: var(--blue);
}
.how48-when {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-glow);
}
.how48-steps h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}
.how48-steps li > p:last-child {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.65;
}
.how48-foot {
  text-align: center;
  margin: 48px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 0.88rem;
}
/* armed by JS only when motion is allowed: steps wait for the line to reach them */
.how48.is-armed .how48-steps li:not(.is-on) {
  opacity: 0.35;
  transform: translateY(8px);
}
.how48.is-armed .how48-steps li:not(.is-on)::before {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}
@media (max-width: 760px) {
  .how48-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
  }
  .how48-tc {
    text-align: left;
  }
  .how48-steps {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 0 0 40px;
  }
  .how48-steps::before,
  .how48-steps::after {
    top: 0;
    bottom: 0;
    left: 8px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .how48-steps::after {
    background: linear-gradient(180deg, var(--blue) 0%, var(--blue-glow) 70%, var(--amber) 100%);
    transform: scaleY(var(--fill));
    transform-origin: 50% 0;
  }
  .how48-steps li::before {
    top: 2px;
    left: -40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-shot,
  .screen-name,
  .screen-meta,
  .how48-steps li {
    transition: none;
  }
}
