/* =========================================================
   The three faces of the house
   They live in the house now, so the first frame is painted
   without waiting for anybody outside. */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/great-vibes-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Great Vibes';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/great-vibes-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/playfair-display-500-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/playfair-display-500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/playfair-display-500-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/playfair-display-500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   My Little Home · a retro Christmas house
   Palette: wine red / vintage green / dark brown / cream yellow
   Every screen is one picture, edge to edge, always in its
   original 4:3 proportion. No frames, no chrome, no bars.
   ========================================================= */

:root {
  --wine-900: #2e0d14;
  --wine-800: #3e1119;
  --wine-700: #5e1c28;
  --wine-500: #8c2f3c;

  --green-900: #1a241c;
  --green-800: #223327;
  --green-700: #33503c;
  --green-500: #4e7355;

  --brown-900: #160e09;
  --brown-800: #241710;
  --brown-700: #38261a;
  --brown-600: #4e3626;

  --cream: #f2e3bc;
  --cream-2: #e2ce9e;
  --cream-3: #c4ac7c;
  --gold: #d9b45f;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --display: "Great Vibes", "Brush Script MT", "Segoe Script", cursive;
  --label: "Playfair Display", Georgia, serif;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  color: var(--cream);
  background-color: var(--brown-900);
  background-image:
    radial-gradient(120% 60% at 50% -12%, rgba(94, 28, 40, 0.5), transparent 62%),
    radial-gradient(100% 55% at 50% 112%, rgba(51, 80, 60, 0.3), transparent 62%),
    linear-gradient(180deg, var(--brown-800) 0%, var(--brown-900) 62%, #120b07 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: overlay;
  background-image: var(--noise);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* the picture keeps its 4:3 and always fits the window. when the window is
   wider than 4:3 the picture is centred and deep brown margins show at the
   sides, so the desk at the bottom of the scene never falls off the screen */
main {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 100%;
  place-items: center;
}

.stage {
  position: relative;
  width: min(100vw, 133.3333vh);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--brown-700);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  container-type: inline-size;
  box-shadow: 0 0 0 1px rgba(217, 180, 95, 0.16), 0 26px 80px rgba(0, 0, 0, 0.6);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.stage__tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background 0.5s ease;
}

.stage__vig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 96% at 50% 46%, transparent 52%, rgba(22, 14, 9, 0.5) 100%);
}

/* a heading for screen readers only - nothing is written on the picture */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------- hotspots ---------------- */

.hotspot {
  position: absolute;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hotspot::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid rgba(217, 180, 95, 0.92);
  box-shadow: 0 0 0 2px rgba(22, 14, 9, 0.55), 0 0 12px rgba(217, 180, 95, 0.5);
  transition: transform 0.25s ease, background 0.25s ease;
  animation: beat 3.2s ease-in-out infinite;
}
.hotspot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(217, 180, 95, 0.9);
}
.hotspot:hover::before,
.hotspot:focus-visible::before {
  transform: scale(1.18);
  background: rgba(217, 180, 95, 0.16);
}
.hotspot__label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 6px);
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 14, 9, 0.86);
  color: var(--cream);
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes beat {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* ---------------- welcome · the script title in the middle ---------------- */

.welcome__title {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0 6%;
  pointer-events: none;
}
.welcome__title h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 10.5vw, 130px);
  font-size: clamp(22px, 10.5cqw, 130px);
  line-height: 1.08;
  text-align: center;
  color: var(--gold);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.8), 0 0 64px rgba(217, 180, 95, 0.32);
}

/* the middle zoom: the next picture grows out of the centre, out of focus,
   and pulls into focus on the way in */
.zoom-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(22, 14, 9, 0);
  pointer-events: none;
}
.zoom-veil__frame {
  width: min(100vw, 133.3333vh);
  aspect-ratio: 4 / 3;
  background-image: url("../img/living-room.jpg");
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(0.18);
  transform-origin: center center;
  filter: blur(24px);
}
body.is-zooming .zoom-veil {
  background: rgba(22, 14, 9, 0.9);
  transition: background 1.5s ease;
}
body.is-zooming .zoom-veil__frame {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  transition: transform 2.1s cubic-bezier(0.16, 0.84, 0.22, 1), opacity 1.4s ease, filter 1.8s ease;
}
/* the picture we leave goes out of focus behind the new one */
body.is-zooming .stage {
  opacity: 0.1;
  transform: scale(1.08);
  filter: blur(16px);
  transition: opacity 1.5s ease, transform 1.8s ease, filter 1.5s ease;
}

