/* Homepage only: keep the download link visible outside the menu. */
.homepage-page {
  /* Avoid the old mobile overflow:hidden creating a body scroll container,
     which prevents the header from sticking to the viewport. */
  overflow-x: clip;
  overflow-y: visible;
}

.homepage-header {
  gap: clamp(10px, 1.4vw, 24px);
}

.homepage-header .brand { order: 0; }
.homepage-header .site-nav { order: 1; }
.homepage-header .menu-toggle { order: 3; flex-shrink: 0; }

.homepage-header .header-app-cta {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #f0c95c;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0c95c, #d8a829);
  color: #071832;
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.homepage-header .header-app-cta svg { flex: 0 0 auto; }
.homepage-header .header-app-cta:hover { background: #f0c95c; }
.homepage-header .header-app-cta:focus-visible,
.hero-actions .hero-app-cta:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Leave room for the permanent button instead of crowding the navigation. */
@media (max-width: 1400px) {
  .homepage-header .header-app-cta { margin-left: auto; }
  .homepage-header .menu-toggle { display: grid; }
  .homepage-header .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100svh - 76px);
    overflow-y: auto;
    padding: 12px 14px 18px;
    background: rgba(6, 18, 34, .98);
    border-bottom: 1px solid rgba(240, 201, 92, .42);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
  }
  .homepage-header .site-nav.is-open { display: flex; }
  .homepage-header .site-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
  }
}

@media (max-width: 560px) {
  .homepage-header .header-app-cta { padding: 10px 12px; font-size: .85rem; }
  .homepage-header .site-nav { max-height: calc(100svh - 60px); }
  .hero-actions .hero-app-cta { grid-column: 1 / -1; min-height: 50px; }
}
