/* ==========================================================================
   Saba Lekiashvili — What's Next?
   Palette and type are carried over from the original site:
   paper white, ink black, #767676 gray · Afacad (display) + Google Sans (text)
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --gray: #767676;
  --gray-2: #a3a3a3;
  --line: rgba(0, 0, 0, 0.1);
  --line-dark: rgba(255, 255, 255, 0.14);
  --dim-dark: #5f5f5f;

  --f-display: "Afacad", "Futura", "Avenir Next", system-ui, sans-serif;
  --f-text: "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(16px, 3.4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 120px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, blockquote { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.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;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px;
  background: var(--ink); color: var(--paper); transform: translateY(-200%);
}
.skip:focus { transform: none; }

.eyebrow {
  font-family: var(--f-text);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 34px var(--pad) 0 calc(var(--pad) * 0.6);
  color: var(--ink);
  pointer-events: none;
  transition: color 0.5s var(--ease), transform 0.7s var(--ease);
}
.site-header[data-theme="dark"] { color: var(--paper); }
.site-header.is-hidden { transform: translateY(-120%); }
.site-header > * { pointer-events: auto; }

.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-role {
  font-family: var(--f-display);
  font-size: clamp(13px, 1.25vw, 18px);
  letter-spacing: -0.01em;
  color: var(--gray);
  transition: color 0.5s var(--ease);
}
.site-header[data-theme="dark"] .brand-role { color: var(--gray-2); }
.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 36px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 2px; }
.nav a {
  position: relative;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(12px, 1.05vw, 15px);
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--gray);
  transition: color 0.3s var(--ease);
}
.site-header[data-theme="dark"] .nav a { color: var(--gray-2); }
.site-header .nav a:hover,
.site-header .nav a.is-current { color: var(--ink); }
.site-header[data-theme="dark"] .nav a:hover,
.site-header[data-theme="dark"] .nav a.is-current { color: var(--paper); }

/* --------------------------------------------------------------------------
   01 · Hero — What's [grid] Next?
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--paper);
  --cell: min(4.7vw, 7.6vh, 78px);
}

.hero-iris {
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

.hero-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 64px);
  padding: var(--header-h) var(--pad) 90px;
}

.hero-word {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: min(8.4vw, 15vh, 150px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  overflow: hidden;
  padding: 0.04em 0.06em 0.12em;
  will-change: transform;
}
.hero-word > span { display: inline-block; }
.hero-word--l { justify-self: end; }
.hero-word--r { justify-self: start; }

.grid-wrap {
  position: relative;
  perspective: 900px;
  perspective-origin: 50% 50%;
}
.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  grid-template-rows: repeat(7, var(--cell));
  transform-style: preserve-3d;
}
.cells {
  grid-area: 1 / 1 / -1 / -1;
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  grid-template-rows: repeat(7, var(--cell));
}
.cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, calc(var(--a, 0) * 0.055));
  transition: background-color 0.25s linear;
}
.cell:nth-child(7n + 1) { border-left: 1px solid var(--line); }
.cell:nth-child(-n + 7) { border-top: 1px solid var(--line); }

.tile {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: default; /* tiles only preview on hover */
}
.tile-pop { position: absolute; inset: 0; display: block; }
.tile-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), opacity 0.4s var(--ease), filter 0.4s var(--ease);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.tile.is-coin .tile-inner { background: var(--paper); }
.tile.is-coin img { object-fit: contain; padding: 6%; }

@media (hover: hover) {
  .grid.has-hover .tile:not(:hover) .tile-inner { opacity: 0.32; filter: grayscale(1); }
  .tile:hover { z-index: 6; }
  .tile:hover .tile-inner {
    transform: scale(1.9);
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.45);
  }
  .tile:hover img { transform: scale(1.06); }
}
.tile:focus-visible { z-index: 6; outline-offset: 4px; }

