/* ==========================================================================
   JD — orbit portfolio
   ========================================================================== */

:root {
  --cream: #f4ebe3;
  --ink: #1c1a1a;
  --coral: #ff5a2c;
  --rose: #ff3d7f;
  --violet: #8b6cff;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --text: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
  --track: -0.03em;
  --mono: none;
  --ui: var(--cream);
  --capsule: #5e5e5e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
h1, h2, h3, p, dl, dd, figure, ol, ul {
  margin: 0;
  padding: 0;
  font: inherit;
}
ol, ul {
  list-style: none;
}
img,
canvas,
svg {
  display: block;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
}

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-stopped,
html.is-scroll-locked {
  overflow: clip;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  font-family: var(--text);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body[data-ui='cream'] {
  --ui: var(--cream);
  --capsule: #5e5e5e;
}
body[data-ui='dark'] {
  --ui: var(--ink);
  --capsule: #ffffff;
}

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

.letter,
.space {
  display: inline-block;
}

/* underline that draws in on hover */
.u-line,
.site-header__link {
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.u-line::after,
.site-header__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
  pointer-events: none;
}
.u-line:hover::after,
.u-line:focus-visible::after,
.site-header__link:hover::after,
.site-header__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

/* ---------- loader ---------- */
.home-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: var(--cream);
}
html[data-loader='pending'] .home-loader {
  display: block;
}
.home-loader.is-canvas-ready {
  background: transparent;
}
.home-loader canvas {
  width: 100%;
  height: 100%;
}

/* ---------- page transition ---------- */
.page-transition {
  --rx: min(60vh, 42vw);
  --ry: 60vh;
  position: fixed;
  top: -10vh;
  left: -20vw;
  z-index: 9999;
  width: 140vw;
  height: 120vh;
  background: var(--cream);
  border-radius: var(--rx) 0 0 var(--rx) / var(--ry) 0 0 var(--ry);
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
}
.page-transition[data-color='dark'] {
  background: var(--ink);
}
.page-transition.is-exit {
  border-radius: 0 var(--rx) var(--rx) 0 / 0 var(--ry) var(--ry) 0;
}
html[data-transition] .page-transition {
  visibility: visible;
}
html[data-transition='dark'] .page-transition {
  background: var(--ink);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 32px;
  color: var(--ui);
  pointer-events: none;
  transition: color 0.4s var(--ease-out);
}
.site-header__logo,
.site-header__nav,
.site-header__motion {
  pointer-events: auto;
}
.site-header__logo {
  display: block;
  width: clamp(36px, 4vw, 48px);
  height: clamp(36px, 4vw, 48px);
}
.site-header__mark {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--mono) center / contain no-repeat;
  mask: var(--mono) center / contain no-repeat;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.6vw, 38px);
  height: clamp(54px, 5vw, 70px);
  padding-inline: clamp(14px, 2.4vw, 34px);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--capsule) 12%, transparent);
  background: color-mix(in srgb, var(--capsule) 20%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
body[data-capsule='soft'] .site-header__nav {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}
.site-header__link,
.site-header__motion {
  font-family: var(--text);
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.site-header__motion {
  justify-self: end;
  opacity: 0.8;
  transition: opacity 0.25s;
}
.site-header__motion:hover {
  opacity: 1;
}
.site-header__motion span {
  display: inline-block;
  min-width: 1.6em;
  text-align: left;
  opacity: 0.55;
}
@media (min-width: 700px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .site-header__nav {
    grid-column: 2;
  }
}

/* ---------- section indicator ---------- */
.indicator {
  position: fixed;
  left: clamp(20px, 2vw, 32px);
  bottom: clamp(24px, 4vh, 40px);
  z-index: 900;
  display: flex;
  flex-direction: column;
  color: var(--ui);
  transition: color 0.4s var(--ease-out);
}
.indicator__item {
  position: relative;
  display: flex;
  align-items: center;
  width: 56px;
  height: 18px;
}
.indicator__item::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  font: 500 14px/1 var(--text);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.indicator__item:hover::after,
.indicator__item:focus-visible::after {
  opacity: 0.85;
  transform: translate(0, -50%);
}
.indicator__bar {
  position: relative;
  display: block;
  width: 12px;
  height: 2px;
  overflow: hidden;
  transition: width 0.45s var(--ease-out);
}
.indicator__bar::before,
.indicator__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
}
.indicator__bar::before {
  opacity: 0.28;
}
.indicator__bar::after {
  opacity: 0;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.indicator__item.is-near .indicator__bar {
  width: 28px;
}
.indicator__item.is-near .indicator__bar::before {
  opacity: 0.55;
}
.indicator__item.is-active .indicator__bar {
  width: 48px;
}
.indicator__item.is-active .indicator__bar::before {
  opacity: 0.45;
}
.indicator__item.is-active .indicator__bar::after {
  opacity: 1;
}

/* ---------- hero ---------- */
.hero {
  --inset: clamp(8px, calc(2.5vw - 8px), 16px);
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--cream);
  overflow: hidden;
}
.hero__frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 18px;
  clip-path: inset(var(--inset) round 18px);
  transform-origin: top center;
  will-change: transform;
  background: linear-gradient(120deg, #ff6a1a, #f0261d 45%, #ff3d7f 70%, #8b3dff);
}
.hero__gl {
  width: 100%;
  height: 100%;
}
.hero__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 80px 24px;
  color: var(--cream);
  text-align: center;
}
.hero__fallback[hidden] {
  display: none;
}
.hero__fallback-mark {
  width: min(28vw, 180px);
  color: rgba(255, 244, 236, 0.85);
}
.hero__fallback-mark svg {
  width: 100%;
  height: auto;
}
.hero__fallback-name {
  font: 700 clamp(56px, 11vw, 190px) / 0.86 var(--display);
  letter-spacing: var(--track);
}
.hero__fallback-roles {
  font: 400 clamp(16px, 1.6vw, 24px) / 1.2 var(--display);
}
.hero__fallback-note {
  max-width: 520px;
  font: 500 14px/1.5 var(--text);
  opacity: 0.85;
}
.hero__fallback-note button {
  text-decoration: underline;
}

