/* ==========================================================================
   GOODEBOY STUDIO — styles
   Two colours. One idea. Type does the work.
   ========================================================================== */

/* ---------- Fonts ----------
   Display face loads from Adobe Fonts (kit link in index.html) as
   "obviously-wide". To self-host instead, put the licensed files in /fonts,
   restore this @font-face and its preload in index.html, and drop the kit:

   @font-face {
     font-family: "Obviously Wide";
     src: url("/fonts/ObviouslyWide-Semibold.woff2") format("woff2");
     font-weight: var(--weight-display);
     font-style: normal;
     font-display: swap;
   }
*/

/* ---------- Tokens ---------- */

:root {
  --bg: #0d0d0d;
  --ink: #f2f0eb;
  --ink-dim: rgba(242, 240, 235, 0.45);
  --hairline: rgba(242, 240, 235, 0.16);

  /* Matches the social templates: Obviously Wide, Regular weight, caps for
     display, normal tracking, air around everything. */
  --font-display: "obviously-wide", "obviously-extended", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --weight-display: 400;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  /* The hero wordmark is the hand-drawn SVG at 102vw, so it always
     spans the page by construction. */
  --size-display: clamp(1.9rem, 5.5vw, 5.5rem);
  --size-manifesto: clamp(1.4rem, 3.4vw, 3.4rem);
  --size-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --size-mono: 0.6875rem;

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --section-gap: clamp(6rem, 14vh, 12rem);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: clip; /* kills sideways scroll even from fixed/bleeding children */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

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

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

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.dim {
  color: var(--ink-dim);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem var(--gutter);
  mix-blend-mode: difference;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav__mark {
  width: 1.9rem; /* carries the brand alone, so slightly larger */
  height: auto;
  fill: var(--ink);
}

/* the head glances back at its own name on hover */
.nav__mark--peek {
  display: none;
}

.nav__brand:hover .nav__mark--fwd,
.nav__brand:focus-visible .nav__mark--fwd {
  display: none;
}

.nav__brand:hover .nav__mark--peek,
.nav__brand:focus-visible .nav__mark--peek {
  display: block;
}

.nav__clock {
  margin-left: auto;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
}

.nav__links a {
  position: relative;
  padding-block: 0.25rem;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(5.5rem, 12vh, 9rem);
  overflow: hidden;
}

.hero__wordmark {
  line-height: 0;
  margin-left: -1vw;
  animation: wordmark-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* The hand-drawn wordmark, edge to edge at every size */
.wordmark-svg {
  display: block;
  width: 102vw;
  height: auto;
  fill: var(--ink);
}

/* Each letter breathes on its own clock — the hand-drawn boil */
.wordmark-svg path {
  transform-box: fill-box;
  transform-origin: 50% 55%;
  animation: letter-drift 4.2s ease-in-out infinite alternate;
}

.wordmark-svg path:nth-of-type(1) { animation-duration: 3.8s; }
.wordmark-svg path:nth-of-type(2) { animation-duration: 4.6s; animation-delay: -1.3s; }
.wordmark-svg path:nth-of-type(3) { animation-duration: 4.1s; animation-delay: -2.2s; animation-name: letter-drift-b; }
.wordmark-svg path:nth-of-type(4) { animation-duration: 5s; animation-delay: -0.7s; }
.wordmark-svg path:nth-of-type(5) { animation-duration: 4.4s; animation-delay: -3.1s; animation-name: letter-drift-b; }
.wordmark-svg path:nth-of-type(6) { animation-duration: 3.9s; animation-delay: -1.8s; }
.wordmark-svg path:nth-of-type(7) { animation-duration: 4.9s; animation-delay: -2.7s; animation-name: letter-drift-b; }
.wordmark-svg path:nth-of-type(8) { animation-duration: 4.3s; animation-delay: -0.4s; }

@keyframes letter-drift {
  from { transform: translateY(-0.9%) rotate(-0.6deg); }
  to { transform: translateY(1%) rotate(0.7deg); }
}

@keyframes letter-drift-b {
  from { transform: translateY(1%) rotate(0.6deg); }
  to { transform: translateY(-0.9%) rotate(-0.7deg); }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.25rem var(--gutter) 0;
  color: var(--ink-dim);
  border-top: 1px solid var(--hairline);
  margin-top: clamp(1rem, 3vh, 2rem);
  font-variant-numeric: tabular-nums;
  animation: meta-fade 0.8s ease 0.5s both;
}

.hero__statement {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding: clamp(4rem, 10vh, 8rem) var(--gutter) 0;
  animation: meta-fade 0.8s ease 0.7s both;
}

.hero__form {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  align-self: start;
  padding-right: clamp(1rem, 3vw, 3rem);
}

.hero__form canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.hero__form-caption {
  margin-top: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.manifesto {
  grid-column: 4 / -1;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-manifesto);
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.hero__actions {
  grid-column: 4 / -1;
  display: flex;
  gap: 3rem;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.action {
  position: relative;
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--ink);
}

.action::after {
  content: "\2192";
  margin-left: 0.75em;
  display: inline-block;
  transition: transform 0.25s ease;
}

.action:hover::after,
.action:focus-visible::after {
  transform: translateX(0.35em);
}

@keyframes wordmark-rise {
  from {
    transform: translateY(0.35em);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes meta-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Sections ---------- */

.section {
  margin-top: var(--section-gap);
  padding-inline: var(--gutter);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.section__head h2 {
  font-weight: 400;
}

.section__head .dim:last-child {
  display: none;
}

@media (min-width: 700px) {
  .section__head .dim:last-child {
    display: block;
  }
}

.section__intro {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-manifesto);
  line-height: 1.15;
  max-width: 24ch;
  margin: clamp(3rem, 8vh, 5rem) 0 clamp(3rem, 8vh, 5rem) auto;
  padding-right: clamp(0rem, 8vw, 8rem);
  text-wrap: balance;
}

/* ---------- Work ---------- */

.work-list {
  margin-top: 0;
}

.work-item {
  border-bottom: 1px solid var(--hairline);
}

.work-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 0.25rem 2rem;
  padding: clamp(1.4rem, 3.5vh, 2.4rem) 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.work-row__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-display);
  line-height: 1;
  letter-spacing: 0.01em;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.35s ease;
}

.work-row__cat {
  color: var(--ink-dim);
  transition: color 0.35s ease;
}

.work-row:hover .work-row__name,
.work-row:focus-visible .work-row__name {
  transform: translateX(0.35em);
}

.work-row:hover .work-row__cat,
.work-row:focus-visible .work-row__cat {
  color: var(--ink);
}

.work-row__toggle {
  color: var(--ink-dim);
  align-self: center;
  transition: transform 0.3s ease, color 0.3s ease;
}

.work-row__toggle .eye-toggle {
  display: block;
  width: 0.95rem;
  height: auto;
  fill: currentColor;
}

.work-row[aria-expanded="true"] .work-row__toggle {
  transform: rotate(45deg);
  color: var(--ink);
}

/* Case study panel: 0fr -> 1fr grid trick for a clean height animation */
.work-case {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-case.is-open {
  grid-template-rows: 1fr;
}

.work-case__inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem var(--gutter);
}

.work-case.is-open .work-case__inner {
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
}

.work-case__inner img {
  width: 100%;
  max-height: 62vh;
  object-fit: cover;
}

.work-case__text p {
  max-width: 46ch;
}

.work-case__scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.5rem;
}

.work-case__cta {
  display: inline-block;
  margin-top: 2rem;
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--ink);
}

.work-case__cta::after {
  content: "\2192";
  margin-left: 0.75em;
  display: inline-block;
  transition: transform 0.25s ease;
}

.work-case__cta:hover::after,
.work-case__cta:focus-visible::after {
  transform: translateX(0.35em);
}

@media (min-width: 900px) {
  .work-case__inner {
    grid-template-columns: 7fr 5fr;
  }

  .work-case__text {
    padding-top: 0.25rem;
  }
}

/* Hover image preview — positioned by main.js, desktop pointers only */
.work-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: min(24rem, 32vw);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: #1a1a19;
  transition: opacity 0.25s ease;
}

.work-preview.is-visible {
  opacity: 1;
}

/* Client work keeps its colour. The studio is black and white;
   the clients are the palette. */
.work-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: none), (max-width: 900px) {
  .work-preview {
    display: none;
  }
}

