/* Hallmark · genre: playful · macrostructure: Marquee Hero · theme: custom (site tokens) · tone: playful-bold · anchor hue: 265
 * enrichment: trailing dot grid on the banner (grey → brand blue under the cursor, fine pointer only) + fanned portfolio trio on touch · nav: N12 + N11 · footer: Ft5
 * sections: banner · about (three dots → think / create / build) · services · morph (pinned WebGL: blob → mark → 0 1 2) · clients · insights · instagram
 * pre-emit critique: P4 H4 E4 S5 R4 V4
 */

/* Banner ------------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 2; /* above the later sections, so the dots can be dragged over them */
  isolation: isolate;
  /* clears the fixed header and the announcement bar (site.js keeps --promo-h exact) */
  padding: calc(var(--header-h) + var(--promo-h, 2.5rem) + var(--ruler-offset, 0px) + var(--space-2xl)) var(--gutter) var(--space-2xl);
}

.hero__title {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: var(--page-max);
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-style: normal;
  font-weight: 400;
  line-height: var(--leading-hero);
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero__line {
  display: block;
}

/* The line above the headline: what the studio does and where, in body type, with a dot. */
.hero__kicker {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-block-end: var(--space-md);
  color: var(--color-blue-deep);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 750;
  line-height: 1.3;
  text-transform: none;
  overflow-wrap: normal;
}

.hero__kicker::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-block-start: 0.4em; /* on the first line when the text wraps */
  border-radius: 50%;
  background-color: var(--color-blue);
}

/* "some magic" sits on a lime block. home.js types it out: the block and the text are
 * revealed together (clip-path), with a lime caret riding the edge. Without JS or with
 * reduced motion, the whole block simply shows. */
.hero__typer {
  position: relative;
  display: inline-block;
}

.hero__mark {
  display: inline-block;
  padding: 0.03em 0.06em 0;
  background-color: var(--color-lime);
  color: var(--color-ink);
  line-height: var(--leading-hero);
}

.hero__typer.is-typing .hero__mark {
  clip-path: inset(0 calc(100% - var(--reveal, 0px)) 0 0);
}

.hero__caret {
  position: absolute;
  inset-block: -0.08em;
  left: calc(var(--reveal, 100%) + 0.05em);
  width: 0.05em;
  background-color: var(--color-lime);
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__typer.is-done .hero__caret {
    animation: caret-blink var(--dur-flow) steps(1, end) 4;
  }
}

/* …ending on the logo's three blue dots — which you can pick up and throw anywhere. */
.hero__dots {
  display: inline-flex;
  gap: 0.07em;
  margin-inline-start: 0.12em;
}

.hero__dots.is-waiting {
  opacity: 0;
}

.hero__dots i {
  position: relative;
  display: block;
  width: 0.15em;
  height: 0.15em;
  border-radius: 50%;
  background-color: var(--color-blue);
  cursor: grab;
  touch-action: none;
  user-select: none;
  translate: var(--dx, 0px) var(--dy, 0px);
  transition: scale var(--dur-short) var(--ease-out);
}

/* A bigger hit area than the dot itself, so it's easy to grab on a phone. */
.hero__dots i::before {
  content: "";
  position: absolute;
  inset: -0.75rem;
}

.hero__dots i.is-held {
  cursor: grabbing;
  scale: 1.2;
}

.hero__dots i.is-returning {
  transition:
    translate var(--dur-reveal) var(--ease-out),
    scale var(--dur-short) var(--ease-out);
}

@media (hover: hover) {
  .hero__dots i:hover {
    scale: 1.12;
  }
}

@keyframes hero-hop {
  0%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-0.25em);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__dots:not(.is-waiting) i {
    animation: hero-hop var(--dur-reveal) var(--ease-in-out) 1 both;
    animation-delay: calc(var(--dur-short) + var(--d) * var(--dur-micro));
  }

  .hero__dots i:nth-child(1) { --d: 0; }
  .hero__dots i:nth-child(2) { --d: 1; }
  .hero__dots i:nth-child(3) { --d: 2; }
}

.hero__reset {
  justify-self: start;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
  padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  transition: border-color var(--dur-short) var(--ease-out);
}

.hero__reset::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-blue);
}

.hero__reset[hidden] {
  display: none;
}

@media (hover: hover) {
  .hero__reset:hover {
    border-color: var(--color-ink);
  }
}

