/* ---------- Design tokens (from the Figma variables) ---------- */
:root {
  --deep-mocha-50: #ebeaea;
  --deep-mocha-100: #8a8582;
  --deep-mocha-200: #58504d;
  --deep-mocha-300: #362c28;
  --deep-mocha-400: #261f1c;
  --deep-mocha-500: #211b18;
  --lemon-lime-75: #e6f69e;
  --lemon-lime-300: #c2e812;
  --mv-red-50: #f8e7f1;
  --mv-red-300: #b91372;
  --mv-red-400: #820d50;
  --snow-50: #fffefe;
  --snow-100: #fdfafb;
  --snow-400: #b0adae;
  --tiger-flame-300: #fe5d26;
  --tiger-flame-400: #b2411b;
  --accent-blue: #0088ff;

  /* 1u = 1px on a 1440px design, scaling down on narrower desktops */
  --u: min(1px, calc(100vw / 1440));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--snow-50);
  color: var(--deep-mocha-500);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* =========================================================
   HERO  (Desktop - 1)
   ========================================================= */
.hero { overflow: hidden; }
.hero__stage {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  height: calc(1024 * var(--u));
}
.hero__stage > * { position: absolute; }

/* wordmark */
.wordmark {
  left: calc(80 * var(--u));
  top: calc(48 * var(--u));
  width: calc(1280 * var(--u));
  aspect-ratio: 1280 / 172;
}
.wordmark .l {
  position: absolute;
  left: calc(var(--x) / 1280 * 100%);
  top: calc(var(--y) / 172 * 100%);
  width: calc(var(--w) / 1280 * 100%);
  height: calc(var(--h) / 172 * 100%);
}

.tagline {
  left: calc(80 * var(--u));
  top: calc(276 * var(--u));
  width: calc(265 * var(--u));
  font-size: calc(16 * var(--u));
  line-height: calc(24 * var(--u));
  font-weight: 500;
  color: var(--deep-mocha-500);
}
.headphones {
  left: calc(365 * var(--u));
  top: calc(165 * var(--u));
  width: calc(205 * var(--u));
  height: calc(223 * var(--u));
  object-fit: cover;
  pointer-events: none;
}

/* work experience */
.exp {
  left: calc(80 * var(--u));
  top: calc(422 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8 * var(--u));
}
.exp__tab {
  background: #444;
  border: 1px solid var(--deep-mocha-100);
  border-radius: calc(6 * var(--u));
  padding: calc(4 * var(--u)) calc(8 * var(--u));
  color: var(--deep-mocha-50);
  font-size: calc(16 * var(--u));
  line-height: calc(24 * var(--u));
  font-weight: 500;
  white-space: nowrap;
}
.exp__panel {
  background: #444;
  width: calc(541 * var(--u));
  min-height: calc(265 * var(--u));
  padding: calc(25 * var(--u)) calc(30 * var(--u));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(14.5 * var(--u));
  color: var(--lemon-lime-75);
}
.exp__row {
  display: grid;
  grid-template-columns: calc(157 * var(--u)) calc(98 * var(--u)) 1fr;
  column-gap: calc(12 * var(--u));
  align-items: center;
}
.exp__co strong,
.exp__role {
  display: block;
  font-size: calc(16 * var(--u));
  line-height: calc(24 * var(--u));
  font-weight: 500;
}
.exp__co span {
  display: block;
  font-size: calc(14 * var(--u));
  line-height: calc(22 * var(--u));
  font-weight: 400;
}
.exp__role { white-space: nowrap; }
.exp__line {
  position: relative;
  height: 1px;
  background: var(--deep-mocha-50);
}
.exp__line::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3.5px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--deep-mocha-50);
  border-right: 1px solid var(--deep-mocha-50);
  transform: rotate(45deg);
  transform-origin: center;
}

