/* Ken Hocker — portfolio
   ------------------------------------------------------------ */
:root {
  --paper: #fdfdf9;
  --ink: #14131f;          /* blue-black text */
  --mute: #7b7a86;         /* secondary text on paper */
  --grey: #7c7c84;         /* display text on paper */
  --line: rgba(20, 19, 31, .14);
  --line-dark: rgba(255, 255, 255, .18);
  --night: #0a0918;        /* hero */
  --dark: #18181c;         /* dark sections */
  --mint: #b4ffe2;
  --mint-soft: #d8fff2;
  --blue: #372be6;         /* Ken's blue */
  --blue-lift: #6a5cff;
  --pad: clamp(16px, 1.6vw, 32px);
  --col: 25vw;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; font-weight: 400; }
ul, ol { list-style: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* page fade ---------------------------------------------------- */
main, .footer { transition: opacity .45s var(--ease-io); }
body.is-leaving main, body.is-leaving .footer { opacity: 0; }

/* scroll progress ---------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; background: var(--blue); transform: scaleX(var(--p, 0)); transform-origin: left; pointer-events: none; }
.on-dark-top .progress { background: var(--mint); }

/* preloader ---------------------------------------------------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--blue); color: var(--mint-soft);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad);
  transition: clip-path 1.1s var(--ease-io), visibility 0s 1.1s;
  clip-path: inset(0);
}
.preloader__count { font-family: var(--sans); font-weight: 300; font-size: clamp(72px, 14vw, 240px); line-height: .8; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.preloader.is-done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.no-preloader .preloader { display: none; }

/* header ------------------------------------------------------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: calc(var(--pad) * .75) var(--pad);
  display: flex; align-items: center; gap: clamp(20px, 2.4vw, 44px);
  color: var(--ink);
  transition: color .4s, transform .6s var(--ease);
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.header.on-dark { color: #fff; }
.header.is-hidden { transform: translateY(-110%); }
.header__logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.header__logo i {
  width: 26px; height: 32px; background: currentColor; display: block;
  -webkit-mask: url(../assets/ken-head.svg) center / contain no-repeat;
          mask: url(../assets/ken-head.svg) center / contain no-repeat;
  transition: transform .8s var(--ease);
}
/* hover: the face fills with a slowly shifting pastel holographic sheen (no movement) */
.header__logo:hover i {
  background: linear-gradient(115deg, #9ad8ff 0%, #c4b0ff 20%, #ff9fd6 40%, #9ff5d6 60%, #fff3a6 80%, #9ad8ff 100%) 0 0 / 300% 300%;
  animation: logo-holo 3.2s linear infinite;
}
@keyframes logo-holo { to { background-position: 150% 150%; } }
@media (prefers-reduced-motion: reduce) { .header__logo:hover i { animation: none; } }
.nav { display: flex; gap: clamp(18px, 2vw, 36px); }
.nav a, .ul { position: relative; }
.nav a::after, .ul::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current]::after, .ul:hover::after { transform: scaleX(1); transform-origin: left; }
.header__cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
@media (min-width: 861px) { .header.mono { font-size: 13.5px; } }

/* round arrow button */
.circ {
  --s: 44px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden; position: relative;
  background: #b4ffe2; color: var(--ink);   /* mint square, dark arrow (was a black square) */
  font-family: var(--sans); font-size: calc(var(--s) * .4); line-height: 1;
  transition: background .35s, color .35s;
  will-change: transform;
}
.circ span { display: block; transition: transform .5s var(--ease); }
.circ::after { content: "↗"; position: absolute; transform: translate(-160%, 160%); transition: transform .5s var(--ease); }
a:hover > .circ span, a:hover .circ span { transform: translate(160%, -160%); }
a:hover > .circ::after, a:hover .circ::after { transform: none; }
a:hover > .circ, a:hover .circ { background: var(--blue); color: #fff; }
.on-dark .circ, .section--dark .circ, .section--blue .circ, .hero .circ { background: var(--mint); color: var(--blue); }
.on-dark a:hover .circ, .section--dark a:hover .circ, .section--blue a:hover .circ, .hero a:hover .circ { background: #fff; color: var(--blue); }
.circ--lg { --s: clamp(64px, 7vw, 120px); }

/* cursor ------------------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center;
  transform: translate3d(var(--x, -100px), var(--y, -100px), 0) scale(0);
  transition: transform .5s var(--ease);
}
.cursor.is-on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* sections ----------------------------------------------------- */
.section { position: relative; padding: var(--pad); }
.section--light { background: var(--paper); isolation: isolate; overflow: hidden; }
.section--dark { background: var(--night); color: #e9e8f4; }
.section--blue { background: var(--blue); color: var(--mint-soft); }
.section--dark, .section--blue { --line: var(--line-dark); --mute: rgba(255,255,255,.6); }

/* soft colour wash at the top of paper sections */
.glow {
  position: absolute; inset: 0 0 auto 0; height: min(100vh, 100%); z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 65% at 82% -12%, rgba(55,43,230,.26) 0%, rgba(55,43,230,0) 70%),
    radial-gradient(60% 70% at 40% -18%, #a9ffdf 0%, rgba(180,255,226,.5) 40%, rgba(180,255,226,0) 75%);
  background-size: 130% 100%, 130% 100%; background-repeat: no-repeat;
  animation: glow 16s ease-in-out infinite alternate;
}
@keyframes glow {
  from { background-position: 0 0, 100% 0; }
  to   { background-position: 100% 0, 0 0; }
}

.label { display: flex; align-items: center; gap: 10px; color: var(--mute); }
.label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.section--dark .label::before, .section--blue .label::before { background: var(--mint); }
.rule { height: 1px; background: var(--line); transform-origin: left; margin-bottom: clamp(16px, 1.6vw, 28px); }
[data-reveal].rule { transform: scaleX(0); transition: transform 1.4s var(--ease-io); }
[data-reveal].rule.in { transform: none; }

.block { padding-top: clamp(110px, 20vh, 220px); padding-bottom: clamp(80px, 13vh, 170px); }
.split { display: grid; grid-template-columns: calc(var(--col) - var(--pad)) minmax(0, 1fr); align-items: start; }
.split > .label { padding-top: .5em; }
.statement {
  font-size: clamp(28px, 3.7vw, 76px);
  line-height: 1.1;
  letter-spacing: -.018em;
  font-weight: 400;
  max-width: 19em;
  text-wrap: pretty;
}
.statement--sm { font-size: clamp(25px, 2.9vw, 58px); max-width: 23em; }

/* word reveal */
[data-split] .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.3em);
  transition: opacity .9s var(--ease-io), filter .9s var(--ease-io), transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 24ms); will-change: opacity, filter, transform; }
[data-split].in .w { opacity: 1; filter: none; transform: none; }

[data-reveal]:not(.rule) { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-io), transform 1.3s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal]:not(.rule).in { opacity: 1; transform: none; }

