/* ==================================================================
   EXHIBITION SITE
   One typeface that stretches (Archivo, width 62 to 125).
   Five flat colours. Three shapes: circle, arch, block.
   Everything that moves is one of those shapes or a letter.
================================================================== */
@font-face {
  font-family: "Archivo";
  src: url(../fonts/archivo-var.woff2) format("woff2-variations"), url(../fonts/archivo-var.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}
:root {
  --bone: #f1ede4; --ink: #0c0c0c; --blue: #2a3cff; --red: #ff3a1c; --sun: #ffcf1a; --pink: #ffa6d1;
  --pad: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.19, 1, .22, 1);
}
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font-family: "Archivo", "Arial Narrow", sans-serif; font-size: 17px; line-height: 1.45;
  font-variation-settings: "wdth" 100, "wght" 420;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, canvas { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--sun); }

/* stretchable display type: animate --w (width) and --g (weight) */
.x {
  font-variation-settings: "wdth" var(--w, 125), "wght" var(--g, 900);
  line-height: .8; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap;
}
.x .l { display: inline-block; font-variation-settings: "wdth" var(--w, 125), "wght" var(--g, 900); }

/* the three shapes */
.circle { border-radius: 50%; aspect-ratio: 1; }
.arch { border-radius: 50% 50% 0 0 / 33.333% 33.333% 0 0; aspect-ratio: 2 / 3; }
.block { aspect-ratio: 5 / 4; }

/* ------------------------------------------------------------------
   CHROME: header, cursor, loader, page shutter
------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--pad); color: var(--ink); pointer-events: none;
}
.header a { pointer-events: auto; }
.logo { background: var(--bone); padding: 9px 16px 9px 14px; border-radius: 999px; display: flex; align-items: flex-end; gap: 4px; font-variation-settings: "wdth" 125, "wght" 900; text-transform: uppercase; font-size: 18px; line-height: 1; }
.logo i { display: block; width: 14px; background: currentColor; }
.logo i:nth-child(1) { height: 14px; border-radius: 50%; }
.logo i:nth-child(2) { height: 20px; border-radius: 7px 7px 0 0; }
.logo i:nth-child(3) { height: 11px; margin-right: 8px; }
.nav { display: flex; gap: 6px; }
.nav a {
  font-variation-settings: "wdth" 125, "wght" 800; text-transform: uppercase; font-size: 15px;
  padding: 9px 18px; background: var(--bone); border-radius: 999px; transition: background .3s, color .3s;
}
.nav a:hover, .nav a[aria-current] { background: var(--ink); color: var(--bone); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: var(--ink); box-shadow: 0 0 0 2px var(--bone); pointer-events: none; border-radius: 50%;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), border-radius .5s var(--ease);
}
.cursor.is-big { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.cursor.is-arch { width: 40px; height: 56px; margin: -28px 0 0 -20px; border-radius: 20px 20px 0 0; }
.cursor.is-block { width: 44px; height: 36px; margin: -18px 0 0 -22px; border-radius: 0; }
@media (hover: none) { .cursor { display: none; } }

.loader { position: fixed; inset: 0; z-index: 250; background: var(--bone); display: grid; place-items: center; }
.loader__stack { display: flex; flex-direction: column; align-items: center; }
.loader__stack div { width: 90px; }
.loader__stack .circle { background: var(--red); width: 60px; }
.loader__stack .arch { background: var(--blue); width: 80px; }
.loader__stack .block { background: var(--sun); width: 120px; aspect-ratio: 2 / 1; }

.shutter { position: fixed; inset: 0; z-index: 240; pointer-events: none; clip-path: circle(0 at 50% 50%); }

/* ------------------------------------------------------------------
   HOME: hero
------------------------------------------------------------------- */
.hero { position: relative; height: 100svh; overflow: hidden; background: var(--blue); color: var(--on-main, var(--bone)); }
.hero__name { display: block; position: absolute; left: var(--pad); right: var(--pad); top: 11vh; z-index: 3; margin: 0; }
.hero__floor { position: absolute; left: 0; right: 0; bottom: 9vh; height: 2px; background: var(--on-main, var(--bone)); transform-origin: left; }
.hero__shapes { position: absolute; inset: 0; z-index: 2; }
.hero__shapes > div { position: absolute; bottom: 9vh; transform-origin: 50% 100%; will-change: transform; cursor: pointer; }
.s-circle { left: 15%; width: min(32vh, 30vw); background: var(--sun); }
.s-arch { left: 43%; width: min(28vh, 24vw); background: var(--red); }
.s-block { left: 64%; width: min(40vh, 30vw); background: var(--block, var(--ink)); aspect-ratio: 5 / 3; }
.s-dot { left: 84%; width: min(10vh, 9vw); background: var(--pink); }
.hero__line { position: absolute; left: var(--pad); right: var(--pad); bottom: 3vh; z-index: 3; display: flex; justify-content: space-between; font-variation-settings: "wdth" 110, "wght" 600; font-size: 15px; }
.hero__reveal { position: absolute; inset: 0; z-index: 5; clip-path: circle(0% at 50% 60%); background: var(--sun); }
.hero__reveal canvas, .hero__reveal img { width: 100%; height: 100%; object-fit: cover; }
.hero__reveal .x { position: absolute; left: var(--pad); right: var(--pad); bottom: 4vh; display: block; }