.hero__foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  max-width: var(--page-max);
  margin: var(--space-xl) auto 0;
}

@media (min-width: 48rem) {
  .hero__foot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .hero__intro {
    grid-column: 2;
  }
}

.hero__intro {
  display: grid;
  justify-items: start;
  gap: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero__lede {
  max-width: 34ch;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.45;
}

.hero__grid {
  mask-image: linear-gradient(to bottom, var(--color-ink) 55%, transparent);
}

/* About: the three dots ---------------------------------------------------- */

.about {
  --color-focus: var(--color-paper);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: var(--space-4xl) var(--gutter);
  background-color: var(--color-blue);
  color: var(--color-paper);
}

/* Moving background: two deep-blue pools drift past each other like a slow wave.
 * Only darker blues, so white text never loses contrast. Transform-only animation;
 * home.js pauses it off-screen, and it stays still with reduced motion. */
.about__pools {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  pointer-events: none;
}

.about__pools::before,
.about__pools::after {
  content: "";
  position: absolute;
  width: 80vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
  animation: about-drift-a var(--dur-drift) var(--ease-in-out) infinite alternate;
}

.about__pools::before {
  inset-block-start: -45%;
  inset-inline-start: -25%;
  background-image: radial-gradient(circle, var(--color-blue-deep) 0 22%, transparent 66%);
}

.about__pools::after {
  inset-block-end: -50%;
  inset-inline-end: -30%;
  background-image: radial-gradient(circle, var(--color-blue-night) 0 20%, transparent 64%);
  animation-name: about-drift-b;
  animation-duration: calc(var(--dur-drift) * 1.35);
}

@keyframes about-drift-a {
  50% {
    transform: translate(45%, 15%) scale(1.2);
  }

  to {
    transform: translate(70%, 45%) scale(0.95);
  }
}

@keyframes about-drift-b {
  50% {
    transform: translate(-30%, -40%) scale(0.85);
  }

  to {
    transform: translate(-65%, -20%) scale(1.15);
  }
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
  max-width: var(--page-max);
  margin-inline: auto;
}

@media (min-width: 64rem) {
  .about__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: var(--space-3xl);
    align-items: center;
  }

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

.about .frame {
  --frame-color: color-mix(in oklch, var(--color-paper) 22%, transparent); /* white lines on blue */
}

.about__intro {
  display: grid;
  justify-items: start;
  gap: var(--space-lg);
}

.about__text {
  max-width: 38ch;
  color: var(--color-blue-tint);
  font-size: var(--text-md);
  line-height: 1.5;
}

/* Viewfinder: a small game. Drag to aim (the photo is zoomed so there's room to pan),
 * release and the focus brackets lock; click to shoot. home.js drives it. */
.viewfinder {
  display: grid;
  gap: var(--space-sm);
}

.viewfinder__stage {
  --vf-line: var(--color-paper);
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: clip;
  border-radius: var(--radius-lg);
  background-color: var(--color-ink);
  cursor: crosshair; /* aim and click to take a shot */
  user-select: none;
}

.viewfinder__stage:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 4px;
}

/* The film roll: frames side by side, looping without end. home.js places each frame
 * (--fx) every animation frame; with no JS only the first frame shows. */
.viewfinder__roll {
  position: absolute;
  inset: 0;
  transition:
    filter var(--dur-reveal) var(--ease-out),
    scale var(--dur-reveal) var(--ease-out);
}

/* Changing frame like a camera: the lens drops out of focus, the frame changes while it's
 * soft, then focus pulls back in (home.js removes the class after the swap). */
.viewfinder__stage.is-defocus .viewfinder__roll {
  filter: blur(14px) brightness(1.08);
  scale: 1.05;
  transition:
    filter calc(var(--dur-long) * 0.9) var(--ease-in),
    scale calc(var(--dur-long) * 0.9) var(--ease-in);
}

@media (prefers-reduced-motion: reduce) {
  .viewfinder__roll {
    filter: none;
    transition: none;
  }
}

.viewfinder__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  translate: var(--fx, 100%) 0;
  pointer-events: none;
}

.viewfinder__frame:first-child {
  translate: var(--fx, 0) 0;
}

/* A light ink veil so the white HUD reads on any part of the photo. */
.viewfinder__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: color-mix(in oklch, var(--color-ink) 18%, transparent);
  pointer-events: none;
}

