/* ==========================================================================
   Collage portfolio: crumpled grid paper, extended black type, torn bands.
   ========================================================================== */

:root {
  --paper: #e9e8e3;
  --grid: rgba(20, 20, 20, .075);
  --ink: #111;
  --ink-2: #4a4a48;
  --red: #ff2a14;
  --white: #f7f6f2;
  --display: 'Archivo', system-ui, sans-serif;
  --hand: 'Caveat', cursive;
  --gutter: clamp(16px, 4vw, 56px);
  /* one column width so the title, Hello and the projects share the same edges */
  --page: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
  color: var(--ink);
  font: 400 14px/1.5 var(--display);
  font-variation-settings: 'wdth' 110;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* crumpled paper light, laid over everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='4' seed='7'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='3.2' diffuseConstant='1.05'%3E%3CfeDistantLight azimuth='225' elevation='52'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
  background-size: 900px 900px;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

/* ---------- type ---------- */

.big, .mid, .mega, .nav__brand {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -.02em;
  line-height: .88;
  margin: 0;
}
.big { font-size: clamp(44px, 7.4vw, 104px); }
.big--center { text-align: center; }
.mid { font-size: clamp(20px, 1.9vw, 26px); margin: 34px 0 14px; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--gutter);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  mix-blend-mode: difference;
  color: #fff;
}
.nav a { text-decoration: none; }
.nav__brand { font-size: 13px; letter-spacing: 0; }
.nav__links { display: flex; gap: clamp(12px, 2.4vw, 28px); }
.nav__links a:hover { text-decoration: line-through; }

/* ---------- hero ---------- */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(84px, 12vh, 120px) var(--gutter) 0;
  text-align: center;
}
.hero__row {
  display: flex;
  justify-content: space-between;
  padding: 0 .6%;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(10px, 1.25vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: .2em;
}
.mega {
  /* PORTFOLIO is about 7.3 em wide: size it to exactly fill the hero column at every width */
  font-size: calc((min(100vw, var(--page)) - 2 * var(--gutter) - 12px) / 7.3);
  line-height: .78;
  letter-spacing: -.045em;
}

.glyphs { display: flex; justify-content: center; align-items: center; gap: .14em; font-size: 26px; }
.glyphs svg { width: 1em; height: 1em; fill: currentColor; }
.glyphs svg:nth-child(2) { transform: scale(.8); }
.glyphs--ink { color: var(--ink); margin-top: clamp(50px, 8vw, 96px); }
.glyphs--sm { font-size: 16px; margin: 0; }

/* ---------- hello ---------- */

.hello {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 230px;
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 110px) var(--gutter) clamp(90px, 11vw, 140px);
  align-items: start;
}

.sel {
  position: relative;
  margin: 6px 0 0;
  outline: 1px solid var(--red);
}
.sel img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.sel .h {
  position: absolute;
  width: 7px; height: 7px;
  background: #fff;
  border: 1px solid var(--red);
  transform: translate(-50%, -50%);
}
.h.tl { left: 0; top: 0; } .h.tc { left: 50%; top: 0; } .h.tr { left: 100%; top: 0; }
.h.ml { left: 0; top: 50%; } .h.mr { left: 100%; top: 50%; }
.h.bl { left: 0; top: 100%; } .h.bc { left: 50%; top: 100%; } .h.br { left: 100%; top: 100%; }
.sel__label, .sel__size {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}
.sel__label { top: -20px; left: 0; }
.sel__size {
  bottom: -24px; left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  padding: 0 5px;
  border-radius: 3px;
}