/* sticker wall */
.wall {
  left: calc(730 * var(--u));
  top: calc(255 * var(--u));
  width: calc(700 * var(--u));
}
.wall__box { position: relative; width: 100%; aspect-ratio: 700 / 450; }
.po {
  position: absolute;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.po:hover {
  z-index: 3;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.p11 { left: 66.571%; top: 32.000%; width: 12.730%; height: 29.703%; }
.p10 { left: 73.857%; top: 56.444%; width: 10.723%; height: 20.850%; }
.p09 { left: 79.286%; top: 5.556%;  width: 12.615%; height: 24.530%; }
.p08 { left: 37.143%; top: 53.778%; width: 14.101%; height: 32.902%; }
.p07 { left: 79.286%; top: 29.556%; width: 13.528%; height: 29.752%; }
.p06 { left: 57.571%; top: 48.222%; width: 12.738%; height: 24.772%; }
.p05 { left: 2.286%;  top: 37.111%; width: 13.525%; height: 29.760%; }
.p04 { left: 14.143%; top: 12.667%; width: 49.845%; height: 38.768%; }
.p03 { left: 47.896%; top: 41.840%; width: 14.097%; height: 30.987%; }
.p02 { left: 64.286%; top: 1.111%;  width: 12.578%; height: 28.882%; }
.p01 { left: 7.143%;  top: 4.000%;  width: 14.083%; height: 27.383%; }

.cursor {
  position: absolute;
  left: 12.857%;
  top: 71.333%;
  z-index: 4;
  width: calc(27 * var(--u));
  height: calc(27 * var(--u));
  background: var(--mv-red-300);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-39.28deg);
}
.pill {
  position: absolute;
  left: 15.857%;
  top: 76.889%;
  z-index: 4;
  padding: calc(6 * var(--u)) calc(24 * var(--u));
  background: var(--mv-red-300);
  border: 1px solid var(--mv-red-400);
  border-radius: 33px;
  color: var(--mv-red-50);
  font-size: calc(16 * var(--u));
  line-height: calc(24 * var(--u));
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.wall__label {
  position: absolute;
  left: calc(2 * var(--u));
  top: calc(411 * var(--u));
  font-size: calc(14 * var(--u));
  line-height: calc(20 * var(--u));
  font-weight: 500;
  color: var(--deep-mocha-200);
  white-space: nowrap;
}

/* songs card */
.songs {
  left: calc(1157 * var(--u));
  top: calc(576 * var(--u));
  width: calc(256 * var(--u));
  padding: calc(16 * var(--u)) calc(12 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8 * var(--u));
  background: var(--snow-100);
  border: 1px solid #f4f4f4;
  border-radius: calc(16 * var(--u));
  z-index: 2;
}
.songs__disc { width: calc(192 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); }
.songs__vinyl { width: 100%; height: auto; border-radius: 50%; }
.songs:hover .songs__vinyl { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pulse { display: flex; gap: 1px; align-items: center; height: calc(14 * var(--u)); }
.pulse i { display: block; width: calc(2 * var(--u)); background: var(--snow-400); height: calc(10 * var(--u)); animation: pulse 1.2s ease-in-out infinite; }
.pulse i:nth-child(2) { height: calc(7 * var(--u)); animation-delay: -0.3s; }
.pulse i:nth-child(3) { height: calc(14 * var(--u)); animation-delay: -0.6s; }
.pulse i:nth-child(4) { animation-delay: -0.9s; }
@keyframes pulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.45); } }

.songs__meta { width: 100%; display: flex; flex-direction: column; align-items: center; gap: calc(7 * var(--u)); text-align: center; }
.songs__cover {
  width: calc(51 * var(--u));
  height: calc(52 * var(--u));
  object-fit: cover;
  border: 1px solid var(--lemon-lime-300);
  border-radius: calc(4 * var(--u));
}
.songs__title { font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); font-weight: 500; color: var(--deep-mocha-400); white-space: nowrap; }
.songs__artist { margin-top: calc(-5 * var(--u)); font-size: calc(12 * var(--u)); line-height: calc(18 * var(--u)); color: var(--deep-mocha-200); }

.scroll-hint {
  left: 50%;
  top: calc(809 * var(--u));
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  animation: nudge 2s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 4px); } }

/* =========================================================
   WORKS  (Desktop - 2)
   ========================================================= */
.works { min-height: 1024px; padding-bottom: 180px; }

.logos {
  position: relative;
  margin-top: 35px;
  height: 70px;
  overflow: hidden;
}
.logos::before, .logos::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.logos::before { left: 0; width: min(359px, 28vw); background: linear-gradient(to right, var(--snow-50) 40.559%, rgba(255, 254, 254, 0)); }
.logos::after  { right: 0; width: min(293px, 24vw); background: linear-gradient(to left, var(--snow-50) 64.53%, rgba(255, 254, 254, 0)); }
.logos__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.logo {
  position: relative;
  flex: none;
  width: 183px;
  height: 70px;
  margin-right: 40px;
  overflow: hidden;
}
.logo img {
  position: absolute;
  left: calc(var(--l) * 1px);
  top: calc(var(--t) * 1px);
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  object-fit: contain;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.works__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5.556vw, 80px);
}
.explore { margin-top: clamp(56px, 8.333vw, 120px); }
.explore h2 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--deep-mocha-500); }
.explore p { margin-top: 24px; color: var(--deep-mocha-200); }
.explore p img { display: inline-block; vertical-align: middle; margin: -4px 0 -4px 8px; width: 28px; height: 28px; }

.works__title { margin-top: 72px; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--deep-mocha-500); }