/* ---------- Beat ---------- */

.beat {
  margin-block: clamp(3rem, 9vh, 6rem);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  row-gap: clamp(1.75rem, 4vh, 2.75rem);
}

.beat__line {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(2.6rem, 8.5vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.beat__sub {
  grid-column: 3 / 8;
  align-self: center;
  color: var(--ink-dim);
  max-width: 30ch;
}

.beat__cta {
  grid-column: 9 / -1;
  justify-self: start;
  align-self: center;
  font-size: clamp(0.8rem, 1.4vw, 1.05rem);
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--ink);
}

.beat__cta::after {
  content: "\2192";
  margin-left: 0.75em;
  display: inline-block;
  transition: transform 0.25s ease;
}

.beat__cta:hover::after,
.beat__cta:focus-visible::after {
  transform: translateX(0.35em);
}

@media (max-width: 700px) {
  .beat__sub {
    grid-column: 1 / -1;
  }

  .beat__cta {
    grid-column: 1 / -1;
  }
}

/* ---------- Services ---------- */

.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: clamp(1.4rem, 3.5vh, 2.2rem) 0;
  border-bottom: 1px solid var(--hairline);
}

.service-row__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-display);
  line-height: 1;
  letter-spacing: 0.01em;
}

.service-row__desc {
  color: var(--ink-dim);
}

