/* ═══════════════════════════════════════
   download.css — Страница «Скачать приложение»
   Блобы · Glow ring · Shimmer · Stagger
   ========================================== */

.dl-page {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 120px);
  padding: 48px 20px;
  overflow: hidden;
}

/* ═══════════════════════════════════════
   Фоновые кляксы
   ========================================== */
.dl-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.dl-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  will-change: transform, opacity;
}

.dl-blob--1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(196, 69, 54, 0.14), transparent 70%);
  top: -80px;
  right: 5%;
  animation:
    blob-in 2s var(--ease) 0.2s forwards,
    blob-drift-1 16s ease-in-out 2s infinite;
}
.dl-blob--2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(230, 126, 34, 0.12),
    transparent 70%
  );
  bottom: 5%;
  left: 0%;
  animation:
    blob-in 2s var(--ease) 0.6s forwards,
    blob-drift-2 18s ease-in-out 2.5s infinite;
}
.dl-blob--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(212, 165, 116, 0.14),
    transparent 70%
  );
  top: 25%;
  left: 6%;
  animation:
    blob-in 2s var(--ease) 1s forwards,
    blob-drift-1 14s ease-in-out 3s infinite;
}
.dl-blob--4 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(39, 174, 96, 0.08), transparent 70%);
  bottom: 15%;
  right: 8%;
  animation:
    blob-in 2s var(--ease) 1.3s forwards,
    blob-drift-2 20s ease-in-out 3.5s infinite;
}
.dl-blob--5 {
  width: 150px;
  height: 150px;
  background: radial-gradient(
    circle,
    rgba(52, 152, 219, 0.07),
    transparent 70%
  );
  top: 10%;
  right: 30%;
  animation:
    blob-in 2s var(--ease) 1.6s forwards,
    blob-drift-1 17s ease-in-out 4s infinite;
}

@keyframes blob-in {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes blob-drift-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -25px) scale(1.06);
  }
  50% {
    transform: translate(-20px, 15px) scale(0.94);
  }
  75% {
    transform: translate(25px, 30px) scale(1.08);
  }
}
@keyframes blob-drift-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-30px, 20px) scale(1.05);
  }
  66% {
    transform: translate(25px, -20px) scale(0.96);
  }
}

html[data-theme="dark"] .dl-blob--1 {
  background: radial-gradient(circle, rgba(224, 112, 96, 0.1), transparent 70%);
}
html[data-theme="dark"] .dl-blob--2 {
  background: radial-gradient(
    circle,
    rgba(240, 148, 58, 0.08),
    transparent 70%
  );
}
html[data-theme="dark"] .dl-blob--3 {
  background: radial-gradient(
    circle,
    rgba(230, 184, 128, 0.08),
    transparent 70%
  );
}
html[data-theme="dark"] .dl-blob--4 {
  background: radial-gradient(
    circle,
    rgba(46, 204, 113, 0.06),
    transparent 70%
  );
}
html[data-theme="dark"] .dl-blob--5 {
  background: radial-gradient(
    circle,
    rgba(52, 152, 219, 0.05),
    transparent 70%
  );
}

/* ═══════════════════════════════════════
   Hero
   ========================================== */
.dl-hero {
  position: relative;
  max-width: 560px;
  text-align: center;
  z-index: 1;
}

.dl-hero > * {
  opacity: 0;
  transform: translateY(28px);
  animation: hero-enter 0.8s var(--ease) forwards;
}

.dl-hero > :nth-child(1) {
  animation-delay: 0.15s;
}
.dl-hero > :nth-child(2) {
  animation-delay: 0.3s;
}
.dl-hero > :nth-child(3) {
  animation-delay: 0.45s;
}
.dl-hero > :nth-child(4) {
  animation-delay: 0.6s;
}
.dl-hero > :nth-child(5) {
  animation-delay: 0.75s;
}
.dl-hero > :nth-child(6) {
  animation-delay: 0.95s;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════
   Логотип — glow + вращающееся кольцо
   ========================================== */
.dl-hero__logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.dl-hero__logo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow:
    0 4px 24px rgba(196, 69, 54, 0.15),
    0 12px 48px rgba(44, 37, 32, 0.08);
  z-index: 2;
  animation: logo-breathe 4s ease-in-out infinite;
}

.dl-hero__logo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 32px;
  z-index: 1;
  background: conic-gradient(
    from 0deg,
    #c44536,
    #e67e22,
    #d4a574,
    #27ae60,
    #3498db,
    #9b59b6,
    #e74c3c,
    #c44536
  );
  animation: ring-spin 8s linear infinite;
  opacity: 0.6;
}

.dl-hero__logo-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 29px;
  background: var(--bg);
}

html[data-theme="dark"] .dl-hero__logo-ring::after {
  background: #1a1716;
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.dl-hero__logo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 40px;
  background: linear-gradient(
    135deg,
    rgba(196, 69, 54, 0.15),
    rgba(230, 126, 34, 0.1),
    rgba(212, 165, 116, 0.15),
    rgba(52, 152, 219, 0.08)
  );
  background-size: 300% 300%;
  animation: glow-shift 6s ease-in-out infinite;
  filter: blur(24px);
  z-index: 0;
}

@keyframes logo-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes glow-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 100%;
  }
}

