/*
 * The download page borrows the app's palette and its Montserrat, so someone
 * arriving here from a link and someone arriving at app.kowl.tech are looking
 * at the same product. It borrows none of the app's CSS: this page is four
 * files on a CDN, and it should stay that way.
 */

:root {
  /* src/app/globals.css */
  --bg: #000;
  --text: #fff;
  --muted: #808080;
  --green: #01ff95;
  --hairline: #1e1e1e;
  --raised: #0d0d0d;
  --rule: linear-gradient(90deg, #000 0%, #404040 50.481%, #000 100%);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  margin-bottom: 56px;
}

.mark {
  display: block;
  margin: 0 auto 28px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.headline {
  margin: 0 auto;
  max-width: 15ch;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  margin: 20px auto 0;
  max-width: 46ch;
  font-size: 17px;
  color: var(--muted);
  text-wrap: balance;
}

/* ── The two cards ────────────────────────────────────────────────────────── */

.downloads {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--raised);
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

/* The visitor's own platform, decided in download.js. It gets the border and
   the filled button; the other stays an outline, so there is one obvious
   thing to click without the second one looking broken. */
.card[data-primary] {
  border-color: #333;
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.logo {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  color: var(--text);
}

.card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.card-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.button {
  display: block;
  padding: 14px 24px;
  border: 1px solid #2e2e2e;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.button:hover {
  border-color: #555;
  background: #161616;
}

.card[data-primary] .button {
  border-color: var(--text);
  background: var(--text);
  color: #000;
}

.card[data-primary] .button:hover {
  background: #e6e6e6;
  border-color: #e6e6e6;
}

.button:active {
  transform: scale(0.985);
}

.button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Set by download.js when a store link is not configured yet: still readable,
   plainly not a button. */
.button[aria-disabled="true"] {
  border-color: var(--hairline);
  background: transparent;
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.version {
  margin: 26px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Divider and reasons ──────────────────────────────────────────────────── */

.rule {
  height: 1px;
  margin: 56px 0;
  border: 0;
  background: var(--rule);
}

/* Two by two rather than `auto-fit`, which lands on three columns at this
   width and leaves the fourth item hanging alone on a second row. */
.reasons {
  display: grid;
  gap: 34px 48px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .reasons {
    grid-template-columns: 1fr 1fr;
  }
}

.reason h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reason p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--text);
  text-decoration-color: #444;
  text-underline-offset: 3px;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .card[data-primary] {
    transform: none;
  }
}