.hero-caption {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 6vh, 64px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--gray);
}
.hero-caption-text {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  white-space: nowrap;
  min-height: 1.1em;
}
.hero-caption-text small {
  display: block;
  font-family: var(--f-text);
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.hero-caption-line {
  position: relative;
  width: 1px;
  height: 46px;
  background: var(--line);
  overflow: hidden;
}
.hero-caption-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(-100%);
  animation: drip 2.2s var(--ease-io) infinite;
}
@keyframes drip {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Intro states (set before JS animates them in) */
.js .hero-word > span { transform: translateY(110%); }
.js .cell { opacity: 0; }
.js .tile-pop { opacity: 0; }
.js .hero-caption,
.js .site-header { opacity: 0; }

/* --------------------------------------------------------------------------
   02 · Work
   -------------------------------------------------------------------------- */
.work {
  position: relative;
  background: var(--ink);
  color: var(--paper);
}
.work::before,
.case::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
.work > * { position: relative; z-index: 1; }

.work-intro {
  padding: clamp(100px, 16vh, 180px) var(--pad) clamp(24px, 4vh, 48px);
  display: grid;
  gap: 22px;
}
.work-intro .eyebrow { color: var(--gray-2); }
.split-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.split-line > span { display: inline-block; }

/* Project list — date + title; a row opens in place */
.work { padding-bottom: clamp(100px, 16vh, 180px); }
.projects { margin: 0 var(--pad); }
.row-head {
  display: grid;
  grid-template-columns: clamp(90px, 12vw, 180px) 1fr;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: clamp(14px, 2vh, 20px) 0;
  text-align: left;
  color: var(--paper);
  transition: color 0.45s var(--ease);
}
.row-date {
  font-size: 13px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--gray-2);
}
.row-title {
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.3;
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) {
  .projects:hover .row-head { color: var(--dim-dark); }
  .projects:hover .row-head:hover,
  .row.is-open .row-head { color: var(--paper); }
  .row-head:hover .row-title { transform: translateX(8px); }
}

.row-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.8s var(--ease);
}
.row.is-open .row-panel { grid-template-rows: 1fr; }
.row-inner { overflow: hidden; min-height: 0; }
.row-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  padding: 8px 0 clamp(32px, 5vh, 56px) calc(clamp(90px, 12vw, 180px) + 16px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}
.row.is-open .row-body { opacity: 1; transform: none; transition-delay: 0.15s; }

.row-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}
.row-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s var(--ease); }
.row-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.row-media.is-loaded img { opacity: 0; }
.row-media.is-image { aspect-ratio: auto; background: transparent; }
.row-media.is-image img { height: auto; }

