/* BetterStream website. Colours are the app's dark theme (shared/.../ui/theme/Color.kt). */
:root {
  --bg: #0f1014;
  --surface: #17181d;
  --surface-variant: #1f2128;
  --surface-container: #23252d;
  --primary: #38bdf8;
  --on-primary: #05202e;
  --text: #f2f4f8;
  --text-2: #9aa0ac;
  --outline: #2b2e37;
  --error: #ef4444;
  --amber: #fbbf24;
  --green: #34d399;
  --radius: 16px;
  --radius-small: 10px;
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--text-2); }
.fineprint { font-size: 0.875rem; color: var(--text-2); }
.eyebrow { color: var(--primary); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; margin-bottom: 1rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary);
  font: 600 1rem/1 var(--font); cursor: pointer; text-decoration: none;
  transition: filter 0.15s ease, background 0.15s ease;
}
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button.small { min-height: 38px; padding: 0 16px; font-size: 0.925rem; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--outline); }
.button.ghost:hover { background: var(--surface-variant); }
.button.danger { background: var(--error); color: #fff1f1; }
.button[disabled], .button.disabled { opacity: 0.45; cursor: not-allowed; filter: none; pointer-events: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(15, 16, 20, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--outline); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a:not(.button) { color: var(--text-2); font-weight: 500; }
.nav a:not(.button):hover { color: var(--text); text-decoration: none; }
.menu-toggle { display: none; margin-left: auto; background: var(--surface-variant); color: var(--text); border: 1px solid var(--outline); border-radius: 999px; padding: 8px 16px; font: 500 0.95rem var(--font); cursor: pointer; }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; background: radial-gradient(900px 480px at 78% 30%, rgba(56, 189, 248, 0.14), transparent 70%); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.hero-copy .lead { max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-shots { position: relative; padding-bottom: 36px; }
.shot-desktop { border-radius: 14px; border: 1px solid var(--outline); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.shot-phone { position: absolute; right: -8px; bottom: 0; width: 27%; border-radius: 22px; border: 5px solid #26282f; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }

/* Sections */
.section { padding: 72px 0; }
.section.tight { padding-top: 16px; }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--text-2); font-size: 1.1rem; max-width: 40em; margin: 0 auto 40px; }
.page-head { padding: 64px 0 24px; }
.page-head.center, .page-head .center { text-align: center; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature, .card, .platform, .plan, .panel {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 26px;
}
.feature h3 { color: var(--text); }
.feature p, .card p, .platform p { color: var(--text-2); margin-bottom: 0; }
.feature::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--primary); margin-bottom: 18px; }

/* Row 1: computer (wide) + phone; row 2: TV + tablet side by side. */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 20px; align-items: end; }
.gallery-grid figure { margin: 0; grid-column: span 3; }
.gallery-grid figure.wide { grid-column: span 4; }
.gallery-grid figure.tall { grid-column: span 2; }
.gallery-grid img { border-radius: 12px; border: 1px solid var(--outline); width: 100%; }
.gallery-grid figure.tall img { max-width: 270px; margin: 0 auto; border-radius: 22px; }
.gallery-grid figcaption { color: var(--text-2); font-size: 0.9rem; margin-top: 10px; text-align: center; }

.price-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; margin: 0 auto 28px; }
.price-teaser div { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 22px; text-align: center; }
.price-teaser strong { display: block; font-size: 1.9rem; }
.price-teaser span { color: var(--text-2); font-size: 0.95rem; }

.download-band { background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.07)); }
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.store-button {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 170px; min-height: 58px;
  padding: 8px 20px; border-radius: 14px; background: var(--surface-container); border: 1px solid var(--outline);
  color: var(--text); line-height: 1.2;
}
.store-button:hover { text-decoration: none; background: var(--surface-variant); border-color: #3a3e4a; }
.store-button small { color: var(--text-2); font-size: 0.75rem; }
.store-button span { font-weight: 700; font-size: 1.1rem; }
.store-button.disabled { opacity: 0.6; cursor: default; }
.platform .store-button { margin-top: 18px; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: start; max-width: 980px; margin: 0 auto 24px; }
.plan h2 { margin-bottom: 6px; }
.plan.featured { border-color: rgba(56, 189, 248, 0.55); background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), var(--surface) 40%); }
.plan-price strong { font-size: 2.4rem; }
.plan-note { color: var(--text-2); }
.plan-options p { margin: 0 0 10px; font-size: 1.05rem; }
.plan-options strong { font-size: 1.6rem; }
.plan-options small { color: var(--text-2); }
.plan-buy { border-top: 1px solid var(--outline); margin-top: 22px; padding-top: 18px; }
.plan-buy p { color: var(--text-2); }
.badge { display: inline-block; color: var(--primary); font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.pill { display: inline-block; background: rgba(52, 211, 153, 0.14); color: var(--green); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; vertical-align: middle; }
.checks { list-style: none; padding: 0; margin: 20px 0 24px; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* FAQ / details */
details { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-small); margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 1.4rem; color: var(--text-2); }
details[open] summary::after { content: "–"; }
details > :not(summary) { padding: 0 20px; color: var(--text-2); }
details > :last-child { padding-bottom: 6px; }
.faq h2 { margin: 36px 0 14px; }
.faq h2:first-child { margin-top: 0; }

/* Download */
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.platform.current { border-color: rgba(56, 189, 248, 0.6); }
.platform .button { margin-top: 18px; }
.notice { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35); border-radius: var(--radius-small); padding: 14px 18px; margin: 24px 0 0; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 12px; }