@media (min-width: 700px) {
  .service-row {
    grid-template-columns: 7fr 5fr;
    align-items: baseline;
  }

  .service-row__desc {
    text-align: right;
  }
}

/* ---------- Process ---------- */

.process {
  margin-top: clamp(4rem, 10vh, 7rem);
}

.process__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.process__steps li {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: clamp(0.75rem, 1.5vw, 1.5rem);
  row-gap: 0.75rem;
}

/* Big outlined step number — the editorial anchor */
.process__num {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(2.75rem, 4.5vw, 4.25rem);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--ink-dim);
  transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}

/* Wireframe sits to the right of the number, on the same row */
.process__glyph {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  display: block;
  width: clamp(78px, 9vw, 124px);
  aspect-ratio: 1 / 1;
  margin: 0;
}

.process__name {
  grid-column: 1 / -1;
  grid-row: 2;
}

.process__desc {
  grid-column: 1 / -1;
  grid-row: 3;
}

.process__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.process__name::after {
  content: "_";
  color: var(--ink-dim);
}

.process__desc {
  color: var(--ink-dim);
  max-width: 32ch;
}

/* Hover fills the number in — the step "activates" */
.process__steps li:hover .process__num {
  color: var(--ink);
  -webkit-text-stroke-color: var(--ink);
}

/* Two-up once the number + wireframe pair needs the room */
@media (min-width: 620px) {
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem);
  }
}

/* Four-up only when the row genuinely fits */
@media (min-width: 1040px) {
  .process__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(2rem, 3vw, 3rem);
  }
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem var(--gutter);
  margin-top: clamp(3rem, 8vh, 5rem);
}

.about__photo {
  grid-column: 1 / -1;
}

.about__photo img {
  width: 100%;
  filter: grayscale(1) contrast(1.05);
}

.about__photo figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.about__text {
  grid-column: 1 / -1;
}

.about__lede {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: 0.005em;
}

.about__travel {
  margin-top: 2rem;
  color: var(--ink-dim);
}

/* ---------- Client logo marquee ---------- */

.clients {
  margin-top: clamp(3rem, 8vh, 5rem);
  border-top: 1px solid var(--hairline);
  padding-top: 1.25rem;
}

.clients__band {
  display: flex;
  overflow: hidden;
  margin-top: 2rem;
  /* full bleed: escape the section gutter */
  margin-inline: calc(-1 * var(--gutter));
  --marquee-duration: 38s;
}

.clients__track {
  display: flex;
  align-items: center;
  gap: clamp(3.5rem, 7vw, 6rem);
  padding-right: clamp(3.5rem, 7vw, 6rem);
  flex-shrink: 0;
  min-width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}

.clients__band:hover .clients__track {
  animation-play-state: paused;
}

.clients__track img {
  height: clamp(2.6rem, 6vw, 3.5rem);
  width: auto;
  opacity: 0.85;
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients__band {
    margin-inline: 0;
  }

  .clients__track {
    animation: none;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    min-width: 0;
  }

  .clients__track[aria-hidden] {
    display: none;
  }
}

@media (min-width: 900px) {
  .about__photo {
    grid-column: 1 / 5;
  }

  .about__text {
    grid-column: 6 / -1;
    padding-top: clamp(0rem, 6vh, 4rem);
  }
}

/* ---------- Rate card ---------- */

.rate-card {
  margin-top: clamp(2.5rem, 6vh, 4rem);
}

.rate-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem 2rem;
  padding: clamp(1.6rem, 4vh, 2.6rem) 0;
  border-bottom: 1px solid var(--hairline);
}

.rate-row__name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--size-display);
  line-height: 1;
  letter-spacing: 0.01em;
}

