/*
 * DataPlayer marketing site.
 * Colours follow the application's dark theme (frontend/src/shared/ui/theme.css):
 * surface #121212, raised #191919, chrome #222, text rgba(255,255,255,.87),
 * accent #64b5f6 / #1976d2 from the logo.
 */

:root {
  color-scheme: dark;

  --surface: #121212;
  --surface-raised: #191919;
  --chrome: #222222;
  --chrome-raised: #2b2b2b;

  --text: rgba(255, 255, 255, 0.87);
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.42);

  --border-faint: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.28);

  --accent: #64b5f6;
  --accent-strong: #1976d2;
  --accent-dim: rgba(100, 181, 246, 0.18);
  --link: rgba(144, 202, 249, 0.95);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);

  --container: 1120px;
  --font:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 650;
}

p {
  margin: 0;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--chrome-raised);
  color: var(--text-muted);
}

.container {
  width: min(100% - 2 * 1.25rem, var(--container));
  margin-inline: auto;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.875rem;
}

.accent {
  color: var(--accent);
}

.top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-strong);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-faint);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 32px;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1rem;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-faint);
}

.mobile-nav a {
  padding: 0.7rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-faint);
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

.mobile-nav.open {
  display: flex;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.925rem;
  font-weight: 550;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}

.btn-primary:hover {
  background: #1e88e5;
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% 0 auto 50%;
  width: min(1100px, 120vw);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
    closest-side,
    rgba(25, 118, 210, 0.28),
    rgba(100, 181, 246, 0.08) 55%,
    transparent 75%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  text-align: center;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 62ch;
  margin-inline: auto;
}

.lede + .lede {
  margin-top: 0.85rem;
  font-size: 1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0 2.5rem;
}

/* ---------- Install / code block ---------- */

.install {
  position: relative;
  text-align: left;
  max-width: 620px;
  margin-inline: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.install pre {
  margin: 0;
  padding: 1.1rem 4.5rem 1.1rem 1.2rem;
  overflow-x: auto;
  color: var(--text);
  line-height: 1.7;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-family: var(--font);
  color: var(--text-muted);
  background: var(--chrome);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.copy-btn.copied {
  color: #a5d6a7;
  border-color: rgba(165, 214, 167, 0.4);
}

.hero-shot {
  margin-top: 3.5rem;
}

.hero-shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Sources strip ---------- */

.sources {
  padding: 1rem 0 2rem;
}

.sources-label {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.source-list img {
  width: 22px;
  height: 22px;
}

/* ---------- Sections ---------- */

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-faint);
}

.section-head {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  margin-bottom: 0.6rem;
}

.section-head p {
  font-size: 1.05rem;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.feature-card h3::before {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  margin-bottom: 0.85rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-card p + p {
  margin-top: 0.75rem;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.ticks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.8;
}

/* ---------- Tour ---------- */

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.5rem;
}

.tour-item {
  margin: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tour-item img {
  width: 100%;
  border-bottom: 1px solid var(--border-faint);
}

.tour-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
}

.tour-item figcaption strong {
  font-size: 0.98rem;
}

.tour-item figcaption span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Videos ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 1.5rem;
}

.video-item {
  margin: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-item video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  border-bottom: 1px solid var(--border-faint);
}

.video-item figcaption {
  padding: 0.85rem 1.15rem;
  font-size: 0.93rem;
  color: var(--text-muted);
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.stack-table th,
.stack-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-faint);
}

.stack-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  background: var(--chrome);
  font-weight: 550;
}

.stack-table tbody th {
  width: 180px;
  color: var(--text);
  font-weight: 550;
}

.stack-table tbody td {
  color: var(--text-muted);
}

.stack-table tbody tr:last-child th,
.stack-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- Get started ---------- */

.start-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.step + .step {
  margin-top: 1.75rem;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(100, 181, 246, 0.35);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 650;
}

.step h3 {
  font-size: 1.1rem;
}

.step > p {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.step .install {
  margin-inline: 0;
}

.step code {
  color: var(--accent);
}

.start-aside {
  padding: 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.start-aside h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.preset-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.preset-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.preset-list code {
  color: var(--accent);
  font-weight: 550;
}

.preset-list span {
  color: var(--text-muted);
}

.start-aside code {
  color: var(--accent);
}

/* ---------- CTA band ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(120deg, rgba(25, 118, 210, 0.16), rgba(100, 181, 246, 0.06));
  border: 1px solid rgba(100, 181, 246, 0.28);
  border-radius: var(--radius);
}

.cta-band h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-faint);
  padding: 3rem 0;
  background: var(--surface-raised);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 2rem 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 28px;
  height: 30px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 0.2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .start-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    gap: 1rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .btn-github span {
    display: none;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .section {
    padding: 3rem 0;
  }
}

/* ---------- Guide ---------- */

.site-nav a.is-active {
  color: var(--text);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 2rem;
  padding-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: none;
}

.breadcrumb__sep {
  color: var(--text-faint);
}

.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 84px;
  font-size: 0.92rem;
}

.guide-sidebar__title {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.guide-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.guide-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.guide-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.guide-nav a.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 550;
}

.guide-sidebar__home {
  display: inline-block;
  margin-top: 1rem;
  padding: 0 0.7rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.guide-sidebar__home:hover {
  color: var(--accent);
  text-decoration: none;
}

.guide-article {
  min-width: 0;
  max-width: 760px;
}

.guide-article h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
}

.guide-article h2 {
  margin: 2.5rem 0 0.9rem;
  padding-top: 0.4rem;
  font-size: 1.4rem;
  border-top: 1px solid var(--border-faint);
}

.guide-article h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.12rem;
}

.guide-article h4 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.guide-article p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.guide-article > p:first-of-type {
  font-size: 1.08rem;
  color: var(--text);
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
  color: var(--text-muted);
}

.guide-article li {
  margin-bottom: 0.45rem;
}

.guide-article li::marker {
  color: var(--accent);
}

.guide-article a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(144, 202, 249, 0.35);
  text-underline-offset: 2px;
}

.guide-article a:hover {
  text-decoration-color: currentColor;
}

.guide-article code {
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: var(--chrome);
  border: 1px solid var(--border-faint);
  color: var(--accent);
  font-size: 0.88em;
}

.guide-article pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.guide-article pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.guide-article blockquote {
  margin: 0 0 1.25rem;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  background: var(--surface-raised);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.guide-article hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border-faint);
}

.guide-article table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.guide-article th,
.guide-article td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border: 1px solid var(--border);
}

.guide-article th {
  background: var(--chrome);
  color: var(--text);
}

.guide-article td {
  color: var(--text-muted);
}

.guide-lede {
  max-width: 62ch;
  font-size: 1.05rem;
}

.guide-index__list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.guide-index__list a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}

.guide-index__list a:hover {
  border-color: var(--border-strong);
  background: var(--chrome);
}

.guide-index__list strong {
  color: var(--text);
  font-weight: 600;
}

.guide-index__list span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .guide-sidebar {
    position: static;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-faint);
  }

  .guide-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 0.4rem;
  }

  .guide-nav a {
    white-space: nowrap;
    border: 1px solid var(--border);
  }

  .guide-sidebar__home {
    display: none;
  }
}

@media (max-width: 720px) {
  .breadcrumb {
    padding-top: 1.25rem;
  }

  .guide-layout {
    padding-bottom: 2.5rem;
  }
}