/* letters that rise from a mask (page titles) */
.rise .wd { display: inline-block; overflow: hidden; padding: .06em .03em .14em; margin: -.06em -.03em -.14em; vertical-align: top; }
.rise .c { display: inline-block; transform: translateY(115%) rotate(6deg); transform-origin: left bottom;
  transition: transform 1.3s var(--ease); transition-delay: calc(var(--i) * 34ms); }
.rise.in .c { transform: none; }

/* hero --------------------------------------------------------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  background: var(--night); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: var(--pad);
  --mx: 0; --my: 0; --sx: 50%; --sy: 60%; --sp: 0;
}
.hero__bg, .hero__spot, .grain { position: absolute; inset: 0; pointer-events: none; }
/* blobs are plain radial gradients (no blur filter) so they stay cheap to animate */
.hero__bg i {
  position: absolute; display: block; border-radius: 50%; will-change: transform;
  translate: calc(var(--mx) * var(--d) * 1px) calc(var(--my) * var(--d) * 1px);
}
.hero__bg i:nth-child(1) { --d: -60; width: 95vmax; height: 95vmax; left: -22vmax; bottom: -52vmax; background: radial-gradient(closest-side, var(--blue) 0%, rgba(55,43,230,.75) 38%, rgba(55,43,230,0) 100%); animation: orbit1 19s ease-in-out infinite alternate; }
.hero__bg i:nth-child(2) { --d: 90; width: 70vmax; height: 70vmax; right: -24vmax; top: -30vmax; background: radial-gradient(closest-side, rgba(106,92,255,.95) 0%, rgba(55,43,230,.5) 45%, rgba(55,43,230,0) 100%); animation: orbit2 23s ease-in-out infinite alternate; }
.hero__bg i:nth-child(3) { --d: -130; width: 42vmax; height: 42vmax; left: 34%; top: 8%; background: radial-gradient(closest-side, rgba(180,255,226,.34) 0%, rgba(180,255,226,0) 100%); animation: orbit3 17s ease-in-out infinite alternate; }
.hero__bg i:nth-child(4) { --d: 40; width: 60vmax; height: 60vmax; left: 22%; top: 18%; background: radial-gradient(closest-side, rgba(10,9,24,.95) 0%, rgba(10,9,24,0) 100%); animation: orbit2 27s ease-in-out infinite alternate-reverse; }
@keyframes orbit1 { from { transform: translate3d(-4%, 3%, 0) scale(1); } to { transform: translate3d(14%, -9%, 0) scale(1.18); } }
@keyframes orbit2 { from { transform: translate3d(5%, -4%, 0) scale(1.1); } to { transform: translate3d(-12%, 10%, 0) scale(.9); } }
@keyframes orbit3 { from { transform: translate3d(-18%, 12%, 0) scale(.85); } to { transform: translate3d(20%, -8%, 0) scale(1.25); } }
.hero__spot {
  background: radial-gradient(26vmax circle at var(--sx) var(--sy), rgba(120,108,255,.55), rgba(120,108,255,0) 70%);
  mix-blend-mode: screen;
}
.grain {
  opacity: .28; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__in {
  position: relative; padding-bottom: clamp(28px, 5vh, 70px);
  opacity: calc(1 - var(--sp) * 1.3);
  filter: blur(calc(var(--sp) * 18px));
  transform: translate3d(0, calc(var(--sp) * -70px), 0);
}
.hero__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(18px, 2.2vw, 36px); color: var(--mint-soft); opacity: 0; transition: opacity 1.2s .2s; }
.hero__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .4; } }
.is-loaded .hero__eyebrow { opacity: 1; }
.hero__title {
  font-size: clamp(40px, 6.9vw, 150px); line-height: 1; letter-spacing: -.022em; font-weight: 300;
  max-width: 13.5em; text-wrap: balance;
}
.hero__title .wd { display: inline-block; white-space: nowrap; }
.hero__title .c { display: inline-block; opacity: 0; filter: blur(16px); transform: translateY(.18em);
  transition: opacity 1.1s var(--ease-io), filter 1.3s var(--ease-io), transform 1.4s var(--ease);
  transition-delay: calc(var(--i) * 20ms + 200ms); }
