/*
 * The download site.
 *
 * Deliberately one hand-written stylesheet and no framework: the page is four
 * sections and a table of facts, it has to load instantly for someone who
 * followed a forum link, and there is nothing here worth a build step.
 *
 * Same palette as the app, so arriving in either one feels like the same thing.
 */

:root {
  --bg: #0f1216;
  --panel: #161b22;
  --panel-2: #1c222b;
  --line: #2a323d;
  --line-soft: #222933;
  --text: #e6edf3;
  --muted: #9fb0c0;
  --faint: #6e7f8f;
  --accent: #4ea3c8;
  --ok: #3fb950;
  --warn: #d29922;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

main {
  width: min(1040px, 100% - 40px);
  margin: 0 auto;
}

/* ---- header ---- */

.top {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1040px, 100% - 40px);
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.top nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

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

.top nav a:hover,
footer a:hover {
  color: var(--accent);
}

/* ---- hero ---- */

.hero {
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--line-soft);
}

h1 {
  max-width: 20ch;
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 62ch;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.fineprint,
.small {
  color: var(--faint);
  font-size: 13px;
}

/* ---- buttons ---- */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Present, so the page reads as finished, but not yet clickable. */
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.is-disabled:hover {
  border-color: var(--line);
  color: var(--text);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #06222d;
  font-weight: 600;
}

.btn-primary:hover {
  background: #63b5d8;
  color: #06222d;
}

/* The licence key on the thank-you page: long, monospaced, selectable. */
.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--accent);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  resize: vertical;
}

button.btn {
  font: inherit;
  cursor: pointer;
}

/* ---- sections ---- */

section {
  padding: 46px 0;
  border-bottom: 1px solid var(--line-soft);
}

h2 {
  margin: 0 0 22px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}

.grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

/* The one being sold. A single accent edge, not a shouty box. */
.grid article.is-featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

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

.grid .btn {
  margin-top: 6px;
}

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

.price {
  margin: 0 0 12px;
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 600;
}

/* The number itself, since it is the answer to the question people arrive with. */
.price .amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.ticks {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.ticks li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 22px;
}

.ticks li::before {
  content: '›';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.ticks strong {
  color: var(--text);
}

/* ---- the SmartScreen explanation ---- */

.note {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel);
}

.note h3 {
  margin-bottom: 8px;
}

.note p {
  margin: 0 0 8px;
  color: var(--muted);
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--accent);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.9em;
}

/* Which controllers are covered - said before the download button, not after. */
.note-devices {
  max-width: 72ch;
  margin-top: 18px;
  border-left-color: var(--accent);
  font-size: 14px;
}

.note-devices a {
  color: var(--accent);
}

/* ---- questions ---- */

details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

details:last-child {
  border-bottom: none;
}

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

summary::marker {
  color: var(--accent);
}

details p {
  margin: 10px 0 0;
  max-width: 74ch;
  color: var(--muted);
}

/* ---- footer ---- */

footer {
  width: min(1040px, 100% - 40px);
  margin: 0 auto;
  padding: 30px 0 50px;
  color: var(--faint);
  font-size: 13px;
}

footer p {
  margin: 0 0 6px;
}

@media (max-width: 560px) {
  .hero {
    padding: 34px 0;
  }
  .cta .btn {
    width: 100%;
    text-align: center;
  }
}
