/* =====================================================================
   VYBR — Design System
   Dark violet, premium music-tech aesthetic.
   ===================================================================== */

/* ---------- Palette & tokens ---------- */
:root {
  --bg: #0B0B0F;
  --bg-2: #111116;
  --card: #171720;
  --elevated: #20202B;
  --accent: #A855F7;
  --accent-bright: #C084FC;
  --text: #FFFFFF;
  --text-2: #A1A1AA;
  --border: #292934;
  --error: #EF4444;
  --success: #22C55E;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --maxw: 1140px;
  --nav-h: 68px;

  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-glow: 0 0 0 1px rgba(168, 85, 247, .25), 0 12px 40px rgba(168, 85, 247, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 84px 0; position: relative; }
.section--tight { padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 14px.
}
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 62ch; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Background glows ---------- */
.glow {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.glow::before, .glow::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
}
.glow::before {
  width: 520px; height: 520px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(168,85,247,.55), transparent 65%);
}
.glow::after {
  width: 460px; height: 460px;
  top: 40px; right: -140px;
  background: radial-gradient(circle, rgba(192,132,252,.38), transparent 65%);
}
.section > .container { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 13px 24px; border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
    background .2s var(--ease), border-color .2s var(--ease);
  will-change: transform;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 85, 247, .32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(168, 85, 247, .48); }
.btn-ghost {
  background: var(--elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

.link-muted { color: var(--text-2); transition: color .2s var(--ease); }
.link-muted:hover { color: var(--accent-bright); }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(11, 11, 15, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: .95rem;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--elevated); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; background: var(--elevated); border: 1px solid var(--border);
  color: var(--text); width: 44px; height: 44px; border-radius: 12px;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 13px 14px; font-size: 1.05rem; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 110px) 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent-bright), #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--text-2); }
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
}

/* ---------- Phone mockup (pure CSS/SVG) ---------- */
.phone-wrap { display: flex; justify-content: center; perspective: 1400px; }
.phone {
  position: relative; width: 272px; height: 560px;
  background: linear-gradient(160deg, #1b1b25, #0e0e14);
  border: 2px solid var(--border); border-radius: 42px;
  padding: 14px; box-shadow: 0 40px 90px rgba(0,0,0,.6), var(--shadow-glow);
  transform: rotateY(-12deg) rotateX(4deg); transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: rotateY(-12deg) rotateX(4deg) translateY(0); } 50% { transform: rotateY(-12deg) rotateX(4deg) translateY(-14px); } }
.phone::after {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 20px; background: #0a0a0e; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: radial-gradient(130% 90% at 20% 0%, rgba(168,85,247,.28), transparent 55%), var(--bg-2);
  display: flex; flex-direction: column; padding: 30px 18px 18px; gap: 14px;
}
.ps-row { display: flex; align-items: center; gap: 12px; }
.ps-art { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-bright)); flex: none; }
.ps-art.sm { width: 42px; height: 42px; border-radius: 10px; opacity: .85; }
.ps-hero-art-wrap {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden;
}
.ps-hero-art {
  width: 100%; height: 100%; object-fit: cover;
  background: var(--elevated);
}
.ps-play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(168,85,247,.35), transparent 70%);
  border: none; cursor: pointer; opacity: 0;
  transition: opacity .3s var(--ease);
}
.ps-hero-art-wrap:hover .ps-play-overlay { opacity: 1; }
.ps-play-overlay svg { width: 64px; height: 64px; color: #fff; filter: drop-shadow(0 8px 24px rgba(168,85,247,.6)); }
.ps-meta { text-align: center; padding-top: 4px; }
.ps-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.ps-artist { font-size: .9rem; color: var(--text-2); margin-top: 2px; }
.ps-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.ps-line { height: 9px; border-radius: 6px; background: var(--elevated); }
.ps-line.w60 { width: 60%; } .ps-line.w40 { width: 40%; } .ps-line.w80 { width: 80%; }
.ps-controls { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 22px; padding-top: 6px; }
.ps-ctrl { width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); }
.ps-ctrl.play { width: 46px; height: 46px; background: linear-gradient(135deg, var(--accent), var(--accent-bright)); box-shadow: 0 6px 18px rgba(168,85,247,.5); }
.ps-bar { height: 5px; border-radius: 4px; background: var(--elevated); position: relative; }
.ps-bar::after { content: ""; position: absolute; inset: 0 60% 0 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
.eq span { width: 5px; background: linear-gradient(var(--accent-bright), var(--accent)); border-radius: 3px; animation: eq 1.1s ease-in-out infinite; }
.eq span:nth-child(2){animation-delay:.2s} .eq span:nth-child(3){animation-delay:.4s} .eq span:nth-child(4){animation-delay:.1s} .eq span:nth-child(5){animation-delay:.3s}
@keyframes eq { 0%,100%{height:30%} 50%{height:100%} }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(168,85,247,.5); box-shadow: var(--shadow-glow); }
.card-icon {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(192,132,252,.12));
  border: 1px solid rgba(168,85,247,.3); color: var(--accent-bright);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); margin: 0; font-size: .96rem; }

