:root {
  color-scheme: dark;

  --page: oklch(12% 0.007 255);
  --page-deep: oklch(7% 0.006 255);
  --panel: oklch(15% 0.006 255);
  --panel-soft: oklch(19% 0.006 255);
  --panel-muted: oklch(24% 0.006 255);
  --line: oklch(88% 0.006 255 / 0.15);
  --line-strong: oklch(88% 0.006 255 / 0.28);
  --text: oklch(92% 0.006 255);
  --muted: oklch(72% 0.008 255);
  --faint: oklch(58% 0.007 255);
  --red: oklch(58% 0.14 24);
  --red-soft: oklch(68% 0.1 24);
  --green: oklch(66% 0.09 154);
  --green-deep: oklch(45% 0.07 154);
  --cream: oklch(86% 0.018 88);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
}

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

html {
  min-height: 100%;
  background: var(--page-deep);
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background-color: var(--page-deep);
  background-image:
    linear-gradient(150deg, oklch(16% 0.008 255) 0%, var(--page-deep) 46%, oklch(9% 0.006 255) 100%),
    linear-gradient(90deg, oklch(88% 0.006 255 / 0.032) 1px, transparent 1px),
    linear-gradient(0deg, oklch(88% 0.006 255 / 0.022) 1px, transparent 1px),
    linear-gradient(120deg, transparent 0%, oklch(88% 0.006 255 / 0.035) 48%, transparent 70%);
  background-size: 100% 100%, 80px 80px, 80px 80px, 100% 100%;
  font-family:
    "Open Sans",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
label {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
label:focus-visible {
  outline: 2px solid var(--red-soft);
  outline-offset: 3px;
}

.page-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 54px;
}

.hero {
  min-height: 66vh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  position: relative;
  padding: 0 0 54px;
}

.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::after {
  width: min(520px, 72%);
  height: 1px;
  left: 50%;
  bottom: 52px;
  background: linear-gradient(90deg, transparent, oklch(88% 0.006 255 / 0.22), transparent);
  transform: translateX(-50%);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  font-weight: 850;
}

.footer-brand img {
  object-fit: contain;
}

.hero-mark {
  display: grid;
  place-items: center;
  align-self: end;
  padding-top: 42px;
  position: relative;
}

.hero-mark::after {
  content: none;
}

.hero-mark img {
  width: min(260px, 54vw);
  height: auto;
  object-fit: contain;
  animation: logo-rise 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logo-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-copy {
  max-width: 720px;
  justify-self: center;
  text-align: center;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red-soft);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.hero-title {
  color: var(--text);
  font-size: 4.4rem;
  font-weight: 850;
  line-height: 1;
}

.hero-title::after {
  content: "";
  width: min(360px, 62vw);
  height: 2px;
  display: block;
  margin: 28px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, oklch(88% 0.006 255 / 0.34), var(--red), oklch(88% 0.006 255 / 0.34), transparent);
  opacity: 0.82;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  color: var(--red-soft);
  animation: chevron-float 1.45s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.scroll-cue-icon {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
}

@keyframes chevron-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

.download-section {
  padding: 54px 0 12px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 2.35rem;
  font-weight: 850;
  line-height: 1.05;
}

.platform-tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, oklch(88% 0.006 255 / 0.075), transparent 62%),
    linear-gradient(315deg, oklch(88% 0.006 255 / 0.04), transparent 54%),
    var(--panel);
  padding: 16px;
  overflow: hidden;
}

.platform-tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: oklch(88% 0.006 255 / 0.04);
}

.tab-control {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 800;
  transition:
    background-color 160ms ease-out,
    color 160ms ease-out;
}

#tab-macos:focus-visible ~ .tab-list label[for="tab-macos"],
#tab-windows:focus-visible ~ .tab-list label[for="tab-windows"],
#tab-linux:focus-visible ~ .tab-list label[for="tab-linux"] {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

#tab-macos:checked ~ .tab-list label[for="tab-macos"],
#tab-windows:checked ~ .tab-list label[for="tab-windows"],
#tab-linux:checked ~ .tab-list label[for="tab-linux"] {
  color: oklch(14% 0.018 154);
  background: oklch(76% 0.018 255);
}

.tab-panel {
  display: none;
}

#tab-macos:checked ~ .tab-panels #macos-panel,
#tab-windows:checked ~ .tab-panels #windows-panel,
#tab-linux:checked ~ .tab-panels #linux-panel {
  display: grid;
}