/* ------------------------------------------------------------------
   HOME: words
------------------------------------------------------------------- */
.words { padding: 16vh var(--pad); background: var(--bone); overflow: hidden; }
.words .x { display: block; }
.words .x:nth-child(4n+2) { color: var(--red); }
.words .x:nth-child(4n+3) { color: var(--blue); text-align: right; }
.words p.after { max-width: 620px; margin: 9vh 0 0 auto; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.35; font-variation-settings: "wdth" 100, "wght" 450; }

/* ------------------------------------------------------------------
   HOME: exhibits (one per work, sticky, colour changes)
------------------------------------------------------------------- */
.exhibit { position: relative; height: 210vh; }
.exhibit__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.exhibit__title { position: absolute; top: 50%; left: 0; transform: translateY(-50%); z-index: 1; will-change: transform; }
.exhibit__frame { position: relative; z-index: 2; overflow: hidden; will-change: transform; height: 64svh; }
.exhibit__frame.circle { height: auto; width: min(64svh, 80vw); }
.exhibit__frame.arch { height: auto; width: min(46svh, 62vw); }
.exhibit__frame.block { height: auto; width: min(84svh, 86vw); aspect-ratio: 4 / 3; }
.exhibit__frame canvas, .exhibit__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); }
.exhibit__info { position: absolute; left: var(--pad); right: var(--pad); bottom: 4vh; z-index: 3; display: flex; justify-content: space-between; font-variation-settings: "wdth" 110, "wght" 600; }
.exhibit--blue { background: var(--blue); color: var(--on-main, var(--bone)); }
.exhibit--red { background: var(--red); color: var(--ink); }
.exhibit--sun { background: var(--sun); color: var(--ink); }
.exhibit--pink { background: var(--pink); color: var(--ink); }
.exhibit--ink { background: var(--ink); color: var(--bone); }
.exhibit--blue .exhibit__title { color: var(--sun); }
.exhibit--red .exhibit__title { color: var(--ink); }
.exhibit--sun .exhibit__title { color: var(--blue); }
.exhibit--pink .exhibit__title { color: var(--red); }
.exhibit--ink .exhibit__title { color: var(--red); }

.more { display: grid; place-items: center; padding: 18vh var(--pad); background: var(--bone); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase;
  font-variation-settings: "wdth" 125, "wght" 900; font-size: clamp(22px, 3vw, 42px); line-height: 1;
  padding: .7em 1.2em; border-radius: 999px; background: var(--ink); color: var(--bone);
  transition: font-variation-settings .6s var(--ease), background .3s, color .3s; will-change: transform;
}
.pill:hover { background: var(--red); color: var(--ink); font-variation-settings: "wdth" 62, "wght" 900; }