.cards { margin-top: 24px; max-width: 1063px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card__img { display: block; width: 100%; height: auto; aspect-ratio: 519.5 / 356; border-radius: 10px; background: #fcf7f8; } /* Snow S300 */
.card:nth-child(2) .card__img { background: #fdf8f9; } /* Snow S200 */
.card__text { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card__text h3 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--deep-mocha-400); }
.card__text p { max-width: 309px; color: var(--deep-mocha-200); }
.card--oneline .card__text p { max-width: none; white-space: nowrap; }

/* Tags (outlined pills, Figma "Frame 30") */
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  padding: 6px 12px;
  border: 1px solid var(--deep-mocha-200);
  border-radius: 16px;
  font-size: 14px;
  line-height: 22px;
  color: var(--deep-mocha-200);
  white-space: nowrap;
}

.works { position: relative; min-height: 989px; padding-bottom: 83px; } /* logos margin (35px) collapses out of the box, so 989 + 35 = Figma's 1024 */
.giraffe { position: absolute; left: calc(83.333% - 20px); top: 558px; width: 208px; height: 208px; pointer-events: none; user-select: none; }
@media (max-width: 1379px) { .giraffe { display: none; } }

/* =========================================================
   OTHER WORKS  (Desktop - 3)
   ========================================================= */
.other { padding: 40px 0 124px; }
.other__inner { max-width: 1440px; margin: 0 auto; padding: 0 clamp(24px, 5.556vw, 80px); }
.other__head { display: flex; align-items: center; gap: 16px; }
.other__head h2 { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--deep-mocha-500); white-space: nowrap; }
.other__shapes { display: flex; align-items: center; gap: 8px; }
.other__shapes img { display: block; height: 32px; width: auto; }
.other__grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.work__media {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 8px;
  background: #2a2a2a;
}
.work__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work__media--pending { background: linear-gradient(135deg, #2a2a2a, #1b1b1b); }
.work__media--inset { background: #fbf6f7; }
.work__media--inset > img {
  position: absolute;
  left: 3.893%; top: 27px;
  width: 92.214%; height: auto;
  aspect-ratio: 379 / 297;
  border-radius: 8px;
  background: #f5f0f1;
  object-fit: contain;
}
.work__text { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-width: 309px; }
.work__text h3 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--deep-mocha-400); white-space: nowrap; }
.work__text p { color: var(--deep-mocha-200); }
.work--fifa .work__media { height: 598px; background: #242424; }
.work--fifa .work__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.work--portal { grid-column: span 2; }
.work--fifa .work__text, .work--portal .work__text { gap: 0; }

/* Slider (Into the Portal) */
.slider { position: relative; height: 595px; overflow: hidden; border-radius: 8px; background: #474747; touch-action: pan-y; }
.slider__track { position: relative; height: 100%; }
/* Both renders share one framing, so a soft cross-fade reads as the scene re-lighting itself in place */
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.45s ease-in-out; }
.slide.is-active { opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
@media (max-width: 1199px) {
  .works { min-height: 0; }
  .other__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work--portal { grid-column: 1 / -1; }
  .slider { height: auto; aspect-ratio: 845 / 595; }
}
@media (max-width: 640px) {
  .other { padding-bottom: 140px; }
  .other__grid { grid-template-columns: 1fr; }
  .work__media { height: auto; aspect-ratio: 411 / 350; }
  .work--fifa .work__media { height: auto; aspect-ratio: 411 / 598; }
  .work--fifa { max-width: 411px; }
  .work__media--inset > img { top: 7.7%; }
}

/* =========================================================
   FLOATING MENU
   ========================================================= */
.menu {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 3.9vh, 40px);
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px;
  background: var(--deep-mocha-300);
  border: 1px solid var(--deep-mocha-200);
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
  max-width: calc(100vw - 24px);
}
.menu__nav { display: flex; gap: 16px; align-items: center; }
.ib { display: flex; padding: 4px; border-radius: 4px; transition: background 0.2s ease; }
.ib img { width: 32px; height: 32px; filter: invert(1); }
.ib:hover { background: rgba(255, 255, 255, 0.1); }
.ib.is-active { background: var(--accent-blue); }
.menu__divider { align-self: stretch; width: 1px; margin: -8px 8px -8px 7px; background: var(--deep-mocha-200); }
.menu__right { display: flex; align-items: center; gap: 8px; }
.socials { display: flex; align-items: center; gap: 8px; padding: 2px 4px; background: var(--deep-mocha-200); border-radius: 4px; }
.socials a { display: flex; padding: 4px; border-radius: 4px; transition: background 0.2s ease; }
.socials a:hover { background: rgba(255, 255, 255, 0.12); }
.socials img { width: 24px; height: 24px; filter: invert(1); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--tiger-flame-300);
  border: 1px solid var(--tiger-flame-400);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--snow-50);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: filter 0.2s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn img { filter: invert(1); }

:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* =========================================================
   BELOW 1200px — flow layout instead of the scaled stage
   ========================================================= */
@media (max-width: 1199px) {
  :root { --u: 1px; }

  .hero__stage {
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "word word" "tag head" "exp exp" "wall wall" "songs songs";
    column-gap: 24px;
    row-gap: 32px;
    padding: 32px 24px 24px;
    align-items: start;
  }
  .hero__stage > * { position: static; left: auto; top: auto; }
  .wordmark { grid-area: word; width: 100%; position: relative; }
  .tagline { grid-area: tag; width: auto; max-width: 320px; align-self: center; }
  .headphones { grid-area: head; width: clamp(110px, 24vw, 205px); height: auto; aspect-ratio: 205 / 223; justify-self: end; }
  .exp { grid-area: exp; width: 100%; max-width: 541px; }
  .exp__panel { width: 100%; }
  .wall { grid-area: wall; width: 100%; max-width: 700px; justify-self: center; position: relative; }
  .wall__label { position: static; margin-top: 12px; }
  .reset-btn { position: static; margin-top: 12px; }
  .songs { grid-area: songs; justify-self: center; position: relative; }
  .scroll-hint { display: none; }
}

@media (max-width: 640px) {
  .exp__row { grid-template-columns: 1fr; row-gap: 4px; }
  .exp__line { display: none; }
  .exp__role { color: var(--deep-mocha-50); }
  .cards { grid-template-columns: 1fr; }
  .pill { font-size: 12px; line-height: 18px; padding: 3px 14px; }
  .cursor { width: 18px; height: 18px; }
  .works__title { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logos__track, .scroll-hint, .pulse i { animation: none; }
  .scroll-hint { transform: translateX(-50%); }
  .songs:hover .songs__vinyl { animation: none; }
  .po { transition: none; }
}

/* =========================================================
   MOTION  (playful)
   ========================================================= */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); }