/* a soft page turn between the screens */
body.is-leaving .stage {
  transform: scale(1.07);
  opacity: 0;
}
/* pushing in towards the thing that was touched */
body.is-zooming-hotspot .stage {
  transform: scale(1.3);
  opacity: 0;
  transition: transform 0.55s ease, opacity 0.55s ease;
}
body.is-entering .stage {
  animation: settle 0.7s ease both;
}
@keyframes settle {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------- the desk · making a cup of coffee ----------------
   the cup stands in the middle of the desk, the beans wait on its
   left and the sugar on its right. click one and it swings up over
   the cup in an arc, trembles, and goes back where it came from */

.brew {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.brew__cup {
  position: absolute;
  left: calc(50% - 16.56%);
  top: 29.4%;
  width: 33.12%;
  aspect-ratio: 996 / 788;
  pointer-events: none;
}
.brew__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.brew__shot.is-on {
  opacity: 1;
}

.brew__pick {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg));
  will-change: transform;
}
.brew__pick img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.28s ease, filter 0.35s ease;
}
.brew__pick:hover img,
.brew__pick:focus-visible img {
  transform: scale(1.06);
  /* a thin gold rim with a soft halo, following the shape of the object */
  filter:
    drop-shadow(0 0 5px rgba(245, 222, 158, 1))
    drop-shadow(0 0 15px rgba(226, 190, 104, 0.85))
    drop-shadow(0 0 34px rgba(217, 180, 95, 0.5));
}

/* the beans wait on the left of the cup, the sugar on the right */
.brew__pick--beans {
  left: calc(19.64% - 7.59%);
  top: 49.5%;
  width: 15.18%;
}
.brew__pick--sugar {
  left: calc(80.36% - 6.555%);
  top: 45.9%;
  width: 13.11%;
}

/* ---------------- the christmas album ----------------
   the tree stands in the middle of the picture with six gold baubles
   on it. touch one and its photograph grows out of the bauble, the
   tree steps aside and goes out of focus behind it. the backspace
   key puts the tree back */

.album__label {
  position: absolute;
  left: 3%;
  top: 50%;
  z-index: 3;
  margin: 0;
  transform: translateY(-50%);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, min(5.2cqw, 5.2vw), 72px);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--gold);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.8), 0 0 64px rgba(217, 180, 95, 0.32);
  pointer-events: none;
}
body.is-leaving .album__label {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.album__tree {
  position: absolute;
  left: 33.5%;
  top: 14.4%;
  z-index: 3;
  width: 33%;
  transition: transform 0.85s cubic-bezier(0.16, 0.84, 0.22, 1), filter 0.85s ease;
}
.album__tree img {
  display: block;
  width: 100%;
  height: auto;
}
body.is-album-open .album__tree {
  /* the tree steps aside and turns a little, so the photograph stands in front */
  transform: translateX(3cqw) perspective(1400px) rotateY(10deg);
  filter: blur(7px);
}

.album__ball {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.album__ball::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(217, 180, 95, 0.92);
  box-shadow: 0 0 0 2px rgba(22, 14, 9, 0.55), 0 0 12px rgba(217, 180, 95, 0.5);
  transition: background 0.25s ease;
  animation: beatBall 3.2s ease-in-out infinite;
}
.album__ball::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(5px, 18%);
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(217, 180, 95, 0.9);
}
.album__ball:hover::before,
.album__ball:focus-visible::before {
  background: rgba(217, 180, 95, 0.16);
}
@keyframes beatBall {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

/* the photograph: a polaroid frame, its own proportion kept.
   it comes out of the bauble tilted in the air, and turns flat as it
   grows, so the picture stands in front of the tree */
.album__shot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: max-content;
  margin: 0;
  padding: 2.2cqw 2.2cqw 8cqw;
  background: linear-gradient(158deg, #f8f3e8 0%, #e9dfcc 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transform: translate(-50%, -50%) translate(var(--fx, 0px), var(--fy, 0px))
             perspective(1500px) rotateX(34deg) rotateY(-26deg) scale(0.06);
  transform-origin: center center;
  filter: blur(16px);
  opacity: 0;
  transition: transform 0.95s cubic-bezier(0.16, 0.84, 0.22, 1), filter 0.95s ease,
              opacity 0.55s ease, box-shadow 0.95s ease;
}
.album__shot.is-open {
  transform: translate(-50%, -50%) perspective(1500px) rotateX(0deg) rotateY(0deg) scale(1);
  filter: blur(0);
  opacity: 1;
  box-shadow: 0 56px 120px rgba(0, 0, 0, 0.74), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
}
.album__photo {
  display: block;
  width: 24cqw;
  height: auto;
  background: #14100c;
  box-shadow: 0 0 0 1px rgba(22, 14, 9, 0.55), 0 3px 10px rgba(0, 0, 0, 0.45);
}

/* ---------------- the shell ----------------
   the music lives in the top window, so it goes on while the
   visitor walks from room to room. the scenes run inside a frame */

.shell__frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background-color: var(--brown-900);
}
body.page--shell::after { content: none; }
body.page--shell #bgm,
body.page--gramophone #record-audio { display: none; }

/* ---------------- the records ----------------
   three covers slide in from the right and stop in the middle of the
   picture, turning as they come. choose one and it grows into the
   middle, and the black disc slides out of its sleeve. the eye of the
   disc starts and stops the music, and the little bar under the disc
   shows how far the record has come.

   the covers are measured against the window, so all three stay in
   sight on a narrow screen. the middle of the picture is measured
   against the picture, as everywhere else in the house */

