.stage {
  position: fixed;
  isolation: isolate;
  inset: 0;
  overflow: hidden;
  color: #f6f4ed;
  background:
    radial-gradient(circle at 47% 46%, rgba(19, 31, 53, 0.54), transparent 42%),
    #060b14;
  font-family: Arial, Helvetica, sans-serif;
  user-select: none;
}

.stage::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(ellipse at 50% 52%, transparent 12%, rgba(1, 4, 10, 0.22) 58%, rgba(1, 4, 10, 0.64) 100%);
  content: "";
  pointer-events: none;
}

.vignette {
  position: absolute;
  z-index: 1;
  top: 49%;
  left: 47%;
  width: min(72vw, 1080px);
  height: min(72vh, 700px);
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 340ms ease, transform 900ms cubic-bezier(0.19, 1, 0.22, 1), filter 600ms ease;
  -webkit-mask-image: radial-gradient(ellipse 50% 48% at 50% 52%, #000 56%, rgba(0, 0, 0, 0.8) 73%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 48% at 50% 52%, #000 56%, rgba(0, 0, 0, 0.8) 73%, transparent 100%);
}

.stage[data-has-selection="true"] .vignette {
  filter: brightness(0.9) saturate(0.92);
  transform: translate(-53%, -50%) scale(0.98);
}

.vignette img {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
}

.sceneMoon,
.sceneClouds,
.sceneGrass {
  height: auto;
}

.sceneNight {
  z-index: 0;
  inset: 4%;
  width: 92%;
  height: 92%;
  object-fit: cover;
  opacity: 0.9;
}

.sceneStars {
  z-index: 1;
  top: 8%;
  left: 11%;
  width: 78%;
  height: 56%;
  object-fit: cover;
  opacity: 0.66;
  animation: starBreathe 4.8s ease-in-out infinite alternate;
}

.sceneMoonlight {
  z-index: 2;
  top: 8%;
  left: 16%;
  width: 62%;
  opacity: 0.34;
  mix-blend-mode: screen;
  animation: moonlightBreathe 7s ease-in-out infinite alternate;
}

.sceneMoon {
  z-index: 3;
  top: 15%;
  left: 27%;
  width: clamp(92px, 10vw, 146px);
  filter: drop-shadow(0 0 20px rgba(255, 226, 152, 0.18));
  animation: moonFloat 8s ease-in-out infinite;
}

.sceneClouds {
  z-index: 4;
  top: 15%;
  right: 15%;
  width: min(38vw, 500px);
  opacity: 0.66;
  animation: cloudDrift 12s ease-in-out infinite alternate;
}

.sceneGrass {
  z-index: 5;
  top: 57%;
  left: 50%;
  width: min(56vw, 760px);
  transform: translate(-50%, -18%);
  filter: drop-shadow(0 25px 30px rgba(0, 0, 0, 0.36));
}

.brand {
  position: absolute;
  z-index: 40;
  top: 25px;
  left: 74px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brandGlyph {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.soundButton {
  position: fixed;
  z-index: 50;
  top: 18px;
  left: 22px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.soundButton:hover { color: #fff; }
.soundButton[aria-pressed="false"] { opacity: 0.35; }
.speakerIcon { position: relative; display: block; width: 26px; height: 24px; }
.speakerIcon i { position: absolute; top: 8px; left: 1px; width: 6px; height: 8px; border: 2px solid currentColor; border-right: 0; border-radius: 2px 0 0 2px; }
.speakerIcon b { position: absolute; top: 5px; left: 7px; width: 9px; height: 14px; background: currentColor; clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%); }
.speakerIcon em,
.speakerIcon em::after { position: absolute; top: 5px; right: 0; width: 8px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-bottom-color: transparent; border-left-color: transparent; border-radius: 0 50% 50% 0; content: ""; }
.speakerIcon em::after { top: -5px; right: -5px; width: 12px; height: 20px; }
.soundButton[aria-pressed="false"] .speakerIcon em { display: none; }

.productCluster {
  position: absolute;
  z-index: 12;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.productAnchor {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(126px, 13vw, 194px);
  opacity: 1;
  transform: translate(-50%, -50%) translate(var(--home-x), var(--home-y));
  transition: opacity 500ms ease, filter 500ms ease, transform 950ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform, opacity;
}

.productButton {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

html.front-phase-animals .productButton {
  animation: characterEnter 720ms var(--delay) cubic-bezier(0.19, 1, 0.22, 1) both;
}

.productButton::before {
  position: absolute;
  z-index: -1;
  inset: 13%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  content: "";
  filter: blur(24px);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 400ms ease, transform 600ms ease;
}

.productButton img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  transform: rotate(var(--home-rotate));
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.42));
  animation: characterWaveFloat 5.6s ease-in-out infinite;
  animation-delay: var(--float-phase, 0s);
  transition: filter 500ms ease, transform 900ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: translate;
}

.productAnchor:nth-child(1) { --float-rise: -7px; --float-phase: 0s; }
.productAnchor:nth-child(2) { --float-rise: -6px; --float-phase: -1.4s; }
.productAnchor:nth-child(3) { --float-rise: -8px; --float-phase: -2.8s; }
.productAnchor:nth-child(4) { --float-rise: -7px; --float-phase: -4.2s; }

.productButton:hover img,
.productButton:focus-visible img {
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.5)) brightness(1.07);
  transform: rotate(var(--home-rotate)) translateY(-6px) scale(1.04);
}

.productButton:focus-visible { outline: none; }

.hoverLabel {
  position: absolute;
  z-index: 50;
  bottom: calc(100% - 10px);
  left: 50%;
  width: max-content;
  padding: clamp(10px, 0.45vw, 16px) clamp(15px, 0.7vw, 24px);
  border: 1px solid rgba(61, 54, 47, 0.2);
  border-radius: 999px;
  color: #0b0e13;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  font-size: clamp(16px, 0.65vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.94);
  transition: opacity 130ms ease, transform 180ms ease;
}

.productButton:hover .hoverLabel,
.productButton:focus-visible .hoverLabel {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.stage[data-has-selection="true"] .productAnchor:not([data-selected]) {
  z-index: 14;
  opacity: 0.66;
  filter: saturate(0.78) brightness(0.8);
  transform: translate(-50%, -50%) translate(var(--aside-x), var(--aside-y)) scale(0.74);
}

.stage[data-has-selection="true"] .productAnchor:not([data-selected]) .productButton img {
  transform: rotate(var(--aside-rotate));
}

.stage[data-has-selection="true"] .productAnchor:not([data-selected]):hover {
  opacity: 0.9;
  filter: saturate(0.95) brightness(0.95);
}

.stage[data-has-selection="true"] .productAnchor[data-selected] {
  z-index: 24;
  opacity: 1;
  transform: translate(-50%, -50%) translate(0, 0) scale(1.08);
}

.stage[data-has-selection="true"] .productAnchor[data-selected] .productButton::before {
  opacity: 0.72;
  transform: scale(1.18);
}

.stage[data-has-selection="true"] .productAnchor[data-selected] .productButton img {
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.5));
  transform: rotate(0deg);
}

