/**
 * PIPs Key — public APK download page
 */

.download-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.download-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.download-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.download-bg__orb--1 {
  width: 18rem;
  height: 18rem;
  top: -4rem;
  left: -4rem;
  background: #6366f1;
}

.download-bg__orb--2 {
  width: 14rem;
  height: 14rem;
  top: 40%;
  right: -3rem;
  background: #ec4899;
  opacity: 0.35;
}

.download-bg__orb--3 {
  width: 16rem;
  height: 16rem;
  bottom: -2rem;
  left: 20%;
  background: #0ea5e9;
  opacity: 0.3;
}

.download-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: max(0.85rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    0.5rem max(1rem, env(safe-area-inset-left));
}

.download-top__link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
  margin-right: auto;
}

.download-top__link:hover {
  background: rgba(99, 102, 241, 0.15);
}

.download-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0.5rem max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.download-card {
  position: relative;
  width: min(100%, 24rem);
  padding: 1.75rem 1.35rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 56px rgba(99, 102, 241, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.download-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%,
    transparent 100%
  );
  pointer-events: none;
}

.download-hero {
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.download-hero__icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 22px;
  box-shadow:
    0 12px 32px rgba(99, 102, 241, 0.35),
    0 0 0 3px rgba(255, 255, 255, 0.15);
  margin-bottom: 0.85rem;
}

.download-hero__eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.download-hero__title {
  margin: 0.2rem 0 0;
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.download-hero__tagline {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.download-meta__pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
  border: none;
  cursor: pointer;
  text-align: left;
}

.download-btn:hover {
  transform: translateY(-2px);
}

.download-btn--primary {
  background: linear-gradient(145deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 28px rgba(99, 102, 241, 0.45);
}

.download-btn--primary:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 14px 36px rgba(99, 102, 241, 0.5);
}

.download-btn--ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.download-btn__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.download-btn--ghost .download-btn__icon {
  background: rgba(99, 102, 241, 0.12);
}

.download-btn__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.download-btn__text strong {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.download-btn__text small {
  font-size: 0.72rem;
  opacity: 0.88;
  font-weight: 500;
}

.download-unavailable {
  margin: 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.download-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
}

.download-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.download-feature__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.download-feature strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.download-feature p {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.download-steps {
  margin-bottom: 1rem;
}

.download-steps__title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-align: center;
}

.download-steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-steps__list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.35;
}

.download-steps__num {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.download-foot {
  margin: 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--muted);
}

.download-foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (min-width: 480px) {
  .download-card {
    padding: 2rem 1.75rem 1.65rem;
  }

  .download-hero__icon {
    width: 6.25rem;
    height: 6.25rem;
  }
}