.macos-panel,
.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card-grid {
  display: grid;
}

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

.download-card {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(150deg, oklch(88% 0.006 255 / 0.078), transparent 58%),
    linear-gradient(320deg, oklch(88% 0.006 255 / 0.032), transparent 50%),
    oklch(14% 0.006 255 / 0.96);
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, oklch(88% 0.006 255 / 0.48), oklch(88% 0.006 255 / 0.16));
  opacity: 0.76;
}

.active-card {
  border-color: oklch(88% 0.006 255 / 0.22);
}

.active-card:hover {
  border-color: oklch(88% 0.006 255 / 0.34);
  background:
    linear-gradient(150deg, oklch(88% 0.006 255 / 0.1), transparent 58%),
    linear-gradient(320deg, oklch(66% 0.09 154 / 0.045), transparent 54%),
    oklch(16% 0.006 255 / 0.96);
}

.disabled-card {
  min-height: 264px;
  background:
    linear-gradient(150deg, oklch(88% 0.006 255 / 0.052), transparent 58%),
    oklch(13% 0.006 255 / 0.88);
}

.disabled-card::before {
  opacity: 0.25;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.centered-card .card-topline {
  justify-content: center;
}

.centered-card {
  align-items: center;
  justify-content: center;
}

.centered-card h3,
.centered-card > p {
  text-align: center;
}

.centered-card .download-action {
  margin-top: 6px;
}

.download-version {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.3;
}

.platform-logo,
.platform-icon {
  width: 64px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: oklch(88% 0.006 255 / 0.045);
}

.platform-logo {
  padding: 12px;
  object-fit: contain;
}

.platform-icon {
  color: var(--muted);
}

.platform-icon svg {
  display: block;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 11px;
  color: var(--muted);
  background: oklch(88% 0.006 255 / 0.04);
  font-size: 0.76rem;
  font-weight: 760;
  white-space: nowrap;
}

h3 {
  margin-bottom: -4px;
  color: var(--text);
  font-size: 1.42rem;
  font-weight: 850;
  line-height: 1.22;
}

.download-card p,
.site-footer p,
.soon-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card-spec {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: oklch(88% 0.006 255 / 0.035);
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.card-spec span {
  color: oklch(84% 0.006 255);
}

.card-spec span::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: oklch(76% 0.018 255);
  vertical-align: 1px;
}

.download-action {
  width: fit-content;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: auto;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  font-size: 0.94rem;
  font-weight: 850;
}

.primary-action {
  color: oklch(15% 0.007 255);
  background: oklch(80% 0.012 255);
  transition:
    background-color 160ms ease-out,
    transform 160ms ease-out;
}

.primary-action:hover {
  background: oklch(87% 0.01 255);
  transform: translateY(-1px);
}

.disabled-action {
  border: 1px solid var(--line);
  color: oklch(84% 0.006 255 / 0.44);
  background: oklch(88% 0.006 255 / 0.035);
  cursor: not-allowed;
}

.coming-soon-panel {
  min-height: 314px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, oklch(88% 0.006 255 / 0.07), transparent 42%),
    linear-gradient(300deg, oklch(66% 0.09 154 / 0.045), transparent 45%),
    oklch(13% 0.006 255 / 0.9);
}

.soon-copy {
  max-width: 460px;
  padding: 28px;
  text-align: center;
}

.soon-kicker {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 11px;
  color: oklch(78% 0.008 255);
  background: oklch(88% 0.006 255 / 0.045);
  font-size: 0.78rem;
  font-weight: 850;
}

.companion-section {
  padding-top: 68px;
}

.site-footer {
  margin-top: 58px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer p {
  max-width: 520px;
  text-align: right;
  font-size: 0.92rem;
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100% - 36px, 1120px);
  }

  .hero {
    min-height: 62vh;
  }

  .macos-panel,
  .tab-panel.macos-panel {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer p {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 20px;
  }

  .hero {
    min-height: 64vh;
    padding-bottom: 38px;
  }

  .hero-mark {
    padding-top: 28px;
  }

  .hero-mark img {
    width: min(210px, 62vw);
  }

  .hero-title {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .platform-tabs {
    padding: 12px;
    border-radius: 20px;
  }

  .tab-list {
    grid-template-columns: 1fr;
  }

  .download-card {
    min-height: 250px;
    padding: 20px;
  }

  .card-topline {
    align-items: flex-start;
  }
}
