:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #171a21;
  --muted: #5b6270;
  --border: #dde1e8;
  --accent: #e8491f;
  --accent-2: #d6246e;
  --accent-text: #ffffff;
  --code: #eceef2;
  --glow: rgba(232, 73, 31, 0.16);
  --shadow: 0 24px 60px -20px rgba(23, 26, 33, 0.35);
}

/* the system decides until the visitor picks one with the button in the top bar (theme.js sets data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e1016;
    --surface: #181b24;
    --text: #eceef3;
    --muted: #9aa2b1;
    --border: #2a2f3b;
    --accent: #ff7a45;
    --accent-2: #ff4f9a;
    --accent-text: #1a0d06;
    --code: #232734;
    --glow: rgba(255, 122, 69, 0.18);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme='light'] {
  color-scheme: light;
}

/* Microsoft's badge comes in a dark and a light version, the one that stands out from the page is shown */
.badge-on-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .badge-on-light {
    display: none;
  }

  :root:not([data-theme='light']) .badge-on-dark {
    display: inline;
  }
}

:root[data-theme='dark'] .badge-on-light {
  display: none;
}

:root[data-theme='dark'] .badge-on-dark {
  display: inline;
}

:root[data-theme='dark'] {
  color-scheme: dark;
    --bg: #0e1016;
    --surface: #181b24;
    --text: #eceef3;
    --muted: #9aa2b1;
    --border: #2a2f3b;
    --accent: #ff7a45;
    --accent-2: #ff4f9a;
    --accent-text: #1a0d06;
    --code: #232734;
    --glow: rgba(255, 122, 69, 0.18);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

header,
main,
footer {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px 20px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
}

.top a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

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

.top .languages {
  display: flex;
  gap: 12px;
}

.top .theme {
  display: flex;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.top .theme:hover {
  color: var(--text);
}

.top .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-right: auto;
  color: var(--text);
  font-weight: 700;
}

.top .wordmark {
  height: 32px;
  width: auto;
}

.top img {
  border-radius: 7px;
}

.hero {
  position: relative;
  padding-top: 56px;
  padding-bottom: 24px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -80px 0 auto;
  z-index: -1;
  height: 520px;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--glow), transparent 70%);
}

.bars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
  margin-bottom: 20px;
}

.bars i {
  width: 6px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
  transform-origin: bottom;
  animation: bounce 1.2s ease-in-out infinite;
}

.bars i:nth-child(1) { animation-delay: -0.9s; }
.bars i:nth-child(2) { animation-delay: -0.3s; }
.bars i:nth-child(3) { animation-delay: -0.7s; }
.bars i:nth-child(4) { animation-delay: -0.1s; }
.bars i:nth-child(5) { animation-delay: -0.5s; }
.bars i:nth-child(6) { animation-delay: -1s; }
.bars i:nth-child(7) { animation-delay: -0.2s; }

@keyframes bounce {
  0%,
  100% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
}

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

  .bars i {
    animation: none;
    transform: scaleY(0.6);
  }
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin: 64px 0 20px;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.lead {
  max-width: 40rem;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.2rem;
}

main > .lead {
  margin-left: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 20px;
  margin: 0 0 12px;
}

.ghost {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.ghost::after {
  content: ' ↓';
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.button .icon {
  flex: none;
}

/* download.js takes the button look off the disk image that is not the first choice, so the icon is hidden there */
a:not(.button) > .icon {
  display: none;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px var(--accent);
}

.button.big {
  padding: 14px 28px;
  font-size: 1.1rem;
}

.shot {
  margin: 0;
}

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

.hero-shot {
  margin-top: 40px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 0 16px;
  list-style: none;
}

.chips li {
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.cards,
.systems {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.cards li,
.systems article {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.cards li {
  transition: transform 0.15s, border-color 0.15s;
}

.cards li:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.cards svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 10px;
  background: var(--glow);
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cards p,
.systems p {
  margin: 4px 0;
  color: var(--muted);
}

.row {
  display: grid;
  gap: 24px 40px;
  align-items: center;
  margin: 40px 0;
  grid-template-columns: 1fr 1.6fr;
}

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

.row.flip .copy {
  order: 2;
}

.copy h3 {
  font-size: 1.35rem;
}

.copy p {
  color: var(--muted);
}

@media (max-width: 720px) {
  .row,
  .row.flip {
    grid-template-columns: 1fr;
  }

  .row.flip .copy {
    order: 0;
  }
}

.systems .detected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px -16px var(--accent);
}

.flatpak {
  margin: 16px 0;
  padding: 20px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 30px -16px var(--accent);
}

.flatpak h3 {
  margin-top: 0;
}

.flatpak .badge {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--glow);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

.command {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--code);
}

.command code {
  flex: 1;
  padding: 0;
  background: none;
  font-size: 0.95em;
}

.command button {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.help {
  margin: 16px 0;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.help summary {
  cursor: pointer;
  font-weight: 600;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.news {
  padding-left: 20px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 64px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
}

.light-shot {
  margin: 48px auto 0;
}

.light-shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}
