:root {
  --ink: #1D2E19;
  --cream: #F2EBCA;
  --dim: rgba(242,235,202,0.38);
  --shadow: 0 1px 3px rgba(0,0,0,0.55);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Fraunces', Georgia, serif;
  --pad-y: clamp(20px, 3vw, 40px);
  --pad-x: clamp(20px, 4vw, 56px);
  /* motion: one curve, three speeds, used everywhere */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 360ms;
  --t-mid: 600ms;
  --t-slow: 1000ms;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #1D2E19; --cream: #F2EBCA; }
}
:root[data-theme="dark"] { --ink: #1D2E19; --cream: #F2EBCA; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  /* no overflow lock: the layout is fixed so nothing scrolls, and leaving it open keeps pull-to-refresh working on phones */
  overscroll-behavior-y: auto;
}
::selection { background: var(--cream); color: var(--ink); }
a, button { color: inherit; text-decoration: none; font: inherit; letter-spacing: inherit; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--cream); outline-offset: 4px; }

.display {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  line-height: 0.86;
}

/* ---------- stage ---------- */
.stage { position: fixed; inset: 0; }

.bg {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none;
}
.bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: contrast(1.05) saturate(0.85) brightness(0.82);
  opacity: 0; transform: scale(1);
  z-index: 0;
  /* leaving: long symmetric fade; z-index steps down only once it's done so a preview dissolves instead of vanishing */
  transition: opacity 1100ms cubic-bezier(0.45, 0, 0.25, 1), transform 9s linear, z-index 0s linear 1100ms;
}
/* arriving: photo and roster peek start quickly; the neighbour preview drifts in slowly */
.bg img.show, .bg img.peek { transition-duration: var(--t-slow), 9s, 0s; transition-timing-function: var(--ease), linear, linear; }
.bg img.preview { transition-duration: 1800ms, 9s, 0s; }
.bg img.show { opacity: 1; transform: scale(1.06); }   /* slow push-in for the full 9s after landing on an artist */
/* roster hover: the artist's photo surfaces behind the names and drifts slowly */
.bg img.peek { opacity: 0.32; transform: scale(1.07); }
/* artist view: hovering a neighbour's name previews their photo over the current one */
.bg img.preview { opacity: 0.55; z-index: 1; transform: scale(1.04); transition-delay: 0s, 0s, 0s; }

/* artwork instead of a photo: contained in the upper right, no darkening */
.bg img.art {
  object-fit: contain; object-position: 100% 40%;
  padding: 12vh 6vw 26vh 34vw; box-sizing: border-box;
  filter: none;
}
body.art .bg::after { display: none; }

/* ---------- logo hover: a wall of "ur good" behind the roster ---------- */
.wall {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-left: var(--pad-x);
}
.wall span {
  display: block; white-space: nowrap;
  font-size: clamp(40px, 7vw, 120px);
  line-height: 0.92; letter-spacing: -0.02em;
  color: var(--cream); opacity: 0;
  transform: translateX(0);
  /* out: slow dissolve, rows trailing off from the top */
  transition: opacity 1400ms var(--ease), transform 14s linear;
  transition-delay: calc(var(--i) * 40ms), 0ms;
}
/* in: quicker wave down the rows */
body.brand:not(.viewing) .wall span { transition-duration: 800ms, 14s; transition-delay: calc(var(--i) * 65ms), 0ms; }
.wall span:nth-child(even) { margin-left: -0.9em; }
body.brand:not(.viewing) .wall span { opacity: 0.11; transform: translateX(-3%); }
body.brand:not(.viewing) .wall span:nth-child(even) { transform: translateX(3%); }
body.brand:not(.viewing) .roster .names a { color: var(--dim); }
/* returning home via the logo: same wall, quicker in and out */
body.quick .wall span, body.quick.brand:not(.viewing) .wall span { transition-duration: 350ms, 14s; transition-delay: calc(var(--i) * 10ms), 0ms; transition-timing-function: ease-in-out, linear; }
body.quick .roster .names a, body.quick.brand:not(.viewing) .roster .names a { transition-duration: 350ms, 350ms; }

