/* SlopTube site: the app's dark theme (src/app/ui/Theme.hpp), large type and tap targets. */
:root {
  --background: #0f0f0f;
  --surface: #1f1f1f;
  --surface-raised: #272727;
  --text: #f1f1f1;
  --text-secondary: #aaaaaa;
  --accent: #ff0033;
  --accent-text: #ffffff;
  --line: #3a3a3a;
  --radius: 12px;
  --width: 1080px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 18px/1.6 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

code {
  font: 0.9em/1.4 ui-monospace, "Roboto Mono", Menlo, monospace;
  background: var(--surface-raised);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

/* --- Top bar ------------------------------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.links {
  display: flex;
  gap: 20px;
  white-space: nowrap;
}

.links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
}

.links a:hover {
  color: var(--text);
}

/* --- Landing page -------------------------------------------------------------------------- */

main > section {
  max-width: var(--width);
  margin: 0 auto;
  padding: 56px 16px;
}

.hero {
  text-align: center;
  padding-top: 64px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  margin: 16px 0 12px;
}

.lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 20px;
}

.download {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 28px;
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #333333;
}

.button.primary {
  min-height: 68px;
  padding: 12px 40px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 22px;
}

.button.primary:hover {
  background: #e6002e;
}

.button-detail {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.9;
}

.requirements {
  color: var(--text-secondary);
  font-size: 16px;
}

.screens {
  display: flex;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.screens figure {
  flex: 0 0 auto;
  width: min(260px, 70vw);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screens img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.screens figcaption {
  color: var(--text-secondary);
  margin-top: 8px;
}

.features h2,
.install h2,
.more h2 {
  font-size: clamp(26px, 4vw, 36px);
  text-align: center;
}

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

.grid article {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.grid h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.grid p {
  margin: 0;
  color: var(--text-secondary);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 0;
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 20px;
}

.steps h3 {
  margin: 12px 0 6px;
}

.steps p {
  margin: 0;
  color: var(--text-secondary);
}

.note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
}

.more {
  text-align: center;
}

.more p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px 40px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.footer p {
  max-width: 760px;
  margin: 0 auto;
}

/* --- Documentation ------------------------------------------------------------------------- */

.doc-layout > * {
  min-width: 0; /* Grid items would otherwise grow to their widest line (tables, the nav). */
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.doc-nav ul {
  position: sticky;
  top: 80px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
}

.doc-nav a:hover,
.doc-nav a[aria-current="page"] {
  background: var(--surface-raised);
  color: var(--text);
}

.doc-content {
  min-width: 0;
  font-size: 17px;
}

.doc-content h1 {
  margin-top: 8px;
  font-size: 36px;
}

.doc-content h2 {
  margin-top: 40px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.doc-content a {
  color: #ff6680;
}

.doc-content .headerlink {
  margin-left: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  opacity: 0;
}

.doc-content :is(h1, h2, h3, h4):hover .headerlink {
  opacity: 1;
}

.doc-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.doc-content th,
.doc-content td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.doc-content th {
  background: var(--surface);
}

.doc-content pre {
  overflow-x: auto;
  background: var(--surface);
  border-radius: 8px;
  padding: 14px 16px;
}

.doc-content pre code {
  background: none;
  padding: 0;
}

.doc-source {
  margin-top: 48px;
  font-size: 15px;
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .links {
    gap: 4px 14px;
    font-size: 15px;
  }

  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-nav ul {
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }

  .doc-nav a {
    white-space: nowrap;
  }

  .screens {
    justify-content: flex-start;
  }
}

/* A phone keeps the bar on one line: the page's sections are a scroll away anyway. */
@media (max-width: 480px) {
  .links a[href^="#"],
  .links a[href$="#download"] {
    display: none;
  }

  .links {
    gap: 14px;
  }
}

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