.viewfinder__hud {
  --inset: var(--space-md);
  --edge: calc(var(--inset) + var(--space-md));
  position: absolute;
  inset: 0;
  z-index: 1;
  color: var(--color-paper);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px var(--color-shadow);
  pointer-events: none;
}

/* The four frame corners: eight short strokes painted as one background. */
.viewfinder__hud::before {
  --l: 1.75rem;
  --t: 2px;
  content: "";
  position: absolute;
  inset: var(--inset);
  background:
    linear-gradient(var(--vf-line) 0 0) left top / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) left top / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) right top / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) right top / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) left bottom / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) left bottom / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) right bottom / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) right bottom / var(--t) var(--l);
  background-repeat: no-repeat;
}

.vf-rec,
.vf-battery,
.vf-shots,
.vf-time {
  position: absolute;
  line-height: 1;
}

.vf-rec {
  inset-block-start: var(--edge);
  inset-inline-start: var(--edge);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.vf-rec i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--color-rec);
}

@keyframes vf-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .vf-rec i {
    animation: vf-blink calc(var(--dur-flow) * 1.2) steps(1, end) infinite;
  }
}

.about.is-paused .vf-rec i {
  animation-play-state: paused;
}

.vf-battery {
  inset-block-start: var(--edge);
  inset-inline-end: calc(var(--edge) + 0.25rem);
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 2px solid var(--vf-line);
  border-radius: 3px;
}

.vf-battery::after {
  content: "";
  position: absolute;
  inset-block: 25%;
  inset-inline-end: -5px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background-color: var(--vf-line);
}

.vf-battery i {
  width: 0.3rem;
  height: 0.55rem;
  background-color: var(--vf-line);
}

.vf-shots {
  inset-block-end: var(--edge);
  inset-inline-start: var(--edge);
}

.vf-time {
  inset-block-end: var(--edge);
  inset-inline-start: 50%;
  translate: -50% 0;
  font-size: var(--text-base);
}

/* Autofocus indicator: blinks while hunting, turns lime once focus locks. */
.vf-af {
  position: absolute;
  inset-block-start: var(--edge);
  inset-inline-start: 50%;
  padding: 0.15rem 0.35rem;
  border: 1.5px solid currentColor;
  border-radius: 0.2rem;
  line-height: 1;
  translate: -50% 0;
  transition: color var(--dur-short) var(--ease-out);
}

.viewfinder__stage:not(.is-hunting) .vf-af {
  color: var(--color-lime);
}

@media (prefers-reduced-motion: no-preference) {
  .viewfinder__stage.is-hunting .vf-af {
    animation: vf-blink calc(var(--dur-flow) * 0.5) steps(1, end) infinite;
  }
}

/* Which frame of the roll is in view. */
.vf-index {
  position: absolute;
  inset-block-end: var(--edge);
  inset-inline-end: var(--edge);
  line-height: 1;
}

/* Focus brackets + centre cross. They widen while you aim and lock when you let go. */
.vf-focus {
  --l: 0.875rem;
  --t: 2px;
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: clamp(3.5rem, 12%, 5rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  background:
    linear-gradient(var(--vf-line) 0 0) left top / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) left top / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) right top / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) right top / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) left bottom / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) left bottom / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) right bottom / var(--l) var(--t),
    linear-gradient(var(--vf-line) 0 0) right bottom / var(--t) var(--l),
    linear-gradient(var(--vf-line) 0 0) center / 1px 30%,
    linear-gradient(var(--vf-line) 0 0) center / 30% 1px;
  background-repeat: no-repeat;
  transition:
    scale var(--dur-short) var(--ease-out),
    opacity var(--dur-short) var(--ease-out);
}

.viewfinder__stage.is-hunting .vf-focus {
  scale: 1.35;
  opacity: 0.6;
}

.viewfinder__flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: var(--color-paper);
  opacity: 0;
  pointer-events: none;
}

@keyframes vf-flash {
  from {
    opacity: 0.85;
  }

  to {
    opacity: 0;
  }
}

.viewfinder__flash.is-firing {
  animation: vf-flash var(--dur-long) var(--ease-out);
}

.viewfinder__hint {
  color: var(--color-blue-tint);
  font-size: var(--text-sm);
}

.process {
  --dot: 1.5rem;
  --step-gap: var(--space-xl);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--step-gap);
  margin-block-start: var(--space-lg);
}

@media (min-width: 48rem) {
  .process {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --step-gap: var(--space-lg);
  }
}