.is-loaded .hero__title .c { opacity: 1; filter: none; transform: none; }
.hero__title .wd { transition: color .4s, filter .5s; }
/* (headline word hover removed: the background reacts to the mouse instead) */
.hero__meta { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; color: rgba(255,255,255,.75); border-top: 1px solid var(--line-dark); padding-top: 14px; }
.hero__meta > * { opacity: 0; transition: opacity 1.2s 1.3s; }
.is-loaded .hero__meta > * { opacity: 1; }
.hero__next { display: flex; align-items: center; gap: 12px; }
.hero__next .circ { --s: 38px; }
.hero__scroll i { display: inline-block; font-style: normal; animation: nudge 1.8s var(--ease-io) infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* page hero (inner pages) */
.phero { padding-top: clamp(150px, 28vh, 300px); padding-bottom: clamp(30px, 5vh, 70px); }
.phero__title {
  font-size: clamp(64px, 15vw, 320px); line-height: .9; letter-spacing: -.035em; font-weight: 300;
  display: flex; align-items: flex-start; gap: .1em; flex-wrap: wrap;
}
.phero__title sup { font-family: var(--mono); font-size: 13px; letter-spacing: .05em; line-height: 1; margin-top: 1.4em; color: var(--blue); }
.phero__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: clamp(16px, 1.6vw, 28px); }

/* tags --------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  border: 1px solid var(--line); border-radius: 99px; padding: 6px 11px 5px; font-size: 11px;
  transition: background .3s, color .3s, border-color .3s;
}
a:hover .tag, .tag:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.section--dark a:hover .tag { background: var(--mint); color: var(--blue); border-color: var(--mint); }
a:hover .tag:nth-child(2) { transition-delay: 40ms; } a:hover .tag:nth-child(3) { transition-delay: 80ms; }
a:hover .tag:nth-child(4) { transition-delay: 120ms; } a:hover .tag:nth-child(5) { transition-delay: 160ms; } a:hover .tag:nth-child(6) { transition-delay: 200ms; }

/* work items --------------------------------------------------- */
.work-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(30px, 4vw, 70px); }
.work-list { display: flex; flex-direction: column; gap: clamp(60px, 8vw, 150px); padding-bottom: clamp(60px, 8vw, 130px); }
.work-item { width: 58%; display: block; perspective: 1400px; }
.work-item:nth-child(even) { margin-left: auto; }
.work-item:nth-child(3n) { width: 46%; margin-left: var(--col); }
.media {
  position: relative; overflow: hidden; border-radius: 10px; background: #e6e6ee;
  aspect-ratio: 1.2;
  /* a 2px sliver stays unclipped so IntersectionObserver can still see the element */
  clip-path: inset(0 0 calc(100% - 2px) 0 round 10px);
  transition: clip-path 1.5s var(--ease-io), transform .9s var(--ease);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.media:not(.in) { background: transparent; }
.media.in { clip-path: inset(0 round 10px); }
.media > img:not(.media__logo), .media > video { position: absolute; left: 0; top: -9%; width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.media > img:not(.media__logo) { scale: 1.22; transition: scale 2s var(--ease); }
.media.in > img:not(.media__logo) { scale: 1; }
.work-item:hover .media.in > img:not(.media__logo) { scale: 1.05; transition-duration: 1.4s; }
.media--wide { aspect-ratio: 16 / 9; }
.media--sq { aspect-ratio: 1; }
.media--tall { aspect-ratio: .84; }
.media__logo {
  position: absolute; inset: 0; margin: auto; width: clamp(64px, 9vw, 150px); height: auto; z-index: 2;
  transition: transform 1s var(--ease), opacity .5s;
  translate: calc(var(--tx, 0) * 1px) calc(var(--ty, 0) * 1px);
}
.media__shade { position: absolute; inset: 0; background: rgba(55,43,230,.3); mix-blend-mode: multiply; transition: opacity .6s; z-index: 1; }
.work-item:hover .media__shade { opacity: 0; }
.work-item:hover .media__logo { transform: scale(.8); opacity: 0; }
.work-item__foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 16px; }
.work-item__title { font-size: clamp(17px, 1.5vw, 28px); line-height: 1.12; letter-spacing: -.008em; max-width: 18em; text-wrap: balance; color: var(--mute); }
.work-item__title b { font-weight: 500; color: var(--ink); transition: color .3s; }
.section--dark .work-item__title b { color: #fff; }
.work-item:hover .work-item__title b { color: var(--blue); }
.section--dark .work-item:hover .work-item__title b { color: var(--mint); }
.work-item .tags { justify-content: flex-end; max-width: 50%; }

.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 6vw, 110px) var(--pad); padding-bottom: clamp(60px, 8vw, 140px); }
.work-grid .work-item, .work-grid .work-item:nth-child(n) { width: auto; margin: 0; }
.work-grid .work-item:nth-child(even) { margin-top: clamp(40px, 9vw, 180px); }
.work-grid--3 { grid-template-columns: repeat(3, 1fr); }
.work-grid--3 .work-item:nth-child(n) { margin-top: 0; }
.work-grid--3 .work-item__foot { flex-direction: column; gap: 10px; }
.work-grid--3 .tags { justify-content: flex-start; max-width: none; }

