* { box-sizing: border-box; }
:root {
  --white: #f7fbff;
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #07152d;
}
body {
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
}
.site {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #07152d;
}
.scene,
.shade {
  position: absolute;
  inset: 0;
}
.scene {
  z-index: -3;
  background: url('assets/scene-bg.png') center center / cover no-repeat;
}
.shade {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3,9,22,.02) 0%, rgba(3,9,22,.08) 48%, rgba(3,9,22,.24) 100%),
    radial-gradient(circle at 78% 66%, rgba(40,89,170,.07), transparent 28%);
  pointer-events: none;
}


.control-panel {
  position: absolute;
  right: clamp(20px, 4vw, 72px);
  top: 0px;
  width: min(39vw, 650px);
  aspect-ratio: 1448 / 1086;
  z-index: 2;
  animation: panelFloat 7s ease-in-out infinite;
}
.panel-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 32px rgba(0,0,0,.34));
  pointer-events: none;
  user-select: none;
}

.ca-control,
.asset-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-decoration: none;
  cursor: pointer;
  color: var(--white);
  font: inherit;
}
.ca-control {
  position: absolute;
  left: 6.2%;
  top: 43.6%;
  width: 87.6%;
  aspect-ratio: 3 / 1;
  transition: transform .18s ease, filter .18s ease;
}
.ca-control > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.ca-value {
  position: absolute;
  left: 6.3%;
  right: 17.5%;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 700;
  font-size: clamp(9px, 1vw, 18px);
  color: rgba(244,249,255,.94);
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.ca-control:hover { transform: translateY(-2px) scale(1.008); filter: brightness(1.06); }
.ca-control:active { transform: scale(.99); }
.ca-control.copied { animation: copyPop .42s ease; }

.action-grid {
  position: absolute;
  left: 7.9%;
  right: 7.9%;
  top: 69.3%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2%;
  align-items: start;
}
.asset-button {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  transition: transform .18s ease, filter .18s ease;
  transform-origin: center;
}
.asset-button > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.22));
}
.asset-button:hover {
  transform: translateY(-4px) scale(1.03);
  filter: brightness(1.06);
}
.asset-button:active { transform: translateY(-1px) scale(.99); }
.asset-button.disabled { opacity: .48; pointer-events: none; filter: saturate(.6); }

.micro-copy {
  position: absolute;
  left: clamp(18px, 3vw, 48px);
  bottom: clamp(18px, 3vh, 36px);
  z-index: 2;
  font-size: clamp(10px, .8vw, 14px);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(233,241,255,.72);
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}

@keyframes panelFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes copyPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@media (max-width: 1200px) {
  .control-panel { width: min(42vw, 620px); }
}
@media (max-width: 900px) {
  .scene-title span { font-size: clamp(10px, 1.45vw, 16px); }
  .scene-title strong { font-size: clamp(24px, 4vw, 42px); }
  .control-panel {
    right: 10px;
    top: 0px;
    width: min(56vw, 500px);
  }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .site {
    min-height: 100dvh;
    height: auto;
    padding: 18px 12px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .scene,
  .shade {
    position: fixed;
  }
  .control-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 560px);
    margin-top: auto;
    align-self: center;
  }
  .micro-copy {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 12px;
    text-align: center;
  }
}