.process__step {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-xs);
  padding-inline-start: calc(var(--dot) + var(--space-md));
}

@media (min-width: 48rem) {
  .process__step {
    padding-inline-start: 0;
    padding-block-start: calc(var(--dot) + var(--space-lg));
  }
}

.process__dot {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background-color: var(--color-paper);
  transition: transform var(--dur-long) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--dur-long));
}

/* Each step draws a dashed line to the next dot — down on phones, across from tablet up —
 * and the dashes march toward the next stage. */
.process__step:not(:last-child)::before {
  --dash: 0.875rem; /* one dash + one gap */
  content: "";
  position: absolute;
  inset-block: calc(var(--dot) / 2) calc(-1 * (var(--step-gap) + var(--dot) / 2));
  inset-inline-start: calc(var(--dot) / 2 - var(--rule-field) / 2);
  width: var(--rule-field);
  background-image: repeating-linear-gradient(to bottom, var(--color-blue-tint) 0 0.5rem, transparent 0.5rem var(--dash));
  background-size: 100% var(--dash);
  transform-origin: top;
  transition: transform var(--dur-long) var(--ease-in-out);
  transition-delay: calc(var(--i, 0) * var(--dur-long) + var(--dur-micro));
  animation: process-flow-y var(--dur-flow) linear infinite;
}

@media (min-width: 48rem) {
  .process__step:not(:last-child)::before {
    inset-block: calc(var(--dot) / 2 - var(--rule-field) / 2) auto;
    inset-inline: calc(var(--dot) / 2) calc(-1 * (var(--step-gap) + var(--dot) / 2));
    width: auto;
    height: var(--rule-field);
    background-image: repeating-linear-gradient(to right, var(--color-blue-tint) 0 0.5rem, transparent 0.5rem var(--dash));
    background-size: var(--dash) 100%;
    transform-origin: left;
    animation-name: process-flow-x;
  }
}

@keyframes process-flow-y {
  to {
    background-position: 0 var(--dash);
  }
}

@keyframes process-flow-x {
  to {
    background-position: var(--dash) 0;
  }
}

/* Off-screen (home.js) or reduced motion: everything in this section holds still. */
.about.is-paused .about__pools::before,
.about.is-paused .about__pools::after,
.about.is-paused .process__step:not(:last-child)::before {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .about__pools::before,
  .about__pools::after,
  .process__step:not(:last-child)::before {
    animation: none;
  }
}

/* home.js adds .reveal-ready, so without JS the steps simply show. */
.process.reveal-ready:not(.is-in) .process__dot {
  transform: scale(0);
}

.process.reveal-ready:not(.is-in) .process__step::before {
  transform: scaleY(0);
}

@media (min-width: 48rem) {
  .process.reveal-ready:not(.is-in) .process__step::before {
    transform: scaleX(0);
  }
}

.process__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: normal;
  font-weight: 400;
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.process__time {
  color: var(--color-blue-tint);
  font-weight: 700;
}

.process__text {
  max-width: 34ch;
  line-height: 1.55;
}

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

.services {
  padding: var(--space-4xl) var(--gutter) var(--space-3xl);
}

.services__inner,
.works__inner,
.clients__inner,
.notes__inner,
.insta__inner {
  display: grid;
  gap: var(--space-2xl);
  max-width: var(--page-max);
  margin-inline: auto;
}

.service-list {
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-xs) var(--space-lg);
  padding: var(--space-lg) var(--space-2xs);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  transition: background-color var(--dur-short) var(--ease-out);
}

@media (min-width: 56rem) {
  .service {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    padding-inline: var(--space-sm);
  }
}

.service__name {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: normal;
  font-weight: 400;
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.service__name a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

/* The whole row is the link. */
.service__name a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.service__name a:focus-visible {
  outline: none;
}

.service__name a:focus-visible::after {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}

/* A blue dot slides in front of the name — the same move as the menu links. */
.service__dot {
  flex-shrink: 0;
  width: 0.24em;
  height: 0.24em;
  margin-inline-end: -0.24em;
  border-radius: 50%;
  background-color: var(--color-blue);
  scale: 0;
  transition: scale var(--dur-short) var(--ease-out);
}

.service__label {
  transition: translate var(--dur-short) var(--ease-out);
}

.service__text {
  grid-column: 1;
  max-width: 46ch;
  color: var(--color-muted);
}

.service__go {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  transition:
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out);
}