/* name entrance: letters bounce up one by one */
.wordmark .l {
  animation: rise 1s var(--spring) backwards;
  animation-delay: calc(120ms + var(--i, 0) * 75ms);
  transition: transform 0.35s var(--spring);
  transform-origin: 50% 100%;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(75%) rotate(9deg) scale(0.88); }
}
.wordmark .l:hover { transform: translateY(-5%) rotate(-2.5deg) scale(1.03); }
.wordmark .l:nth-child(1)  { --i: 0; }
.wordmark .l:nth-child(2)  { --i: 1; }
.wordmark .l:nth-child(3)  { --i: 2; }
.wordmark .l:nth-child(4)  { --i: 3; }
.wordmark .l:nth-child(5)  { --i: 4; }
.wordmark .l:nth-child(6)  { --i: 6; }  /* extra beat between the two words */
.wordmark .l:nth-child(7)  { --i: 7; }
.wordmark .l:nth-child(8)  { --i: 8; }
.wordmark .l:nth-child(9)  { --i: 9; }
.wordmark .l:nth-child(10) { --i: 10; }
.wordmark .l:nth-child(11) { --i: 11; }

/* draggable posters */
.po {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform 0.35s var(--spring), box-shadow 0.25s ease;
}
.po:nth-child(odd)  { --r: -2.5deg; }
.po:nth-child(even) { --r: 2.5deg; }
.po:hover {
  transform: translate(var(--dx, 0px), var(--dy, 0px)) translateY(-6px) scale(1.06) rotate(var(--r));
}
.po.is-dragging {
  cursor: grabbing;
  transition: box-shadow 0.2s ease;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(1.1) rotate(calc(var(--r) * 1.6));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
}
@media (pointer: coarse) { .po { touch-action: pan-y; } }

/* Azrem cursor + pill: float gently in place */
.cursor, .pill { animation: hover-float 4.5s ease-in-out infinite; }
.pill { animation-delay: -0.35s; }
@keyframes hover-float {
  0%, 100% { translate: 0 0; }
  25%      { translate: 6px -7px; }
  50%      { translate: 11px 2px; }
  75%      { translate: 3px 8px; }
}

/* headphones: drop in, then float; mouse parallax goes through transform */
.headphones {
  transform: translate(var(--px, 0px), var(--py, 0px)) rotate(var(--pr, 0deg));
  animation: drop 1s var(--spring) 350ms backwards, float 5s ease-in-out 1.4s infinite;
}
@keyframes drop { from { opacity: 0; scale: 0.55; rotate: -16deg; } }
@keyframes float {
  0%, 100% { translate: 0 0; rotate: -1.5deg; }
  50%      { translate: 0 -12px; rotate: 1.5deg; }
}

/* vinyl: click to spin */
.songs__btn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.songs__btn:active .songs__vinyl { scale: 0.96; }
.songs__vinyl { animation: spin 3.5s linear infinite; animation-play-state: paused; transition: scale 0.25s var(--spring); }
.songs:hover .songs__vinyl, .songs.is-spinning .songs__vinyl { animation: spin 3.5s linear infinite; animation-play-state: running; }
.songs:not(:hover):not(.is-spinning) .songs__vinyl { animation-play-state: paused; }
.songs.is-spinning .songs__vinyl { animation-duration: 2.2s; }
.pulse i { animation-play-state: paused; }
.songs:hover .pulse i, .songs.is-spinning .pulse i { animation-play-state: running; }