/* ---------- manifesto ---------- */
.manifesto {
  position: relative;
  z-index: 2;
  margin-top: clamp(-500px, -55svh, -450px);
  background: var(--cream);
  overflow: hidden;
}
.manifesto.is-exiting {
  background: var(--ink);
}
.manifesto__card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--cream);
  transform-origin: top center;
  will-change: transform, border-radius;
}
.manifesto__text {
  display: flex;
  width: max-content;
  padding: 0 101vw;
  font: 700 12vw/1 var(--display);
  letter-spacing: var(--track);
  white-space: nowrap;
  color: var(--ink);
  cursor: default;
}

/* ---------- path ---------- */
.path {
  position: relative;
  z-index: 1;
  background: var(--ink);
  padding: 0 2vw;
}
.path__intro {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.path__title {
  /* stays above the sentences stage, which scrolls up underneath while the title is pinned */
  position: relative;
  z-index: 3;
  font-family: var(--display);
  font-size: 12vw;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: var(--track);
  text-align: center;
  color: var(--cream);
  white-space: nowrap;
}
.path__motion,
.path__motion .letter {
  display: inline-block;
  will-change: transform;
}

.story {
  --story-bg: var(--ink);
  position: relative;
  width: calc(100% + 4vw);
  margin: 0 -2vw;
  background: var(--ink);
  overflow: hidden;
}
.story__track {
  height: 1100vh;
}
.story__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  background: var(--story-bg);
  will-change: transform;
}
.story__visuals {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.story__half {
  position: absolute;
  top: 50%;
  width: 48vw;
  height: 30vh;
  opacity: 0;
  background-color: #6d3cff;
  background-repeat: no-repeat;
  background-size: 100vw 100vh;
  will-change: transform, width, height, border-radius;
}
.story.is-art-ready .story__half {
  background-image: var(--story-art);
}
.story__half--l {
  left: 0;
  border-radius: 0 24px 24px 0;
  background-position: 0% 50%;
}
.story__half--r {
  right: 0;
  border-radius: 24px 0 0 24px;
  background-position: 100% 50%;
}
.story__gl {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.story__lines {
  position: relative;
  z-index: 2;
  width: 100%;
}
.story__line {
  --stroke: 0px;
  width: 100%;
  font-family: var(--display);
  font-size: 10vw;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: var(--track);
  text-align: center;
  color: var(--cream);
  white-space: nowrap;
}
.story__line:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
}
.story__line .letter {
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .story__line.is-both {
    -webkit-text-stroke: var(--stroke) var(--cream);
  }
  .story__line.is-both.is-play {
    pointer-events: none;
  }
  .story__line.is-both.is-play .letter {
    pointer-events: auto;
  }
  .story__line.is-both.is-play .letter:hover {
    color: var(--cream) !important;
  }
}

/* ---------- toolkit ---------- */
.toolkit {
  position: relative;
  background: var(--ink);
  color: var(--cream);
}
.toolkit__track {
  height: 600vh;
}
.toolkit__stage {
  position: relative;
  z-index: 3;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
}
.toolkit__head {
  position: absolute;
  top: 12vh;
  left: 0;
  z-index: 2;
  width: 100%;
  text-align: center;
  pointer-events: none;
}
.toolkit__title {
  font-family: var(--display);
  font-size: max(48px, 6vw);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--track);
}
.toolkit__subs {
  position: relative;
  height: 3.2em;
  margin-top: 2vh;
  overflow: hidden;
  font-size: max(20px, 2vw);
}
.toolkit__sub {
  position: absolute;
  inset: 0;
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.2;
}

