/* Baubra Backdrops: shared styles. The page sits on top of a live backdrop
   (#stage), so everything is glass over moving light. */
:root {
  --bg: #06070c;
  --ink: #f4f3fa;
  --muted: rgba(236, 234, 248, .68);
  --faint: rgba(236, 234, 248, .42);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .24);
  --glass: rgba(14, 15, 24, .42);
  --glass-2: rgba(22, 24, 36, .62);
  --glass-hi: rgba(255, 255, 255, .07);
  --accent: #5ef2b8;
  --accent-ink: #04130d;
  --radius: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* "hidden" always wins, even over classes like .btn that set display */
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
/* The page background lives on <html>: a background on <body> would paint over
   the live backdrop canvas, which sits at a negative z-index. */
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: transparent;
  font: 400 16px/1.55 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the live stage behind every page */
#stage, #stage-fade, #stage-poster {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: -2; display: block;
}
#stage-poster { object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
#stage-poster.on { opacity: 1; }
#stage-fade { z-index: -1; pointer-events: none; opacity: 0; }
#stage-fade.go { transition: opacity .7s var(--ease); }
.scrim {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 7, 12, .5) 0%, rgba(6, 7, 12, 0) 18%, rgba(6, 7, 12, 0) 55%, rgba(6, 7, 12, .55) 100%);
  transition: background .5s var(--ease);
}
body.deep .scrim { background: rgba(6, 7, 12, .5); }

/* ---------- nav */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(calc(100% - 24px), var(--max)); display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-weight: 450; color: var(--muted); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 14.5px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: var(--glass-hi); }
@media (max-width: 760px) { .nav-links { display: none; } .brand small { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--glass-hi); color: var(--ink); text-decoration: none; font-weight: 550; font-size: 15px;
  cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn:hover { background: rgba(255, 255, 255, .13); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); box-shadow: 0 10px 38px -8px color-mix(in srgb, var(--accent) 85%, transparent); }