/* button press feel */
.ib, .btn, .socials a, .chip { transition: transform 0.3s var(--spring), background 0.2s ease, filter 0.2s ease, color 0.2s ease; }
.ib:hover, .socials a:hover { transform: translateY(-3px) rotate(-3deg); }
.btn:hover { transform: translateY(-2px); }
.chip:hover { transform: translateY(-2px); }
.ib:active, .socials a:active, .btn:active, .chip:active { transform: scale(0.9); }
.btn img { transition: transform 0.3s var(--spring); }
.btn:hover img { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .wordmark .l, .headphones, .cursor, .pill { animation: none; }
  .wordmark .l:hover, .po:hover, .ib:hover, .socials a:hover, .btn:hover, .chip:hover { transform: none; }
  .po, .po.is-dragging, .ib, .btn, .socials a, .chip, .btn img, .songs__vinyl { transition: none; }
  .songs__vinyl, .songs:hover .songs__vinyl, .songs.is-spinning .songs__vinyl { animation: none; }
  .headphones { transform: none; }
}

/* song hint (shown only if the browser blocks sound until a click) */
.songs__hint {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  color: var(--deep-mocha-200);
}
.songs__hint[hidden] { display: none; }

/* Social icon hover (Figma "Social" component, Hover variant):
   background Deep Mocha D400 #261f1c, icon colour #71bdff */
.socials a:hover,
.socials a:focus-visible { background: var(--deep-mocha-400); }
.socials a:hover img,
.socials a:focus-visible img {
  filter: brightness(0) saturate(100%) invert(51%) sepia(48%) saturate(505%) hue-rotate(174deg) brightness(123%) contrast(106%);
}

/* =========================================================
   SOCIAL MENU WRAPPER (desktop: invisible, links show inline)
   ========================================================= */
.social-wrap { display: contents; }
.social-toggle { display: none; }

/* =========================================================
   MOBILE FLOATING TAB  (Figma "Mobile resposnsive tab", 393px)
   Closed: icons | [in v] [Get in touch]
   Open:   tapping the chip pops the four social icons above it
   ========================================================= */
@media (max-width: 599px) {
  .menu { bottom: clamp(16px, 5vh, 42px); gap: 0; max-width: calc(100vw - 12px); }
  .menu__nav { gap: 16px; }
  .ib img { width: 24px; height: 24px; }
  .menu__divider { display: block; margin: -8px 7px -8px 8px; }
  .menu__right { gap: 16px; }
  .btn { padding: 7px 13px; } /* Figma strokes sit inside the 36px button */
  .btn img { display: none; }

  .social-wrap { display: block; position: relative; }
  .social-toggle {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    background: var(--deep-mocha-200);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s var(--spring);
  }
  .social-toggle img { display: block; width: 18px; height: 18px; }
  .social-toggle .social-toggle__icon { width: 24px; height: 24px; margin: 4px; filter: invert(1); }
  .social-toggle:active { transform: scale(0.92); }

  /* the same four links, stacked above the chip */
  .socials {
    /* opens as a tall panel that grows up out of the chip and covers it */
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.85);
    transform-origin: 50% 100%;
    transition: transform 0.35s var(--spring), opacity 0.2s ease, visibility 0s linear 0.35s;
  }
  .social-wrap.is-open .socials {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: transform 0.35s var(--spring), opacity 0.2s ease, visibility 0s;
  }
  .social-wrap.is-open .socials a { animation: social-pop 0.45s var(--spring) backwards; }
  .social-wrap.is-open .socials a:nth-child(4) { animation-delay: 0ms; }
  .social-wrap.is-open .socials a:nth-child(3) { animation-delay: 45ms; }
  .social-wrap.is-open .socials a:nth-child(2) { animation-delay: 90ms; }
  .social-wrap.is-open .socials a:nth-child(1) { animation-delay: 135ms; }
}
@keyframes social-pop { from { opacity: 0; transform: translateY(14px) scale(0.6); } }

/* very small phones: tighten gaps so the bar fits */
@media (max-width: 359px) {
  .menu__nav, .menu__right { gap: 8px; }
  .menu__divider { margin: -8px 4px; }
  .btn { padding: 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .socials, .social-toggle { transition: none !important; }
  .social-wrap.is-open .socials a { animation: none; }
}

/* =========================================================
   RESET BUTTON (Figma "Reset") + INFO TAG (Figma "Info tag")
   ========================================================= */
.reset-btn {
  position: absolute;
  left: calc(2 * var(--u));
  top: calc(439 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  padding: calc(8 * var(--u));
  background: var(--snow-100);
  border: 1px solid #ada8a7; /* Deep Mocha D75 */
  border-radius: calc(8 * var(--u));
  cursor: pointer;
  transition: transform 0.3s var(--spring), border-color 0.2s ease;
}
.reset-btn img { display: block; width: 100%; height: 100%; transition: transform 0.5s var(--spring); }
.reset-btn:hover { border-color: var(--deep-mocha-100); transform: translateY(-2px); }
.reset-btn:hover img { transform: rotate(-45deg); }
.reset-btn:active { transform: scale(0.92); }
.reset-btn.is-spinning img { animation: reset-spin 0.7s var(--spring); }
@keyframes reset-spin { to { transform: rotate(360deg); } }

.tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  padding: 2px 8px;
  background: var(--deep-mocha-400); /* #261f1c */
  color: var(--deep-mocha-50);       /* #ebeaea */
  border-radius: 6px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(var(--tip-shift, 4px)) scale(0.9);
  transform-origin: var(--tip-origin, 50% 100%);
  transition: opacity 0.15s ease, transform 0.28s var(--spring);
}
.tip.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reset-btn { display: none; } /* posters can't be dragged with reduced motion, so nothing to reset */
  .tip { transition: opacity 0.1s ease; transform: none; }
}