.wheel {
  position: absolute;
  top: 60svh;
  left: -100%;
  width: 300%;
  aspect-ratio: 1;
}
.wheel--a {
  z-index: 1;
}
.wheel--b {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.wheel__slot {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: 50% 50%;
}
.wheel__slot.is-visible {
  visibility: visible;
}
.wheel__card {
  position: relative;
  width: min(clamp(180px, 18vw, 290px), 29svh);
  aspect-ratio: 290 / 410;
  margin: 0 auto;
  transform: translateY(-50%);
  transition: transform 0.25s ease-out;
  pointer-events: none;
  will-change: transform;
}
.wheel.is-interactive .wheel__card {
  pointer-events: auto;
  cursor: pointer;
}
@media (any-hover: hover) and (any-pointer: fine) {
  .wheel.is-interactive .wheel__card:hover {
    transform: translateY(-54%) scale(1.04);
  }
}
.wheel__bounce {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.wheel__card.is-flip .wheel__bounce {
  perspective: 2000px;
}
.flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.flip__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip__face--back {
  transform: rotateY(180deg);
}
.wheel__wipe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 6.2cqw; /* matches the plain end card */
  pointer-events: none;
}

/* tool cards: dark smoked glass. A near-black sheet with fine grain, a hairline rim (brighter
   on top), a folder tab top right and a step bottom left, light type, and one glowing accent:
   the tool's own colour on its logo, the dots and a faint rise of light from the bottom edge.
   The shape is one SVG path (render.js CARD_PATH), used as the mask here and as the rim.
   Sizes use cqw (the card is a size container), so it scales as one piece: 1cqw = 2.9 path units. */
.wheel__card {
  container-type: inline-size;
}
.tcard {
  --accent: #f4ebe3;
  --ink: #ececec;
  --mute: #7c7c80;
  --mx: 50%;
  --my: 35%;
  --rx: 0deg;
  --ry: 0deg;
  position: absolute;
  inset: 0;
  color: var(--ink);
  user-select: none;
  isolation: isolate;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 290 410' preserveAspectRatio='none'%3E%3Cpath d='M0 40A18 18 0 0 1 18 22H140C154 22 154 0 168 0H272A18 18 0 0 1 290 18V370A18 18 0 0 1 272 388H148C134 388 134 410 120 410H18A18 18 0 0 1 0 392Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 290 410' preserveAspectRatio='none'%3E%3Cpath d='M0 40A18 18 0 0 1 18 22H140C154 22 154 0 168 0H272A18 18 0 0 1 290 18V370A18 18 0 0 1 272 388H148C134 388 134 410 120 410H18A18 18 0 0 1 0 392Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.7s var(--ease-out);
}
.tcard.is-plain {
  -webkit-mask: none;
  mask: none;
  overflow: hidden;
  border-radius: 6.2cqw;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.tcard.is-tilt {
  transition: transform 0.15s linear;
}
.tcard__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* light leaking up from the bottom edge, in the tool's colour */
    radial-gradient(75% 30% at 12% 104%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 72%),
    /* a soft sheen across the top, like the top of a pane of glass */
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 22%),
    linear-gradient(170deg, #1a1a1c 0%, #0f0f10 48%, #0a0a0b 100%);
}
.tcard__bg::after {
  /* fine grain, as on the reference: light specks on black */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.55;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 9 -7.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}
/* the hairline rim: one neutral stroke brighter at the top, one accent stroke at the bottom left */
.tcard__rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.tcard__rim path {
  fill: none;
  stroke: #fff;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
.tcard__rim:not(.tcard__rim--glow) {
  opacity: 0.32;
  -webkit-mask: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.45));
  mask: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.45));
}
.tcard__rim--glow path {
  stroke: var(--accent);
}
.tcard__rim--glow {
  opacity: 0.85;
  -webkit-mask: radial-gradient(70% 40% at 10% 100%, #000, transparent 75%);
  mask: radial-gradient(70% 40% at 10% 100%, #000, transparent 75%);
}
.tcard__tab {
  /* sits in the folder tab: 168..290 x 0..22 in path units */
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 42cqw;
  height: 7.6cqw;
  padding-top: 0.3cqw;
  font: 400 3.9cqw/1 var(--text);
  letter-spacing: 0.01em;
  color: #a9a9ad;
}
.tcard__top {
  position: absolute;
  top: 13cqw;
  left: 8cqw;
  right: 8cqw;
  display: flex;
  align-items: baseline;
  gap: 2.4cqw;
  font: 500 3.3cqw/1 var(--text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.tcard__no {
  color: var(--ink);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.tcard__kind {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcard__meta {
  position: absolute;
  top: 22cqw;
  left: 8cqw;
  right: 7cqw;
}
.tcard__name {
  font: 300 12.6cqw/1.02 var(--text);
  letter-spacing: -0.045em;
  color: var(--ink);
}
.tcard__note {
  margin-top: 2.4cqw;
  max-width: 76cqw;
  font: 300 5cqw/1.2 var(--text);
  letter-spacing: -0.015em;
  color: var(--mute);
}
.tcard__art {
  /* the glowing mark, bottom left (like a big lit number) */
  position: absolute;
  left: 8cqw;
  bottom: 15cqw;
  display: flex;
  align-items: flex-end;
  height: 30cqw;
  color: var(--accent);
  filter: drop-shadow(0 0 1.1cqw color-mix(in srgb, var(--accent) 75%, transparent))
    drop-shadow(0 0 5cqw color-mix(in srgb, var(--accent) 45%, transparent));
  transition: filter 0.5s var(--ease-out);
}
.tcard__logo {
  width: 30cqw;
  height: 30cqw;
  fill: currentColor;
}
.tcard__logo--img {
  object-fit: contain;
  object-position: left bottom;
}
.tcard__mark,
.tcard__word {
  font: 300 25cqw/0.8 var(--text);
  letter-spacing: -0.06em;
  /* lit from inside: a touch whiter at the core */
  color: color-mix(in srgb, var(--accent) 80%, #fff);
}
.tcard__word {
  font-size: 12cqw;
  line-height: 1;
  letter-spacing: -0.045em;
}
.tcard__star {
  font: 200 30cqw/0.8 var(--display);
  color: color-mix(in srgb, var(--accent) 80%, #fff);
}
.tcard__dots {
  /* in the bottom-left step: 0..120 x 388..410 in path units */
  position: absolute;
  left: 8cqw;
  bottom: 2.8cqw;
  display: flex;
  gap: 1.5cqw;
}
.tcard__dots i {
  width: 2.1cqw;
  height: 2.1cqw;
  border-radius: 50%;
  background: #2b2b2e;
}
.tcard__dots i.is-on {
  background: color-mix(in srgb, var(--accent) 80%, #fff);
  box-shadow: 0 0 1.4cqw color-mix(in srgb, var(--accent) 70%, transparent);
}
.tcard.is-plain .tcard__art {
  bottom: 12cqw;
}
@media (any-hover: hover) and (any-pointer: fine) {
  .wheel.is-interactive .wheel__card:hover .tcard__art {
    filter: drop-shadow(0 0 1.4cqw color-mix(in srgb, var(--accent) 90%, transparent))
      drop-shadow(0 0 8cqw color-mix(in srgb, var(--accent) 60%, transparent));
  }
}

/* each tool's accent: its brand colour (logos come from js/core/logos.js) */
.tcard--html { --accent: #ff6a3d; }
.tcard--css { --accent: #9d78ff; }
.tcard--js { --accent: #f7df1e; }
.tcard--gsap { --accent: #0ae448; }
.tcard--three { --accent: #e9edff; }
.tcard--shopify { --accent: #95bf47; }
.tcard--vercel { --accent: #ffffff; }
.tcard--figma { --accent: #ff7262; }
.tcard--ps { --accent: #31a8ff; }
.tcard--ai { --accent: #ff9a00; }
.tcard--ae { --accent: #a3a3ff; }
.tcard--pr { --accent: #ea77ff; }
.tcard--capcut { --accent: #f2f2f2; }
.tcard--blender { --accent: #ff8a1f; }
.tcard--end { --accent: #f4ebe3; }

/* ---------- projects ---------- */
.work {
  position: relative;
  background: var(--ink);
}
.work__track {
  height: 360vh;
}
.work__stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  transform-origin: top center;
  will-change: transform, border-radius;
}
.work__title {
  position: absolute;
  top: 11vh;
  left: 0;
  width: 100%;
  font-family: var(--display);
  font-size: max(48px, 6vw);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--track);
  text-align: center;
}
.work__list {
  position: absolute;
  top: 27vh;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* seven names: 7 lines + 6 gaps stay inside the screen (about 65vh) */
  gap: clamp(10px, 2.6svh, 28px);
}
.work__link {
  position: relative;
  display: flex;
  justify-content: center;
  width: fit-content;
  font-family: var(--text);
  font-size: min(clamp(40px, 5.6vw, 76px), 7svh);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}
.wl {
  position: relative;
  display: inline-block;
  transform-origin: 50% 0%;
  pointer-events: none;
  will-change: transform;
}
.wl__in {
  position: relative;
  display: inline-block;
  pointer-events: auto;
}
.wl__in.has-img {
  color: transparent;
}
.wl__img {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 7vw;
  border-radius: 1vw;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 14px 30px -12px rgba(28, 26, 26, 0.45);
}
.wl__img.is-square {
  aspect-ratio: 1;
}
.wl__img.is-portrait {
  aspect-ratio: 4 / 5;
}

/* ---------- outro ---------- */
.outro {
  position: relative;
  background: var(--ink);
  color: var(--cream);
}
.outro__track {
  height: 500vh;
}
.outro__stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.outro__intro {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: var(--track);
  text-align: center;
  white-space: nowrap;
}
.outro__detour {
  position: absolute;
  top: calc(115% + clamp(12px, 1.5vw, 24px));
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  width: max-content;
  font: 400 clamp(16px, 1.5vw, 24px) / 1.2 var(--text);
  letter-spacing: 0;
  text-decoration: none;
  color: var(--cream);
}
.outro__detour-letter {
  display: inline-block;
}
.outro__detour-arrow {
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.35s var(--ease-out);
}
.outro__detour:hover .outro__detour-arrow {
  transform: translate(3px, -3px);
}
.outro__svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.outro__path {
  fill: none;
  stroke: none;
}
.outro__text {
  font-family: var(--display);
  font-size: 220px;
  font-weight: 500;
  letter-spacing: -0.04em;
  fill: var(--cream);
}
.outro__orb {
  /* colour comes from the fill attribute (set in outro.js), so the full stop matches the gradient's end */
  opacity: 0;
  visibility: hidden;
}

.foot {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  height: calc(50vh - 18px);
  overflow: hidden;
  border-radius: 18px;
  clip-path: circle(0px at 50% 50%);
  pointer-events: none;
  color: var(--cream);
  will-change: clip-path;
}
.foot__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 90% at 12% 110%, #ff5a2c 0%, transparent 60%),
    radial-gradient(55% 80% at 45% -10%, #ff3d7f 0%, transparent 62%),
    radial-gradient(60% 100% at 95% 60%, #6b3cff 0%, transparent 64%),
    linear-gradient(120deg, #e8321f, #b9245d 50%, #4b2bd1);
}
.foot__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.foot__in {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(48px, 9vw, 170px);
  height: 100%;
  padding: clamp(40px, 6.5vw, 100px);
  align-content: center;
}
.foot__in {
  align-items: center;
}
.foot__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: clamp(24px, 3.2vw, 50px);
  min-width: 0;
}
.foot__headline {
  max-width: 950px;
  font: 500 clamp(28px, 3.1vw, 64px) / 1.1 var(--display);
  letter-spacing: var(--track);
}
.foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(20px, 3.4vw, 50px);
  font: 400 clamp(15px, 1.05vw, 19px) / 1.3 var(--text);
}
.foot__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.foot__status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9dffb0;
  box-shadow: 0 0 0 4px rgba(157, 255, 176, 0.18);
}
.foot__nav {
  display: flex;
  flex-shrink: 0;
  gap: clamp(24px, 4vw, 56px);
}
.foot__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 1.2vh, 16px);
  min-width: clamp(110px, 8vw, 160px);
}
.foot__group-title {
  margin-bottom: clamp(6px, 1.2vh, 16px);
  font: 500 clamp(22px, 1.9vw, 30px) / 1 var(--display);
}
.foot__group a {
  font: 400 clamp(17px, 1.15vw, 22px) / 1.2 var(--text);
}

/* ---------- case study ---------- */
body.is-case {
  background: var(--cream);
  color: var(--ink);
}
.case {
  padding: 0 clamp(16px, 3vw, 48px);
}
.case__head {
  padding: clamp(150px, 24vh, 240px) 0 clamp(40px, 7vh, 80px);
  text-align: center;
}
.case__kicker {
  font: 500 clamp(14px, 1.1vw, 18px) / 1 var(--text);
  letter-spacing: 0.02em;
  opacity: 0.7;
}
.case__title {
  margin-top: 0.25em;
  overflow: hidden;
  padding-bottom: 0.08em;
  font: italic 400 clamp(64px, 13vw, 230px) / 0.95 var(--text);
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.case__title .letter {
  will-change: transform;
}
.case__line {
  margin-top: 0.6em;
  font: 400 clamp(20px, 2vw, 34px) / 1.1 var(--display);
}
.case__hero-in {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 1600 / 788;
  background: #e2d7cc;
}
.case__hero img,
.case__shot img,
.case__next-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 120px);
  padding: clamp(70px, 12vh, 140px) 0;
}
.case__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  align-content: start;
}
.case__meta dt {
  margin-bottom: 0.5em;
  font: 600 13px/1 var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}
.case__meta dd {
  font: 500 clamp(16px, 1.2vw, 20px) / 1.35 var(--text);
}
.case__summary p {
  font: 400 clamp(24px, 2.4vw, 42px) / 1.18 var(--display);
  letter-spacing: -0.015em;
}
.case__visit {
  display: inline-flex;
  gap: 0.6em;
  align-items: center;
  margin-top: 36px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font: 600 16px/1 var(--text);
  text-decoration: none;
  transition: transform 0.35s var(--ease-out), background-color 0.35s;
}
.case__visit:hover {
  transform: translateY(-2px);
  background: #000;
}
.case__h2 {
  font: 700 clamp(40px, 5vw, 90px) / 1 var(--display);
  letter-spacing: var(--track);
}
.case__built {
  padding-bottom: clamp(70px, 12vh, 140px);
}
.case__clips + .case__built {
  padding-top: clamp(70px, 12vh, 140px);
}
.case__built ol {
  margin-top: clamp(28px, 4vh, 48px);
  border-top: 1px solid rgba(28, 26, 26, 0.18);
}
.case__built li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 24px;
  padding: clamp(20px, 3vh, 32px) 0;
  border-bottom: 1px solid rgba(28, 26, 26, 0.18);
}
.case__built li span {
  font: 600 14px/1.6 var(--text);
  opacity: 0.55;
}
.case__built li p {
  font: 400 clamp(20px, 1.8vw, 30px) / 1.25 var(--display);
}
.case__status {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(28, 26, 26, 0.25);
  border-radius: 999px;
  font: 500 13px/1 var(--text);
}
.case__label {
  margin-bottom: 18px;
  font: 600 13px/1 var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}
.case__sechead {
  margin-bottom: clamp(28px, 5vh, 56px);
}

/* the brief: one big paragraph */
.case__brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: clamp(24px, 5vw, 96px);
  padding: clamp(50px, 9vh, 110px) 0;
  border-top: 1px solid rgba(28, 26, 26, 0.18);
}
.case__brief-text {
  font: 400 clamp(26px, 2.9vw, 52px) / 1.14 var(--display);
  letter-spacing: -0.02em;
}

/* how I handled it: numbered steps */
.case__process {
  padding: clamp(60px, 10vh, 120px) 0;
}
.case__steps {
  border-top: 1px solid rgba(28, 26, 26, 0.18);
}
.case__step {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 24px clamp(24px, 4vw, 72px);
  padding: clamp(24px, 4vh, 44px) 0;
  border-bottom: 1px solid rgba(28, 26, 26, 0.18);
}
.case__step-n {
  font: 600 14px/1.9 var(--text);
  opacity: 0.55;
}
.case__step h3 {
  font: 500 clamp(24px, 2.2vw, 38px) / 1.1 var(--display);
  letter-spacing: -0.015em;
}
.case__step p {
  font: 400 clamp(16px, 1.15vw, 20px) / 1.55 var(--text);
  opacity: 0.85;
}

/* in motion: clips recorded from the live site */
.case__clips {
  margin: 0 calc(clamp(16px, 3vw, 48px) * -1);
  padding: clamp(70px, 12vh, 140px) clamp(16px, 3vw, 48px);
  border-radius: 28px;
  background: var(--ink);
  color: var(--cream);
}
.case__clips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px) clamp(16px, 2vw, 32px);
}
.case__clips-grid.is-1 .case__clip,
.case__clips-grid.is-3 .case__clip:first-child {
  grid-column: 1 / -1;
}
.case__clip-in {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--r, 16 / 10);
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #2a2626;
  cursor: pointer;
}
.case__clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case__clip-state {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(244, 235, 227, 0.92);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.case__clip-state::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--ink);
  transform: translate(-50%, -50%);
}
.case__clip-in.is-playing .case__clip-state {
  opacity: 0;
  transform: scale(0.8);
}
.case__clip-in:hover .case__clip-state,
.case__clip-in:focus-visible .case__clip-state {
  opacity: 1;
  transform: none;
}
.case__clip-in.is-playing .case__clip-state::before {
  left: 50%;
  width: 14px;
  height: 16px;
  border: 0;
  border-left: 4px solid var(--ink);
  border-right: 4px solid var(--ink);
}
.case__clip figcaption {
  margin-top: 16px;
  max-width: 60ch;
  font: 400 clamp(15px, 1.05vw, 18px) / 1.45 var(--text);
  opacity: 0.75;
}

/* under the hood: numbers + stack */
.case__notes {
  padding-bottom: clamp(70px, 12vh, 140px);
}
.case__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(28, 26, 26, 0.18);
}
.case__stats > div {
  padding: clamp(24px, 4vh, 40px) 24px clamp(24px, 4vh, 40px) 0;
  border-bottom: 1px solid rgba(28, 26, 26, 0.18);
}
.case__stats dt {
  font: 600 clamp(44px, 5vw, 88px) / 1 var(--display);
  letter-spacing: -0.03em;
}
.case__stats dd {
  margin-top: 12px;
  max-width: 22ch;
  font: 400 clamp(15px, 1.05vw, 18px) / 1.4 var(--text);
  opacity: 0.75;
}
.case__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 4vh, 44px);
  list-style: none;
}
.case__stack li {
  padding: 10px 16px;
  border: 1px solid rgba(28, 26, 26, 0.25);
  border-radius: 999px;
  font: 500 15px/1 var(--text);
}

/* see it live */
.case__live {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: clamp(80px, 14vh, 160px);
  padding: clamp(60px, 12vh, 130px) 24px;
  border-radius: 24px;
  background: linear-gradient(120deg, #ff6a1a, #f0261d 35%, var(--rose) 62%, #8b3dff);
  color: #fff;
  text-align: center;
  text-decoration: none;
  transition: transform 0.5s var(--ease-out);
}
.case__live:hover {
  transform: scale(0.985);
}
.case__live-label {
  font: 500 clamp(14px, 1.1vw, 18px) / 1 var(--text);
  opacity: 0.85;
}
.case__live-name {
  font: 700 clamp(48px, 8vw, 150px) / 0.95 var(--display);
  letter-spacing: -0.04em;
}
.case__live-url {
  margin-top: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 clamp(15px, 1.1vw, 18px) / 1 var(--text);
}

.case__gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.case__shot {
  grid-column: 1 / -1;
}
.case__shot.is-narrow {
  grid-column: 3 / 11;
}
.case__shot-in {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 1600 / 788;
  background: #e2d7cc;
}
.case__next {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(100px, 18vh, 200px);
  padding: clamp(70px, 14vh, 150px) 0;
  border-radius: 24px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  overflow: hidden;
}
.case__next-label {
  font: 500 clamp(14px, 1.1vw, 18px) / 1 var(--text);
  opacity: 0.7;
}
.case__next-name {
  position: relative;
  z-index: 2;
  font: italic 400 clamp(56px, 10vw, 180px) / 1 var(--text);
  letter-spacing: -0.05em;
  white-space: nowrap;
  mix-blend-mode: difference;
}
.case__next-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: clamp(180px, 22vw, 360px);
  aspect-ratio: 4 / 3;
  margin: calc(clamp(180px, 22vw, 360px) * -0.375) 0 0 calc(clamp(180px, 22vw, 360px) * -0.5);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s, scale 0.5s var(--ease-out);
  pointer-events: none;
}
.case__next:hover .case__next-thumb {
  opacity: 1;
  scale: 1.25;
}
.case__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0;
  font: 500 15px/1 var(--text);
}
.case__foot a {
  text-decoration: none;
}

/* ---------- contact popup ---------- */
html.has-dialog {
  overflow: hidden;
}
.cform {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.cform[open] {
  display: grid;
  place-items: center;
}
.cform::backdrop {
  background: rgba(20, 18, 18, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cform__panel {
  position: relative;
  width: min(600px, 100%);
  max-height: calc(100svh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  /* still scrolls on very short screens, but without a visible scrollbar */
  scrollbar-width: none;
  padding: clamp(26px, 3.4vw, 44px);
  border-radius: 28px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
}
.cform__panel::-webkit-scrollbar {
  display: none;
}
.cform__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 26, 26, 0.18);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.4s var(--ease-out);
}
.cform__close span::before,
.cform__close span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(45deg);
}
.cform__close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.cform__close:hover {
  background: rgba(28, 26, 26, 0.06);
  transform: rotate(90deg);
}
.cform__kicker {
  font: 600 13px/1 var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}
.cform__title {
  margin-top: 10px;
  font: 700 clamp(38px, 4.4vw, 58px) / 0.95 var(--display);
  letter-spacing: -0.035em;
}
.cform__title:focus {
  outline: none;
}
.cform__intro {
  margin-top: 12px;
  max-width: 44ch;
  font: 400 16px/1.45 var(--text);
  opacity: 0.75;
}
.cform__form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.cform__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
.cform__field {
  display: grid;
  gap: 6px;
}
.cform__field > span,
.cform__chips legend {
  font: 600 12px/1 var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}
.cform__field input,
.cform__field textarea {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1.5px solid rgba(28, 26, 26, 0.22);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.35 var(--text);
  resize: none;
  transition: border-color 0.25s;
}
.cform__field textarea {
  height: 64px;
}
.cform__field input::placeholder,
.cform__field textarea::placeholder {
  color: rgba(28, 26, 26, 0.35);
}
.cform__field input:focus,
.cform__field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.cform__field.is-bad input,
.cform__field.is-bad textarea {
  border-bottom-color: #d23a24;
}
.cform__field.is-bad > span {
  color: #d23a24;
  opacity: 1;
}
.cform__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.cform__chips legend {
  margin-bottom: 10px;
  padding: 0;
}
.cform__chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cform__chips span {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid rgba(28, 26, 26, 0.22);
  border-radius: 999px;
  font: 500 15px/1 var(--text);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.cform__chips label:hover span {
  border-color: var(--ink);
}
.cform__chips input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}
.cform__chips input:focus-visible + span {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}
.cform__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cform__error {
  font: 500 15px/1.45 var(--text);
  color: #c2341f;
}
.cform__error:empty {
  display: none;
}
.cform__error a {
  color: inherit;
}
.cform__send {
  display: inline-flex;
  gap: 0.7em;
  align-items: center;
  justify-self: start;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font: 600 16px/1 var(--text);
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.35s, opacity 0.3s;
}
.cform__send:hover {
  transform: translateY(-2px);
  background: #000;
}
.cform__send.is-busy {
  opacity: 0.65;
  cursor: progress;
}
.cform__send-arrow {
  transition: transform 0.35s var(--ease-out);
}
.cform__send:hover .cform__send-arrow {
  transform: translateX(4px);
}
.cform__again {
  margin-top: 30px;
}
@media (max-height: 820px) and (min-width: 601px) {
  .cform__title {
    font-size: 44px;
  }
  .cform__form {
    gap: 14px;
    margin-top: 18px;
  }
  .cform__chips legend {
    margin-bottom: 8px;
  }
  .cform__chips span {
    padding: 8px 13px;
    font-size: 14px;
  }
}
@media (max-width: 600px) {
  .cform {
    padding: 0;
  }
  .cform[open] {
    place-items: end stretch;
  }
  .cform__panel {
    width: 100%;
    max-height: 92svh;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .cform__close {
    top: 14px;
    right: 14px;
  }
  .cform__row {
    grid-template-columns: 1fr;
  }
  .cform__send {
    justify-self: stretch;
    justify-content: center;
  }
}

/* ---------- motion off ---------- */
html[data-motion='off'] .wheel__card,
html[data-motion='off'] .u-line::after {
  transition: none;
}

/* ---------- noscript ---------- */
.noscript {
  max-width: 640px;
  margin: 0 auto;
  padding: 140px 24px;
  font: 400 18px/1.5 var(--text);
  color: var(--cream);
}
.noscript h1 {
  margin-bottom: 16px;
  font: 700 40px/1 var(--display);
}
.noscript li {
  margin: 8px 0;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) and (orientation: portrait) {
  .work__track {
    height: 317vh;
  }
  .work__title {
    top: 14svh;
  }
  .outro__track {
    height: 450vh;
  }
  .outro__intro {
    font-size: clamp(36px, 9vw, 72px);
  }
  .foot {
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: calc(min(66svh, 720px) - 10px);
  }
  .foot__in {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(18px, 3svh, 32px);
    padding: clamp(28px, 7vw, 44px);
  }
  .foot__headline {
    font-size: clamp(28px, 6vw, 46px);
  }
  .foot__nav {
    justify-content: flex-start;
    gap: clamp(40px, 12vw, 96px);
  }
  .case__intro {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1025px) {
  .wheel {
    top: 58svh;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 22px clamp(12px, 4vw, 24px);
  }
  .site-header__nav {
    gap: clamp(8px, 3vw, 14px);
    height: 50px;
    padding-inline: clamp(12px, 3.4vw, 18px);
  }
  .site-header__link.is-secondary {
    display: none;
  }
  .site-header__motion {
    display: none;
  }
  .indicator {
    display: none;
  }
  .manifesto__text {
    font-size: clamp(52px, 15vw, 72px);
  }
  .path__title {
    font-size: clamp(52px, 15vw, 72px);
  }
  .story__line {
    font-size: clamp(42px, 12vw, 60px);
  }
  .work__list {
    top: 31svh;
    padding-inline: 20px;
  }
  .work__link {
    font-size: min(clamp(30px, 9.5vw, 50px), 7svh);
  }
  .wheel__card {
    width: min(clamp(140px, 46vw, 180px), 25svh);
  }
  .foot__group a {
    font-size: 17px;
  }
  .case__built li {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .case__shot.is-narrow {
    grid-column: 1 / -1;
  }
  .case__brief {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .case__step {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 16px;
  }
  .case__step p {
    grid-column: 2;
  }
  .case__clips-grid {
    grid-template-columns: 1fr;
  }
  .case__clips {
    border-radius: 20px;
  }
  .case__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1024px) and (min-width: 601px) {
  .case__step {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .case__step p {
    grid-column: 2;
  }
  .case__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .toolkit__head {
    top: 4svh;
  }
  .wheel {
    top: 66svh;
  }
  .wheel__card {
    width: min(180px, 32svh);
  }
  .work__title {
    top: 8svh;
  }
}
