/* ==========================================================================
   Bluetooth Audio Connect Widget — bluetoothwidget.com
   Design tokens + layout. Dependency-free, dark-first, responsive.
   ========================================================================== */

:root {
  /* Dark theme (default) */
  --bg:         #0b0e14;
  --bg-grid:    rgba(255, 255, 255, 0.025);
  --surface:    #121824;
  --surface-2:  #161d2b;
  --border:     #232c3b;
  --border-soft:#1b2432;
  --text:       #e6edf3;
  --text-dim:   #99a6b8;
  --text-faint: #5f6b7d;
  --accent:     #2f9bff;
  --accent-ink: #0a84ff;
  --accent-soft:rgba(47, 155, 255, 0.12);
  --ok:         #30d158;

  --radius:     14px;
  --radius-sm:  10px;
  --maxw:       1120px;
  --gutter:     20px;

  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
}

:root[data-theme="light"] {
  --bg:         #ffffff;
  --bg-grid:    rgba(10, 14, 20, 0.035);
  --surface:    #f7f9fc;
  --surface-2:  #ffffff;
  --border:     #e2e8f1;
  --border-soft:#eef2f7;
  --text:       #0b0e14;
  --text-dim:   #51607420;
  --text-dim:   #556074;
  --text-faint: #8a97a8;
  --accent:     #0a74e0;
  --accent-ink: #0a74e0;
  --accent-soft:rgba(10, 116, 224, 0.09);
  --ok:         #1a9c3e;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 16px 40px -20px rgba(16,24,40,.25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:         #ffffff;
    --bg-grid:    rgba(10, 14, 20, 0.035);
    --surface:    #f7f9fc;
    --surface-2:  #ffffff;
    --border:     #e2e8f1;
    --border-soft:#eef2f7;
    --text:       #0b0e14;
    --text-dim:   #556074;
    --text-faint: #8a97a8;
    --accent:     #0a74e0;
    --accent-ink: #0a74e0;
    --accent-soft:rgba(10, 116, 224, 0.09);
    --ok:         #1a9c3e;
    --shadow: 0 1px 2px rgba(16,24,40,.06), 0 16px 40px -20px rgba(16,24,40,.25);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(68% 52% at 86% -12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(52% 46% at -8% 104%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 58%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
  background-position: center top;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-attachment: scroll, scroll, fixed, fixed;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle grain overlay for depth/texture */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { line-height: 1.14; letter-spacing: -0.025em; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Eyebrow / mono labels ------------------------------------------------ */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-block;
}
.eyebrow::before { content: "// "; color: var(--text-faint); }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 550;
  padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* ---- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; overflow: hidden; flex: none;
  display: grid; place-items: center;
}
.brand .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand b { font-weight: 650; }
.brand .brand-sub { color: var(--text-faint); font-weight: 450; font-size: 13px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  color: var(--text-dim); font-size: 14.5px; padding: 7px 11px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  display: grid; place-items: center; transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero { padding: 76px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.35rem); margin-bottom: 18px; font-weight: 700; letter-spacing: -0.035em; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: 1.12rem; color: var(--text-dim); max-width: 46ch; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-meta {
  margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta b { color: var(--text-dim); font-weight: 550; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }

/* Orchestrated hero reveal on load */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: riseIn .72s cubic-bezier(.22,.61,.36,1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: .04s; }
.hero-copy > *:nth-child(2) { animation-delay: .12s; }
.hero-copy > *:nth-child(3) { animation-delay: .20s; }
.hero-copy > *:nth-child(4) { animation-delay: .28s; }
.hero-copy > *:nth-child(5) { animation-delay: .36s; }
.hero .device { animation: floatIn .9s cubic-bezier(.22,.61,.36,1) .22s backwards; }

/* Device frame — holds a real app screenshot */
.device {
  justify-self: center; width: 286px; max-width: 80vw;
  border-radius: 36px; padding: 10px; position: relative;
  background: linear-gradient(160deg, #1c2534, #0d1017);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.device::before {
  content: ""; position: absolute; inset: -16% -12% -10%; z-index: -1;
  background: radial-gradient(58% 52% at 50% 38%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 70%);
  filter: blur(46px); opacity: 0.55;
}
:root[data-theme="light"] .device { background: linear-gradient(160deg, #dde4ee, #c3cdda); }
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]) .device { background: linear-gradient(160deg, #dde4ee, #c3cdda); } }
.device img { width: 100%; height: auto; border-radius: 28px; display: block; }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.shot { display: flex; flex-direction: column; }
.shot .frame {
  border-radius: 24px; padding: 8px;
  background: linear-gradient(160deg, #1c2534, #0d1017);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
:root[data-theme="light"] .shot .frame { background: linear-gradient(160deg, #dde4ee, #c3cdda); }
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]) .shot .frame { background: linear-gradient(160deg, #dde4ee, #c3cdda); } }
.shot .frame img { width: 100%; height: auto; border-radius: 17px; display: block; }
.shot h3 { font-size: 1.04rem; margin: 20px 0 6px; }
.shot p { color: var(--text-dim); font-size: 0.93rem; }
.muted-note { color: var(--text-faint); font-family: var(--mono); font-size: 0.78rem; }

/* ---- Section scaffolding -------------------------------------------------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-bottom: 12px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }
.divider { border: 0; border-top: 1px solid var(--border-soft); margin: 0; }

/* ---- Social proof / stats band -------------------------------------------- */
.proof { padding: 20px 0 8px; }
.proof-row {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  max-width: 560px; margin: 0 auto;
}
.proof-note {
  text-align: center; font-family: var(--mono); font-size: 0.76rem;
  color: var(--text-faint); letter-spacing: 0.04em; margin-top: 14px;
}
.stat { padding: 22px 20px; text-align: center; border-left: 1px solid var(--border-soft); }
.stat:first-child { border-left: 0; }
.stat-num {
  display: block; font-family: var(--mono); font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 1.95rem); letter-spacing: -0.02em; color: var(--text);
  line-height: 1.1; margin-bottom: 6px;
}
.stat .star { color: var(--accent); margin-left: 3px; font-size: 0.8em; }
.stat-label {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-dim);
}
@media (max-width: 460px) {
  .stat { padding: 18px 10px; }
  .stat-label { font-size: 0.68rem; letter-spacing: 0.04em; }
}

/* ---- Feature grid --------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.card .c-ico {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 16px;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.card .c-ico svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.08rem; margin-bottom: 7px; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ---- How it works --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step {
  position: relative; padding: 24px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  display: block; margin-bottom: 12px; font-weight: 600;
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--text-dim); font-size: 0.92rem; }

/* ---- Support / spec table ------------------------------------------------- */
.support { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
}
.spec h3 { font-size: 1.05rem; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.spec h3 svg { width: 19px; height: 19px; color: var(--accent); }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--border-soft);
  font-size: 0.95rem; color: var(--text-dim);
}
.spec-list li:first-child { border-top: 0; }
.spec-list .k { font-family: var(--mono); font-size: 12px; color: var(--text); min-width: 120px; flex: none; padding-top: 1px; }
.tick { color: var(--ok); flex: none; margin-top: 2px; }
.tick svg { width: 16px; height: 16px; }

/* ---- Callout / note ------------------------------------------------------- */
.note {
  display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--text-dim); font-size: 0.95rem; margin-top: 16px;
}
.note svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }
.note b { color: var(--text); font-weight: 600; }

/* ---- FAQ ------------------------------------------------------------------ */
.faq { max-width: 820px; margin: 0 auto; }
details.qa {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
}
details.qa[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
details.qa summary {
  list-style: none; cursor: pointer; padding: 17px 20px;
  font-weight: 550; font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary .plus { color: var(--accent); flex: none; transition: transform .2s ease; font-family: var(--mono); font-size: 18px; }
details.qa[open] summary .plus { transform: rotate(45deg); }
details.qa .qa-body { padding: 0 20px 18px; color: var(--text-dim); font-size: 0.97rem; }
details.qa .qa-body a { color: var(--accent); }

/* ---- CTA ------------------------------------------------------------------ */
.cta {
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  border: 1px solid var(--border); border-radius: 20px; padding: 56px 24px;
}
.cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.cta p { color: var(--text-dim); font-size: 1.08rem; max-width: 50ch; margin: 0 auto 26px; }
.cta .hero-cta { justify-content: center; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 46px 0 40px; margin-top: 24px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--text-faint); font-size: 0.9rem; margin-top: 12px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.93rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.86rem; color: var(--text-faint); font-family: var(--mono);
}

/* ---- Google Play badge (official artwork) --------------------------------- */
.gp-badge { display: inline-flex; border-radius: 12px; transition: transform .12s ease, opacity .15s ease; }
.gp-badge:hover { transform: translateY(-1px); opacity: 0.88; text-decoration: none; }
.gp-badge img { height: 58px; width: auto; }
.gp-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Legal pages ---------------------------------------------------------- */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 0; }
.doc h1 { font-size: 2.1rem; margin-bottom: 8px; }
.doc .updated { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); margin-bottom: 36px; }
.doc h2 { font-size: 1.3rem; margin: 36px 0 12px; }
.doc p, .doc li { color: var(--text-dim); margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--accent); }
.back-link { font-family: var(--mono); font-size: 13px; color: var(--text-dim); display: inline-flex; gap: 7px; align-items: center; margin-bottom: 28px; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .device { grid-row: 1; width: 260px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  section { padding: 56px 0; }
  .hero { padding: 48px 0; }
  .support { grid-template-columns: 1fr; }
  .footer-cols { gap: 36px; }
}
@media (max-width: 560px) {
  /* Full product name needs the room; the hero has the primary CTA right below. */
  .site-header .btn-primary { display: none; }
  .brand b { font-size: 0.98rem; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .hero-cta .gp-badge { justify-content: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