.rate-row__meta {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.rate-row__price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.rate-row__desc {
  color: var(--ink-dim);
  max-width: 42ch;
}

.rate-note {
  margin-top: 1.25rem;
}

@media (min-width: 900px) {
  .rate-row {
    grid-template-columns: 6fr 3fr 3fr;
    align-items: baseline;
  }

  .rate-row__meta {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* ---------- Contact ---------- */

.contact {
  margin-top: var(--section-gap);
  padding: 0 var(--gutter) var(--section-gap);
}

.contact__statement {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(2.4rem, 8vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  max-width: 12ch;
}

.contact__sub {
  margin-top: 2rem;
  color: var(--ink-dim);
  max-width: 38ch;
}

.contact__email {
  display: inline-block;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.35rem;
}

.contact__email:hover {
  color: var(--bg);
  background: var(--ink);
}

/* ---------- Footer ---------- */

.footer {
  position: relative; /* the walker is anchored to the top rule */
  border-top: 1px solid var(--hairline);
  padding: clamp(3rem, 8vh, 5rem) var(--gutter) 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem var(--gutter);
}

.footer__col h3 {
  font-size: inherit;
  font-weight: 400;
  margin-bottom: 1rem;
}

.footer__col p {
  margin-top: 0.4rem;
}

.footer__col a {
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.25s ease;
}

.footer__col a:hover,
.footer__col a:focus-visible {
  border-color: var(--ink);
}

.footer__col--mark {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.footer__mark {
  width: clamp(3.5rem, 7vw, 6rem);
  height: auto;
  fill: var(--ink);
}

/* The walker: ambles along the footer's top rule, right to left.
   The studio moves. */
.walker {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(44px, 6vw, 70px);
  pointer-events: none;
  animation: stroll 36s linear infinite;
}

/* The legs animate inside the SVG itself (a stepped 4-pose walk cycle,
   see assets/boy-walking.svg). Out here the body just bobs on the same
   beat: down on each contact, up as he passes over the planted foot. */
.walker img {
  display: block;
  width: 100%;
  height: auto;
  animation: gait 0.96s step-end infinite;
}

@keyframes stroll {
  from { transform: translate(104vw, -99%); }
  to { transform: translate(-18vw, -99%); }
}

@keyframes gait {
  0%, 50%, 100% { transform: translateY(0); }
  25%, 75% { transform: translateY(-1.8%); }
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.footer__base a:hover,
.footer__base a:focus-visible {
  color: var(--ink);
}

@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Sketch layer (mouse trail + circle annotations) ---------- */

.sketch-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%; /* without this the hi-dpi backing store doubles the size
                   and the trail lands offset from the cursor */
  z-index: 70;
  pointer-events: none;
}

/* ---------- Display caps ----------
   Short display moments read in caps, like the social templates.
   Long-form display (manifesto, intros, about) stays sentence case. */

.work-row__name,
.service-row__name,
.rate-row__name,
.beat__line,
.contact__statement {
  text-transform: uppercase;
}

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
  /* Nav: head left, links fit on one tracked row */
  .nav {
    gap: 0.5rem 1rem;
    padding: 0.75rem var(--gutter);
  }

  .nav__clock {
    display: none; /* the hero metadata carries the clock on mobile */
  }

  .nav__links {
    gap: 0.85rem;
    margin-left: auto;
  }

  .nav__links a {
    letter-spacing: 0.08em; /* tighten tracking so four links fit */
  }

  /* Hero: less air under the fixed nav */
  .hero {
    padding-top: 4.25rem;
  }

  .hero__meta > span:nth-child(3) {
    display: none; /* coords go quiet on mobile */
  }

  /* Lead with the wireframe, then the manifesto, then the links */
  .hero__statement {
    display: flex;
    flex-direction: column;
    padding-top: clamp(2rem, 7vh, 4rem);
  }

  .hero__form {
    width: 82%;
    max-width: 330px;
    margin: 0 auto 2.5rem; /* centre the wireframe */
    padding: 0;
  }

  .hero__form-caption {
    text-align: center;
  }

  .manifesto,
  .hero__actions {
    width: 100%;
  }

  .hero__actions {
    gap: 2.5rem;
  }

  /* Beat: tighten the gap around the line */
  .beat {
    margin-block: clamp(2.5rem, 7vh, 4rem);
    row-gap: 1.25rem;
  }

  .beat__line {
    grid-column: 1 / -1;
  }

  .section__intro {
    margin-inline: 0;
    padding-right: 0;
    max-width: none;
  }

  /* Process: number + wireframe side by side, name + desc below */
  .process__steps {
    gap: 2.25rem;
  }

  .process__desc {
    max-width: none;
  }

  /* No oversized display word should ever clip the edge */
  .work-row__name,
  .service-row__name,
  .rate-row__name {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Work rows: name on its own line, meta + toggle beneath */
  .work-row {
    grid-template-columns: 1fr auto;
    row-gap: 0.5rem;
  }

  .work-row__name {
    grid-column: 1 / -1;
  }

  .work-row__toggle {
    justify-self: end;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  /* infinite loops stop dead rather than strobing */
  .wordmark-svg path,
  .walker,
  .walker img,
  .clients__track {
    animation: none !important;
  }

  .walker {
    left: auto;
    right: calc(var(--gutter) + 2rem);
    transform: translateY(-99%);
  }
}