.more { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 clamp(60px, 8vw, 120px) calc(var(--col) - var(--pad)); }

/* marquee ------------------------------------------------------ */
.marquee { overflow: hidden; padding: clamp(24px, 3.4vw, 56px) 0; margin: 0 calc(var(--pad) * -1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; will-change: transform; }
.marquee__track span {
  font-size: clamp(30px, 4.4vw, 90px); letter-spacing: -.015em; font-weight: 300; line-height: 1;
  padding: 0 clamp(18px, 2vw, 40px); white-space: nowrap; display: flex; align-items: center; gap: clamp(36px, 4vw, 80px);
}
.marquee__track span::after { content: ""; width: .28em; height: .28em; border-radius: 50%; background: var(--blue); }
.section--blue .marquee__track span::after, .section--dark .marquee__track span::after { background: var(--mint); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* lists / tables ---------------------------------------------- */
.table { margin-left: var(--col); padding-bottom: clamp(70px, 10vw, 160px); }
.table__row {
  position: relative; display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 20px; align-items: baseline;
  padding: 20px 0 34px; border-top: 1px solid var(--line);
  font-size: clamp(17px, 1.6vw, 30px); letter-spacing: -.008em; line-height: 1.15;
  transition: color .3s, padding .6s var(--ease);
}
.table__row span:nth-child(2) { color: var(--mute); transition: color .3s; }
.table__row::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.section--blue .table__row::before, .section--dark .table__row::before { background: var(--mint); }
.table__row:hover::before { transform: none; }
.table__row:hover { padding-left: 14px; color: var(--blue); }
.section--blue .table__row:hover, .section--dark .table__row:hover { color: #fff; }
.table__row:hover span:nth-child(2) { color: inherit; }
.table__row .mono { white-space: nowrap; color: var(--mute); }

.caps { padding-bottom: clamp(70px, 10vw, 160px); }
.cap {
  display: grid; grid-template-columns: calc(var(--col) - var(--pad)) 1fr auto; align-items: center;
  border-top: 1px solid var(--line); padding: 12px 0 14px;
  font-size: clamp(30px, 4.6vw, 96px); letter-spacing: -.018em; line-height: 1.04; font-weight: 300;
  color: rgba(216,255,242,.62);
  transition: color .35s, padding .7s var(--ease);
}
.section--light .cap { color: var(--mute); }
.cap:hover { color: #fff; padding-left: 18px; }
.section--light .cap:hover { color: var(--blue); }
.cap .mono { color: var(--mute); }
.cap i { width: .34em; height: .34em; background: var(--mint); border-radius: 50%; transform: scale(0); transition: transform .5s var(--ease); margin-right: .1em; }
.section--light .cap i { background: var(--blue); }
.cap:hover i { transform: none; }

/* contact + footer -------------------------------------------- */
.contact { padding-top: clamp(100px, 16vh, 190px); padding-bottom: clamp(60px, 9vh, 120px); }
.contact__link { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 48px); width: max-content; max-width: 100%; margin-top: clamp(30px, 5vw, 80px); }
.contact__title { font-size: clamp(64px, 14.5vw, 310px); line-height: .92; letter-spacing: -.035em; font-weight: 300; transition: color .4s; }
.contact__link:hover .contact__title { color: var(--blue); }
.contact__sub { margin-top: 18px; color: var(--mute); }

.footer { position: relative; padding: clamp(40px, 6vh, 80px) var(--pad) var(--pad); background: var(--paper); }
.footer__links { display: grid; grid-template-columns: calc(var(--col) - var(--pad)) 1fr 1fr; padding: clamp(20px, 3vw, 50px) 0 clamp(50px, 7vw, 110px); }
.footer__links h3 { margin-bottom: 14px; }
.footer__links a {
  display: flex; align-items: baseline; width: max-content; font-size: clamp(30px, 3.7vw, 76px); line-height: 1.08; letter-spacing: -.018em; font-weight: 300;
  transition: color .3s, transform .7s var(--ease);
}
.footer__links a::before { content: "→"; width: 0; overflow: hidden; opacity: 0; font-size: .7em; transition: width .6s var(--ease), opacity .4s; }
.footer__links a:hover { color: var(--blue); }
.footer__links a:hover::before { width: 1.25em; opacity: 1; }
.footer__base { display: flex; justify-content: space-between; gap: 20px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 14px; }

/* project page ------------------------------------------------- */
.project-hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 160px; overflow: hidden; isolation: isolate; }
.project-hero::before {
  content: ""; position: absolute; z-index: -1; width: 90vmax; height: 90vmax; right: -30vmax; top: -40vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(55,43,230,.95), rgba(55,43,230,0)); animation: orbit2 20s ease-in-out infinite alternate;
}
.project-hero .phero__title { font-size: clamp(56px, 13vw, 290px); }
.meta { display: grid; grid-template-columns: calc(var(--col) - var(--pad)) 1fr 1fr 2fr; gap: 0 20px; padding: 4px 0 8px; }
.meta dt { color: var(--mute); margin-bottom: 8px; }
.cover { padding: 0 var(--pad) var(--pad); background: var(--night); }
.cover .media { aspect-ratio: 16 / 8.2; }
.prose { margin-left: var(--col); max-width: 44em; padding: clamp(40px, 6vw, 90px) 0 clamp(70px, 10vw, 150px); display: grid; gap: 1.2em;
  font-size: clamp(17px, 1.35vw, 22px); line-height: 1.45; color: #3c3b4a; }
.stats { margin-left: var(--col); padding-bottom: clamp(70px, 10vw, 150px); }
.stats .table__row { grid-template-columns: 1fr 1.8fr; padding: 16px 0 26px; font-size: clamp(16px, 1.3vw, 22px); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); padding-bottom: clamp(70px, 10vw, 150px); }
.gallery .media--full { grid-column: 1 / -1; }
.gallery .media > img:not(.media__logo), .gallery .media > video { top: 0; height: 100%; }
.gallery > .media:last-child:nth-child(odd):not(.media--full) { grid-column: 2; }
.gallery iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* about -------------------------------------------------------- */
.portrait { width: 40%; margin-left: var(--col); padding-bottom: clamp(70px, 10vw, 150px); perspective: 1400px; }
.clients { margin-left: calc(var(--col) - var(--pad)); padding-bottom: clamp(70px, 10vw, 160px); }
.clients li { font-size: clamp(36px, 5.6vw, 116px); line-height: 1.04; letter-spacing: -.02em; font-weight: 300; transition: color .3s, transform .7s var(--ease); width: max-content; max-width: 100%; }
.clients:hover li { color: var(--mute); }
.clients li:hover { color: var(--blue); transform: translateX(18px); }

/* responsive --------------------------------------------------- */
@media (max-width: 860px) {
  :root { --col: 0px; --pad: 16px; }
  .split { grid-template-columns: 1fr; gap: 22px; }
  .nav {
    position: fixed; inset: 0; margin: 0; padding: 110px var(--pad) var(--pad); background: var(--blue); color: var(--mint-soft);
    display: flex; flex-direction: column; gap: 4px; justify-content: flex-end;
    opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s;
  }
  .nav a { font-family: var(--sans); font-weight: 300; font-size: 46px; letter-spacing: -.02em; text-transform: none; line-height: 1.1; width: max-content; }
  .menu-open .nav { opacity: 1; visibility: visible; transition-delay: 0s; }
  .menu-open .header { color: #fff; }
  .nav-toggle { display: block; position: relative; z-index: 2; padding: 6px 0; }
  .header__cta { display: none; }
  .header__logo { position: relative; z-index: 2; }
  .work-item, .work-item:nth-child(n) { width: 88%; margin-left: 0; }
  .work-item:nth-child(even) { margin-left: auto; }
  .work-item__foot { flex-direction: column; gap: 12px; }
  .work-item .tags { justify-content: flex-start; max-width: none; }
  .work-grid, .work-grid--3, .gallery { grid-template-columns: 1fr; }
  .work-grid .work-item:nth-child(n) { width: 100%; margin: 0; }
  .gallery > .media:last-child:nth-child(odd):not(.media--full) { grid-column: auto; }
  .table, .prose, .stats { margin-left: 0; }
  .portrait { width: 84%; margin-left: auto; }
  .table__row { grid-template-columns: 1fr auto; }
  .table__row span:nth-child(2) { grid-row: 2; }
  .stats .table__row { grid-template-columns: 1fr; gap: 6px; }
  .stats .table__row span:nth-child(2) { grid-row: auto; }
  .cap { grid-template-columns: 38px 1fr auto; }
  .more, .clients { margin-left: 0; }
  .footer__links { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer__links > div:first-child { display: none; }
  .meta { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .meta > div:first-child { display: none; }
  .meta > div:last-child { grid-column: 1 / -1; }
  .cover .media { aspect-ratio: 1; }
  .hero__title { font-size: clamp(38px, 11vw, 64px); }
  .hero__scroll { display: none; }
  .phero__title { font-size: 22vw; }
  .project-hero .phero__title { font-size: 17vw; }
  .contact__title { font-size: 19vw; }
  .circ--lg { --s: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-split] .w, [data-reveal]:not(.rule), .hero__title .c, .rise .c { opacity: 1; filter: none; transform: none; }
  .media { clip-path: none; }
  .media > img:not(.media__logo) { scale: 1; }
  [data-reveal].rule { transform: none; }
  .hero__in { opacity: 1; filter: none; transform: none; }
}

/* ============================================================
   Blend pass — first version's type, grey and squares,
   on the second version's layout and motion
   ============================================================ */
body, h1, h2, h3, .mono { font-weight: 500; }
.prose, .prose p { font-weight: 400; }
.section--dark, .section--blue { background: var(--dark); color: #dcdce2; --grey: #9a9aa2; }
.cover { background: var(--dark); }

.statement { font-weight: 500; letter-spacing: -.028em; line-height: 1.06; color: var(--grey); }
.hero__title { font-weight: 500; letter-spacing: -.03em; line-height: 1; color: #ececf4; }
.phero__title { font-weight: 500; letter-spacing: -.045em; color: var(--grey); }
.section--dark .phero__title { color: #d2d2da; }
.contact__title { font-weight: 500; letter-spacing: -.045em; color: var(--grey); }
.preloader__count { font-weight: 500; letter-spacing: -.045em; }
.footer__links a, .clients li, .cap, .marquee__track span { font-weight: 500; letter-spacing: -.03em; }
.footer__links a, .clients li, .marquee__track span { color: var(--grey); }
.cap { color: #74747c; }
.table__row { font-weight: 500; color: var(--grey); letter-spacing: -.015em; }
.work-item__title { letter-spacing: -.018em; }

/* squares, not circles */
.circ { border-radius: 3px; }
.tag { border-radius: 2px; padding: 7px 9px 6px; }
.label::before, .hero__eyebrow::before, .marquee__track span::after, .cap i { border-radius: 1px; }
.cursor { border-radius: 3px; width: 68px; height: 68px; margin: -34px 0 0 -34px; }
.media { border-radius: 3px; clip-path: inset(0 0 calc(100% - 2px) 0); }
.media.in { clip-path: inset(0); }

/* images keep their own colour; only a faint neutral shade behind the white logo */
.media__shade { background: rgba(18, 18, 22, .2); mix-blend-mode: normal; }

/* paper wash is mint only */
.glow {
  background:
    radial-gradient(60% 70% at 68% -10%, #8dffd2 0%, rgba(150,255,214,.6) 38%, rgba(180,255,226,0) 74%),
    radial-gradient(40% 45% at 12% 0%, rgba(216,255,242,.9) 0%, rgba(216,255,242,0) 70%);
  background-size: 130% 100%, 130% 100%; background-repeat: no-repeat;
}

/* click-to-play video poster */
.yt { cursor: pointer; }
.yt__play {
  position: absolute; inset: 0; z-index: 2; width: 100%; display: flex; align-items: flex-end; gap: 12px;
  padding: var(--pad); color: #fff; text-align: left;
  background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,0) 45%);
}
.yt__play > span:last-child { align-self: center; margin-top: auto; padding-bottom: 14px; }
.yt__play .circ { background: var(--mint); color: var(--blue); font-size: 14px; transition: background .3s, transform .6s var(--ease); }
.yt:hover .yt__play .circ { background: #fff; transform: scale(1.12); }

/* password wall */
.gate { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; padding-top: 160px; }
.gate::before {
  content: ""; position: absolute; z-index: -1; width: 90vmax; height: 90vmax; right: -30vmax; top: -40vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(55,43,230,.95), rgba(55,43,230,0)); animation: orbit2 20s ease-in-out infinite alternate;
}
.gate .phero__title { font-size: clamp(52px, 12vw, 260px); }
.gate__row { display: grid; grid-template-columns: calc(var(--col) - var(--pad)) minmax(0, 1fr); padding-bottom: clamp(20px, 4vh, 50px); }
.gate__copy { font-size: clamp(18px, 1.6vw, 28px); letter-spacing: -.015em; line-height: 1.2; color: var(--grey); max-width: 22em; margin-bottom: 22px; }
.gate__form { display: flex; gap: 8px; max-width: 520px; }
.gate__input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: 3px; border: 1px solid var(--line-dark);
  background: rgba(255,255,255,.04); color: #fff; font-family: var(--mono); font-size: 14px; letter-spacing: .08em;
  transition: border-color .3s, background .3s;
}
.gate__input:focus { outline: 0; border-color: var(--mint); background: rgba(255,255,255,.08); }
.gate__btn .circ { --s: 52px; }
.gate__btn:hover .circ { background: #fff; }
.gate__msg { min-height: 1.4em; margin-top: 12px; color: var(--mint); }
.gate.is-wrong .gate__form { animation: shake .45s var(--ease-io); }
.gate.is-busy .gate__btn { opacity: .5; pointer-events: none; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

@media (max-width: 860px) {
  .nav { background: #111116; color: #e6e6ea; }
  .nav a { font-weight: 500; letter-spacing: -.03em; }
  .gate__row { grid-template-columns: 1fr; }
  .gate__row > :first-child { display: none; }
}

/* ============================================================
   Condensed serif — hero, page titles and the big contact line
   ============================================================ */
:root { --serif: "Instrument Serif", "Times New Roman", serif; }
.hero__title, .phero__title, .contact__title, .preloader__count {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.02em;
}
.phero__title { line-height: .86; }
.phero__title sup { font-family: var(--mono); }
.wd.em, .serif-i { font-style: italic; }

/* ============================================================
   Hero — a silent reel of project footage behind the headline.
   The headline is blended with the footage (difference), so its
   colour keeps changing with whatever plays underneath.
   ============================================================ */
.hero--reel { background: #0b0b10; color: #fff; }
/* texture over the footage: a fine dot screen, then shade for the nav and bottom row */
.reel__screen {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,8,14,.5) 0%, rgba(8,8,14,.08) 26%, rgba(8,8,14,.12) 60%, rgba(8,8,14,.7) 100%),
    radial-gradient(rgba(8,8,14,.5) 1px, rgba(8,8,14,0) 1.5px) 0 0 / 4px 4px;
}
.hero--reel .grain { opacity: .5; }
.hero--reel .hero__in { mix-blend-mode: difference; max-width: none; }
.hero--reel .hero__title {
  font-size: clamp(60px, 10.6vw, 230px); line-height: .86; letter-spacing: -.025em; color: #fff;
  max-width: 9.5em; text-wrap: balance;
}
.hero--reel .hero__eyebrow { color: #fff; }
.hero--reel .hero__eyebrow::before { background: #fff; }
.hero--reel .hero__meta { position: relative; color: #fff; border-top-color: rgba(255,255,255,.4); }
/* (headline word hover removed) */
@media (max-width: 860px) { .hero--reel .hero__title { font-size: clamp(56px, 17vw, 96px); } }

/* ============================================================
   Project pages take their colour from the work. Each page sets
   --blue (the accent) and --tint (its pale partner) on .themed.
   ============================================================ */
.themed { --mint: var(--tint); }
.themed .project-hero, .themed .cover { background: var(--blue); }
.themed .project-hero { color: #fff; --mute: rgba(255,255,255,.72); --line: rgba(255,255,255,.34); }
.themed .project-hero::before { background: radial-gradient(closest-side, rgba(255,255,255,.3), rgba(255,255,255,0)); }
.themed .project-hero .phero__title { color: #fff; }
.themed .project-hero .label::before { background: var(--tint); }
.themed .glow {
  background:
    radial-gradient(60% 70% at 68% -10%, var(--tint) 0%, transparent 74%),
    radial-gradient(40% 45% at 12% 0%, var(--tint) 0%, transparent 70%);
  background-size: 130% 100%, 130% 100%; background-repeat: no-repeat;
}
.themed .section--dark:not(.project-hero) .circ { background: var(--tint); color: var(--ink); }

/* ============================================================
   Project cards carry their project's colour (set per card as
   --blue / --tint): a chip by the name, the hover frame on the
   thumbnail, the name and tags on hover, and the "View" cursor
   ============================================================ */
.work-item__title b::before {
  content: ""; display: inline-block; width: .52em; height: .52em; margin-right: .42em; vertical-align: .06em;
  background: var(--blue); border-radius: 1px; transition: transform .5s var(--ease);
}
.work-item:hover .work-item__title b::before { transform: scale(1.35) rotate(90deg); }
.work-item .media.in { background: var(--blue); }
.work-item .media::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--blue); transition: box-shadow .6s var(--ease);
}
/* (the coloured border that drew in on hover was removed; the rest of the card hover stays) */
.section--dark .work-item:hover .work-item__title b { color: var(--tint); }
.section--dark a.work-item:hover .tag { background: var(--blue); color: #fff; border-color: var(--blue); }

.reel__screen {
  background:
    linear-gradient(180deg, rgba(8,8,14,.22) 0%, rgba(8,8,14,0) 22%, rgba(8,8,14,0) 62%, rgba(8,8,14,.34) 100%),
    radial-gradient(rgba(8,8,14,.22) 1px, rgba(8,8,14,0) 1.5px) 0 0 / 4px 4px;
}
.hero--reel .grain { opacity: .28; }

/* ============================================================
   Hero background candidates (pick one with ?bg=a|b|c|reel).
   a: abstract forms drawn live (monochrome)
   b: one slowed clip on a blue field
   c: the work floating in depth (full colour)
   ============================================================ */
.bgx { position: absolute; inset: 0; overflow: hidden; }
.bgx > * { position: absolute; inset: 0; display: none; }
.hero[data-bg="a"] .bgx > [data-bgx="a"],
.hero[data-bg="b"] .bgx > [data-bgx="b"],
.hero[data-bg="c"] .bgx > [data-bgx="c"] { display: block; }
.hero:not([data-bg="reel"]) .reel { display: none; }
.hero[data-bg="reel"] .bgx { display: none; }

/* a */
.bgx__gl { width: 100%; height: 100%; background: #6f6f72; }

/* a touch more texture over the dark forms: a slightly stronger dot screen and grain */
.hero[data-bg="a"]:not([data-tone="a3"]) .reel__screen {
  background:
    linear-gradient(180deg, rgba(8,8,14,.22) 0%, rgba(8,8,14,0) 22%, rgba(8,8,14,0) 62%, rgba(8,8,14,.34) 100%),
    radial-gradient(rgba(8,8,14,.36) 1px, rgba(8,8,14,0) 1.5px) 0 0 / 4px 4px;
}
.hero[data-bg="a"]:not([data-tone="a3"]) .grain { opacity: .46; }

/* ============================================================
   Projects whose colour is pale (light: true in content.rb, e.g. Frontier's aqua):
   type on the colour turns dark instead of white, on the page and on its cards.
   ============================================================ */
.themed--light .project-hero { color: var(--ink); --mute: rgba(20, 19, 31, .68); --line: rgba(20, 19, 31, .24); }
.themed--light .project-hero .phero__title { color: var(--ink); }
.themed--light .project-hero .label::before { background: var(--ink); }
.themed--light .project-hero::before { background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,0)); }
.themed--light .project-hero .circ, .themed--light .section--dark:not(.project-hero) .circ { background: var(--ink); color: var(--blue); }
.themed--light a:hover > .circ, .themed--light a:hover .circ { background: var(--ink); color: var(--blue); }
.themed--light ::selection { background: var(--ink); color: var(--blue); }
.work-item--light:hover .work-item__title b { color: var(--ink); }
.section--dark .work-item--light:hover .work-item__title b { color: var(--tint); }
.work-item--light:hover .tag, .section--dark a.work-item--light:hover .tag { background: var(--blue); color: var(--ink); border-color: var(--blue); }
.work-item--light .work-item__title b::before { box-shadow: inset 0 0 0 1px rgba(20, 19, 31, .28); }

/* ============================================================
   Wall of marks (Brand Marks page): a tight mosaic of every logo,
   a few at double size. Tiles draw in as they scroll into view;
   hover nudges the image and shows its number; click enlarges.
   ============================================================ */
.marks__head { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); color: var(--mute); }
.marks {
  --g: clamp(6px, .7vw, 12px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g); grid-auto-flow: dense;
  padding-bottom: clamp(70px, 10vw, 150px);
}
.mark { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #e9e9e4; cursor: pointer; overflow: hidden; }
.mark--lg { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
.marks .media > img:not(.media__logo) { top: 0; height: 100%; transition: scale 2s var(--ease), transform .9s var(--ease); }
.mark:hover > img, .mark:focus-visible > img { transform: scale(1.045); }
.mark__n {
  position: absolute; left: 0; bottom: 0; padding: 7px 9px; background: var(--ink); color: #fff; font-size: 10px;
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.mark:hover .mark__n, .mark:focus-visible .mark__n { transform: none; }
/* stagger the draw-in across each row */
.marks .media { transition-delay: 0s; }
.marks .media:nth-child(4n + 2) { transition-delay: .07s; }
.marks .media:nth-child(4n + 3) { transition-delay: .14s; }
.marks .media:nth-child(4n + 4) { transition-delay: .21s; }
@media (max-width: 860px) {
  .marks { grid-template-columns: 1fr 1fr; }
  .mark--lg { grid-row: span 1; aspect-ratio: 4 / 3; height: auto; }
}

/* the viewer */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(8px, 2vw, 28px); padding: clamp(56px, 7vh, 84px) clamp(12px, 2.4vw, 36px);
  background: rgba(11, 11, 16, .95); color: #fff; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.lightbox__fig { margin: 0; height: 100%; min-height: 0; display: grid; place-items: center; }
.lightbox__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; opacity: 0; transform: scale(.985); transition: opacity .35s ease, transform .6s var(--ease); }
.lightbox__fig img.is-in { opacity: 1; transform: none; }
.lightbox__count, .lightbox__close { position: absolute; top: clamp(18px, 2.4vh, 28px); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.lightbox__count { left: clamp(14px, 2.4vw, 36px); }
.lightbox__close { right: clamp(14px, 2.4vw, 36px); color: #fff; }
.lightbox__close:hover { color: var(--mint); }
.lightbox__nav { width: clamp(40px, 4vw, 58px); aspect-ratio: 1; background: var(--mint); color: var(--ink); font-size: 18px; border-radius: 3px; transition: background .3s, transform .4s var(--ease); }
.lightbox__nav:hover { background: #fff; }
.lightbox__nav--prev:hover { transform: translateX(-3px); }
.lightbox__nav--next:hover { transform: translateX(3px); }
.gallery[hidden] { display: none; }
/* keep the enlarged mark inside the screen, clear of the counter and Close */
.lightbox { grid-template-rows: minmax(0, 1fr); }
.lightbox__fig img { max-height: calc(100svh - 150px); max-width: min(100%, 1400px); }
@media (max-width: 860px) {
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lightbox__fig { grid-column: 1 / -1; grid-row: 1; }
  .lightbox__nav { grid-row: 2; }
  .lightbox__nav--prev { justify-self: end; }
  .lightbox__fig img { max-height: calc(100svh - 220px); }
}

/* a small notice (used when an email address is copied) */
.toast {
  position: fixed; left: 50%; bottom: clamp(18px, 3vh, 34px); z-index: 400; translate: -50% 0;
  padding: 13px 16px; background: #b4ffe2; color: var(--ink); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 3px; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s ease, transform .5s var(--ease);
}
.toast.is-on { opacity: 1; transform: none; }