.row-info { display: grid; gap: 22px; align-content: start; }
.row-meta { display: grid; gap: 12px; }
.row-client { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-2); }
.row-text { display: grid; gap: 1em; font-size: 15px; line-height: 1.6; color: #cfcfcf; }
.row-text blockquote { white-space: pre-line; color: var(--paper); font-style: italic; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #d9d9d9;
}
.tag-dot { width: 8px; height: 8px; border-radius: 50%; }
.medal-silver { background: linear-gradient(135deg, #f4f4f4, #9a9a9a); }
.medal-bronze { background: linear-gradient(135deg, #d9a77a, #7a4b2a); }
.medal-gold { background: linear-gradient(135deg, #ffe39a, #b8862b); }
.medal-award { background: transparent; border: 1px solid currentColor; }

/* --------------------------------------------------------------------------
   03 · Awards
   -------------------------------------------------------------------------- */
.awards {
  position: relative;
  padding: clamp(110px, 18vh, 200px) var(--pad) clamp(80px, 14vh, 160px);
  background: var(--paper);
  overflow: hidden;
}
.awards-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 8vh, 90px); }

/* Medals: hang one on the portrait and its work opens */
.podium {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.portrait { position: relative; margin: 0; max-width: 520px; justify-self: end; width: 100%; }
.portrait > img { display: block; width: 100%; height: auto; transition: filter 0.5s var(--ease); }
.portrait::after { /* where a medal can land */
  content: "";
  position: absolute;
  left: 26%; right: 20%; top: 52%; bottom: 0;
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.portrait.is-target::after { opacity: 1; }
.worn { position: absolute; inset: 0 0 auto 0; aspect-ratio: 768 / 824; pointer-events: none; }
.worn svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.worn .medal-coin { position: absolute; left: 49.6%; top: 90.6%; width: 10.2%; }
.portrait-cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 1.5em;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray);
}
.portrait-cap button { color: var(--ink); border-bottom: 1px solid currentColor; }

.rack { display: grid; gap: clamp(28px, 5vh, 48px); }
.rack-hint {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.rack-hint span { display: block; margin-top: 12px; font-family: var(--f-text); font-size: 14px; letter-spacing: 0; color: var(--gray); }
.medals {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 32px);
  padding-top: 10px;
  border-top: 2px solid var(--ink); /* the rail they hang from */
}
.medal-slot { display: grid; justify-items: center; gap: 14px; text-align: center; }
.medal {
  --coin: clamp(62px, 6.4vw, 96px);
  display: grid;
  justify-items: center;
  touch-action: none;
  cursor: grab;
  transform-origin: 50% 0;
  transition: opacity 0.4s var(--ease);
}
@media (hover: hover) {
  .medal:hover { animation: sway 1.6s var(--ease-io) infinite alternate; }
}
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.medal-slot.is-worn .medal,
.medal.is-lifted { opacity: 0; pointer-events: none; }
.medal-body { display: grid; justify-items: center; width: var(--coin); }
.medal-ribbon { display: block; width: 70%; height: calc(var(--coin) * 2.05); overflow: visible; margin-bottom: -4px; }
.medal-coin { width: 100%; height: auto; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.22)); user-select: none; -webkit-user-drag: none; }
.medal-year { font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 40px); line-height: 0.9; letter-spacing: -0.02em; }
.medal-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); }

/* the medal while it is being carried */
.medal-ghost {
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  pointer-events: none;
  transform-origin: 50% 0;
  cursor: grabbing;
}