/* ------------------------------------------------------------------
   HELLO + FOOTER
------------------------------------------------------------------- */
.hello { display: block; background: var(--red); color: var(--ink); padding: 12vh var(--pad) 10vh; overflow: hidden; text-align: center; }
.hello .x { display: block; }
.hello .l { transition: color .3s; }
.hello:hover .l:hover { color: var(--bone); }
.footer { background: var(--ink); color: var(--bone); padding: 48px var(--pad) 22px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer a { display: block; width: fit-content; }
.footer a:hover { color: var(--sun); }
.footer .big { font-variation-settings: "wdth" 125, "wght" 800; font-size: clamp(22px, 2.6vw, 38px); line-height: 1.05; }
.footer small { grid-column: 1 / -1; display: flex; justify-content: space-between; opacity: .55; padding-top: 40px; font-size: 14px; gap: 16px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .footer { grid-template-columns: 1fr; }
  /* phone: the shapes pile up big in the middle of the screen */
  .s-circle { left: 4%; width: 52vw; z-index: 1; }
  .s-arch { left: 44%; width: 40vw; z-index: 2; }
  .s-block { left: 22%; width: 58vw; z-index: 3; }
  .s-dot { left: 74%; width: 18vw; z-index: 4; }
  .hero__name { top: 9vh; }
}

/* ------------------------------------------------------------------
   WORK: the wall
------------------------------------------------------------------- */
.page-work { background: var(--bone); overflow: hidden; height: 100svh; touch-action: none; }
.wall { position: fixed; inset: 0; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; }
.wall.is-drag { cursor: grabbing; }
.piece {
  position: absolute; left: 0; top: 0; overflow: hidden; will-change: transform;
  transition: filter .5s, opacity .5s;
}
.piece canvas, .piece img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wall.ready .piece canvas, .wall.ready .piece img { transition: transform 1s var(--ease); }
.wall.ready .piece:hover canvas, .wall.ready .piece:hover img { transform: scale(1.08); }
.wall.has-hover .piece:not(:hover) { opacity: .35; filter: grayscale(1); }
.caption {
  position: fixed; left: var(--pad); right: var(--pad); bottom: 3vh; z-index: 20; pointer-events: none;
  color: var(--ink); overflow: hidden;
}
.caption .x { display: block; font-size: clamp(56px, 11vw, 190px); }
.caption .x .l { transform: translateY(105%); }
.hint { position: fixed; left: 50%; top: 50%; z-index: 21; transform: translate(-50%, -50%); pointer-events: none; }
.hint div { width: 120px; height: 120px; border-radius: 50%; background: var(--ink); color: var(--bone); display: grid; place-items: center; text-transform: uppercase; font-variation-settings: "wdth" 125, "wght" 900; font-size: 18px; }

.viewer { position: fixed; inset: 0; z-index: 90; display: none; }
.viewer.is-open { display: block; }
.viewer__bg { position: absolute; inset: 0; }
.viewer__pic { position: absolute; overflow: hidden; z-index: 2; }
.viewer__pic canvas, .viewer__pic img { width: 100%; height: 100%; object-fit: cover; }
.viewer__title { position: absolute; left: var(--pad); right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 1; overflow: hidden; }
.viewer__title .x { display: block; }
.viewer__meta { position: absolute; left: var(--pad); right: var(--pad); bottom: 3vh; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-variation-settings: "wdth" 110, "wght" 650; flex-wrap: wrap; }
.viewer__btns { display: flex; gap: 8px; }
.viewer__btns button { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--bone); font-size: 22px; transition: transform .4s var(--ease), background .3s; }
.viewer__btns button:hover { transform: scale(1.12); background: var(--bone); color: var(--ink); }
.viewer__btns .close { border-radius: 0; }

/* ------------------------------------------------------------------
   TALK: the letter + cities
------------------------------------------------------------------- */
.letter { background: var(--sun); padding: 18vh var(--pad) 10vh; min-height: 100svh; }
.letter__head { margin: 0 0 6vh; }
.letter__head .x { display: block; }
.letter form { font-variation-settings: "wdth" 112, "wght" 760; font-size: clamp(30px, 4.4vw, 74px); line-height: 1.2; letter-spacing: -.01em; max-width: 1500px; }
.letter form p { margin: 0 0 .25em; }
.blank {
  display: inline-block; border: 0; border-bottom: .07em solid var(--ink); background: transparent; outline: none;
  padding: 0 .1em; margin: 0 .05em; min-width: 3ch; color: var(--blue); font-variation-settings: "wdth" 112, "wght" 760;
  border-radius: 0; -webkit-appearance: none; appearance: none; line-height: 1;
  transition: border-color .3s, background .3s;
}
.blank::placeholder { color: rgba(12, 12, 12, .28); }
.blank:focus { background: rgba(255, 255, 255, .35); border-color: var(--red); }
select.blank { cursor: pointer; padding-right: .4em; }
textarea.blank { display: block; width: 100%; resize: vertical; min-height: 2.6em; margin-top: .2em; font-size: .7em; }
.letter .hp { position: absolute; left: -9999px; }
.letter__foot { display: flex; align-items: center; gap: 30px; margin-top: 7vh; flex-wrap: wrap; }
.send {
  width: clamp(150px, 16vw, 220px); aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: var(--sun);
  text-transform: uppercase; font-variation-settings: "wdth" 125, "wght" 900; font-size: clamp(22px, 2.2vw, 32px);
  transition: background .3s, color .3s;
}
.send:hover { background: var(--red); color: var(--ink); }
.status { font-variation-settings: "wdth" 105, "wght" 600; font-size: 18px; max-width: 420px; }
.status a { text-decoration: underline; }
.rain { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.rain div { position: absolute; top: -20vh; }

.cities { background: var(--ink); color: var(--bone); padding: 14vh var(--pad); }
.city { display: block; border-top: 2px solid rgba(241, 237, 228, .25); padding: 2vh 0 3vh; }
.city .x { display: block; transition: color .3s; }
.city:hover .x { color: var(--sun); }
.halls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2vh; }
.halls span { padding: 8px 16px; border: 1.5px solid currentColor; border-radius: 999px; font-variation-settings: "wdth" 115, "wght" 700; text-transform: uppercase; font-size: 15px; }

/* ------------------------------------------------------------------
   REDUCED MOTION
------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
