:root {
  --bg: #0b0c16;
  --bg-soft: #12132440;
  --card: #181a2e;
  --card-2: #1f2138;
  --line: #2a2c47;
  --text: #eef0ff;
  --muted: #a3a7c9;
  --accent: #667eea;
  --accent-2: #8a7bf0;
  --radius: 20px;
  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Animated aurora background ----------
   Perf: each blob is promoted to its own compositor layer (will-change:
   transform) and the blur is rasterized ONCE. Only `transform` is animated,
   so the whole effect runs on the GPU. No mix-blend-mode (it would force a
   full backdrop re-composite every frame). */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: layout paint style; }
.aurora span {
  position: absolute; width: 46vw; height: 46vw; border-radius: 50%;
  filter: blur(64px); opacity: 0.5;
  will-change: transform; transform: translateZ(0); backface-visibility: hidden;
  animation: drift 30s ease-in-out infinite;
}
.aurora .b1 { background: #4a90d9; top: -16%; left: -10%; animation-delay: 0s; }
.aurora .b2 { background: #8a7bf0; top: 6%; right: -14%; animation-delay: -10s; }
.aurora .b3 { background: #2e7d32; bottom: -18%; left: 16%; animation-delay: -20s; }
.aurora .b4 { background: #ec407a; bottom: -8%; right: 8%; width: 34vw; height: 34vw; animation-delay: -25s; opacity: 0.34; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(5vw, 4vh, 0); }
  66% { transform: translate3d(-4vw, -3vh, 0); }
}
#motes { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .aurora span, .pad.active .eq i, .bar-dot.playing, .phone-screen { animation: none !important; }
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; position: relative; z-index: 1; }
main, header, footer { position: relative; z-index: 1; }

.kicker {
  display: inline-block; color: var(--accent-2); font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; font-size: 0.72rem; margin-bottom: 14px;
}
section h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.5px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 22, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(102, 126, 234, 0.6); position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), transparent 60%);
}
.brand-name { font-size: 1.05rem; }
.header-right { display: flex; align-items: center; gap: 20px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.lang-switch { display: flex; gap: 5px; background: rgba(255,255,255,.05); padding: 3px; border-radius: 10px; }
.lang-btn {
  background: transparent; border: 0; border-radius: 7px; padding: 5px 7px;
  cursor: pointer; line-height: 0; filter: grayscale(.5); opacity: 0.6; transition: all 0.18s;
}
.lang-btn:hover { opacity: 0.9; }
.lang-btn.active { opacity: 1; filter: none; background: rgba(255,255,255,.14); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; padding: clamp(52px, 8vw, 96px) 0; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; color: var(--muted); margin-bottom: 22px;
}
.badge .live { width: 8px; height: 8px; border-radius: 50%; background: #36d399; box-shadow: 0 0 10px #36d399; animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem); line-height: 1.06; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(110deg, #fff 20%, #b9c0ff 55%, #8a7bf0 90%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.lead { margin: 22px 0 28px; color: var(--muted); font-size: 1.12rem; max-width: 30em; }
.hint { margin-top: 16px; color: var(--muted); font-size: 0.86rem; }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge { display: inline-flex; transition: transform 0.15s; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { height: 52px; width: auto; display: block; }

/* ---------- Phone mockup ---------- */
.phone { justify-self: center; }
.phone-screen {
  width: 272px; height: 564px; border-radius: 40px;
  background: linear-gradient(170deg, #14152a, #0c0d1a); border: 9px solid #05060d;
  box-shadow: 0 36px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  padding: 24px 16px 16px; display: flex; flex-direction: column; position: relative; overflow: hidden;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
.phone-screen::before {
  content: ""; position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 6px; border-radius: 6px; background: #000; z-index: 3;
}
.phone-aura { position: absolute; inset: 0; opacity: 0.5; transition: background 1.2s ease; }
.phone-screen > * { position: relative; }
.app-top { margin: 8px 4px 14px; }
.app-title { display: block; font-weight: 700; font-size: 1.05rem; }
.app-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.sound-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; align-content: start; }
.tile {
  aspect-ratio: 1; border-radius: 12px; display: flex; align-items: flex-end; padding: 6px;
  font-size: 0.6rem; font-weight: 600; color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5); position: relative; overflow: hidden;
}
.tile.on { outline: 2px solid #fff; outline-offset: -2px; }
.tile.on::after { content: "♪"; position: absolute; top: 4px; right: 6px; font-size: 0.65rem; }
.app-bar {
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07); border-radius: 12px; padding: 9px 12px; font-size: 0.74rem;
}
.bar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.bar-dot.playing { animation: blink 1.6s infinite; }
.bar-timer { margin-left: auto; color: var(--muted); }

/* ---------- Interactive mixer ---------- */
.mixer-section { padding: 80px 0; }
.mixer {
  background: linear-gradient(180deg, rgba(31,33,56,0.7), rgba(20,21,40,0.7));
  border: 1px solid var(--line); border-radius: 28px; padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4); position: relative; overflow: hidden;
}
.mixer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px;
}
.pad {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; cursor: pointer; overflow: hidden; background: var(--card);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.3s ease;
  user-select: none; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between;
}
.pad:hover { transform: translateY(-3px); }
.pad:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pad .glow { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease; }
.pad.active { border-color: transparent; box-shadow: 0 0 0 2px var(--pc, var(--accent)), 0 12px 30px -8px var(--pc, var(--accent)); }
.pad.active .glow { opacity: 0.3; }
.pad-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.pad-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.pad-name { font-weight: 700; font-size: 0.98rem; position: relative; }
.pad-cat { font-size: 0.7rem; color: var(--muted); position: relative; }

/* equalizer */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 12px; position: relative; }
/* animate transform (GPU) instead of height (layout reflow every frame) */
.eq i { flex: 1; background: currentColor; border-radius: 2px; height: 100%; opacity: 0.85; transform: scaleY(0.22); transform-origin: bottom; }
.pad.active .eq i { animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.15s; }
.eq i:nth-child(3) { animation-delay: 0.3s; }
.eq i:nth-child(4) { animation-delay: 0.45s; }
.eq i:nth-child(5) { animation-delay: 0.6s; }
@keyframes eq { 0%,100% { transform: scaleY(0.22); } 50% { transform: scaleY(1); } }

.mixer-controls {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line);
}
.mix-status { font-weight: 700; }
.mix-status b { color: var(--accent-2); }
.master { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.master input[type=range] { width: 130px; accent-color: var(--accent); }
.btn {
  border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 700; cursor: pointer;
  font-size: 0.92rem; transition: transform 0.15s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.audio-hint { font-size: 0.78rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Features ---------- */
.features { padding: 40px 0 70px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform 0.2s, border-color 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--accent); }
.feat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 14px; background: rgba(102,126,234,0.14);
}
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Download ---------- */
.download { text-align: center; padding: 80px 0; }
.download-card {
  background: linear-gradient(135deg, var(--accent), #5b4fcf); border-radius: 28px;
  padding: clamp(40px, 6vw, 64px); position: relative; overflow: hidden;
}
.download-card::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1.3px, transparent 1.4px);
  background-size: 18px 18px;
}
.download-card > * { position: relative; }
.download-card h2 { color: #fff; }
.download-card p { color: rgba(255,255,255,0.9); margin: 12px 0 28px; }
.download .store-badges { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .hero .lead, .hero .store-badges, .hero .badge { margin-left: auto; margin-right: auto; }
  .store-badges { justify-content: center; }
  .nav { display: none; }
  .master { margin-left: 0; }
}