/* Small phones: the name needs the full row; the whole row is still the link. */
@media (max-width: 29.99rem) {
  .service__go {
    display: none;
  }
}

.service__go svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 56rem) {
  .service__text {
    grid-column: 2;
    grid-row: 1;
  }

  .service__go {
    grid-column: 3;
    grid-row: 1;
  }
}

.service:focus-within .service__dot {
  scale: 1;
}

.service:focus-within .service__label {
  translate: 0.45em 0;
}

@media (hover: hover) {
  .service:hover {
    background-color: var(--color-paper-2);
  }

  .service:hover .service__dot {
    scale: 1;
  }

  .service:hover .service__label {
    translate: 0.45em 0;
  }

  .service:hover .service__go {
    border-color: var(--color-blue);
    background-color: var(--color-blue);
    color: var(--color-paper);
  }
}

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

/* Hover card: one picture that follows the cursor over the list and cross-fades between
 * services. Mouse only, no reduced motion — it's decoration, the list works without it. */
.service-peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-raised);
  display: none;
  width: clamp(12rem, 18vw, 17rem);
  aspect-ratio: 4 / 5;
  overflow: clip;
  border-radius: var(--radius-lg);
  background-color: var(--color-paper-2);
  box-shadow: 0 1.5rem 3rem -1.5rem var(--color-shadow);
  opacity: 0;
  pointer-events: none;
  translate: calc(var(--peek-x, 0px) - 50%) calc(var(--peek-y, 0px) - 50%);
  rotate: var(--peek-r, 0deg);
  scale: 0.6;
  transition:
    opacity var(--dur-short) var(--ease-out),
    scale var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.js .service-peek {
    display: block;
  }
}

.service-peek.is-visible {
  opacity: 1;
  scale: 1;
}

.service-peek img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  scale: 1.08;
  transition:
    opacity var(--dur-short) var(--ease-out),
    scale var(--dur-long) var(--ease-out);
}

.service-peek img.is-active {
  opacity: 1;
  scale: 1;
}

/* Morph: pinned while you scroll — a liquid chrome blob becomes the mark, then 0 1 2 ----- */

.morph {
  position: relative;
  background-color: var(--color-paper); /* continues straight on from Services */
  color: var(--color-ink);
}

.morph__sticky {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: var(--space-4xl) var(--gutter);
}

/* The grid sits behind the chrome: faint blue dots, strongest around the shape in the
 * middle and fading out toward the top (into Services) and the bottom — the same soft
 * edge as the banner. They light up full brand blue under the cursor. */
.morph__grid {
  --grid-dot: color-mix(in oklch, var(--color-blue) 30%, transparent);
  color: var(--color-blue);
  mask-image: radial-gradient(ellipse 70% 58% at 50% 50%, var(--color-ink) 30%, transparent 100%);
}

.morph__still {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
}

.morph__mark {
  width: clamp(6rem, 18vw, 12rem);
  height: auto;
}

.morph__digits {
  width: clamp(14rem, 40vw, 26rem);
  height: auto;
  fill: currentColor;
}

.morph__canvas {
  display: none;
}

/* morph.js adds .is-live once WebGL2 is up: the section grows tall and its stage sticks,
 * so scrolling through it scrubs the animation. */
/* Long on purpose: each stage gets plenty of scroll, so nothing moves fast. */
.morph.is-live {
  height: 400svh;
}

@media (min-width: 64rem) {
  .morph.is-live {
    height: 480vh;
  }
}

.morph.is-live .morph__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 0;
}

.morph.is-live .morph__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.morph.is-live .morph__still {
  display: none;
}

/* Works: three projects numbered 0 · 1 · 2 with the morph's ringed badges -------- */

.works {
  padding: var(--space-3xl) var(--gutter) var(--space-4xl);
}

.works__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-lg);
}

/* Ticker: two crossing tapes between Works and Clients -------------------------
 * Blue tape (services) runs left, lime tape (tagline) runs right, crossing in an X.
 * Each track holds the list twice and slides by half its width, so the loop is seamless.
 * Pauses on hover and off-screen (home.js [data-ambient]); still with reduced motion. */

.ticker {
  display: grid;
  /* minmax(0, 1fr): the very long tracks must not stretch the column, or the tapes would
   * cross far off-screen and show up apart and cut off */
  grid-template-columns: minmax(0, 1fr);
  overflow: clip;
  padding-block: var(--space-3xl);
}