@media (max-width: 1199px) {
  .reset-btn { position: static; margin-top: 12px; width: 42px; height: 42px; padding: 8px; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
}

/* Project links */
.card__link, a.work__media { display: block; }
.card__link { border-radius: 10px; }
a.work__media, .card__link { transition: transform 0.3s var(--spring), box-shadow 0.25s ease; }
a.work__media:hover, .card__link:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1); }
.card__text h3 a, .work__text h3 a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.25s ease; }
.card__text h3 a:hover, .work__text h3 a:hover, .card__text h3 a:focus-visible, .work__text h3 a:focus-visible { background-size: 100% 1.5px; }
.slide a { display: block; width: 100%; height: 100%; -webkit-user-drag: none; user-select: none; }
@media (prefers-reduced-motion: reduce) { a.work__media, .card__link { transition: none; } a.work__media:hover, .card__link:hover { transform: none; } }

@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

.works__title { scroll-margin-top: 96px; }

/* =========================================================
   ABOUT + CLOSING LINE + FOOTER  (Desktop - 3, lower half)
   Absolute 1440px stage like the hero (1u = 1px on a 1440px design); flow layout below 1200px.
   ========================================================= */
.story { overflow-x: clip; }
.story__stage { position: relative; width: 100%; max-width: 1440px; margin: 0 auto; height: calc(1096 * var(--u)); }
.story__stage > *, .closing > *, .credits > * { position: absolute; }
.closing { display: contents; }
.credits { display: contents; }

.story__title { left: calc(80 * var(--u)); top: 0; font-size: calc(24 * var(--u)); line-height: calc(32 * var(--u)); font-weight: 600; color: var(--deep-mocha-500); white-space: nowrap; }
.story__sub { left: calc(80 * var(--u)); top: calc(48 * var(--u)); font-size: calc(18 * var(--u)); line-height: 1.6; letter-spacing: 0.09px; color: var(--deep-mocha-300); white-space: nowrap; }

.collage {
  position: absolute;
  left: calc(80 * var(--u)); top: calc(111 * var(--u));
  width: calc(526 * var(--u)); height: calc(457 * var(--u));
  overflow: hidden;
  border-radius: calc(8 * var(--u));
  background: #002f9e;
  container-type: inline-size;
}
.collage > img { position: absolute; height: auto; user-select: none; -webkit-user-drag: none; }
.collage > .collage__img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.story__fade {
  left: calc(558 * var(--u)); top: calc(103 * var(--u)); width: calc(125 * var(--u)); height: calc(499 * var(--u));
  background: linear-gradient(to left, var(--snow-50) 25.949%, rgba(255, 254, 254, 0));
  pointer-events: none;
}
.story__tick { left: calc(69 * var(--u)); top: calc(850 * var(--u)); width: calc(12 * var(--u)); height: auto; }
.story__star { left: calc(647 * var(--u)); top: calc(794 * var(--u)); width: calc(19.5 * var(--u)); height: auto; }
.story__bio { left: calc(658 * var(--u)); top: calc(110 * var(--u)); width: calc(593 * var(--u)); font-size: calc(18 * var(--u)); line-height: 1.6; letter-spacing: 0.09px; color: var(--deep-mocha-300); }

.story__cursor {
  left: calc(725.4 * var(--u)); top: calc(432.4 * var(--u));
  width: calc(27 * var(--u)); height: calc(27 * var(--u));
  background: var(--mv-red-300);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-39.28deg);
  z-index: 2;
}
.story__pill {
  left: calc(741 * var(--u)); top: calc(452 * var(--u));
  padding: calc(6 * var(--u)) calc(24 * var(--u));
  background: var(--mv-red-300); border: 1px solid var(--mv-red-400); border-radius: 33px;
  color: var(--mv-red-50); font-size: calc(16 * var(--u)); line-height: calc(24 * var(--u)); font-weight: 500; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2;
}
.story__cursor, .story__pill { animation: hover-float 4.5s ease-in-out infinite; }
.story__pill { animation-delay: -0.35s; }
.story__octopus { left: calc(1160 * var(--u)); top: calc(389 * var(--u)); width: calc(218 * var(--u)); height: auto; }