/* ---------- Screenshots ---------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 920px) { .screenshot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .screenshot-grid { grid-template-columns: 1fr; } }

.screenshot-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.screenshot-frame:hover {
  transform: translateY(-4px);
  border-color: rgba(168,85,247,.5);
  box-shadow: var(--shadow-glow);
}
.screenshot-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  background: var(--elevated);
}
.screenshot-frame figcaption {
  padding: 14px 16px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ---------- Download Guide ---------- */
.guide-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.guide-step:hover {
  transform: translateY(-4px);
  border-color: rgba(168,85,247,.5);
  box-shadow: var(--shadow-glow);
}
.guide-num {
  position: absolute;
  top: -14px; left: 24px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(168,85,247,.4);
}
.guide-step h3 { margin-top: 8px; margin-bottom: 10px; font-size: 1.1rem; }
.guide-step p { color: var(--text-2); font-size: .95rem; margin: 0; }
.guide-step code {
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, rgba(168,85,247,.16), rgba(192,132,252,.06));
  border: 1px solid rgba(168,85,247,.3);
  border-radius: var(--radius-lg); padding: 48px 40px; text-align: center;
}

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; color: var(--accent-bright); }
.prose p, .prose li { color: var(--text-2); }
.prose a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.note {
  background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4);
  border-radius: var(--radius); padding: 16px 18px; margin: 0 0 28px;
  color: #fecaca; font-size: .95rem;
}
.note strong { color: #fff; }
.meta-updated { color: var(--text-2); font-size: .9rem; margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.contact-row .card-icon { margin: 0; flex: none; }
.placeholder {
  display: inline-block; font-style: italic; color: var(--text-2);
  background: var(--elevated); border: 1px dashed var(--border);
  padding: 2px 10px; border-radius: 8px; font-size: .9rem;
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-brand p { color: var(--text-2); max-width: 32ch; margin-top: 12px; font-size: .95rem; }
.footer h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--text-2); font-size: .95rem; transition: color .2s var(--ease); }
.footer a:hover { color: var(--accent-bright); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 40px; height: 40px; border-radius: 11px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--elevated);
  border: 1px solid var(--border); color: var(--text-2);
  transition: all .2s var(--ease);
}
.socials a:hover { color: #fff; border-color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--text-2); font-size: .88rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.notfound { min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.notfound .code { font-size: clamp(4rem, 18vw, 9rem); font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--accent), var(--accent-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .phone { animation: none; } .eq span { animation: none; height: 60%; } }

/* ---------- Download page extras ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; color: var(--text-2); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-bright));
}
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.badge { font-size: .82rem; color: var(--text-2); background: var(--elevated); border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-pill); }