.ticker__band {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
  width: 110%;
  margin-inline: -5%;
  overflow: hidden;
  padding-block: var(--space-sm);
  rotate: -2deg;
}

.ticker__band--blue {
  z-index: 1;
  background-color: var(--color-blue);
  color: var(--color-paper);
  box-shadow: 0 1rem 2rem -1.25rem var(--color-shadow);
  --ticker-dot: var(--color-lime);
}

.ticker__band--lime {
  background-color: var(--color-lime);
  color: var(--color-ink);
  rotate: 2deg;
  --ticker-dot: var(--color-blue);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-left 46s linear infinite;
}

.ticker__band--lime .ticker__track {
  animation-name: ticker-right;
  animation-duration: 54s;
}

@keyframes ticker-left {
  to {
    translate: -50% 0;
  }
}

@keyframes ticker-right {
  from {
    translate: -50% 0;
  }

  to {
    translate: 0 0;
  }
}

.ticker:hover .ticker__track,
.ticker.is-paused .ticker__track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }
}

.ticker__list {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-lg);
  padding-inline-end: var(--space-lg);
}

.ticker__item {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw + 1rem, 3.25rem);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The three dots between phrases. */
.ticker__dots {
  display: flex;
  gap: 0.3rem;
}

.ticker__dots i {
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--ticker-dot);
}

/* Clients ------------------------------------------------------------------ */

.clients {
  padding: var(--space-3xl) var(--gutter) var(--space-4xl);
}

/* Open wall: no boxes, just the logos on the page. Each logo is a little 3D card —
 * home.js tilts it toward the cursor, adds a moving shadow and a glare that only lands on
 * the artwork, and lets you drag to spin it like a coin. */
/* Flex rather than grid, so a part-filled last row sits centred instead of hanging left. */
/* 14 logos: 3 per row on phones, 5 on tablets, and two rows of 7 on desktop. */
.client-wall {
  --cols: 3;
  --gap: var(--space-xs);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}

@media (min-width: 48rem) {
  .client-wall {
    --cols: 5;
    --gap: var(--space-md);
  }
}

@media (min-width: 64rem) {
  .client-wall {
    --cols: 7;
    --gap: var(--space-md);
  }
}

/* Cell size follows the column count; logo heights follow the cell so nothing spills:
 * --logo-h for wide wordmarks, --badge-h for round / stacked logos. */
.client-wall {
  --logo-h: 1.75rem;
  --badge-h: 3.5rem;
}

@media (min-width: 48rem) {
  .client-wall {
    --logo-h: 2.25rem;
    --badge-h: 4.5rem;
  }
}

@media (min-width: 64rem) {
  .client-wall {
    --logo-h: 2.5rem;
    --badge-h: 4.5rem;
  }
}

.client {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: var(--space-sm);
  perspective: 700px;
  touch-action: pan-y; /* sideways drag spins the logo; vertical swipes still scroll */
}

@media (min-width: 64rem) {
  .client {
    aspect-ratio: 5 / 4;
  }
}

/* The card that moves. Sized to the logo, so the glare's mask matches the artwork. */
.client__logo {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  --sx: 0px;
  --sy: 0px;
  --gx: 50%;
  --gy: 50%;
  position: relative;
  display: inline-block;
  max-width: 90%; /* cells are narrower now; wide wordmarks need most of the width */
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--lift));
  filter: drop-shadow(var(--sx) var(--sy) 0.6rem var(--color-shadow));
  will-change: transform;
}

.client__logo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--logo-h);
  object-fit: contain;
}

/* Glare: a soft light spot that follows the cursor, masked to the logo's own shape. */
.client__logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at var(--gx) var(--gy), var(--color-paper) 0%, transparent 55%);
  -webkit-mask: var(--logo) center / 100% 100% no-repeat;
  mask: var(--logo) center / 100% 100% no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-short) var(--ease-out);
}

.client.is-active .client__logo::after {
  opacity: 0.75;
}

.client.is-active {
  cursor: grab;
}

.client.is-spinning {
  cursor: grabbing;
}

.client--badge .client__logo img {
  max-height: var(--badge-h);
}

/* At rest every logo is grey and a little faded, so the wall reads as one quiet row; the
 * logo you point at (or touch / spin, or reach with the keyboard) comes back in colour. */
