/* OnePlus Buds 4 for macOS — site stylesheet.
   No webfonts and no third-party requests: the palette is the app's own and the type is the
   system's. The page is the document, one stylesheet and its own images, plus a single
   same-origin module that draws the hero's sculpture when the browser and the layout support
   it. Without that module the page is exactly what it was. */

:root {
  /* Mirrors Sources/BudsBarKit/Theme.swift so the page and the app are the same blue. */
  --accent: #5c99ff;
  --accent-deep: #2957f2;
  --bg-top: #0e2049;
  --bg-bottom: #070e26;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.085);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f5fb;
  --muted: rgba(255, 255, 255, 0.66);
  --faint: rgba(255, 255, 255, 0.62);
  /* Body-copy link blue: #8fb8ff is ~6:1 on the lightest surface, where --accent (3.75:1)
     is reserved for icons, glyphs and strokes. */
  --link: #8fb8ff;
  --green: #3ddc8c;
  --radius: 18px;
  --radius-sm: 12px;
  --page: 1080px;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-bottom);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial,
               sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The app's background: a vertical gradient with one soft glow near the top. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 620px at 22% -8%, rgba(92, 153, 255, 0.24), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 62%);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: #b7d0ff; text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

/* Every image here is content, never a control: not one of them is a link, and none of them
   wants to be. Taking pointer events off them removes the pointer cursor, the drag-to-desktop
   ghost and the browser's image menu — "Open Image in New Tab", "Save Image As", "Copy Image" —
   which are the only ways off this page that are not this page. Text stays selectable and every
   link still takes its own clicks, because a link's own box is still a hit target. */
img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.wrap { width: min(100% - 48px, var(--page)); margin-inline: auto; }

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(7, 14, 38, 0.72);
  border-bottom: 1px solid var(--stroke);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }

nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 4px 0; }
nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 780px) { nav a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  /* Measured against white: this deep blue is 5.62:1, where the bright accent is 2.82:1. */
  background: var(--accent-deep);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 28px -12px rgba(41, 87, 242, 0.9);
}
.btn-primary:hover { background: #3562ff; color: #fff; }

.btn-quiet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stroke);
}
.btn-quiet:hover { background: var(--surface-strong); border-color: var(--stroke-strong); color: var(--text); }

.btn svg { width: 17px; height: 17px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
  .hero-field canvas { transition: none; }
}

/* ---------- hero ---------- */

.hero { position: relative; padding: 76px 0 24px; }

/* The liquid sculpture, painted behind the hero's copy. It is pure decoration and it is
   optional: the field's height is set from JS only once there is room for it, and the canvas
   only fades in on the engine's first frame, so without WebGL2 (or on a phone, or with
   reduced motion, or Save-Data) none of this appears and the hero is exactly as it was. */
.hero-field {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-field canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s ease 0.05s;
  /* The strands fade out well before the headline: --field-mask is the measured right edge of
     the copy, so a particle flung outwards is invisible by the time it could reach any text. */
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--field-mask, 62%) - 14%), #000 var(--field-mask, 62%));
          mask-image: linear-gradient(90deg, transparent calc(var(--field-mask, 62%) - 14%), #000 var(--field-mask, 62%));
}
.hero-field[data-gl="on"] canvas { opacity: 1; }

.hero > .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px 1px var(--green);
}

.hero h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 700;
  max-width: 17ch;
}

.hero .lede {
  margin-top: 22px;
  max-width: 60ch;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  align-items: center;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--faint);
}
.facts li { display: inline-flex; align-items: center; gap: 7px; }
.facts svg { width: 14px; height: 14px; opacity: 0.8; }

/* ---------- screenshot ---------- */

.shot {
  margin-top: 56px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  box-shadow: var(--shadow);
  /* The window is a 470pt-wide column: showing it at 1.1× the page width made it a billboard
     and pushed everything below the fold. It is presented near its real size instead. */
  width: min(100%, 560px);
  margin-inline: auto;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--faint);
  text-align: center;
}

/* ---------- sections ---------- */

section { padding: 76px 0; }
.section-head { max-width: 62ch; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-size: 16.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card p { margin-top: 9px; color: var(--muted); font-size: 14.5px; }

.tile-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-strong);
  border: 1px solid var(--stroke);
  display: grid; place-items: center;
  flex: none;
}
.tile-icon svg { width: 18px; height: 18px; color: var(--accent); }

.tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--faint);
}

/* ---------- feature list (checkmarks) ---------- */

.checks { display: grid; gap: 12px 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 0; padding: 0; list-style: none; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--green); }
.check b { color: var(--text); font-weight: 600; }

/* ---------- screens ---------- */

.screens { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.screen figure { margin: 0; }
.screen img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}
.screen figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.screen figcaption b { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; }

/* The window is a tall column; the page shows its top. The whole image is in the repository
   and rendered in full by the README, which is where a tall screenshot belongs. */
.screen .window-shot {
  max-height: 620px;
  object-fit: cover;
  object-position: top center;
}

/* ---------- table ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
th, td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; }
th[scope="row"] { font-size: 14.5px; text-transform: none; letter-spacing: normal; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td { color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.yes { color: var(--green); }
.status.no { color: #ff8b8b; }
.status.maybe { color: #ffcf6b; }

/* ---------- steps ---------- */

.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px 22px 22px 22px;
}
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step .num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 9px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}
kbd, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text);
}
code { background: none; border: 0; padding: 0; color: #cfe0ff; }
kbd { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--stroke); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Visually hidden until focused: the skip link reappears as a real control. */
.sr-only:focus,
.sr-only:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--accent-deep);
  color: #fff;
  border-radius: 10px;
  z-index: 100;
}

/* ---------- two-column note ---------- */

.panel-split {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 8px;
}
.note {
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 18px 20px;
}
.note h3 { font-size: 15px; font-weight: 600; }
.note p { margin-top: 7px; color: var(--muted); font-size: 14.5px; }

/* ---------- faq ---------- */

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 20px;
}
.faq details[open] { background: var(--surface-strong); border-color: var(--stroke-strong); }
.faq summary {
  cursor: pointer;
  padding: 17px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  width: 9px; height: 9px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
  flex: none;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details p {
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 14.75px;
  max-width: 76ch;
}
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--stroke);
  padding: 44px 0 64px;
  color: var(--faint);
  font-size: 13.5px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 0 0 18px; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); display: inline-block; padding: 4px 0; }
footer p + p { margin-top: 10px; }

/* ---------- one-off layout utilities ----------
   Extracted from inline style="" attributes so the markup stays style-free. Each
   !important matches the computed value the inline declaration used to force. */

.u-mt-52 { margin-top: 52px !important; }
.u-mt-56 { margin-top: 56px !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mb-26 { margin-bottom: 26px !important; }
.u-fs-24 { font-size: 24px !important; }
.u-fs-19 { font-size: 19px !important; }
.u-fs-16 { font-size: 16px !important; }
.u-fs-15 { font-size: 15px !important; }