/* Cards (support) */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.big-link { font-size: 1.25rem; font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: 8px; color: var(--text-2); }

/* Account flows */
.panel { margin: 24px 0; }
.stack label { display: block; font-weight: 600; margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="email"], input[inputmode="numeric"] {
  flex: 1 1 240px; min-height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--outline); background: var(--bg); color: var(--text); font: 1rem var(--font);
}
input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-2); margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--outline); }
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social .button { flex: 1 1 200px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); margin: 12px 0; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--error); }
.form-message:empty { display: none; }
.form-message { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--surface-variant); }
.form-message.error { background: rgba(239, 68, 68, 0.12); color: #fecaca; }
/* /send: the playlist form */
[data-send] input[type="text"], [data-send] input:not([type]), [data-send] input[type="password"] {
  display: block; width: 100%; min-height: 48px; padding: 0 16px; margin-bottom: 14px; border-radius: 12px;
  border: 1px solid var(--outline); background: var(--bg); color: var(--text); font: 1rem var(--font);
}
[data-send] .fineprint { font-weight: 400; }
.choice { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.choice legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.stack .choice label { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
.choice input { width: 18px; height: 18px; accent-color: var(--primary); }
.code-input { font-size: 1.35rem; letter-spacing: 0.12em; text-transform: uppercase; font-variant-numeric: tabular-nums; max-width: 14ch; }
.notice-ok { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); border-radius: var(--radius-small); padding: 14px 18px; }
.devices-title { font-size: 1.15rem; margin-top: 28px; }
.devices { list-style: none; padding: 0; margin: 0; }
.devices li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--outline); }
.devices .device-meta { color: var(--text-2); font-size: 0.9rem; }
.copy-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-small); padding: 14px 16px; margin: 20px 0; }
.copy-box code { background: none; border: 0; font-size: 1rem; }

/* Documents (legal, demo credits, account) */
.doc { max-width: 820px; margin: 0 auto; padding: 56px 24px 24px; }
.page-head + .section .doc { padding-top: 0; }
.doc h1 { margin-bottom: 0.6em; }
.doc h2 { margin-top: 1.8em; font-size: 1.45rem; }
.doc h3 { margin-top: 1.4em; }
.doc p, .doc li { color: #d3d7de; }
.doc li { margin-bottom: 6px; }
.doc blockquote { margin: 1em 0; padding: 4px 18px; border-left: 3px solid var(--outline); color: var(--text-2); }
.table { overflow-x: auto; margin: 1em 0 1.5em; border: 1px solid var(--outline); border-radius: var(--radius-small); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--outline); }
th { background: var(--surface-variant); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.draft-banner { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.4); color: var(--amber) !important; border-radius: 10px; padding: 12px 16px; }
mark.placeholder { background: rgba(251, 191, 36, 0.2); color: var(--amber); border-radius: 4px; padding: 0 3px; }
.doc-source { margin-top: 3em; font-size: 0.9rem; color: var(--text-2) !important; }

/* Footer */
.footer { border-top: 1px solid var(--outline); margin-top: 48px; padding: 48px 0 24px; background: #0c0d10; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-2); max-width: 26em; margin-top: 12px; font-size: 0.95rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin: 0 0 6px; }
.footer-links a { color: var(--text); font-size: 0.95rem; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--outline); color: var(--text-2); font-size: 0.875rem; }

/* Small screens */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: var(--bg); border-bottom: 1px solid var(--outline); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav .button { margin-top: 8px; }
  .features, .cards, .price-teaser { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid figure, .gallery-grid figure.wide, .gallery-grid figure.tall { grid-column: auto; }
  .section { padding: 52px 0; }
  .shot-phone { width: 30%; right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
