/* SPDX-License-Identifier: GPL-3.0-or-later */

/* Values from brand/tokens/tokens.css. The site is dark-only. */
:root {
  color-scheme: dark;
  --ink: #181e21;
  --ink-raised: #242e2e;
  --umber: #543529;
  --amber: #fdc78e;
  --teal: #1e959d;
  --teal-deep: #1b676b;
  --coral: #ee5a3c;
  --paper: #f6f2ea;

  --bg: var(--ink);
  --panel: var(--ink-raised);
  --text: var(--amber);
  --muted: #bfa285;
  --subtle: #a8967f;
  /* Teal and coral are under 4.5:1 on --panel: fills and graphics there, not text. */
  --accent: var(--teal);
  --accent-deep: var(--teal-deep);
  --accent-fg: var(--ink);
  --brand: var(--coral);
  --brand-fg: var(--ink);
  --border: var(--umber);
  --border-accent: var(--teal);
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 90ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

::selection {
  background: var(--accent-deep);
  color: var(--paper);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

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

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 36px;
}

nav {
  display: flex;
  gap: 26px;
}

nav a,
footer a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

nav a:hover,
footer a:hover {
  color: var(--text);
}

.hero {
  min-height: 670px;
  padding: 72px 0 92px;
  display: grid;
  grid-template-columns: minmax(390px, 0.86fr) minmax(520px, 1.25fr);
  align-items: center;
  gap: 66px;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 20px 0 24px;
  font-size: clamp(3.2rem, 6vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

h1 span {
  color: var(--accent);
}

.hero-intro {
  max-width: 600px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.download-panel {
  max-width: 470px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.release-line {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.release-badge {
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
}

#release-date {
  color: var(--subtle);
  font-size: 0.7rem;
}

.primary-download {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease);
}

.primary-download:hover {
  background: var(--text);
}

.primary-download:focus-visible,
.download-link:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.primary-detail,
.platform-hint {
  display: block;
  text-align: center;
}

.primary-detail {
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.platform-hint {
  margin: 9px 0 0;
  color: var(--subtle);
  font-size: 0.7rem;
}

.security-note {
  max-width: 470px;
  margin: 14px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
}

.security-note strong {
  color: var(--muted);
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.spotlight,
.features,
.download-catalog,
.open-source {
  border-top: 1px solid var(--border);
}

.spotlight {
  padding: 100px 0;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.9fr);
  gap: 72px;
  align-items: center;
}

.spotlight-text-only {
  grid-template-columns: minmax(0, 760px);
}

.spotlight-copy > p {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
}

.spotlight kbd,
.spotlight code {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85em;
}

.spotlight-points {
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.spotlight-points li {
  padding-left: 16px;
  border-left: 2px solid var(--border-accent);
  color: var(--muted);
  font-size: 0.9rem;
}

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

.spotlight-copy > .spotlight-note {
  margin-top: 28px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.spotlight-visual img {
  width: 100%;
  height: auto;
  display: block;
}

.features {
  padding: 100px 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 52px;
}

h2 {
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.feature-grid article {
  min-height: 245px;
  padding: 28px;
  border-right: 1px solid var(--border);
}

.feature-grid article:last-child {
  border-right: 0;
}

.feature-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-number {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.025em;
}

.feature-grid h3 {
  margin: 0;
  font-size: 1.05rem;
}

.feature-grid p,
.catalog-copy p,
.open-source p {
  color: var(--muted);
  font-size: 0.86rem;
}

.download-catalog {
  padding: 100px 0;
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 72px;
  align-items: start;
}

.catalog-copy {
  position: sticky;
  top: 40px;
}

.catalog-copy h2 {
  margin-bottom: 18px;
}

.release-notes {
  margin-top: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--accent-deep);
}

.platform-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

summary {
  padding: 17px 20px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.platform-downloads {
  padding: 0 12px 12px;
}

.platform-group {
  padding: 16px 8px 8px;
  border-top: 1px solid var(--border);
}

.platform-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-card {
  margin-bottom: 8px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--bg);
}

.download-card:hover {
  border-color: var(--border);
}

.download-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.download-format,
.download-meta {
  display: block;
}

.download-format {
  font-size: 0.8rem;
}

.download-meta {
  color: var(--subtle);
  font-size: 0.68rem;
}

.download-link {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.download-link:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

.checksum-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.checksum-label {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.checksum {
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  overflow-wrap: anywhere;
  user-select: all;
}

.loading {
  padding: 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.open-source {
  padding: 90px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
}

.open-source p {
  max-width: 570px;
  margin: 18px 0 0;
}

.source-links {
  display: grid;
}

.source-links a {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.source-links a:hover {
  color: var(--accent);
}

footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.7rem;
}

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

@media (max-width: 980px) {
  .hero {
    padding-top: 48px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero-visual {
    width: min(820px, 100%);
  }

  .spotlight {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .spotlight-visual {
    width: min(620px, 100%);
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid article:nth-child(2) {
    border-right: 0;
  }

  .feature-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 70px;
  }

  .brand img {
    height: 32px;
  }

  nav a:not(:last-child) {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 52px 0 74px;
    gap: 48px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .spotlight,
  .features,
  .download-catalog,
  .open-source {
    padding: 72px 0;
  }

  .feature-grid,
  .download-catalog,
  .open-source {
    grid-template-columns: 1fr;
  }

  .feature-grid article,
  .feature-grid article:nth-child(2) {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .feature-grid article:last-child {
    border-bottom: 0;
  }

  .download-catalog,
  .open-source {
    gap: 42px;
  }

  .catalog-copy {
    position: static;
  }

  footer {
    padding: 28px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