.stage[data-has-selection="true"] .productAnchor[data-selected] .hoverLabel { display: none; }

.detailCard {
  position: fixed;
  z-index: 32;
  top: 14vh;
  right: clamp(24px, 3.2vw, 54px);
  display: flex;
  width: min(27vw, 410px);
  min-width: 330px;
  max-height: 72vh;
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(202, 220, 244, 0.16);
  border-radius: 26px;
  padding: 42px 38px 32px;
  color: #f2f4f7;
  background: rgba(9, 16, 29, 0.78);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(17px) saturate(0.8);
  animation: cardIn 720ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.closeButton {
  position: absolute;
  top: 16px;
  right: 17px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: color 140ms ease, background 140ms ease;
}

.closeButton:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.detailCard h1 { margin: 0 0 15px; font-size: clamp(34px, 3vw, 46px); font-weight: 400; letter-spacing: -0.045em; line-height: 1; }
.detailCard header p { max-width: 27ch; margin: 0; color: rgba(245, 247, 250, 0.82); font-size: 16px; line-height: 1.45; }
.detailCard dl { margin: 34px 0 0; }
.detailCard dl div { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.detailCard dt { color: rgba(255, 255, 255, 0.42); font-size: 14px; }
.detailCard dd { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 14px; text-align: right; }
.detailCard footer { margin-top: 38px; color: rgba(255, 255, 255, 0.42); }
.detailCard footer p { max-width: 31ch; margin: 13px 0 0; font-size: 12px; line-height: 1.45; }
.detailLinks { display: flex; flex-wrap: wrap; gap: 6px; }
.detailLinks span { padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.19); border-radius: 999px; color: rgba(255, 255, 255, 0.62); font-size: 10px; }

.controls {
  position: fixed;
  z-index: 38;
  bottom: 38px;
  left: 50%;
  display: flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 13, 23, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  animation: controlsIn 240ms ease both;
}

.controls button {
  display: grid;
  width: 42px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.52);
  background: transparent;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: color 140ms ease, background 140ms ease;
}

