:root {
  --purple: #b984ff;
  --purple-soft: #d7b8ff;
  --ink: #fffaf3;
  --room-ratio: 1.5005861665;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #18130f;
  color: var(--ink);
  font-family:
    Inter,
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
}

a {
  color: inherit;
}

/* =========================================================
   MEMORY ROOM
   ========================================================= */

.memory-room {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #18130f;
}

.room-backdrop {
  position: absolute;
  inset: -30px;
  background:
    linear-gradient(rgba(22, 15, 11, .28), rgba(22, 15, 11, .44)),
    url("../image/home/memory-room.webp") center / cover no-repeat;
  filter: blur(24px) saturate(.9);
  transform: scale(1.08);
}

.room-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, calc(100dvh * var(--room-ratio)));
  aspect-ratio: 1280 / 853;
  transform: translate(-50%, -50%);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 245, 224, .08),
    0 30px 90px rgba(0, 0, 0, .34);
}

.room-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(13, 8, 5, .11), transparent 22%),
    radial-gradient(circle at 50% 46%, transparent 42%, rgba(12, 8, 6, .16) 100%);
}

.room-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* =========================================================
   TOP BRAND
   ========================================================= */

.home-brand {
  position: absolute;
  z-index: 8;
  left: 2.6%;
  top: 3.4%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .34);
}

.home-brand-top {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3.2vw, 47px);
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: #fff8f0;
}

.home-brand-copy {
  display: grid;
  gap: 3px;
}

.home-brand-copy strong {
  font-size: clamp(10px, 1.15vw, 16px);
  letter-spacing: .08em;
}

.home-brand-copy small {
  color: rgba(255, 246, 237, .60);
  font-size: clamp(5px, .48vw, 7px);
  font-weight: 700;
  letter-spacing: .32em;
}

/* =========================================================
   FELT BOARD HOTSPOT
   Matches the physical board in the supplied room photo.
   ========================================================= */

.felt-board-hotspot {
  position: absolute;
  z-index: 6;
  left: 38.7%;
  top: 14.4%;
  width: 16.4%;
  height: 17.2%;
  display: grid;
  place-items: center;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  outline: none;
}

.felt-board-glow {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(208, 167, 255, 0);
  box-shadow:
    inset 0 0 0 rgba(186, 124, 255, 0),
    0 0 0 rgba(167, 103, 255, 0);
  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.felt-board-label {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translate(-50%, 7px);
  min-width: 165px;
  padding: 9px 12px;
  border: 1px solid rgba(205, 175, 242, .28);
  border-radius: 10px;
  opacity: 0;
  background: rgba(27, 19, 22, .75);
  backdrop-filter: blur(9px);
  text-align: center;
  transition:
    opacity .22s ease,
    transform .22s ease;
}

.felt-board-label strong {
  display: block;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px;
}

.felt-board-label small {
  display: block;
  margin-top: 4px;
  color: rgba(231, 209, 255, .62);
  font-size: 6px;
  letter-spacing: .13em;
}

.felt-board-hotspot:hover .felt-board-glow,
.felt-board-hotspot:focus-visible .felt-board-glow {
  border-color: rgba(211, 175, 255, .78);
  background: rgba(151, 93, 221, .06);
  box-shadow:
    inset 0 0 24px rgba(172, 109, 255, .12),
    0 0 30px rgba(158, 95, 242, .24);
}

.felt-board-hotspot:hover .felt-board-label,
.felt-board-hotspot:focus-visible .felt-board-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   BUTTERFLY NAVIGATION
   ========================================================= */

.butterfly-link {
  position: absolute;
  z-index: 7;
  width: clamp(64px, 7.2vw, 98px);
  aspect-ratio: 1;
  text-decoration: none;
  transform: translate(-50%, -50%);
  outline: none;
}

.butterfly-travel {
  left: 17.2%;
  top: 58.0%;
  --rest-rotate: -14deg;
}

.butterfly-members {
  left: 39.2%;
  top: 60.0%;
  --rest-rotate: 8deg;
}

.butterfly-music {
  left: 62.5%;
  top: 58.2%;
  --rest-rotate: -6deg;
}

.butterfly-collection {
  left: 84.0%;
  top: 58.0%;
  --rest-rotate: 12deg;
}

.butterfly-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(var(--rest-rotate));
  transform-origin: center;
  filter:
    drop-shadow(0 3px 4px rgba(34, 16, 21, .28))
    drop-shadow(0 0 6px rgba(191, 133, 255, .20));
  transition:
    transform .25s ease,
    filter .25s ease;
}

.butterfly-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: .92;
}

.butterfly-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translate(-50%, 6px);
  min-width: 132px;
  padding: 8px 11px;
  border: 1px solid rgba(205, 170, 244, .30);
  border-radius: 999px;
  opacity: 0;
  background: rgba(31, 22, 27, .72);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .22);
  backdrop-filter: blur(9px);
  text-align: center;
  pointer-events: none;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.butterfly-label strong {
  display: block;
  color: #fff8f4;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.butterfly-label small {
  display: block;
  margin-top: 3px;
  color: rgba(219, 188, 255, .62);
  font-size: 6px;
  letter-spacing: .17em;
  white-space: nowrap;
}

.butterfly-link:hover .butterfly-visual,
.butterfly-link:focus-visible .butterfly-visual {
  transform:
    translateY(-6px)
    rotate(calc(var(--rest-rotate) + 4deg))
    scale(1.13);
  filter:
    drop-shadow(0 5px 6px rgba(27, 14, 24, .28))
    drop-shadow(0 0 14px rgba(178, 111, 255, .65));
  animation: roomButterflyFloat .85s ease-in-out infinite alternate;
}

.butterfly-link:hover .butterfly-label,
.butterfly-link:focus-visible .butterfly-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes roomButterflyFloat {
  from {
    margin-top: 0;
  }

  to {
    margin-top: -5px;
  }
}

/* =========================================================
   SMALL ROOM COPY
   ========================================================= */

.room-copy {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 2.7%;
  transform: translateX(-50%);
  display: grid;
  gap: 5px;
  min-width: 280px;
  color: rgba(255, 248, 235, .82);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.room-copy span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .28em;
}

.room-copy small {
  color: rgba(255, 244, 231, .67);
  font-size: 10px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {
  .room-stage {
    width: min(155vw, calc(100dvh * var(--room-ratio)));
  }

  .home-brand {
    left: 3.2%;
    top: 4%;
  }

  .home-brand-copy strong {
    font-size: 9px;
  }

  .butterfly-link {
    width: 60px;
  }

  .butterfly-label {
    top: calc(100% - 2px);
    min-width: 102px;
    padding: 6px 8px;
    opacity: .88;
  }

  .butterfly-label strong {
    font-size: 9px;
  }

  .butterfly-label small {
    font-size: 5px;
  }

  .felt-board-label {
    min-width: 125px;
    opacity: .88;
    transform: translate(-50%, 0);
  }

  .room-copy {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