html[data-theme="dark"] .dl-hero__logo {
  box-shadow:
    0 4px 24px rgba(196, 69, 54, 0.25),
    0 12px 48px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .dl-hero__logo-ring {
  opacity: 0.45;
}

html[data-theme="dark"] .dl-hero__logo-glow {
  background: linear-gradient(
    135deg,
    rgba(224, 112, 96, 0.12),
    rgba(240, 148, 58, 0.08),
    rgba(230, 184, 128, 0.12),
    rgba(52, 152, 219, 0.06)
  );
  background-size: 300% 300%;
}

/* ═══════════════════════════════════════
   Заголовок
   ========================================== */
.dl-hero__title {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    #c44536,
    #e67e22,
    #d4a574,
    #e74c3c,
    #c44536
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    hero-enter 0.8s var(--ease) 0.3s forwards,
    logo-shimmer 6s ease-in-out 1s infinite;
  opacity: 0;
}

html[data-theme="dark"] .dl-hero__title {
  background: linear-gradient(
    90deg,
    #e07060,
    #f0943a,
    #e6b880,
    #f06050,
    #e07060
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dl-hero__tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.dl-hero__desc {
  font-size: 0.92rem;
  color: var(--text-3);
  line-height: 1.65;
  margin-bottom: 40px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

html[data-theme="dark"] .dl-hero__tagline {
  color: #f5f1ed;
}
html[data-theme="dark"] .dl-hero__desc {
  color: #8b7e74;
}

/* ═══════════════════════════════════════
   Бейджи сторов
   ========================================== */
.dl-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.dl-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px 14px 20px;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font);
  transition: all 0.4s var(--ease);
  text-decoration: none;
  min-width: 200px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.dl-badge__shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 100%
  );
  pointer-events: none;
}

.dl-badge:hover .dl-badge__shimmer {
  animation: shimmer-sweep 0.7s var(--ease) forwards;
}

@keyframes shimmer-sweep {
  from {
    left: -100%;
  }
  to {
    left: 100%;
  }
}

.dl-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dl-badge:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.dl-badge__icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  fill: currentColor;
}

.dl-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.dl-badge__text small {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
}

.dl-badge__text strong {
  font-size: 1.15rem;
  font-weight: 600;
}

html[data-theme="dark"] .dl-badge {
  background: linear-gradient(135deg, #2a2522 0%, #3a3330 100%);
  border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .dl-badge:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(196, 69, 54, 0.1);
}

/* ═══════════════════════════════════════
   Фичи
   ========================================== */
.dl-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.dl-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-radius: var(--radius);
  min-width: 130px;
  transition: all 0.3s var(--ease);
  cursor: default;
}

.dl-feature:hover {
  background: var(--bg-subtle);
  transform: translateY(-3px);
}

html[data-theme="dark"] .dl-feature:hover {
  background: rgba(58, 51, 48, 0.4);
}

.dl-feature__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: var(--primary-light);
  transition: all 0.35s var(--bounce);
}

.dl-feature:hover .dl-feature__icon-wrap {
  background: rgba(196, 69, 54, 0.13);
  transform: scale(1.15) rotate(-3deg);
}

html[data-theme="dark"] .dl-feature__icon-wrap {
  background: rgba(196, 69, 54, 0.1);
}

html[data-theme="dark"] .dl-feature:hover .dl-feature__icon-wrap {
  background: rgba(196, 69, 54, 0.2);
}

.dl-feature__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--primary);
}

html[data-theme="dark"] .dl-feature__icon {
  color: #e07060;
}

.dl-feature__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

html[data-theme="dark"] .dl-feature__label {
  color: #a89b8e;
}

/* ═══════════════════════════════════════
   Reduced motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  .dl-blob,
  .dl-hero > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .dl-hero__logo,
  .dl-hero__logo-ring,
  .dl-hero__logo-glow,
  .dl-hero__title {
    animation: none !important;
    opacity: 1 !important;
  }
  .dl-badge__shimmer {
    display: none;
  }
}

/* ═══════════════════════════════════════
   Мобильный
   ========================================== */
@media (max-width: 480px) {
  .dl-page {
    padding: 24px 16px;
    min-height: calc(100vh - var(--header-h) - 80px);
  }

  .dl-hero__logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
  .dl-hero__logo-ring {
    inset: -5px;
    border-radius: 26px;
  }
  .dl-hero__logo-ring::after {
    border-radius: 23px;
  }
  .dl-hero__logo-glow {
    inset: -14px;
    border-radius: 30px;
  }

  .dl-hero__title {
    font-size: 2.1rem;
  }
  .dl-hero__tagline {
    font-size: 1.05rem;
  }

  .dl-badges {
    flex-direction: column;
    align-items: center;
  }
  .dl-badge {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .dl-features {
    gap: 10px;
  }
  .dl-feature {
    min-width: 100px;
    padding: 16px 12px;
  }
  .dl-feature__icon-wrap {
    width: 44px;
    height: 44px;
  }

  .dl-blob--1 {
    width: 180px;
    height: 180px;
  }
  .dl-blob--2 {
    width: 150px;
    height: 150px;
  }
  .dl-blob--3 {
    width: 120px;
    height: 120px;
  }
  .dl-blob--4,
  .dl-blob--5 {
    display: none;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .dl-hero__logo {
    width: 110px;
    height: 110px;
  }
  .dl-hero__title {
    font-size: 2.4rem;
  }
}
