/* ============================================================
   Quite — download page
   Reuses the shared site chrome and design tokens from styles.css
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.download-hero {
  position: relative;
  padding: 148px 0 40px;
}

.back-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--dim);
  font-size: 13px;
  transition: color 150ms ease, gap 150ms ease;
}

.back-link .icon {
  width: 14px;
  height: 14px;
}

.back-link:hover {
  gap: 10px;
  color: var(--text);
}

.download-hero h1 {
  margin-top: 18px;
  font-size: clamp(2.7rem, 5.6vw, 4.3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.download-lede {
  max-width: 600px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.7;
}

.release-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 9px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------------
   Platform cards
   ------------------------------------------------------------ */
.platforms {
  padding: 48px 0 24px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.platform-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.platform-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-soft);
  transition: color 180ms ease, border-color 180ms ease;
}

.platform-icon .icon {
  width: 23px;
  height: 23px;
}

.platform-card:hover .platform-icon {
  color: var(--accent-bright);
  border-color: var(--accent-line);
}

.platform-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.platform-title p {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12.5px;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-soon i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.platform-desc {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.platform-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.platform-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.platform-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent-bright);
}

.platform-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.platform-desc + .platform-list {
  margin-bottom: 24px;
}

.platform-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

.btn-soon {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--dim);
  font-size: 13px;
  cursor: not-allowed;
}

.btn-soon .icon {
  width: 15px;
  height: 15px;
}

.portable-links {
  margin-top: 10px;
  color: var(--dim);
  font-size: 12px;
  text-align: right;
}

.portable-links a {
  margin-left: 4px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.portable-links span {
  margin: 0 4px;
}

.platform-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.platform-note > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--accent-bright);
}

.platform-note p {
  flex: 1;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.platform-note .btn {
  flex: none;
}

/* ------------------------------------------------------------
   Run from source
   ------------------------------------------------------------ */
.source {
  padding: 64px 0 104px;
}

.source-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.source-copy h2 {
  margin-top: 16px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.source-copy p {
  max-width: 470px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.source-code {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #161616;
}

.source-code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-code pre {
  padding: 18px 20px 20px;
  overflow-x: auto;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 2;
}

.source-code .prompt {
  color: var(--accent-bright);
}

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .download-hero .back-link,
  .download-hero .eyebrow,
  .download-hero h1,
  .download-hero .download-lede,
  .download-hero .release-status {
    animation: download-rise 0.65s var(--ease) both;
  }

  .download-hero .eyebrow { animation-delay: 0.04s; }
  .download-hero h1 { animation-delay: 0.09s; }
  .download-hero .download-lede { animation-delay: 0.14s; }
  .download-hero .release-status { animation-delay: 0.19s; }

  .platform-card {
    animation: download-rise 0.65s var(--ease) both;
  }

  .platform-card:nth-child(1) { animation-delay: 0.16s; }
  .platform-card:nth-child(2) { animation-delay: 0.22s; }

  @keyframes download-rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .source-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .source-copy p {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .download-hero {
    padding-top: 118px;
  }

  .platform-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-note {
    flex-wrap: wrap;
  }

  .platform-note p {
    flex: 1 1 100%;
    order: 3;
  }

  .platform-note .btn {
    order: 2;
    margin-left: auto;
  }
}

@media (max-width: 540px) {
  .platform-card {
    padding: 24px;
  }

  .release-status {
    align-items: flex-start;
    border-radius: 12px;
    line-height: 1.45;
  }

  .release-status .status-dot {
    margin-top: 6px;
    flex: none;
  }

  .badge-soon {
    display: none;
  }

  .platform-foot {
    flex-wrap: wrap;
  }

  .platform-foot .btn {
    width: 100%;
  }

  .source {
    padding: 48px 0 76px;
  }

  .source-card {
    padding: 26px;
  }

  .source-actions .btn {
    width: 100%;
  }

  .source-code pre {
    font-size: 11px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
