/* ────────────────────────────────────────────────────────────────────────
   getlivebpm.com — site styles (web-scale, loose inspiration from the
   mobile app's glass-morphism aesthetic). Pairs with Bootstrap 5.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  --accent-pink:   #FF4D97;
  --accent-blue:   #4D96FF;
  --accent-green:  #6BCB77;
  --accent-yellow: #FFD93D;

  --ink-900: #0f172a;
  --ink-700: #1e293b;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;
  --ink-100: #e2e8f0;
  --ink-50:  #f1f5f9;
  --bg:      #f8fafc;

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);

  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 40px;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  line-height: 1.6;
  margin: 0;
  /* Colored radial haze behind the whole page */
  background-image:
    radial-gradient(at 0% 0%,     rgba(77, 150, 255, 0.10) 0px, transparent 50%),
    radial-gradient(at 100% 0%,   rgba(255, 77, 151, 0.10) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(107, 203, 119, 0.10) 0px, transparent 50%),
    radial-gradient(at 0% 100%,   rgba(255, 217, 61, 0.10) 0px, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; color: var(--ink-900); }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.15; }
h3 { font-size: 1.25rem; }

p { color: var(--ink-500); }

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: #2563eb; text-decoration: underline; }

.mono-data {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.03em;
}

.section-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: 12px;
}

/* ── Navigation ───────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}
.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--ink-900);
}
.brand:hover { color: var(--ink-900); text-decoration: none; }
.brand .brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px rgba(77, 150, 255, 0.6);
}
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--ink-500);
  font-weight: 600;
  font-size: 14px;
}
.nav-links a:hover { color: var(--ink-900); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
}
.hero-copy .lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-500);
  max-width: 560px;
  margin-top: 20px;
}
.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ink-100);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-500);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.badge-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); }

/* ── Glass card (re-used for detector embed, feature showcases) ───── */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

/* Detector placeholder (fallback copy for older markup) */
.detector-placeholder {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-300);
  font-weight: 600;
}
.detector-placeholder .pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(77, 150, 255, 0.12);
  color: var(--accent-blue);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  margin-top: 14px;
}

/* ── Live BPM detector (ported from the Vite app) ────────────────────── */
.detector-card { padding: 32px; }

.detector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.engine-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: 4px;
}
.engine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  display: inline-block;
}
.engine-name { font-weight: 700; color: var(--ink-700); font-size: 14px; }
.engine-stat { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--ink-700); letter-spacing: -0.03em; }

/* Big circular BPM dial */
.bpm-stage { position: relative; padding: 24px 0 16px; }
.chromatic-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent-blue);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  z-index: 0;
  transition: all 0.5s ease;
  pointer-events: none;
}
.bpm-dial {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(255,255,255,0.5);
  margin: 0 auto;
}
.bpm-dial::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(148,163,184,0.3);
}
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-blue);
  animation: ring-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.bpm-dial:not(.idle) .pulse-ring { animation: none; opacity: 0; }
@keyframes ring-pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0;   }
}

.bpm-caption {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 4px;
}
.bpm-value {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.05em;
  font-size: 84px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-900);
}
.bpm-unit {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-300);
  margin-top: 6px;
  font-weight: 700;
  text-transform: uppercase;
}
.bpm-dial.idle .bpm-value { color: var(--ink-200); }
.bpm-dial.idle .chromatic-glow,
.bpm-stage.idle .chromatic-glow { opacity: 0.2; }

/* Waveform visualiser */
.visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  margin-top: 24px;
}
.wave-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent-blue);
  transition: height 0.1s ease, background-color 0.1s ease;
  height: 10px;
}

/* Detector stat cards + gain */
.stat-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid #ffffff;
  border-radius: 24px;
  padding: 14px 16px;
}
.stat-label-sm {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-300);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-value-lg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-700);
  letter-spacing: -0.03em;
}
.gain-slider {
  width: 100%;
  accent-color: var(--accent-blue);
  margin-top: 6px;
}
.vu-meter {
  position: relative;
  height: 10px;
  background: rgba(15,23,42,0.08);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 8px;
}
.vu-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green) 60%, var(--accent-yellow) 75%, var(--accent-pink) 95%);
  transition: width 0.05s linear;
}
.vu-peak {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--ink-900);
  opacity: 0.7;
}

/* Detector buttons */
.tap-button {
  transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 24px;
  font-weight: 700;
  padding: 16px 20px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  width: 100%;
}
.tap-button:active { transform: scale(0.96); }
.tap-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-mic {
  background: var(--ink-900);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}