.controls button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.siteFooter {
  position: absolute;
  z-index: 20;
  right: 26px;
  bottom: 20px;
  left: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.siteFooter nav { display: flex; gap: 17px; }
.siteFooter nav:last-child { justify-content: flex-end; }

@keyframes characterEnter { from { opacity: 0.01; transform: translateY(80px) scale(0.72); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes characterWaveFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 var(--float-rise); } }
@keyframes cardIn { from { opacity: 0; transform: translateX(42px) scale(0.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes controlsIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes starBreathe { from { opacity: 0.48; } to { opacity: 0.72; } }
@keyframes moonlightBreathe { from { opacity: 0.23; } to { opacity: 0.4; } }
@keyframes moonFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(-1deg); } }
@keyframes cloudDrift { from { transform: translateX(-7px); } to { transform: translateX(12px); } }

@media (max-width: 980px) {
  .brand { top: 18px; left: 66px; }
  .soundButton { top: 12px; left: 12px; }
  .vignette { top: 39%; left: 50%; width: 96vw; height: 64vh; }
  .stage[data-has-selection="true"] .vignette { transform: translate(-50%, -52%) scale(0.96); }
  .sceneMoon { top: 13%; left: 17%; width: clamp(78px, 20vw, 132px); }
  .sceneClouds { top: 14%; right: 4%; width: 65vw; }
  .sceneGrass { top: 57%; width: 88vw; }
  .productAnchor { top: 42%; width: clamp(108px, 25vw, 162px); transform: translate(-50%, -50%) translate(clamp(-155px, var(--home-x), 155px), var(--home-y)); }
  .stage[data-has-selection="true"] .productAnchor:not([data-selected]) { transform: translate(-50%, -50%) translate(clamp(-145px, var(--aside-x), 145px), 80px) scale(0.58); }
  .stage[data-has-selection="true"] .productAnchor[data-selected] { transform: translate(-50%, -50%) translate(0, -22px) scale(1.02); }
  .detailCard { top: auto; right: 14px; bottom: 14px; left: 14px; width: auto; min-width: 0; max-height: 43dvh; border-radius: 22px; padding: 31px 24px 24px; animation-name: sheetIn; }
  .detailCard h1 { font-size: 32px; }
  .detailCard header p { font-size: 14px; }
  .detailCard dl { margin-top: 20px; }
  .detailCard dl div { min-height: 40px; }
  .detailCard footer { margin-top: 22px; }
  .controls { top: 14px; right: 14px; bottom: auto; left: auto; transform: none; }
  .siteFooter { display: none; }
}

@media (max-height: 720px) and (min-width: 981px) {
  .vignette { height: 88vh; }
  .detailCard { top: 8vh; max-height: 80vh; padding-top: 36px; padding-bottom: 26px; }
  .detailCard dl { margin-top: 24px; }
  .detailCard footer { margin-top: 24px; }
}

@keyframes sheetIn { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .vignette,
  .productAnchor,
  .productButton,
  .productButton img,
  .detailCard,
  .controls,
  .sceneStars,
  .sceneMoonlight,
  .sceneMoon,
  .sceneClouds { animation: none; transition: none; }
}
