:root {
  --bg: #09090d;
  --bg-elevated: #111118;
  --bg-panel: #161620;
  --bg-glass: rgba(17, 17, 24, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f5f0;
  --text-soft: #b8b5c4;
  --text-muted: #7f7d8c;
  --accent-pink: #ff3b6b;
  --accent-orange: #ff7a3d;
  --accent-amber: #ffb347;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --gradient-brand: linear-gradient(135deg, #ff3b6b 0%, #ff7a3d 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(255, 59, 107, 0.18), transparent 65%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-width: 248px;
  --player-height: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 59, 107, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 122, 61, 0.09), transparent);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--player-height) + 16px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* ─── Layout Shell ─── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: var(--player-height);
  width: var(--sidebar-width);
  background: #0b0b10;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  z-index: 40;
  overflow-y: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-orange);
  margin-top: 2px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 10px 10px 6px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 59, 107, 0.18), rgba(255, 122, 61, 0.12));
  color: #fff;
  border: 1px solid rgba(255, 59, 107, 0.35);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(9, 9, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 32px 28px 48px;
  flex: 1;
}

/* ─── Buttons & Badges ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 59, 107, 0.28);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 30px rgba(255, 59, 107, 0.42);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.badge-accent {
  border-color: rgba(255, 59, 107, 0.35);
  background: rgba(255, 59, 107, 0.12);
  color: #ff9cb5;
}

.badge-emerald {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

/* ─── Hero & Editorial Typography ─── */
.hero {
  position: relative;
  padding: 28px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.hero-title {
  margin: 14px 0 16px;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.gradient-text {
  background: linear-gradient(135deg, #ff3b6b 0%, #ff7a3d 55%, #ffd166 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 24px;
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 600px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.metric-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 700;
}

.metric-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ─── Cards & Studio Grid ─── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-highlight {
  background: linear-gradient(180deg, rgba(255, 59, 107, 0.07) 0%, var(--bg-elevated) 100%);
  border-color: rgba(255, 59, 107, 0.25);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ─── Flagship MP3-to-Sheet Studio ─── */
.studio-workspace {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 22px;
  align-items: start;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-pink);
  background: rgba(255, 59, 107, 0.07);
}

.dropzone-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 8px 0 4px;
}

.dropzone-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent-pink);
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.attestation-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.35);
  margin: 14px 0 18px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #fde68a;
}

.attestation-box input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-pink);
  flex-shrink: 0;
  cursor: pointer;
}

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin: 10px 0;
}

.alert-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* ─── Waveform & Sheet Music Engraving Paper ─── */
.waveform-canvas {
  width: 100%;
  height: 74px;
  display: block;
  border-radius: var(--radius-sm);
  background: #0d0d14;
  border: 1px solid var(--border);
}

.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.sheet-paper {
  background: #fdfcf7;
  color: #141418;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 24px 20px;
  min-height: 360px;
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.sheet-paper svg {
  width: 100%;
  height: auto;
  display: block;
}

.chord-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chord-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-weight: 700;
  font-size: 0.85rem;
  color: #ddd6fe;
}

/* ─── Track Cards & Tags ─── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.pill-btn.selected {
  background: rgba(255, 59, 107, 0.2);
  border-color: var(--accent-pink);
  color: #fff;
}

.track-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.track-card:hover {
  border-color: rgba(255, 122, 61, 0.45);
  transform: translateY(-2px);
}

.track-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.track-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.track-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Pricing ─── */
.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-figure {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* ─── FAQ ─── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* ─── Legal Document Styling ─── */
.legal-article {
  max-width: 820px;
  margin: 0 auto;
}

.legal-article h2 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.legal-article p,
.legal-article li {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* ─── Shared Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  background: #07070a;
  padding: 28px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ─── Persistent Bottom Studio Player ─── */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-height);
  background: rgba(11, 11, 16, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-strong);
  z-index: 50;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  align-items: center;
  gap: 18px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.player-track-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-track-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-canvas {
  flex: 1;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── Responsive ─── */
@media (max-width: 1040px) {
  .studio-workspace,
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-area {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .grid-2,
  .grid-3,
  .field-row,
  .hero-metrics {
    grid-template-columns: 1fr;
  }
  .player-bar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }
  .player-center .player-canvas,
  .player-right .hide-mobile {
    display: none;
  }
}

/* ─── Print Sheet Music Only ─── */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .sidebar,
  .topbar,
  .player-bar,
  .site-footer,
  .no-print {
    display: none !important;
  }
  .main-area {
    margin-left: 0 !important;
  }
  .sheet-paper {
    box-shadow: none !important;
    padding: 0 !important;
  }
}