.btn-mic:hover:not(:disabled) { background: var(--ink-700); color: #fff; }
.btn-mic .dot { background: var(--accent-pink); width: 8px; height: 8px; border-radius: 50%; }
.btn-system {
  background: #fff;
  color: var(--ink-900);
  border: 1px solid var(--ink-100);
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}
.btn-system:hover:not(:disabled) { background: var(--ink-50); }
.btn-stop {
  background: rgba(255,255,255,0.55);
  color: var(--ink-400);
  border: 1px solid var(--ink-100);
}
.btn-stop:hover:not(:disabled) { background: #fff; color: var(--ink-900); }

/* Detector status toast */
.status {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 12px;
  text-align: center;
  display: none;
  font-weight: 600;
}
.status.visible   { display: block; }
.status.analyzing { background: #fef3c7; color: #92400e; }
.status.error     { background: #fee2e2; color: #991b1b; }
.status.success   { background: #dcfce7; color: #166534; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.btn-pill:hover { transform: translateY(-1px); text-decoration: none; }
.btn-dark {
  background: var(--ink-900);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.btn-dark:hover { background: var(--ink-700); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
}
.btn-ghost:hover { background: #fff; color: var(--ink-900); }

/* ── Section building blocks ─────────────────────────────────────────── */
.section {
  padding: 80px 0;
}
.section-muted {
  background: #fff;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}
.section-title {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}
.section-title p {
  margin-top: 12px;
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  border-color: var(--ink-200);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}
.feature-card .feature-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 0.95rem; margin: 0; }

/* ── Steps / how-it-works ────────────────────────────────────────────── */
.step-list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}
.step-item {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 26px;
  counter-increment: step;
}
.step-item::before {
  content: counter(step, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-pink);
  display: block;
  margin-bottom: 10px;
}
.step-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-item p { font-size: 0.92rem; margin: 0; }

/* ── FAQ accordion ───────────────────────────────────────────────────── */
.faq-group {
  max-width: 760px;
  margin: 0 auto;
}
.faq-group + .faq-group { margin-top: 40px; }

.faq-item {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover { border-color: var(--ink-200); }
.faq-item.open { border-color: var(--accent-blue); box-shadow: 0 10px 28px rgba(77, 150, 255, 0.08); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
}
.faq-question:hover { color: var(--accent-blue); }

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-50);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--accent-blue);
  color: #fff;
}

.faq-answer {
  max-height: 0;
  padding: 0 22px;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 22px 20px;
}
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { padding-left: 20px; margin: 6px 0 0; }
.faq-answer li { color: var(--ink-500); margin-bottom: 4px; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.form-field {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-900);
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field::placeholder { color: var(--ink-300); }
.form-field:hover { border-color: var(--ink-200); }
.form-field:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(77, 150, 255, 0.12);
}
textarea.form-field { resize: vertical; min-height: 140px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 6px;
}

.ajax-response { color: var(--ink-500); font-size: 0.9rem; min-height: 1.2em; }

/* ── Contact info list ───────────────────────────────────────────────── */
.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-100);
}
.contact-line:last-child { border-bottom: 0; }
.contact-line .contact-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(77, 150, 255, 0.12);
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.contact-line .contact-body { min-width: 0; }
.contact-line .contact-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 2px;
}
.contact-line .contact-value {
  font-weight: 600;
  color: var(--ink-900);
  word-break: break-word;
}

/* ── App store download badges ───────────────────────────────────────── */
.store-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  background: #0f172a;
  color: #fff;
  border-radius: 14px;
  text-decoration: none;
  min-width: 180px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.store-badge:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  background: var(--ink-700);
}
.store-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.store-badge .store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store-badge .store-caption {
  font-size: 10px;
  opacity: 0.75;
  letter-spacing: 0.05em;
}
.store-badge .store-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.store-badge.disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.85;
}
/* Coming-soon ribbon pinned to the top-right of each disabled badge */
.store-badge .ribbon {
  position: absolute;
  top: -10px;
  right: -8px;
  background: var(--accent-pink);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 77, 151, 0.35);
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--ink-100);
  padding: 60px 0 30px;
  margin-top: 40px;
}
.footer-brand p {
  color: var(--ink-400);
  font-size: 0.92rem;
  margin-top: 10px;
  max-width: 320px;
}
.footer-heading {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-700);
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: var(--ink-500);
  font-size: 0.92rem;
  font-weight: 500;
}
.footer-links a:hover { color: var(--ink-900); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--ink-100);
  margin-top: 40px;
  padding-top: 20px;
  color: var(--ink-400);
  font-size: 0.82rem;
}

/* ── Responsive nits ─────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 56px 0; }
}