.btn.small { height: 36px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn.icon { width: 40px; padding: 0; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

/* ---------- layout */
.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--max)); margin: 0 auto; }
section { position: relative; }
.eyebrow { font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; font-weight: 620; }
p { margin: 0; }
.lede { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 60ch; }
.panel {
  background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

/* ---------- hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 0 clamp(28px, 6vh, 64px); }
.hero h1 { font-size: clamp(46px, 8.2vw, 116px); max-width: 11ch; text-shadow: 0 2px 40px rgba(0, 0, 0, .35); }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-top: 18px; text-shadow: 0 1px 18px rgba(0, 0, 0, .5); color: rgba(240, 238, 250, .82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.now {
  margin-top: clamp(28px, 6vh, 56px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 8px 8px 16px; border-radius: 16px; width: fit-content; max-width: 100%;
}
.now .label { font-size: 13.5px; color: var(--muted); }
.now .label b { color: var(--ink); font-weight: 600; }
.now .hint { font-size: 13px; color: var(--faint); margin-right: 6px; }
.now .sep { width: 1px; height: 22px; background: var(--line); }
/* the home bar's settings: sound, mouse, music, time of day */
.now-settings { width: min(340px, 100%); margin-top: 10px; padding: 6px 18px; border-radius: 16px; }
/* full screen from the home bar: nothing but the backdrop (a tap or Esc brings the page back) */
body.home-bare .nav, body.home-bare main, body.home-bare .footer, body.home-bare .scrim { opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
body.home-bare { overflow: hidden; cursor: none; }
/* settings controls (the home bar and the backdrop page share them) */
.ctl { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ctl:last-of-type { border-bottom: 0; }
.ctl label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.ctl label b { color: var(--ink); font-weight: 550; }
.ctl output { font: 500 12.5px/1 var(--mono); color: var(--faint); }
.ctl input[type=range] { width: 100%; margin-top: 10px; }
.ctl select { width: 100%; margin-top: 8px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line); padding: 0 10px; font: inherit; }
.ctl input[type=color] { width: 44px; height: 28px; border: 0; background: none; padding: 0; }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.ctl-note { color: var(--faint); font-size: 12.5px; margin-top: 6px; }
@media (max-width: 600px) {
  .now { flex-wrap: nowrap; gap: 6px; padding-left: 12px; }
  .now .hint, .now .sep { display: none; }
  .now .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ---------- library */
.library { padding: clamp(60px, 10vh, 120px) 0 40px; }
.lib-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.lib-head .lede { margin-top: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sort { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sort select { height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); padding: 0 12px; font: inherit; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sort select:hover { border-color: var(--line-strong); }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  color: var(--muted); font-size: 14px; cursor: pointer; transition: all .2s; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative; display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden;
  background: var(--glass-2); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, transparent); box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--c, var(--accent)) 55%, transparent); }
.card .thumb { aspect-ratio: 16 / 9; position: relative; background: var(--bg0, #111) center / cover no-repeat; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .4s; }
.card:hover .thumb img { transform: scale(1.04); }
.card .thumb .live { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.card.trying .thumb .live { opacity: 1; }
.card .meta { padding: 14px 16px 16px; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 18px; }
.card p { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font: 500 12px/1 var(--mono); color: var(--muted); background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.badge svg { width: 13px; height: 13px; }
.badge.cost { color: color-mix(in srgb, var(--accent) 80%, white); }
.badge.kind { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink); }
.try { font: 500 12px/1 var(--mono); color: var(--faint); white-space: nowrap; }

/* ---------- feature sections */
.band { padding: clamp(70px, 12vh, 140px) 0; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 22px; }
.stat .num { font-size: clamp(34px, 4vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.stat .num small { font-size: .45em; font-weight: 550; letter-spacing: -.01em; color: var(--muted); margin-left: 4px; }
.stat p { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 500 13px/1 var(--mono); color: var(--accent); }
.step h3 { margin-top: 14px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.faq { display: grid; gap: 10px; margin-top: 30px; }
.faq details { padding: 4px 20px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 580; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 18px; max-width: 70ch; }
.footer { padding: 50px 0 60px; color: var(--faint); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 26px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- dialog */
dialog {
  border: 1px solid var(--line-strong); border-radius: 22px; padding: 26px; max-width: min(440px, calc(100vw - 32px));
  background: rgba(16, 17, 27, .92); color: var(--ink); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7);
}
dialog::backdrop { background: rgba(4, 5, 9, .55); backdrop-filter: blur(3px); }
dialog h3 { font-size: 22px; }
dialog p { color: var(--muted); margin-top: 10px; font-size: 15px; }
dialog .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
dialog :is(p, ol) a { color: var(--accent); }
dialog b { color: var(--ink); font-weight: 580; }
dialog ol.how { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
dialog h4 { font-size: 16.5px; margin-top: 20px; color: var(--ink); }
dialog .dl-live { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.copy { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.copy code { flex: 1; min-width: 0; font: 500 13px/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* the card in the corner after "Download for Windows" (non-modal: the page and the download bar stay usable) */
dialog.install-helper {
  position: fixed; inset: auto 20px 20px auto; margin: 0; width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 40px); overflow: auto; z-index: 60;
}
dialog.install-helper .x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; }
dialog.install-helper .x:hover { color: var(--ink); }
dialog.install-helper h3 { padding-right: 28px; }
dialog.install-helper .actions { margin-top: 14px; }
dialog.install-helper .wait { display: flex; gap: 10px; align-items: center; }
dialog.install-helper .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: helper-pulse 1.4s ease-in-out infinite; flex: none; }
@keyframes helper-pulse { 50% { opacity: .25; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 50;
  padding: 12px 18px; border-radius: 14px; font-size: 14.5px; pointer-events: none;
  transition: all .35s var(--ease);
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation-duration: .01s !important; } }

/* Phones: Windows-only parts give way to phone ones (mountNav sets html.phone) */
html.phone [data-desktop-only], html:not(.phone) [data-phone-only] { display: none !important; }
/* Parts for one kind of computer (mountNav sets html[data-device]); the app's
   parts show on Windows and Macs, [data-browser-only] on iPads, Chromebooks and Linux */
html[data-device]:not([data-device="windows"]) [data-windows-only],
html[data-device]:not([data-device="mac"]) [data-mac-only],
html[data-device]:not([data-device="windows"]):not([data-device="mac"]) [data-app-only],
html:not([data-device="ipad"]):not([data-device="chromebook"]):not([data-device="other"]) [data-browser-only] { display: none !important; }
html.standalone [data-homescreen], html.standalone [data-homescreen-step] { display: none !important; }
#home-screen { max-width: min(460px, calc(100vw - 20px)); }

/* The phone sheet: a preview and two choices, each one Save button */
#phone-sheet { max-width: min(460px, calc(100vw - 20px)); padding: 22px 18px; max-height: calc(100dvh - 24px); overflow-y: auto; }
#phone-sheet h3 { font-size: 21px; outline: none; }
.ph-preview { margin: 12px auto 2px; width: min(34vw, 128px); aspect-ratio: 1080 / 2340; border-radius: 22px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .14); background: #000; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .7); }
.ph-preview :is(video, img) { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-opt { margin-top: 14px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.ph-opt h4 { font-size: 17px; display: flex; align-items: center; gap: 8px; color: var(--ink); margin: 0 0 12px; }
.ph-opt .tag { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.ph-more { margin-top: 14px; }
.ph-more summary { cursor: pointer; color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.ph-more[open] summary { color: var(--ink); }
.btn.wide { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }
.btn.wide[disabled] { opacity: .6; }
.ph-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ph-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; line-height: 1.45; }
.ph-steps .n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink); background: rgba(255, 255, 255, .1); margin-top: 1px; }
#phone-sheet .fine { font-size: 13.5px; margin-top: 14px; }