/* ---------- chrome (shared header) ---------- */
header {
  position: absolute; left: 0; right: 0; top: 0;
  padding: var(--pad-y) var(--pad-x) 0;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 3;
}
.logo {
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  display: flex; align-items: center; min-height: 44px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
body.viewing header { text-shadow: var(--shadow); }

/* ---------- roster view ---------- */
.roster {
  position: absolute; inset: 0;
  padding: calc(var(--pad-y) + 60px) var(--pad-x) var(--pad-y);
  display: flex; flex-direction: column; justify-content: center;
  z-index: 2;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.roster .names { display: flex; flex-direction: column; gap: 0.06em; }
.roster .names a {
  display: block; width: max-content; max-width: 100%;
  margin-left: -0.04em;
  /* sized by width, but capped by height so four names + the links always fit a short window */
  font-size: clamp(40px, min(10.5vw, calc((100vh - 260px) / 3.6)), 176px);
  letter-spacing: -0.035em;
  color: var(--cream);
  transition: color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
/* names ease back to full slower than they dim */
.roster .names a { transition-duration: var(--t-slow), var(--t-mid); }
body.brand:not(.viewing) .roster .names a { transition-duration: var(--t-mid), var(--t-mid); }
@media (hover: hover) {
  .roster .names:has(a:hover) a:not(:hover) { color: var(--dim); }
  .roster .names a:hover { transform: translateX(0.08em); }
  .roster .names:has(a:hover) a { transition-duration: var(--t-mid), var(--t-mid); }
}

/* company links under the roster */
.roster .meta {
  display: flex; flex-direction: column; gap: 0.15em;
  margin-top: clamp(20px, min(4vw, 5vh), 56px);
  font-size: clamp(19px, 2vw, 28px);
}
.roster .meta a {
  width: max-content; letter-spacing: -0.02em; line-height: 1;
  opacity: 0.55;
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
@media (hover: hover) {
  .roster .meta a:hover { opacity: 1; transform: translateX(0.12em); }
  .roster .meta:has(a:hover) a:not(:hover) { opacity: 0.35; }
}

/* ---------- artist view ---------- */
.artist {
  position: absolute; inset: 0;
  padding: var(--pad-y) var(--pad-x);
  display: flex; flex-direction: column; justify-content: flex-end;
  z-index: 2;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--t-slow) var(--ease) 120ms, transform var(--t-slow) var(--ease) 120ms;
}
body.viewing .artist { opacity: 1; transform: none; pointer-events: auto; }

.artist .bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.artist .who { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.artist .name {
  font-size: clamp(64px, 11.5vw, 168px);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  margin-left: -0.03em;
}
.artist .links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.artist .links a.icon {
  display: block; width: 22px; height: 22px; color: var(--cream);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
  transition: opacity var(--t-slow) var(--ease), transform var(--t-fast) var(--ease);
}
.artist .links a.icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.artist .links a.icon.site { margin-left: -2px; }   /* the globe sits 2.5 units inside its box; pull it in so the visual gap matches the others */
.artist .links a.icon.site svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (hover: hover) {
  .artist .links a.icon:hover { transform: translateY(-2px); }
  .artist .links:has(a:hover) a:not(:hover) { opacity: 0.5; }
}
.artist .city {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: clamp(16px, 1.5vw, 20px); letter-spacing: 0; line-height: 1;
  margin-bottom: -6px; margin-left: 0.04em;
  text-shadow: var(--shadow);
}
.artist .city { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; white-space: nowrap; }
.artist .city .note { margin-left: auto; }              /* credit ends under the last letter of the name; width set in script */

.artist .ctl {
  --nm: clamp(19px, 2vw, 28px);
  display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end;
  gap: 8px clamp(10px, 1.2vw, 16px); flex-shrink: 0;
}
.artist .ctl button {
  background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: calc(var(--nm) * 0.35);
  color: var(--cream); text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  opacity: 0.55;
  transition: transform var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
}
.artist .ctl .nm { font-size: var(--nm); letter-spacing: -0.02em; line-height: 1; }
.artist .ctl .dir {
  width: calc(var(--nm) * 0.8); height: calc(var(--nm) * 0.48); flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}
@media (hover: hover) {
  .artist .ctl button:hover { opacity: 1; }
  .artist .ctl:has(button:hover) button:not(:hover) { opacity: 0.35; }
  #prev:hover { transform: translateX(-8px); }
  #next:hover { transform: translateX(8px); }
}
/* no hover (touch): neighbour names sit at a readable weight instead of dim */
@media (hover: none) { .artist .ctl button { opacity: 0.8; } }


/* ---------- reveal: hidden until fonts are ready, then a plain fade (nothing paused, nothing to get stuck) ---------- */
header { opacity: 0; transform: translateY(6px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), text-shadow var(--t-mid) var(--ease); }
body.ready header { opacity: 1; transform: none; }
.roster { opacity: 0; transform: translateY(6px); transition-delay: 120ms; }
body.ready .roster { opacity: 1; transform: none; }
body.viewing .roster { opacity: 0; transform: translateY(8px); pointer-events: none; transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) {
  header, .roster { transition: none; }
  .roster, .artist, .bg img, .roster a, header, .artist .ctl button, .artist .links a.icon { transition: none; }
  .bg img.peek, .bg img.show, .bg img.preview { transform: none; }
  .wall span { transition: none; transform: none !important; }
}

@media (max-width: 860px) {
  .roster .names a { font-size: clamp(34px, min(12.5vw, calc((100vh - 240px) / 3.6)), 84px); }
  .artist .bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .artist .name { font-size: clamp(56px, 16vw, 96px); }
  .artist .ctl { align-self: flex-end; }
}

/* ---------- phones only: touch pointer + phone-sized screen (tablets and desktops untouched) ---------- */
@media (hover: none) and (pointer: coarse) and (max-width: 600px), (hover: none) and (pointer: coarse) and (max-height: 500px) {
  /* header sits lower, clear of the status bar and any notch */
  header { padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
  /* roster: more air between names; company links read as live buttons */
  .roster .names { gap: 14px; }
  .roster .meta { gap: 0.5em; }
  .roster .meta a { opacity: 1; padding: 6px 0; }
  /* artist links: bigger marks, wider spacing, 44px hit areas */
  .artist .links { gap: 24px; }
  .artist .links a.icon { width: 28px; height: 28px; padding: 8px; margin: -8px; box-sizing: content-box; }
  .artist .links a.icon.site { margin-left: -2px; }
  /* prev / next: full strength, pushed to opposite edges, arrows on the outside, tall tap zones */
  .artist .ctl { align-self: stretch; justify-content: space-between; flex-wrap: nowrap; gap: 16px; }
  .artist .ctl button { opacity: 1; min-height: 44px; }
  #prev .dir { order: -1; }
  #next .dir { order: 2; }
  #next { flex-direction: row; }
  .bg img { filter: none; }
  .bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.2); pointer-events: none; }
  .bg img.art { padding: 14vh 8vw 38vh 8vw; object-position: 50% 40%; }
}

/* ---------- screenshot mode (?shot): social assets only, never seen by visitors ---------- */
/* same composition as the site: name and city stay put; only the controls and icons go, and the logo drops off the top edge */
body.shot { --edge: 64px; }                                            /* one margin for everything on the squares */
body.shot header { padding: var(--edge) var(--edge) 0; justify-content: flex-end; }
body.shot .logo { font-size: 48px; min-height: 0; line-height: 0.86; margin: -9.5px 0.5px 0 0; }   /* ink-measured, then raised 7px so the visual top edge (between ascender tip and x-height) sits on the margin */
body.shot .artist { padding: var(--edge); }
body.shot .artist .who { margin: 0 0 3.5px -0.5px; }
body.shot .artist .name { margin-left: 0; }
body.shot .artist .ctl, body.shot .artist .links { display: none; }
body.shot .artist .city { font-size: 36px; order: 2; margin: 0; }   /* readable at feed size, tight under the name */
