.studio-media-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  cursor: pointer;
}

.studio-media-link:focus-visible {
  outline: 3px solid #9cbbff;
  outline-offset: -4px;
}

.desk-carousel__pane:not(.is-active) .studio-media-link {
  visibility: hidden;
}

.download-options--nav .download-options__chevron,
.download-options--nav.is-open .download-options__chevron {
  transform: none;
}

@property --download-card-scale {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

@keyframes terminal-download-breathe {
  0%, 100% { --download-card-scale: .985; }
  50% { --download-card-scale: 1; }
}

/* Use one breathing cycle for every card within each download group. */
.terminal-download-choices {
  --download-card-width: 318px;
  --download-card-height: 68px;
  --download-card-gap: 16px;
  --download-label-size: 17px;
  width: min(calc(2 * var(--download-card-width) + var(--download-card-gap)), 100%);
  gap: 0;
  animation: terminal-download-breathe 3.2s ease-in-out infinite;
}

.hero__fold-main > .terminal-download-choices {
  margin-block: 6px;
}

html:not([data-page-entry="news"]) .hero__bg-top {
  top: clamp(112px, 24vh, 216px);
}

.terminal-download-choices .download-pair {
  width: 100%;
  gap: var(--download-card-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-download-choices .btn-download--platform {
  width: 100%;
  height: var(--download-card-height);
  border-radius: 15px;
  animation: none;
  transform: scale(var(--download-card-scale, 1));
}

.terminal-download-choices .btn-download__inner--platform {
  padding: 0 clamp(14px, 2.5vw, 18px);
  gap: 10px;
}

.terminal-download-choices .btn-download__copy {
  gap: 3px;
  text-align: left;
}

.terminal-download-choices .btn-download__label {
  font-size: var(--download-label-size);
  line-height: 1.2;
  white-space: normal;
}

.terminal-download-choices .download-release__new {
  right: 0;
}

.terminal-download-choices .btn-download--mac .btn-download__hero-fill {
  background: linear-gradient(110deg, #fff 0%, #f5f3ff 58%, #eaeaff 100%);
}

.terminal-download-choices .btn-download--windows .btn-download__hero-fill {
  background: linear-gradient(110deg, #fff 0%, #eefafd 59%, #dbe8ff 100%);
}

.terminal-download-choices .btn-download--platform:focus-visible {
  outline: 2px solid #a5c8ff;
  outline-offset: 4px;
}

.terminal-download-choices__browser {
  width: calc((100% - var(--download-card-gap)) / 2);
  margin-top: 16px;
}

.terminal-download-choices__browser-label {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.terminal-download-choices .studio-entry-button {
  border: 1px solid rgba(255, 255, 255, .56);
  background: transparent;
  color: #fff;
}

.studio-entry-button .btn-download__label {
  color: #fff;
}

.studio-entry-button .btn-download__sub {
  color: rgba(255, 255, 255, .74);
}

.studio-entry-button .btn-download__arrow {
  filter: brightness(0) invert(1);
}

.terminal-download-choices .studio-entry-button:hover,
.terminal-download-choices .studio-entry-button:focus-visible {
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

.terminal-download-choices .hero__note {
  margin-top: 12px;
}

/* Keep the scroll link visible when browser chrome reduces the desktop viewport. */
@media (min-width: 768px) and (max-height: 820px) {
  html:not([data-page-entry="news"]) .hero__fold-main {
    gap: 12px;
    padding-block: 8px;
  }

  html:not([data-page-entry="news"]) .hero__intro {
    gap: 12px;
  }

  html:not([data-page-entry="news"]) .hero__title {
    font-size: clamp(48px, min(7.2vw, 11.5dvh), 92px);
    line-height: 1.08;
  }

  html:not([data-page-entry="news"]) .hero__title-group {
    gap: 10px;
  }

  html:not([data-page-entry="news"]) .hero__scroll {
    gap: 4px;
    padding-block: 6px 12px;
  }
}

@media (min-width: 768px) and (max-height: 700px) {
  html:not([data-page-entry="news"]) .hero__fold-main {
    gap: 8px;
    padding-block: 4px;
  }

  html:not([data-page-entry="news"]) .hero__title {
    font-size: clamp(42px, min(7.2vw, calc(21dvh - 76px)), 70px);
  }

  html:not([data-page-entry="news"]) .hero__fold-main > .terminal-download-choices {
    margin-block: 2px;
  }
}

@media (max-width: 600px) {
  html:not([data-page-entry="news"]) .hero__bg-top {
    top: clamp(194px, 35vh, 286px);
    opacity: .82;
  }

  .terminal-download-choices {
    --download-card-gap: 10px;
    --download-card-height: 62px;
    width: min(var(--download-card-width), 100%);
  }

  .terminal-download-choices .download-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .terminal-download-choices__browser {
    width: 100%;
    margin-top: 12px;
  }

  .terminal-download-choices__browser-label {
    margin-bottom: 8px;
  }
}

@media (max-width: 360px) {
  .terminal-download-choices .btn-download__label {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-download-choices {
    animation: none;
  }
}
