/* ===== БАЗА ДЛЯ iOS SAFE AREA ===== */
html {
  background: #0b1120; /* цвет под статус-баром */
}

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --bg-dark: #0b1120;
  --bg-darker: #070b16;
  --accent: #6366f1;
  --accent2: #22d3ee;
  --text: #e2e8f0;
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

/* ===== BODY ===== */
body {
  position: relative;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, #111827, var(--bg-dark) 60%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  min-height: 100dvh;
}

/* ===== АНИМИРОВАННЫЙ ФОН ===== */
.bg-animated {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 10%, rgba(99,102,241,0.25), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(34,211,238,0.25), transparent 40%),
    linear-gradient(160deg, var(--bg-dark), var(--bg-darker));
}

.floating-icon {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  animation: floatIcon linear infinite;
}

.floating-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 30%, rgba(99,102,241,0.4), transparent 60%);
  opacity: .6;
}

@keyframes floatIcon {
  from { transform: translateY(110vh) rotate(0deg); }
  to { transform: translateY(-140px) rotate(360deg); }
}

/* ===== КОНТЕНТ ПОВЕРХ ФОНА ===== */
header, section, footer {
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
header {
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 40px) 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

header h1 {
  font-size: 64px;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #a5b4fc);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  margin-top: 20px;
  font-size: 20px;
  max-width: 640px;
  opacity: 0.85;
}

/* ===== КНОПКА ===== */
.btn {
  margin-top: 32px;
  padding: 14px 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: white;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(99,102,241,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99,102,241,0.6);
}

/* ===== СЕКЦИИ ===== */
section {
  padding: 100px 20px;
  max-width: 1100px;
  margin: auto;
}

h2 {
  font-size: 36px;
  margin-bottom: 50px;
  text-align: center;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  gap: 28px;
}

.services {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ===== КАРТОЧКИ ===== */
.card {
  padding: 28px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .3s ease, border .3s ease;
  text-align: center;
}

.card:hover {
  transform: translateY(-6px);
  border: 1px solid rgba(99,102,241,0.6);
}

/* ===== APPS GRID ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
  align-items: stretch;
}

/* ===== APP CARD ===== */
.app-card {
  padding: 32px;
  border-radius: 24px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .3s ease, border .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.app-card:hover {
  transform: translateY(-8px);
  border: 1px solid rgba(99,102,241,0.6);
  box-shadow: 0 20px 60px rgba(99,102,241,0.3);
}

.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.app-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex: 1;
}

.app-content {
  text-align: center;
}

.app-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
}

.app-description {
  font-size: 16px;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.6;
  margin: 0;
}

.store-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  width: 100%;
  min-height: 50px;
}

.store-button {
  display: inline-block;
  transition: transform .2s ease, opacity .2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.store-button img {
  padding: 5px 0px;
}

.store-button.google-play img{
  padding: 0;
}

.store-button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.store-button img {
  display: block;
  height: 50px;
  width: auto;
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all .8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
footer {
  margin-top: 80px;
  padding: 60px 20px;
  background: #060a14;
  color: #94a3b8;
  font-size: 14px;
}

.footer-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ===== ССЫЛКИ ===== */
.contact-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--accent2);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 700px) {
  header h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .floating-icon { width: 80px; height: 80px; }
}