/* the card that opens when a medal is hung */
.pop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--pad); }
.pop[hidden] { display: none; }
.pop-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pop-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  width: min(1080px, 100%);
  max-height: calc(100svh - var(--pad) * 2);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5);
}
.pop-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s;
}
.pop-close:hover { background: var(--ink); color: var(--paper); }
.pop-media { position: relative; overflow: hidden; background: #111; min-height: 100%; }
.pop-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pop-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(28px, 3.4vw, 52px) clamp(24px, 3vw, 44px);
  min-height: 0;
  overflow-y: auto;
}
.pop-award {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 90px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}
.pop-coin { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2)); }
.pop-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.pop-meta { font-size: 13px; color: var(--gray); letter-spacing: 0.02em; }
.pop .tags { justify-content: flex-start; }
.pop .tag { color: var(--ink); border-color: var(--line); }
.pop-text { display: grid; gap: 0.9em; font-size: 15px; line-height: 1.6; color: #333; }
.pop-go {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transition: gap 0.4s var(--ease), background-color 0.3s;
}
.pop-go:hover { gap: 16px; background: #222; }

/* --------------------------------------------------------------------------
   04 · About — polyphony
   -------------------------------------------------------------------------- */
.about {
  padding: clamp(100px, 16vh, 180px) var(--pad) clamp(100px, 16vh, 180px);
  background: var(--paper);
}
.about > .eyebrow { margin-bottom: clamp(32px, 6vh, 64px); }

.wave-scroll {
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.wave-scroll::-webkit-scrollbar { display: none; }
.wave {
  --u: 0.0931cqw;
  container-type: inline-size;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  height: clamp(220px, 38vw, 470px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3%;
}
.voice {
  position: relative;
  margin: 0;
  flex: var(--w) 1 0;
  height: calc(var(--h) / 386 * 100%);
  overflow: hidden;
  clip-path: inset(var(--c, 0%) 0 var(--c, 0%) 0);
  transition: flex-grow 0.8s var(--ease);
  background: #eee;
}
.voice img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter 0.6s var(--ease);
}
@media (hover: hover) {
  .wave:hover .voice:not(:hover) img { filter: grayscale(1) contrast(0.9); }
  .voice:hover { flex-grow: calc(var(--w) * 1.1); }
  .voice:hover img { transform: scale(1.04); }
}

.about-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(60px, 10vh, 110px);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.about-col { display: grid; gap: 1.15em; align-content: start; font-size: clamp(15px, 1.08vw, 17px); line-height: 1.6; }
.about-col strong { font-weight: 700; }
.inline-link { color: var(--gray); border-bottom: 1px solid currentColor; transition: color 0.3s; }
.inline-link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   05 · Hobby 1 / ears — record shelf
   -------------------------------------------------------------------------- */
.ears {
  --sleeve: #efece4;
  --sleeve-ink: #1a1a1a;
  --spine: clamp(20px, 1.8vw, 28px);
  --gap: clamp(2px, 0.25vw, 4px);
  /* the open sleeve takes what the four other spines leave, up to 340px */
  --cover: min(340px, calc((100vw - var(--pad) * 2 - var(--spine) * 4 - var(--gap) * 4) / 1.4));
  --peek: calc(var(--cover) * 0.38);
  position: relative;
  overflow-x: clip; /* a sleeve mid-turn would otherwise widen the page */
  padding: clamp(40px, 8vh, 90px) var(--pad) clamp(100px, 16vh, 180px);
  background: var(--paper);
}
.ears-head { display: grid; gap: 14px; margin-bottom: clamp(48px, 9vh, 100px); }
.ears-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.ears-desc { color: var(--gray); font-size: clamp(15px, 1.08vw, 17px); }

/* the shelf: spines stand on a thin plank */
.shelf { display: flex; justify-content: center; }
.shelf-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: var(--gap);
}
.shelf-row::after {
  content: "";
  position: absolute;
  left: -12px; right: -12px; bottom: -10px;
  height: 10px;
  background: linear-gradient(#e6e3dc, #d7d3ca);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.25);
}

.rec {
  position: relative;
  width: var(--spine);
  height: var(--cover);
  transition: width 0.9s var(--ease);
}
.rec.is-open { width: calc(var(--cover) + var(--peek)); }
.rec-btn { position: absolute; inset: 0; display: block; perspective: 1400px; text-align: left; clip-path: inset(-40px 0 -60px 0); }

/* spine: the thin edge of a plain sleeve, the ID printed along it */
.rec-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--spine);
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.55) 28%, transparent 62%, rgba(0, 0, 0, 0.14)),
    var(--sleeve);
  color: var(--sleeve-ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
  transform-origin: left center;
  transition: transform 0.7s var(--ease), opacity 0.4s var(--ease), translate 0.5s var(--ease);
  z-index: 3;
}
.rec-id {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--f-text);
  font-weight: 500;
  font-size: clamp(10px, 0.8vw, 12px);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
@media (hover: hover) {
  .rec:not(.is-open) .rec-btn:hover .rec-spine { translate: 0 -10px; }
}

