/* UMPlayer site — colors mirror crates/umplayer/ui/theme.slint */

:root {
  --bg: #f6f6f9; --sidebar: #ededf2; --bar: #ffffff; --surface: #ffffff;
  --surface-hover: #e6e6ee; --border: #dadae3; --fg: #16161b; --fg-muted: #686876;
  --accent: #6a46f5; --accent-hover: #5a36e6; --accent-soft: #6a46f51c;
  --viz: linear-gradient(90deg, #2f6bff 0%, #5a46f0 60%, #6a2fd8 100%);
  --grad-text: linear-gradient(90deg, #2f6bff, #6a46f5 55%, #a43fe0);
  --glow: #6a46f533;
  --shadow: 0 1px 2px #16161b0f, 0 20px 50px -20px #2b1d7a40;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] { --is-dark: 1; }
}
:root[data-theme="dark"] { --is-dark: 1; }

/* Dark tokens: applied for explicit dark, or system + OS dark. */
:root[data-theme="dark"] {
  --bg: #0f0f13; --sidebar: #15151b; --bar: #17171e; --surface: #1d1d25;
  --surface-hover: #272731; --border: #2b2b36; --fg: #f3f3f6; --fg-muted: #9a9aa9;
  --accent: #8f72ff; --accent-hover: #a48cff; --accent-soft: #8f72ff26;
  --viz: linear-gradient(90deg, #5b3df5 0%, #a05cff 50%, #ff5fc8 100%);
  --grad-text: linear-gradient(90deg, #a48cff, #c77dff 50%, #ff7ad1);
  --glow: #8f72ff40;
  --shadow: 0 1px 2px #0006, 0 30px 70px -25px #5b3df566;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0f0f13; --sidebar: #15151b; --bar: #17171e; --surface: #1d1d25;
    --surface-hover: #272731; --border: #2b2b36; --fg: #f3f3f6; --fg-muted: #9a9aa9;
    --accent: #8f72ff; --accent-hover: #a48cff; --accent-soft: #8f72ff26;
    --viz: linear-gradient(90deg, #5b3df5 0%, #a05cff 50%, #ff5fc8 100%);
    --grad-text: linear-gradient(90deg, #a48cff, #c77dff 50%, #ff7ad1);
    --glow: #8f72ff40;
    --shadow: 0 1px 2px #0006, 0 30px 70px -25px #5b3df566;
    color-scheme: dark;
  }
}

/* Theme-specific screenshots */
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .only-dark { display: block; }
  :root[data-theme="system"] .only-light { display: none; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--fg-muted); }
.eyebrow {
  color: var(--accent); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px;
}
.sub { color: var(--fg-muted); font-size: 1.12rem; max-width: 620px; margin-top: 16px; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 12px 30px -8px var(--accent); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--fg); }
.btn-light { background: #fff; color: #2a1a7a; }
.btn-light:hover { background: #f1edff; color: #2a1a7a; }
.btn-outline-light { color: #fff; border-color: #ffffff66; }
.btn-outline-light:hover { color: #fff; background: #ffffff1a; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { color: var(--fg); }
.brand-tile {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #d061ff 100%); color: #fff;
  box-shadow: 0 6px 16px -6px var(--accent);
}
.brand-tile svg { width: 20px; height: 20px; }
.brand-tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.brand-tile.sm svg { width: 16px; height: 16px; }
.nav-links { display: flex; gap: 6px; margin-left: 12px; }
.nav-links a { color: var(--fg-muted); font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--fg); background: var(--surface-hover); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--fg-muted); }
.icon-btn:hover { color: var(--fg); background: var(--surface-hover); }

/* Segmented theme control — same as the app's sidebar switcher */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.seg button {
  width: 38px; height: 30px; border-radius: 999px; border: 0; background: transparent;
  color: var(--fg-muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s;
}
.seg button svg { width: 16px; height: 16px; }
.seg button:hover { color: var(--fg); }
.seg button[aria-checked="true"] { background: var(--accent); color: #fff; }

/* Hero */
.hero { position: relative; padding: 88px 0 40px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 760px; z-index: -2;
  background:
    radial-gradient(600px 340px at 50% 30%, var(--glow), transparent 70%),
    radial-gradient(420px 260px at 78% 18%, color-mix(in srgb, #ff5fc8 18%, transparent), transparent 70%),
    radial-gradient(420px 260px at 22% 22%, color-mix(in srgb, #2f6bff 16%, transparent), transparent 70%);
}
.hero-viz { position: absolute; left: 0; right: 0; top: 560px; width: 100%; height: 520px; z-index: -1; opacity: .5; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg); font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow);
}
.pill:hover { color: var(--fg); border-color: var(--accent); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px #3ddc8433; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 850; letter-spacing: -0.045em; margin-top: 28px; line-height: 1.02; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--fg-muted); max-width: 680px; margin-top: 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.fine { color: var(--fg-muted); font-size: .88rem; margin-top: 18px; }
.hero-shot { margin-top: 64px; }

:root[data-theme="light"] .hero-viz { opacity: .3; }
@media (prefers-color-scheme: light) { :root[data-theme="system"] .hero-viz { opacity: .3; } }

/* Window frame around screenshots */
.window {
  margin: 0; border-radius: 14px; overflow: hidden; background: var(--bar);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.window-bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 13px; background: var(--sidebar); border-bottom: 1px solid var(--border); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.hero-shot { position: relative; }
.hero-shot::after { content: ""; position: absolute; inset: auto 10% -40px; height: 80px; background: var(--viz); filter: blur(60px); opacity: .35; z-index: -1; }

/* Strip */
.strip { border-block: 1px solid var(--border); background: var(--sidebar); margin-top: 72px; }
.strip-inner { display: flex; flex-wrap: wrap; gap: 14px 36px; justify-content: center; align-items: center; padding: 20px 0; font-weight: 650; font-size: .95rem; }
.strip-inner span { display: inline-flex; align-items: center; gap: 8px; }
.strip-inner svg { color: var(--accent); width: 18px; height: 18px; }
.strip .formats { color: var(--fg-muted); font-weight: 600; letter-spacing: .02em; }

/* Sections */
.section { padding: 110px 0; }
.section > .wrap > h2, .section > .wrap > .eyebrow { text-align: center; }
.section > .wrap > .sub { margin-inline: auto; text-align: center; }
#features h2 { text-align: center; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.card p { color: var(--fg-muted); font-size: .94rem; margin-top: 8px; }
.ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }

/* Tour */
.tour { background: linear-gradient(to bottom, transparent, var(--sidebar) 12%, var(--sidebar) 88%, transparent); }
.row { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.row + .row { margin-top: 120px; }
.row.flip .row-copy { order: 2; }
.row-copy > p:not(.eyebrow) { color: var(--fg-muted); font-size: 1.06rem; margin-top: 18px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 600; font-size: .96rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c5cff' d='m9 16.17-4.17-4.17-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.viz-block { margin-top: 140px; text-align: center; }
.viz-block .sub { margin-inline: auto; }
.tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 28px; }
.tabs button {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--fg); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; transition: all .15s;
}
.tabs button:hover { background: var(--surface-hover); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.viz-frame { max-width: 960px; margin-inline: auto; }
.viz-frame img { transition: opacity .25s; }

/* Theme compare */
.compare {
  position: relative; max-width: 1040px; margin: 48px auto 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); user-select: none;
}
.compare-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-top img { width: 100%; height: 100%; object-fit: cover; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 12px #0006; pointer-events: none; }
.compare-handle span {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--accent); border: 3px solid #fff; box-shadow: 0 6px 20px #0005;
}
.compare-handle span::before, .compare-handle span::after { content: ""; position: absolute; top: 50%; border: 6px solid transparent; transform: translateY(-50%); }
.compare-handle span::before { left: 5px; border-right-color: #fff; }
.compare-handle span::after { right: 5px; border-left-color: #fff; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare-tag { position: absolute; bottom: 14px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; pointer-events: none; }
.compare-tag.left { left: 14px; background: #0f0f13cc; color: #fff; }
.compare-tag.right { right: 14px; background: #ffffffd9; color: #16161b; }

/* Values */
.values { padding-top: 40px; }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.sub.left { text-align: left; margin-inline: 0; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.stat-list strong { display: block; font-size: 2rem; font-weight: 850; letter-spacing: -.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-list span { color: var(--fg-muted); font-size: .92rem; font-weight: 600; }

/* Roadmap */
.timeline { list-style: none; padding: 0; margin: 56px auto 0; max-width: 760px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.timeline li { display: flex; gap: 24px; align-items: flex-start; position: relative; padding: 14px 0; }
.tl-ver {
  flex: none; width: 64px; height: 34px; border-radius: 999px; display: grid; place-items: center; z-index: 1;
  background: var(--surface); border: 1px solid var(--border); font-weight: 800; font-size: .85rem; color: var(--fg-muted);
}
.timeline li.done .tl-ver { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.timeline li.next .tl-ver { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.timeline h3 { margin-top: 6px; display: flex; align-items: center; gap: 10px; }
.timeline h3 em { font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.timeline p { color: var(--fg-muted); margin-top: 6px; }

/* Download */
.download { background: var(--sidebar); border-block: 1px solid var(--border); }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.dl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; transition: border-color .2s, box-shadow .2s;
}
.dl-card.is-mine { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.dl-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.dl-ico svg { width: 30px; height: 30px; }
.dl-card .btn { margin-top: 16px; width: 100%; }
.dl-alt { font-size: .9rem; font-weight: 600; margin-top: 6px; }
.note { max-width: 760px; margin: 36px auto 0; text-align: center; color: var(--fg-muted); font-size: .9rem; }

/* OSS banner */
.oss {
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding: 52px; border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #3b22c9 0%, #6a46f5 45%, #b84ee6 100%);
  box-shadow: 0 30px 80px -30px #5b3df5aa;
}
.oss::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(#ff5fc855, transparent 70%); }
.oss h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.oss p { max-width: 520px; opacity: .88; margin-top: 12px; }
.oss .cta-row { margin-top: 0; position: relative; z-index: 1; }

/* Footer */
.footer { padding: 48px 0 56px; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: center; }
.footer nav { display: flex; gap: 22px; justify-content: flex-end; flex-wrap: wrap; }
.footer nav a { color: var(--fg-muted); font-weight: 600; font-size: .92rem; }
.footer nav a:hover { color: var(--fg); }
.footer p { grid-column: 1 / -1; font-size: .85rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .row, .values-grid { grid-template-columns: 1fr; gap: 36px; }
  .row.flip .row-copy { order: 0; }
  .row + .row { margin-top: 90px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .section { padding: 80px 0; }
  .dl-grid { grid-template-columns: 1fr; }
  .oss { padding: 34px 26px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
  .hero { padding-top: 56px; }
}
@media (max-width: 520px) {
  .grid, .stat-list { grid-template-columns: 1fr; }
  .seg button { width: 32px; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
