/* SPDX-License-Identifier: AGPL-3.0-only */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1a1c23;
  --muted: #4b5563;
  --accent: #0f6fde;
  --accent-hover: #0b5bbd;
  --border: #d1d5db;
  --shadow: rgba(0, 0, 0, 0.08);
  --radius: 0.75rem;
  --max-width: 70rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1d24;
    --text: #f1f3f7;
    --muted: #a0aab8;
    --accent: #3b9eff;
    --accent-hover: #6bb4ff;
    --border: #3a3f4a;
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a:hover,
a:focus {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 0.15rem solid var(--accent);
  outline-offset: 0.15rem;
  border-radius: 0.15rem;
}

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

header,
section,
footer {
  padding: 2.5rem 1rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

header {
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tagline {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: var(--muted);
  max-width: 42rem;
  margin: 0 auto 1.75rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.05s ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .button-primary {
    color: #07111f;
  }
}

.button-primary:hover,
.button-primary:focus {
  background: var(--accent-hover);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .button-primary:hover,
  .button-primary:focus {
    color: #07111f;
  }
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.button-secondary:hover,
.button-secondary:focus {
  background: var(--border);
  color: var(--text);
}

/* Third-party store badge: same height as the buttons (the global
   img { height: auto } rule would otherwise render it full-size). */
.store-badge {
  display: block;
  height: 3.25rem;
  width: auto;
}

section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.screenshots {
  background: var(--surface);
}

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.screenshot {
  text-align: center;
}

.screenshot img {
  border-radius: var(--radius);
  box-shadow: 0 0.25rem 1rem var(--shadow);
  border: 1px solid var(--border);
}

.screenshot figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.install-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.install-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.install-card h3 {
  margin: 0 0 0.75rem;
}

.install-card ol,
.install-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.install-card li {
  margin-bottom: 0.35rem;
}

.note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-left: 0.25rem solid var(--accent);
  border-radius: 0 0.25rem 0.25rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.disclaimer {
  font-size: 0.9rem;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  z-index: 100;
  /* Hide it fully regardless of its own height: the old fixed top offset left
     a blue sliver at the top of the page (issue #77). */
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 24rem) {
  header,
  section,
  footer {
    padding: 1.75rem 0.875rem;
  }

  .screenshot-row {
    grid-template-columns: 1fr;
  }
}
