/* ----------------------------------------
   RESOSPHERE – HERO WITH INLINE XYLOPHONE
---------------------------------------- */
.project-hero .container {
  display: flex;
  align-items: flex-end;
  gap: clamp(2rem, 4vw, 4rem);
}

.reso-hero-text {
  flex: 1;
  min-width: 0;
}

.reso-xylophone-inline {
  flex-shrink: 0;
  width: clamp(260px, 35vw, 380px);
  border-left: 1px solid var(--color-border);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---- Header ---- */
.xylophone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.xylophone-prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--color-text-secondary);
  opacity: 0;
  transform: translateY(10px);
}

.xylophone-mute {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-secondary);
  transition: border-color 0.3s ease, color 0.3s ease,
    background 0.3s ease;
  flex-shrink: 0;
}

.xylophone-mute:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.xylophone-mute.muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 100, 100, 0.4);
  color: rgba(255, 100, 100, 0.7);
}

.xylophone-mute svg {
  width: 16px;
  height: 16px;
}

/* ---- Bars ---- */
.xylophone-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(5px, 1vw, 10px);
  min-height: 200px;
  padding-bottom: 1.5rem;
}

.xylophone-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.xylophone-bar-body {
  width: clamp(28px, 4vw, 38px);
  border-radius: 100px;
  background: linear-gradient(
    180deg,
    rgba(200, 150, 80, 0.7) 0%,
    rgba(140, 90, 40, 0.85) 100%
  );
  border: 1px solid rgba(200, 150, 80, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.xylophone-bar-body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  width: 18%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 220, 150, 0.14),
    transparent
  );
  pointer-events: none;
}

.xylophone-bar:hover .xylophone-bar-body {
  border-color: rgba(255, 200, 80, 0.5);
  box-shadow: 0 0 16px rgba(255, 200, 80, 0.15);
  transform: scaleX(1.1);
}

.xylophone-bar.hit .xylophone-bar-body {
  transform: scaleY(0.95) scaleX(1.12);
  border-color: rgba(255, 200, 80, 0.8);
  box-shadow:
    0 0 24px rgba(255, 200, 80, 0.3),
    0 0 48px rgba(255, 180, 60, 0.12);
}

/* ---- Labels ---- */
.xylophone-bar-label {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  white-space: nowrap;
  text-align: center;
  transition: color 0.2s ease;
}

.xylophone-bar:hover .xylophone-bar-label {
  color: rgba(255, 210, 80, 0.85);
}

.xylophone-bar.hit .xylophone-bar-label {
  color: rgba(255, 210, 80, 0.95);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .project-hero .container {
    flex-direction: column;
    align-items: stretch;
  }

  .reso-xylophone-inline {
    width: 100%;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    margin-top: 1rem;
  }

  .xylophone-wrap {
    gap: 6px;
    min-height: 160px;
  }

  .xylophone-bar-body {
    width: clamp(28px, 9vw, 36px);
  }
}

@media (max-width: 480px) {
  .xylophone-wrap {
    min-height: 140px;
    gap: 4px;
  }

  .xylophone-bar-body {
    width: 24px;
  }

  .xylophone-bar-label {
    font-size: 0.5rem;
  }
}