.story__beyond { left: calc(80 * var(--u)); top: calc(628 * var(--u)); width: calc(903 * var(--u)); font-size: calc(16 * var(--u)); line-height: calc(24 * var(--u)); color: #000; }
.story__beyond img { display: inline-block; vertical-align: middle; margin: -4px 0 -2px 2px; }

/* closing line + clouds */
.cloud {
  left: calc(448 * var(--u)); top: calc(723 * var(--u)); width: calc(713 * var(--u)); height: auto;
  z-index: 0; --tx: 0; pointer-events: none;
  transform: translateX(var(--tx, 0)) scaleX(var(--sx, 1));
  transition: transform 2.8s cubic-bezier(0.22, 0.7, 0.2, 1), opacity 2.8s ease;
}
.cloud--b { left: calc(-230 * var(--u)); top: calc(784 * var(--u)); --sx: -1; }
/* desktop: the clouds cover the closing line, then drift apart sideways once it scrolls into view */
@media (min-width: 1200px) {
  .cloud { z-index: 3; }
  .story__stage.is-revealed .cloud--a { --tx: calc(330 * var(--u)); opacity: 0.35; }
  .story__stage.is-revealed .cloud--b { --tx: calc(-330 * var(--u)); opacity: 0.35; }
  .credits__by, .credits__copy, .credits__top, .bubble { z-index: 4; }
}
.closing__title { z-index: 1; left: calc(80 * var(--u)); top: calc(803 * var(--u)); font-size: calc(36 * var(--u)); line-height: calc(44 * var(--u)); font-weight: 600; color: var(--deep-mocha-500); white-space: nowrap; }
.closing__mail { left: calc(80 * var(--u)); top: calc(892 * var(--u)); font-size: calc(16 * var(--u)); line-height: calc(24 * var(--u)); color: var(--deep-mocha-300); z-index: 1; }
.closing__mail a { margin-left: 4px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.25s ease; }
.closing__mail a:hover, .closing__mail a:focus-visible { background-size: 100% 1px; }

/* footer */
.credits__by { left: calc(80 * var(--u)); top: calc(1030 * var(--u)); width: calc(147 * var(--u)); font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); font-weight: 500; color: var(--deep-mocha-300); }
.credits__top { left: calc(1255 * var(--u)); top: calc(1052 * var(--u)); display: inline-flex; align-items: center; gap: 8px; font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); font-weight: 500; color: var(--deep-mocha-500); white-space: nowrap; text-decoration: none; transition: opacity 0.2s ease; }
.credits__top img { width: 20px; height: 20px; }
.credits__top:hover, .credits__top:focus-visible { opacity: 0.65; }
.credits__copy { left: calc(1159 * var(--u)); top: calc(1028 * var(--u)); display: flex; align-items: center; gap: 2px; font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); font-weight: 500; color: var(--deep-mocha-300); white-space: nowrap; }
.credits__copy img { width: 18px; height: 18px; }