.hello h2.big { font-size: clamp(48px, 5.4vw, 70px); line-height: .8; }
.hello__mid p {
  max-width: 44ch;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.hello__mid .lead { color: var(--ink); margin-top: 16px; font-size: 12px; }
.mid { font-size: clamp(17px, 1.6vw, 21px); line-height: .9; margin: 34px 0 12px; }
.hello__side .mid:first-child { margin-top: 4px; }

.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.entries li { display: grid; gap: 1px; font-size: 11px; line-height: 1.35; }
.entries em {
  font-style: normal;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: 11.5px;
}
.entries b { font-weight: 700; }
.entries span { color: var(--ink-2); }

.tiles__cat {
  margin: 14px 0 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.hello__side .mid:first-child + .tiles__cat { margin-top: 0; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 38px); gap: 10px 12px; }
.tiles li {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
  cursor: default;
}
.tiles img { width: 100%; height: 100%; object-fit: contain; }
/* logos without their own app tile get a white one */
.tile { background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.tile--pad { padding: 7px; }
.tile--pad img { width: 24px; height: 24px; }
.tile--nx { background: #009999; padding: 5px 4px; gap: 1px; align-content: center; box-shadow: none; }
.tile--nx img { height: auto; filter: brightness(0) invert(1); }
.tile--nx b { color: #fff; font-weight: 900; font-variation-settings: 'wdth' 125; font-size: 12px; line-height: 1; }
.tiles li:hover { transform: rotate(-8deg) scale(1.12); }

/* ---------- torn bands ---------- */

.band { position: relative; z-index: 2; }
.band__body {
  position: relative;
  background: #121212;
  color: var(--white);
  overflow: hidden;
}
/* subtle crease texture on the black paper */
.band__body::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px);
}

/* torn grid paper over the band edges */
.rip {
  position: absolute;
  left: 0; right: 0;
  height: 64px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}
.rip--top { top: -1px; }
.rip--bottom { bottom: -1px; filter: drop-shadow(0 -3px 4px rgba(0, 0, 0, .45)); }
.rip__core, .rip__paper { position: absolute; inset: 0; }
.rip__core { background: #fbfaf6; }
.rip__paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
}

.band--name { margin: 0; }
.band--name .band__body { padding: 92px 0 96px; }

.clients__k {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(14px, 1.6vw, 20px);
  text-transform: uppercase;
}
.clients__k svg { width: 18px; height: 18px; fill: var(--red); }
.clients {
  overflow: hidden;
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients__track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
/* spacing as padding, not gap, so the loop lands exactly on the copy */
.chip {
  flex: none;
  display: grid;
  place-items: center;
  box-sizing: content-box;
  width: clamp(130px, 14vw, 180px);
  height: clamp(48px, 5.2vw, 64px);
  padding: 0 clamp(22px, 2.8vw, 36px);
}
/* every logo as a flat white mark */
.chip img { width: clamp(130px, 14vw, 180px); height: clamp(48px, 5.2vw, 64px); transform: scale(var(--s, 1)); object-fit: contain; filter: brightness(0) invert(1); }

.marquee {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  animation: marquee 28s linear infinite;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(80px, 15vw, 230px);
  line-height: 1;
  letter-spacing: -.03em;
}
.marquee--slow .marquee__track { animation-duration: 40s; }
.marquee__track span { padding-right: .35em; display: inline-flex; align-items: center; gap: .35em; }
.marquee__track svg { width: .45em; height: .45em; fill: var(--red); }
@keyframes marquee { to { transform: translateX(-50%); } }

.cutout {
  position: relative;
  z-index: 2;
  justify-self: center;
  align-self: end;
  width: clamp(240px, 34vw, 470px);
  margin: 76px 0 -2px;
  transform: rotate(1.5deg);
  /* red sticker outline around the scissor cut */
  filter:
    drop-shadow(7px 0 0 var(--red)) drop-shadow(-7px 0 0 var(--red))
    drop-shadow(0 7px 0 var(--red)) drop-shadow(0 -7px 0 var(--red));
}
.cutout img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: 50% 0;
  clip-path: polygon(0% 100%, 0% 84%, 7% 78%, 19% 73%, 29% 69%, 27% 62%, 22% 55%, 18% 45%, 15% 35%, 17% 24%, 23% 14%, 33% 7%, 45% 3%, 58% 4%, 68% 8%, 76% 16%, 80% 27%, 79% 38%, 77% 48%, 73% 58%, 70% 67%, 79% 72%, 91% 77%, 100% 83%, 100% 100%);
  filter: contrast(1.08) saturate(1.05);
}

.band .glyphs--white {
  position: absolute;
  right: 6%; top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  color: var(--white);
  font-size: clamp(30px, 5vw, 68px);
}

/* ---------- work ---------- */

.work {
  padding: clamp(110px, 14vw, 180px) var(--gutter) clamp(60px, 9vw, 120px);
  max-width: var(--page);
  margin: 0 auto;
}
.sub { text-align: center; color: var(--ink-2); margin: 16px 0 0; font-size: 12px; }

/* the two groups of work under THE STUFF */
.stuff { margin-top: clamp(56px, 7vw, 90px); }
.stuff { text-align: center; }
.stuff__h {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45em;
  margin: 0;
  color: var(--red);
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: .9;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.stuff__h svg { flex: none; width: .62em; height: .62em; fill: currentColor; }
.stuff__sub { margin: 10px 0 0; font-size: 12px; color: var(--ink-2); }

/* project cards under each group */
.cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(28px, 3.4vw, 44px);
  margin-top: clamp(28px, 4vw, 44px);
  text-align: left;
}
/* buttons centre their content vertically; stack it from the top so cards in a row line up */
.case { all: unset; display: flex; flex-direction: column; justify-content: flex-start; cursor: pointer; }
.case:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
.case__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
.case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.case:hover .case__img img { transform: scale(1.04); }
.case__cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1.5px solid var(--ink);
}
.case__title {
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.case__year { font-size: 11px; font-weight: 700; white-space: nowrap; }
.case__meta { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.case__meta b { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--red); font-weight: 700; font-size: 11px; }
.case__meta svg { width: 13px; height: 13px; fill: currentColor; }

.prints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(44px, 5vw, 64px) clamp(28px, 3.4vw, 44px);
  margin-top: clamp(50px, 7vw, 84px);
}
.print {
  all: unset;
  display: block;
  cursor: pointer;
}
.print:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }

/* an outline drawing on the paper; the photo fades in on hover */
.print__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.print__img img, .print__sketch { position: absolute; inset: 0; width: 100%; height: 100%; }
.print__img img { object-fit: cover; }
.print__sketch {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* same line weight at every card size */
.print__sketch * { vector-effect: non-scaling-stroke; }
.print__sketch .d { stroke-dasharray: 2 5; stroke-width: 1.2px; }
.print__sketch text { fill: var(--ink); stroke: none; font: 900 26px var(--display); font-variation-settings: 'wdth' 125; }
.print__photo { opacity: 0; transition: opacity .35s ease; }
.print:hover .print__photo, .print:focus-visible .print__photo { opacity: 1; }

.print__cap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1.5px solid var(--ink);
}
.print__no { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.print__title {
  flex: 1;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.print__year { font-size: 11px; font-weight: 700; white-space: nowrap; }
.print__meta { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-2); }
.print__meta b { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--red); font-weight: 700; }
.print__meta svg { width: 10px; height: 10px; fill: currentColor; }

/* ---------- contact ---------- */

.band--contact { margin: 0; }
.band--contact .band__body { padding: clamp(110px, 14vw, 180px) var(--gutter); }
.band--contact .marquee { top: 32%; opacity: .14; }
.contact { position: relative; z-index: 2; text-align: center; }
.contact__k { margin: 0 0 14px; font-size: 15px; color: #bdbdb8; }
.contact__mail {
  display: inline-block;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(22px, 4.6vw, 64px);
  letter-spacing: -.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--red), var(--red)) 0 92% / 0 .14em no-repeat;
  transition: background-size .4s ease;
}
.contact__mail:hover { background-size: 100% .14em; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin-top: 30px; font-size: 14px; font-weight: 600; }
.contact__links a { text-decoration: none; border-bottom: 1.5px solid currentColor; }
.contact__links a:hover { color: var(--red); }
.contact__links span { color: #9d9d98; }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px var(--gutter) 34px;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- project sheet ---------- */

.sheet {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  overflow: auto;
}
.sheet[open] { animation: drop .45s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes drop { from { transform: translateY(40px) rotate(-2deg); opacity: 0; } }
.sheet::backdrop { background: rgba(10, 10, 10, .72); }
.sheet__close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  z-index: 3;
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  font: 700 12px var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.sheet__close:hover { background: var(--red); }
.sheet__body {
  padding: clamp(22px, 4vw, 48px);
  /* the paper also sits inside the scrolling content: on phones the scroller is drawn as its own layer, and the
     multiply on PDF pages and renders needs something behind it in that layer, or their white stays white */
  background-color: var(--white);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  isolation: isolate;
}
.sheet__eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.sheet__body h2 { font-size: clamp(42px, 7vw, 92px); margin: 10px 0 18px; }
.sheet__lead { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.4; font-weight: 600; max-width: 60ch; margin: 0 0 14px; }
.sheet__body > p { color: var(--ink-2); max-width: 64ch; }
.sheet__meta { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 13px; margin: 22px 0 28px; }
.sheet__meta b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.sheet__cover { width: 100%; max-height: 520px; object-fit: cover; margin: 6px 0 10px; }
.sheet__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 28px 0; }
.sheet__stats div { background: var(--ink); color: #fff; padding: 16px; transform: rotate(var(--r)); }
.sheet__stats b { display: block; font-weight: 900; font-variation-settings: 'wdth' 125; font-size: 30px; line-height: 1; letter-spacing: -.03em; }
.sheet__stats span { font-size: 12px; color: #c9c9c4; }
.sheet__how { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 16px; counter-reset: how; }
.sheet__how li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; counter-increment: how; }
.sheet__how li::before { content: '0' counter(how); font-weight: 900; font-variation-settings: 'wdth' 125; font-size: 22px; color: var(--red); }
.sheet__how b { display: block; }
.sheet__how span { color: var(--ink-2); font-size: 14px; }
.sheet__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 30px; }
.sheet__gallery figure { margin: 0; background: #fff; padding: 8px 8px 10px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); transform: rotate(var(--r)); }
.sheet__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sheet__gallery figcaption { font-size: 12px; color: var(--ink-2); margin-top: 7px; }
.sheet__note { font-size: 12px; color: var(--ink-2); margin-top: 22px; }
.sheet__tools { font-size: 13px; margin-top: 22px; }
.sheet__tools b { font-weight: 800; }

/* case pages (THE STUFF cards) */
.sheet__body .sheet__award { max-width: none; display: flex; align-items: center; gap: 6px; margin: 0; color: var(--red); font-size: 13px; font-weight: 700; }
.sheet__award svg { width: 15px; height: 15px; fill: currentColor; }
.sheet__page { margin: 0 0 22px; }
.sheet__page img { width: 100%; display: block; background: #000; }
.sheet__page--blend img { background: none; mix-blend-mode: multiply; }
/* renders on a grey studio backdrop: lift the grey to white first so it melts away too */
.sheet__page--studio img { filter: brightness(1.32) contrast(1.08); }
.sheet__page figcaption { margin-top: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hello { grid-template-columns: 1fr 1fr; }
  .sel { grid-column: 1 / -1; max-width: 300px; justify-self: center; }
}
@media (max-width: 640px) {
  .nav__links a:not(.nav__cv) { display: none; }
  .sel { max-width: 240px; }
  .hello { grid-template-columns: 1fr; }
  .year { grid-template-columns: 1fr; gap: 14px; }
  .year__items { grid-template-columns: 1fr; }
  .band .glyphs--white { top: 16%; right: 8%; transform: none; }
  .print { --y: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .doodle__arrow path { stroke-dashoffset: 0; }
}

/* client logo on case cards and case pages (white logos turned black for the paper) */
.case__logo { flex: none; height: 26px; width: auto; filter: brightness(0); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 44px 0 18px; }
.sheet__head h2.big { margin: 0; }
/* client logo as a link: drawn through a mask so it can take the client's brand colour on hover */
.sheet__brand { flex: none; display: block; padding: 6px 0; transition: transform .25s ease; }
.sheet__brand:hover { transform: translateY(-2px); }
.sheet__brand span {
  display: block;
  width: clamp(120px, 16vw, 180px);
  aspect-ratio: var(--ar, 430 / 199);
  background: var(--ink);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  transition: background-color .25s ease;
}
/* hover: the client's own colour when we know it, otherwise the site accent */
.sheet__brand:hover span, .sheet__brand:focus-visible span { background: var(--brand, var(--red)); }
.sheet__brand:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

/* longer case pages: tagline, numbered sections, side-by-side images */
.case__by { font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.sheet__sec { margin-top: clamp(40px, 6vw, 70px); }
.sheet__sec h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--ink);
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.sheet__sec h3 span { font-size: 11px; font-weight: 700; letter-spacing: 0; color: var(--red); }
.sheet__sec > p { max-width: 64ch; margin: 0 0 22px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.sheet__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.sheet__duo .sheet__page { margin: 0; }
.sheet__duo img { height: 100%; object-fit: cover; }
@media (max-width: 640px) { .sheet__duo { grid-template-columns: 1fr; } }
.sheet__video { margin: 0 0 22px; }
.sheet__video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.sheet__video figcaption { margin-top: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }

/* the award trophy in a warm amber that sits next to the red-orange accent */
.case__meta b svg, .sheet__award svg { fill: #ff9a1f; }
/* image and text side by side on a case page */
.sheet__split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; margin-top: 8px; }
.sheet__split .sheet__page { margin: 0; }
.sheet__body .sheet__split p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 640px) { .sheet__split { grid-template-columns: 1fr; } }
/* square product shots on black: show the whole object instead of cropping */
.case__img--black { background: #000; }
.case__img--black img { object-fit: contain; }
.case__logo[src$="niko.svg"] { height: 18px; }

.sheet__visit { flex: none; font-size: 12px; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid currentColor; transition: color .2s ease; }
.sheet__visit:hover { color: var(--red); }

/* a stacked list of awards on a case page */
.sheet__awards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sheet__awards li { display: grid; grid-template-columns: 16px max-content 1fr; align-items: center; gap: 8px; font-size: 13px; }
.sheet__awards svg { width: 14px; height: 14px; fill: #ff9a1f; }
.sheet__awards b { color: var(--red); font-weight: 800; }
.sheet__awards span { color: var(--ink-2); }

/* trophy colour follows the medal: gold for winner/gold, then silver and bronze */
.sheet__awards .is-gold svg { fill: #f2b200; }
.sheet__awards .is-silver svg { fill: #a8adb4; }
.sheet__awards .is-bronze svg { fill: #c0743a; }
.case__awards { margin-top: 8px; gap: 3px; }
.case__awards li { font-size: 11px; grid-template-columns: 13px max-content 1fr; gap: 6px; }
.case__awards svg { width: 12px; height: 12px; }
.case__logo[src$="umbrosa.svg"] { height: 13px; }
.case__logo--ditto { height: 32px; filter: none; }
/* a client or studio logo that does not link anywhere */
.sheet__logo { flex: none; height: clamp(48px, 6vw, 64px); width: auto; }
/* project without photos yet: the organiser's logo on paper */
.case__img--logo { display: grid; place-items: center; background: #f4f2ec; box-shadow: inset 0 0 0 1.5px var(--ink); }
.case__img--logo img { width: 55%; height: auto; object-fit: contain; }
.case:hover .case__img--logo img { transform: none; }
.case__logo--kbs { height: 44px; }



/* a studio card: white tile with its logo and name */
.case__img--brand { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; background: #fff; }
.case__img--brand img { width: auto; height: 42%; object-fit: contain; }
.case__img--brand span { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.case:hover .case__img--brand span { transform: scale(1.04); }
.case__img--brand span { font-weight: 900; font-variation-settings: 'wdth' 125; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: .02em; color: var(--ink); }
.entries__link { all: unset; cursor: pointer; }
.entries__link:hover { color: var(--red); }
button.sheet__visit { all: unset; cursor: pointer; font-size: 13px; font-weight: 700; border-bottom: 1.5px solid currentColor; }
button.sheet__visit:hover { color: var(--red); }
/* project pages on phones: title and client logo stack, and the title never runs off the sheet */
@media (max-width: 640px) {
  .sheet__head { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 52px; }
  .sheet__body .sheet__head h2.big { font-size: min(11vw, 52px); overflow-wrap: anywhere; }
  .sheet__brand span { width: 130px; }
  .sheet__logo { height: 44px; }
}
/* founder portraits, captions and local video on case pages */
.sheet__person img { aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1); }
.sheet__page figcaption { margin-top: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.sheet__duo { margin-top: 22px; }
.sheet__video video { display: block; width: 100%; aspect-ratio: 16 / 10; background: #000; }
.sheet__sec > ol.sheet__how { margin: 6px 0 22px; }
/* side-by-side photos with a caption: let the image keep its own height so the caption sits under it */
.sheet__duo figure:has(figcaption) img { height: auto; }
.sheet__duo + .sheet__page { margin-top: 6px; }

/* ---------- Euphoriax page: stats and small story visuals ---------- */

.eux-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin: 26px 0 0; }
.eux-stats div { padding: 18px 16px 16px; }
.eux-stats div + div { border-left: 1px solid rgba(17, 17, 17, .2); }
.eux-stats b { display: block; font-weight: 900; font-variation-settings: 'wdth' 125; font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -.03em; }
.eux-stats span { display: block; margin-top: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }

/* the bits below start hidden and slide in once they are on screen ([data-reveal] gets .in) */
[data-reveal] > * { transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }

.eux-ideas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 22px; }
.eux-idea { padding: 14px; border: 1.5px solid var(--ink); background: #fbfaf6; opacity: 0; transform: translateY(10px); }
.eux-idea span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.eux-idea b { display: block; margin-top: 6px; font-size: 14px; }
.eux-idea.is-out b { position: relative; color: var(--ink-2); }
.eux-idea.is-out b::after { content: ''; position: absolute; left: 0; top: 52%; height: 2px; width: 0; background: var(--red); transition: width .4s ease; }
.eux-idea.is-in { background: var(--ink); color: var(--white); }
.eux-idea.is-in span { color: #b9b8b2; }
.in .eux-idea { opacity: 1; transform: none; }
.in .eux-idea:nth-child(2) { transition-delay: .12s; } .in .eux-idea:nth-child(3) { transition-delay: .24s; } .in .eux-idea:nth-child(4) { transition-delay: .5s; }
.in .eux-idea.is-out b::after { width: 100%; transition-delay: .8s; }


.eux-tree { display: block; width: 100%; max-width: 520px; margin: 6px auto 22px; }
.eux-tree path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.eux-tree circle { fill: var(--ink); }
.eux-tree .t1 circle { fill: var(--red); }
.eux-tree g { opacity: 0; transition: opacity .5s ease; }
.in.eux-tree g { opacity: 1; }
.in.eux-tree .t2 { transition-delay: .35s; } .in.eux-tree .t3 { transition-delay: .7s; }

.eux-flow { list-style: none; margin: 6px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: flow; }
.eux-flow li { position: relative; padding: 14px 18px 14px 14px; border: 1.5px solid var(--ink); margin-left: -1.5px; background: #fbfaf6; counter-increment: flow; opacity: 0; transform: translateX(-8px); }
.eux-flow li::before { content: '0' counter(flow); display: block; font-size: 11px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.eux-flow li::after { content: '→'; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); z-index: 1; background: var(--white); font-weight: 900; font-size: 13px; line-height: 1; padding: 2px 0; }
.eux-flow li:last-child::after { display: none; }
.eux-flow b { display: block; font-size: 13px; line-height: 1.25; }
.eux-flow span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--ink-2); }
.in.eux-flow li { opacity: 1; transform: none; }
.in.eux-flow li:nth-child(2) { transition-delay: .12s; } .in.eux-flow li:nth-child(3) { transition-delay: .24s; } .in.eux-flow li:nth-child(4) { transition-delay: .36s; } .in.eux-flow li:nth-child(5) { transition-delay: .48s; }


.eux-tags { list-style: none; margin: 6px 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.eux-tags li { padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 30px; font-size: 12px; font-weight: 700; opacity: 0; transform: scale(.9); }
.in.eux-tags li { opacity: 1; transform: none; }
.in.eux-tags li:nth-child(2) { transition-delay: .06s; } .in.eux-tags li:nth-child(3) { transition-delay: .12s; } .in.eux-tags li:nth-child(4) { transition-delay: .18s; }
.in.eux-tags li:nth-child(5) { transition-delay: .24s; } .in.eux-tags li:nth-child(6) { transition-delay: .3s; } .in.eux-tags li:nth-child(7) { transition-delay: .36s; } .in.eux-tags li:nth-child(8) { transition-delay: .42s; }

@media (max-width: 760px) {
  .eux-ideas { grid-template-columns: 1fr 1fr; }
  .eux-flow { grid-template-columns: 1fr; }
  .eux-flow li { margin: -1.5px 0 0; }
  .eux-flow li::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -9px; transform: translateX(-50%); }
  .eux-stats b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .eux-idea, .eux-flow li, .eux-tags li, .eux-tree g { opacity: 1 !important; transform: none !important; }
}
/* centre the face in the founder crop (the original photo has it right of centre) */
.sheet__person img[src*="eux-aeon"] { object-position: 77% 50%; }
/* the community as a loose web that spreads outward, ring by ring */
.eux-net path { stroke: rgba(17, 17, 17, .35); stroke-width: 1; }
.in.eux-tree .t4 { transition-delay: 1.05s; }

/* ---------- sales globe ---------- */
.eux-globe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 32px; align-items: center; margin: 10px 0 22px; }
.eux-globe__ball { aspect-ratio: 1; cursor: grab; touch-action: none; }
.eux-globe__ball:active { cursor: grabbing; }
.eux-globe__ball canvas { display: block; width: 100%; height: 100%; }
.eux-globe__label { display: block; margin: 6px 0 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.eux-globe__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.eux-globe figcaption { grid-column: 1 / -1; font-size: 11px; color: var(--ink-2); }
.eux-globe__list { grid-template-columns: 1fr 1fr; gap: 0 18px; }
.eux-globe__list li { padding: 7px 0; border-bottom: 1px solid rgba(17, 17, 17, .15); font-size: 13px; font-weight: 700; }
.eux-globe__list li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
@media (max-width: 760px) { .eux-globe { grid-template-columns: 1fr; } }
.eux-globe__list li.is-more::before { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  /* the top bar gets its own paper, so text and photos no longer show through it */
  .nav {
    mix-blend-mode: normal;
    color: var(--ink);
    background: rgba(233, 232, 227, .94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(17, 17, 17, .1);
    padding-top: 12px;
    padding-bottom: 12px;
  }
  /* a project page fills exactly the visible screen (dvh leaves out the browser bars), so Close is never hidden */
  .sheet {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    inset: 0;
    box-shadow: none;
    overscroll-behavior: contain;
  }
  .sheet[open] { animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
  .sheet__close { top: 10px; margin: 10px 10px 0 0; padding: 10px 16px; font-size: 13px; }
}
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }

/* the logo band can be dragged or swiped sideways, the page still scrolls up and down over it */
.clients { touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.clients.is-dragging { cursor: grabbing; }
.chip img { -webkit-user-drag: none; pointer-events: none; }

/* Euphoriax stats: figures keep their width while counting, and on phones the three stack as rows */
.eux-stats b { font-variant-numeric: tabular-nums; }
.eux-stats div { min-width: 0; }
@media (max-width: 760px) {
  .eux-stats { grid-template-columns: 1fr; }
  .eux-stats div { display: flex; align-items: baseline; gap: 14px; padding: 12px 2px; }
  .eux-stats div + div { border-left: 0; border-top: 1px solid rgba(17, 17, 17, .2); }
  .eux-stats b { font-size: 32px; min-width: 4.6em; }
  .eux-stats span { margin-top: 0; }
  /* nothing on a project page may push it wider than the screen */
  .sheet { overflow-x: hidden; }
}

/* globe: the countries flow as one compact block instead of a long two-column list */
.eux-globe__list { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.eux-globe__list li { padding: 0; border: 0; font-size: 13px; white-space: nowrap; }
.eux-globe__label { font-size: 12px; margin-bottom: 14px; }