.client__logo img {
  filter: grayscale(1);
  opacity: 0.55;
  transition:
    filter var(--dur-long) var(--ease-out),
    opacity var(--dur-long) var(--ease-out);
}

/* One-colour logos (white or yellow artwork) are inked so every logo reads on paper. */
.client--mono .client__logo img {
  filter: brightness(0);
  opacity: 0.35;
}

.client:hover .client__logo img,
.client.is-active .client__logo img,
.client.is-spinning .client__logo img {
  filter: none;
  opacity: 1;
}

.client--mono:hover .client__logo img,
.client--mono.is-active .client__logo img,
.client--mono.is-spinning .client__logo img {
  filter: brightness(0);
  opacity: 0.88;
}

/* Insights ----------------------------------------------------------------- */

.notes {
  padding: var(--space-3xl) var(--gutter);
  background-color: var(--color-paper-2);
}

.notes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-lg);
}

.notes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}

@media (min-width: 56rem) {
  .notes__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }

  .note--feature {
    grid-row: 1 / span 2;
  }
}

.note {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-lg);
  background-color: var(--color-paper);
  color: var(--color-ink);
  transition:
    border-color var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out);
}

.note--feature {
  --color-focus: var(--color-blue-soft);
  min-height: 22rem;
  padding: var(--space-xl);
  border-color: var(--color-ink);
  background-color: var(--color-ink);
  color: var(--color-paper);
}

.note__tag {
  color: var(--color-blue-deep);
  font-size: var(--text-sm);
  font-weight: 700;
}

.note--feature .note__tag {
  color: var(--color-blue-soft);
}

.note__title {
  font-size: var(--text-xl);
  font-style: normal;
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.note--feature .note__title {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.note__title a {
  text-decoration: none;
}

/* The whole card is the link. */
.note__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.note__title a:focus-visible {
  outline: none;
}

.note__title a:focus-visible::after {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.note__excerpt {
  max-width: 44ch;
  color: var(--color-muted);
}

.note--feature .note__excerpt {
  color: var(--color-muted-dark);
}

.note__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-block-start: auto;
  padding-block-start: var(--space-sm);
  color: var(--color-blue-deep);
  font-weight: 700;
  white-space: nowrap;
}

.note__more::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

.note--feature .note__more {
  color: var(--color-paper);
}

@media (hover: hover) {
  .note:hover {
    border-color: var(--color-ink);
  }

  .note--feature:hover {
    background-color: var(--color-ink-2);
  }
}

/* Instagram ---------------------------------------------------------------- */

.insta {
  padding: var(--space-3xl) var(--gutter) var(--space-4xl);
}

.insta__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Placeholder until the feed plugin renders its own grid in this slot. */
.insta__placeholder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
}

@media (min-width: 48rem) {
  .insta__placeholder {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-sm);
  }
}

.insta__placeholder li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background-color: var(--color-paper-2);
}

.insta__dots {
  display: flex;
  gap: 0.3rem;
}

.insta__dots i {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-rule);
}

/* The Instagram Feed plugin's grid, drawn like the placeholder: rounded squares with a gentle
   zoom on hover. Its own spacing is undone; the column count stays the plugin's (Instagram
   Feed → Feeds → Customize → Layout), so it can be changed from wp-admin. */
.insta__feed #sb_instagram {
  padding: 0 !important;
  width: 100% !important;
}

.insta__feed #sb_instagram #sbi_images {
  gap: var(--space-xs) !important;
  padding: 0 !important;
}

@media (min-width: 48rem) {
  .insta__feed #sb_instagram #sbi_images {
    gap: var(--space-sm) !important;
  }
}

.insta__feed #sb_instagram #sbi_images .sbi_item {
  padding: 0 !important;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background-color: var(--color-paper-2);
}

.insta__feed #sb_instagram .sbi_photo_wrap,
.insta__feed #sb_instagram .sbi_photo {
  display: block;
  height: 100% !important;
}

.insta__feed #sb_instagram .sbi_photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-long) var(--ease-out);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .insta__feed #sb_instagram .sbi_photo:hover img {
    transform: scale(1.05);
  }
}

.insta__feed #sb_instagram .sbi_photo:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: -2px;
}

/* The section has its own header and Follow button. */
.insta__feed #sb_instagram .sb_instagram_header,
.insta__feed #sb_instagram #sbi_load {
  display: none !important;
}

.insta__note {
  margin-block-start: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
