html { background: #06060c; }
body, body.dark-bg { background: transparent; }
body { visibility: hidden; }
body.is-ready { visibility: visible; }

.page-bg {
  position: fixed; inset: 0; z-index: -3;
  background: #06060c url('https://assets.melodreams.com/assets/media/home/scene.webp') center top / cover no-repeat;
  transform: scale(1.12); will-change: transform;
}
.page-bg-overlay {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(115% 62% at 50% 18%, rgba(37,99,235,0.30) 0%, rgba(37,99,235,0.06) 34%, transparent 56%),
    linear-gradient(180deg, rgba(6,6,12,0.12) 0%, rgba(6,6,12,0.34) 24%, rgba(6,6,12,0.72) 56%, rgba(6,6,12,0.9) 100%);
}
@media (prefers-reduced-motion: reduce) { .page-bg { transform: none; } }
.home-hero h1 { text-shadow: 0 2px 60px rgba(0,0,0,0.55); }
.home-hero p  { text-shadow: 0 1px 30px rgba(0,0,0,0.6); }
#hero-type { color: rgba(255,255,255,0.92); font-weight: 500; }
.hero-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; background: #3b82f6; vertical-align: -0.14em; border-radius: 1px; animation: heroCaretBlink 1.05s steps(1) infinite; }
@keyframes heroCaretBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-caret { animation: none; } }

.home-tail { position: relative; isolation: isolate; overflow: hidden; }
.home-tail__bg {
  position: absolute; inset: 0; z-index: -2;
  background: url('https://assets.melodreams.com/assets/media/footer/footer-bg.webp') center / cover no-repeat fixed;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 12%, rgba(0,0,0,0.55) 34%, #000 60%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 0%, transparent 12%, rgba(0,0,0,0.55) 34%, #000 60%, #000 100%);
}
.home-tail__fade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    transparent 0%, transparent 48%,
    rgba(6,6,12,0.34) 70%, rgba(6,6,12,0.66) 90%, rgba(6,6,12,0.80) 100%);
}
.home-tail .footer::before, .home-tail .footer::after { display: none; }
.home-tail .footer { padding-top: 20px; }
.home-tail .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .home-tail__bg { background-attachment: scroll; }
}
body:not(.is-ready) { animation: mdRevealSafety 0s linear 3s forwards; }
@keyframes mdRevealSafety { to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { body:not(.is-ready) { animation-delay: 0s; } }
:root {
  --md-ring:   rgba(255, 255, 255, 0.10);
  --md-ring-2: rgba(255, 255, 255, 0.06);
  --md-mute:   rgba(255, 255, 255, 0.55);
  --md-faint:  rgba(255, 255, 255, 0.40);
}

.text-anything { color: #3b82f6; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal:nth-child(4) { transition-delay: 0.18s; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--md-mute);
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 16px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.feat-card {
  padding: 24px 22px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--md-ring);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, transparent 40%, rgba(59, 130, 246, 0.12) 80%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  border-radius: inherit;
}
.feat-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.28);
  transform: translateY(-2px);
}
.feat-card:hover::before { opacity: 1; }
.feat-card__icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  margin-bottom: 16px;
}

.feat-chip {
  padding: 18px 16px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--md-ring);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.feat-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.28);
  transform: translateY(-1px);
}
.feat-chip__icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px;
  margin-bottom: 12px;
}
.feat-chip__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.005em;
}
.feat-chip__body {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.reel {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.reel__track {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: reelScroll 60s linear infinite;
}
.reel__track:hover { animation-play-state: paused; }
.reel__pill {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--md-ring);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}
.reel__pill i {
  width: 6px; height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  vertical-align: 2px;
}
@keyframes reelScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sig {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 20px;
  padding: 10px 12px;
  border: 1px solid var(--md-ring-2);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  font-size: 12px;
  color: var(--md-mute);
  letter-spacing: 0.02em;
  max-width: 100%;
}
.sig span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.sig i { display: none; }
.sig em { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reel__track { animation: none; }
}