/* sleeve: turns in from the spine's edge */
.rec-sleeve {
  position: absolute;
  left: 0; top: 0;
  width: var(--cover);
  height: var(--cover);
  overflow: hidden;
  background: var(--sleeve);
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.45);
  transform-origin: left center;
  transform: rotateY(80deg);
  opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.35s var(--ease);
  z-index: 2;
}
.rec-sleeve img { width: 100%; height: 100%; object-fit: cover; }
.rec-sleeve::after { /* a little wear on the sleeve */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 40%), var(--grain);
  opacity: 0.5;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.rec-white {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-text);
  font-weight: 500;
  font-size: calc(var(--cover) * 0.06);
  letter-spacing: 0.02em;
  color: var(--sleeve-ink);
}
.rec-white::before { /* the hole you see through a plain sleeve */
  content: "";
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.rec.is-open .rec-spine { transform: scaleX(0); opacity: 0; }
.rec.is-open .rec-sleeve { transform: none; opacity: 1; transition-delay: 0.08s; }

/* the disc hides in the sleeve, slides out to the right and spins while playing */
.rec-disc {
  position: absolute;
  top: 3%;
  left: 3%;
  width: calc(var(--cover) * 0.94);
  aspect-ratio: 1;
  border-radius: 50%;
  transition: transform 1s var(--ease);
  z-index: 1;
}
.rec-vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(255, 255, 255, 0.06) 31.5% 32%, transparent 32.5%),
    repeating-radial-gradient(circle, #111 0 1px, #1c1c1c 1.5px 2.5px),
    #111;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
  animation: spin 1.8s linear infinite;
  animation-play-state: paused;
}
.rec-vinyl::before { /* light catching the grooves */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 10%, rgba(255, 255, 255, 0.12) 15%, transparent 22% 55%, rgba(255, 255, 255, 0.09) 62%, transparent 70%);
}
.rec-label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: var(--sleeve) center / cover;
  animation: spin 1.8s linear infinite;
  animation-play-state: paused;
}
.rec-label::after { /* spindle hole */
  content: "";
  position: absolute;
  inset: 46%;
  border-radius: 50%;
  background: var(--paper);
}
.rec:not(.is-open) .rec-disc { opacity: 0; transition: transform 1s var(--ease), opacity 0s 0.6s; }
.rec.is-open .rec-disc { transform: translateX(var(--peek)); transition-delay: 0.45s; }
.rec.is-playing .rec-vinyl,
.rec.is-playing .rec-label { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

/* now playing */
.ears-now {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  max-width: 900px;
  margin: clamp(48px, 8vh, 80px) auto 0;
  font-size: 14px;
}
.ears-num { white-space: nowrap; font-size: 12px; letter-spacing: 0.08em; color: var(--gray); font-variant-numeric: tabular-nums; }
.ears-track { font-weight: 500; font-size: 15px; line-height: 1; white-space: nowrap; }
.ears-bar { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.ears-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }
.ears-btn { font-size: 13px; border-bottom: 1px solid currentColor; padding-bottom: 1px; white-space: nowrap; }
.ears-btn:hover { color: var(--gray); }
.ears-player { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ears-player iframe { width: 300px; height: 166px; border: 0; }

/* --------------------------------------------------------------------------
   06 · Contact
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(80px, 14vh, 150px) 0 0;
  overflow: hidden;
}
.contact-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  padding: 0 var(--pad) clamp(80px, 14vh, 150px);
}
.contact-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 2.6vw, 40px);
  letter-spacing: -0.01em;
}
.contact-links { display: grid; gap: 14px; align-content: start; }
.contact-links a {
  position: relative;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1;
  color: var(--gray-2);
  transition: color 0.3s var(--ease);
}
.contact-links a:hover { color: var(--paper); }
.contact-links .contact-mail {
  color: var(--paper);
  font-size: clamp(30px, 5.2vw, 84px);
  letter-spacing: -0.03em;
  word-break: break-word;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.7s var(--ease);
}
.contact-links .contact-mail:hover { background-size: 100% 1px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px var(--pad) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-2);
}
.footer a:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   Project view
   -------------------------------------------------------------------------- */
.case {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  clip-path: inset(0 0 0 0);
}
.case[hidden] { display: none; }
.case-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.case-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px var(--pad);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.case-count { color: var(--gray-2); font-variant-numeric: tabular-nums; }
.case-nav { display: flex; gap: 6px; }
.case-btn {
  padding: 9px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.case-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.case-close { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.case-close:hover { background: transparent; color: var(--paper); border-color: var(--line-dark); }

.case-inner { padding: 0 var(--pad) 40px; }
.case-media {
  position: relative;
  width: min(100%, calc((100svh - 150px) * 16 / 9));
  margin: 4px auto 0;
  aspect-ratio: 16 / 9;
  background: #0b0b0b;
  overflow: hidden;
}
.case-media.is-image { aspect-ratio: auto; background: transparent; width: min(100%, 1400px); }
.case-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-media img { width: 100%; height: auto; }
.case-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 1.2s var(--ease) 0.6s;
}
.case-media.is-loaded .case-poster { opacity: 0; pointer-events: none; }

.case-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 90px);
  max-width: 1400px;
  margin: clamp(36px, 7vh, 72px) auto 0;
}
.case-head { display: grid; gap: 16px; align-content: start; }
.case-date { font-size: 12px; letter-spacing: 0.12em; color: var(--gray-2); }
.case-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.case-client { color: var(--gray-2); font-size: 15px; }
.case-head .tags { justify-content: flex-start; }
.case-text { display: grid; gap: 1.1em; align-content: start; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: #dedede; padding-top: 6px; }
.case-text blockquote {
  margin: 0.4em 0 0;
  padding-left: 20px;
  border-left: 1px solid var(--line-dark);
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  color: var(--paper);
  white-space: pre-line;
}
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}
.case-link:hover { background: var(--paper); color: var(--ink); }
.case-link.is-primary { background: var(--paper); color: var(--ink); }
.case-link.is-primary:hover { background: transparent; color: var(--paper); }

.case-frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1vw, 14px);
  max-width: 1400px;
  margin: clamp(48px, 9vh, 96px) auto 0;
}
.case-frames:empty { display: none; }
.case-frames figure { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; background: #111; }
.case-frames img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.case-frames figure:hover img { transform: scale(1.06); }

.case-next {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1400px;
  margin: clamp(70px, 12vh, 140px) auto 0;
  padding: clamp(28px, 5vh, 48px) 0 clamp(20px, 4vh, 40px);
  border-top: 1px solid var(--line-dark);
  text-align: left;
}
.case-next-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-2); }
.case-next-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.case-next-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 110px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  transition: transform 0.7s var(--ease);
}
.case-next:hover .case-next-title { transform: translateX(14px); }
.case-next-thumb { flex: 0 0 auto; width: clamp(110px, 18vw, 280px); aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.case-next-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.case-next:hover .case-next-thumb img { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   Cursor (fine pointers only)
   -------------------------------------------------------------------------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--paper);
    mix-blend-mode: difference;
    pointer-events: none;
    transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), opacity 0.3s;
  }
  .has-cursor .cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; mix-blend-mode: normal; background: var(--paper); }
  .has-cursor .cursor.is-hidden { opacity: 0; }
  .has-cursor .cursor.is-big.on-light { background: var(--ink); }
  .has-cursor .cursor.is-big.on-light .cursor-label { color: var(--paper); }
  .cursor-label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .cursor.is-big .cursor-label { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .pop-card { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .pop-media { aspect-ratio: 16 / 9; min-height: 0; }
  .podium { grid-template-columns: 1fr; }
  .portrait { justify-self: center; max-width: min(440px, 46vh); }
  .podium { gap: 28px; }
  .ears-now { grid-template-columns: auto 1fr auto auto; }
  .ears-bar { grid-column: 1 / -1; grid-row: 2; }
  .row-body { grid-template-columns: 1fr; padding-left: 0; }
  .contact-body { grid-template-columns: 1fr; }
}

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --header-h: 92px; }
  .site-header { padding-top: 22px; }
  .nav { gap: 5px; }
  .hero { --cell: min(11.2vw, 6.2vh, 64px); }
  .hero-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    align-content: center;
    gap: clamp(8px, 2.4vh, 22px);
    padding: calc(var(--header-h) + 8px) var(--pad) 110px;
  }
  .hero-word { font-size: min(19vw, 11vh); }
  .hero-word--l, .hero-word--r { justify-self: center; }
  .hero-caption { bottom: 22px; }
  .hero-caption-line { height: 34px; }


  .about-text { grid-template-columns: 1fr; gap: 1.15em; }
  .wave { width: 720px; max-width: none; height: 300px; }

  .case-body { grid-template-columns: 1fr; }
  .case-frames { grid-template-columns: 1fr 1fr; }
  .case-frames figure:first-child { grid-column: 1 / -1; }
  .case-next-row { flex-direction: column-reverse; align-items: flex-start; }
  .case-next-thumb { width: 100%; }
  .case-btn { padding: 8px 11px; }
  #casePrev { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .hero-word > span { transform: none; }
  .js .cell, .js .tile-pop, .js .hero-caption, .js .site-header { opacity: 1; }
}