/* "Oh Really" thought bubble: pops in when the footer is reached, fades away after a few seconds */
.bubble { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.bubble > * { position: absolute; opacity: 0; transition: opacity 0.25s ease, transform 0.45s var(--spring); }
.bubble__spark { left: calc(222 * var(--u)); top: calc(1047 * var(--u)); width: calc(18 * var(--u)); height: auto; transform: scale(0.2); transform-origin: 50% 50%; }
.bubble__dot { background: #e29ec5; border-radius: 50%; transform: scale(0.2); }
.bubble__dot--m { left: calc(233.8 * var(--u)); top: calc(1025 * var(--u)); width: calc(15.7 * var(--u)); height: calc(15.7 * var(--u)); }
.bubble__dot--s { left: calc(231 * var(--u)); top: calc(1036.6 * var(--u)); width: calc(9.5 * var(--u)); height: calc(9.5 * var(--u)); }
.bubble__pill {
  left: calc(246.67 * var(--u)); top: calc(1008 * var(--u));
  padding: calc(7 * var(--u)) calc(24 * var(--u));
  background: #e29ec5; border: 1px solid #d676ad; border-radius: 33px;
  color: #710c46; font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); font-weight: 500; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: scale(0.4); transform-origin: 0 100%;
}
.bubble.is-shown > * { opacity: 1; }
.bubble.is-shown .bubble__spark { transform: scale(1); transition-delay: 0s; }
.bubble.is-shown .bubble__dot--s { transform: scale(1); transition-delay: 0.12s; }
.bubble.is-shown .bubble__dot--m { transform: scale(1); transition-delay: 0.24s; }
.bubble.is-shown .bubble__pill { transform: scale(1); transition-delay: 0.38s; }

@media (max-width: 1199px) {
  .story__stage { height: auto; padding: 0 clamp(24px, 5.556vw, 80px); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
  .story__stage > *, .closing > * { position: static; }
  .story__title { font-size: 24px; line-height: 32px; white-space: normal; }
  .story__sub { margin-top: -16px; font-size: 18px; white-space: normal; }
  .collage { position: relative; left: auto; top: auto; width: 100%; max-width: 526px; height: auto; aspect-ratio: 526 / 457; border-radius: 8px; }
  .story__fade, .story__tick, .story__star, .story__cursor, .story__pill { display: none; }
  .story__bio { width: 100%; max-width: 593px; font-size: 18px; }
  .story__octopus { align-self: flex-end; width: clamp(120px, 28vw, 218px); margin-top: -8px; }
  .story__beyond { width: 100%; max-width: 903px; font-size: 16px; }
  .closing { display: block; position: relative; width: 100%; margin-top: 24px; padding: 32px 0 8px; overflow: hidden; }
  .closing > * { position: relative; left: auto; top: auto; }
  .cloud { position: absolute; z-index: 0; opacity: 0.5; width: min(713px, 90vw); left: auto; top: auto; }
  .closing__title, .closing__mail { z-index: 1; }
  .cloud--a { right: -10%; top: 0; }
  .cloud--b { left: -30%; top: 90px; }
  .story__stage.is-revealed .cloud--a, .story__stage.is-revealed .cloud--b { --tx: 0; opacity: 0.3; }
  .closing__title { font-size: clamp(26px, 5vw, 36px); line-height: 1.22; white-space: normal; }
  .closing__mail { margin-top: 16px; font-size: 16px; }
  .credits { display: flex; width: 100%; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding-bottom: 8px; position: relative; }
  .credits__by, .credits__copy, .credits__top { position: static; font-size: 14px; width: auto; left: auto; top: auto; }
  .bubble { position: absolute; inset: auto; left: 150px; top: -30px; width: 150px; height: 60px; }
  .bubble > * { left: auto; top: auto; }
  .bubble__spark { left: 0; bottom: 0; width: 18px; }
  .bubble__dot--m { left: 12px; bottom: 16px; width: 16px; height: 16px; }
  .bubble__dot--s { left: 6px; bottom: 6px; width: 10px; height: 10px; }
  .bubble__pill { left: 28px; top: 0; padding: 6px 20px; font-size: 12px; line-height: 16px; }
}
@media (max-width: 640px) {
  .story__stage { gap: 20px; }
  .closing__title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .story__cursor, .story__pill { animation: none; }
  .cloud { transition: none; }
  .bubble > * { transition: opacity 0.2s ease; }
}

/* ---------- Loading screen ---------- */
html.is-loading, html.is-loading body { overflow: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 1000; background: #fffefe; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
  animation: loaderFailsafe 0.4s ease 15s forwards;
}
.loader.is-done { transform: translateY(-101%); pointer-events: none; }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }
.loader__stage { position: relative; width: 100%; max-width: 1440px; height: min(100vh, calc(1024 * var(--u))); }
.loader__count { position: absolute; right: calc(180 * var(--u)); top: calc(698 * var(--u)); display: flex; }
.loader__tile {
  position: relative; display: block; width: calc(127 * var(--u)); height: calc(146 * var(--u)); overflow: hidden;
  background: #9a9797; color: #fffefe;
}
.loader__tile:first-child { background: #fe5d26; }
.loader__tile b {
  position: absolute; left: calc(19 * var(--u)); top: calc(-43 * var(--u)); width: calc(89 * var(--u));
  font: 400 calc(220 * var(--u)) / calc(233 * var(--u)) "New Amsterdam", Impact, "Arial Narrow Bold", sans-serif;
  text-align: center; font-weight: 400;
}
.loader__tile.is-tick b { animation: loaderTick 0.28s cubic-bezier(0.22, 0.7, 0.2, 1); }
@keyframes loaderTick { from { transform: translateY(24%); opacity: 0.2; } to { transform: none; opacity: 1; } }

.loader__trail { position: absolute; inset: 0; pointer-events: none; }
.loader__po {
  position: absolute; height: auto; transform: translate(-50%, -50%) scale(0.55) rotate(var(--rot, 0deg));
  opacity: 0; transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.3, 1.2), opacity 0.25s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14); will-change: transform, opacity;
}
.loader__po.is-in { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(var(--rot, 0deg)); }
.loader__po.is-out { opacity: 0; transform: translate(-50%, -50%) scale(0.82) rotate(var(--rot, 0deg)); transition: transform 0.5s ease, opacity 0.45s ease; }

@media (max-width: 640px) {
  .loader__stage { height: 100%; }
  .loader__count { right: 20px; top: auto; bottom: 28px; }
  .loader__tile { width: 70px; height: 80px; }
  .loader__tile b { left: 10px; top: -24px; width: 50px; font-size: 120px; line-height: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .loader { transition: opacity 0.3s ease; }
  .loader.is-done { transform: none; opacity: 0; }
  .loader__tile.is-tick b { animation: none; }
}