.record__title,
.desk__title {
  position: absolute;
  left: 0;
  right: 0;
  top: 4.5%;
  z-index: 3;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  text-align: center;
  color: var(--gold);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.8), 0 0 64px rgba(217, 180, 95, 0.32);
  pointer-events: none;
}
.record__title { font-size: clamp(22px, min(10.5cqw, 10.5vw), 130px); }
.desk__title { font-size: clamp(20px, min(7.4cqw, 7.4vw), 100px); }

.record__row {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  perspective: 1400px;
}

.record {
  position: absolute;
  top: calc(37.5cqw - 10.5cqw);
  width: 21cqw;
  height: 21cqw;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform-origin: left center;
  transform: translateX(30cqw) scale(0.86) rotateY(-26deg);
  filter: blur(7px);
  transition: opacity 0.55s ease, transform 1s cubic-bezier(0.16, 0.84, 0.22, 1), filter 0.85s ease;
}
.record:nth-child(1) { left: calc(50% - 36.5cqw); }
.record:nth-child(2) { left: calc(50% - 10.5cqw); }
.record:nth-child(3) { left: calc(50% + 15.5cqw); }
.record img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.record:hover img,
.record:focus-visible img {
  transform: scale(1.04);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.62), 0 0 0 2px rgba(217, 180, 95, 0.55);
}
body.is-records-in .record {
  opacity: 1;
  transform: translateX(0) scale(1) rotateY(0deg);
  filter: blur(0);
  transition-delay: var(--d, 0s);
}

.record__deck {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

/* the sleeve, grown into the middle of the picture */
.record__cover {
  position: absolute;
  left: calc(50% - 27cqw);
  top: calc(37.5cqw - 17cqw);
  width: 34cqw;
  height: 34cqw;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.82);
  filter: blur(14px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.16, 0.84, 0.22, 1), filter 0.7s ease;
}

/* the disc, waiting behind the sleeve */
.record__disc {
  position: absolute;
  left: calc(50% - 27cqw);
  top: calc(37.5cqw - 17cqw);
  width: 34cqw;
  height: 34cqw;
  border-radius: 50%;
  overflow: hidden;
  background-color: #0b0907;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.4s ease 0.28s, transform 0.85s cubic-bezier(0.16, 0.84, 0.22, 1);
}
.record__disc-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  filter: saturate(0.86) brightness(0.74);
}
.record__disc-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 245, 216, 0.06) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 50%, rgba(11, 9, 7, 0.55) 0 16%, transparent 42%);
}

/* the eye of the disc: the key that starts and stops the music */
.record__play {
  position: absolute;
  left: calc(50% + 5.5cqw);
  top: calc(37.5cqw - 4.5cqw);
  width: 9cqw;
  height: 9cqw;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(14, 10, 7, 0.92);
  box-shadow: 0 0 0 2px rgba(217, 180, 95, 0.75), 0 8px 26px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.45s ease 0.3s, transform 0.5s ease 0.3s;
}
.record__glyph {
  position: absolute;
  inset: 0;
}
.record__glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-40%, -50%);
  border-left: 3.1cqw solid var(--gold);
  border-top: 2cqw solid transparent;
  border-bottom: 2cqw solid transparent;
}
body.is-record-playing .record__glyph::before {
  width: 3.1cqw;
  height: 4cqw;
  transform: translate(-50%, -50%);
  border: 0;
  background-image: linear-gradient(90deg,
    var(--gold) 0 1.05cqw, transparent 1.05cqw 2.05cqw, var(--gold) 2.05cqw 3.1cqw);
}

/* the little bar under the disc: how far the record has come */
.record__progress {
  position: absolute;
  left: calc(50% - 1cqw);
  /* it hangs just under the disc, and never falls off the picture */
  top: min(calc(37.5cqw + 17cqw + 1.1cqw), calc(75cqw - 1.6cqw));
  width: 22cqw;
  height: 0.75cqw;
  border-radius: 999px;
  background: rgba(22, 14, 9, 0.55);
  box-shadow: inset 0 0 0 1px rgba(242, 227, 188, 0.22), 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scaleX(0.92);
  transition: opacity 0.5s ease 0.3s, transform 0.6s ease 0.3s;
}
.record__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(140, 47, 60, 0.95), var(--gold));
}
.record__progress-fill::after {
  content: "";
  position: absolute;
  right: -0.65cqw;
  top: 50%;
  width: 1.3cqw;
  height: 1.3cqw;
  margin-top: -0.65cqw;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 10px rgba(217, 180, 95, 0.9);
}
body.is-record-open .record__progress {
  opacity: 1;
  transform: scaleX(1);
}

/* the record is on the deck */
body.is-record-open .record__cover {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  pointer-events: auto;
}
body.is-record-open .record__disc {
  opacity: 1;
  transform: translateX(20cqw);
}
body.is-record-open .record__play {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* the chosen record leaves the row */
body.is-record-open .record {
  opacity: 0;
  pointer-events: none;
}

/* the disc turns while the music plays */
body.is-record-playing .record__disc-face {
  animation: spin 14s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------------- responsive ---------------- */

@media (max-width: 720px) {
  .hotspot { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .hotspot::before { inset: 2px; }
  .hotspot__label { font-size: 9px; padding: 3px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .hotspot, .zoom-veil { display: none !important; }
}
