:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --ink: #0e2235;
  --muted: #5b6d80;
  --line: #e1eaf3;
  --accent: #0a7fd0;
  --accent-2: #19bff3;
  --accent-ink: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(14, 34, 53, .06), 0 8px 24px rgba(14, 34, 53, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { width: 88px; height: auto; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--accent); }

/* Первый экран */
.hero {
  background:
    radial-gradient(900px 420px at 85% 30%, rgba(25, 191, 243, .18), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 72px 20px 80px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 20px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-text { min-width: 0; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: 100%; max-width: 440px; height: auto; filter: drop-shadow(0 24px 40px rgba(10, 127, 208, .25)); }
.glow { position: absolute; inset: 8% 10%; border-radius: 50%; background: radial-gradient(circle, rgba(25, 191, 243, .35), transparent 65%); filter: blur(20px); }

.stats { display: flex; gap: 40px; margin: 44px 0 0; padding: 0; }
.stats div { margin: 0; }
.stats dt { font-size: 30px; font-weight: 800; color: var(--ink); }
.stats dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(10, 127, 208, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10, 127, 208, .35); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Секции */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; }
.section-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 32px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 500; padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.chip span { color: var(--muted); margin-left: 4px; }
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: rgba(255, 255, 255, .6); }

/* Карточки приложений */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.app {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.app:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(14, 34, 53, .06), 0 16px 36px rgba(14, 34, 53, .1); }
.app[hidden] { display: none; }
.app-head { display: flex; gap: 16px; align-items: center; }
.app-icon { width: 72px; height: 72px; border-radius: 22%; flex: none; box-shadow: 0 0 0 1px rgba(14, 34, 53, .08); background: var(--bg); }
.app h3 { font-size: 18px; font-weight: 700; }
.genre { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.app-desc {
  margin: 0; color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.app-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.stores { display: flex; flex-wrap: wrap; gap: 8px; }
.store {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.store:hover { background: var(--accent); }
.privacy { font-size: 13px; color: var(--muted); }
.privacy:hover { color: var(--accent); }

/* О студии */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature h3::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; margin-bottom: 16px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.feature p { margin: 0; color: var(--muted); }

/* Контакты */
.contacts { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.contacts p { margin: 12px 0 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }

.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 20px 56px; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 260px; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .top-in { height: 60px; }
  .brand img { width: 72px; }
  .nav { gap: 16px; font-size: 15px; }
  .nav a[href="#about"] { display: none; }
  .hero-in { padding: 32px 16px 48px; }
  .stats { gap: 24px; }
  .stats dt { font-size: 24px; }
  .section { padding: 56px 0; }
  .grid { grid-template-columns: 1fr; }
  .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app, .btn { transition: none; }
}

/* Карточка целиком ведёт на страницу приложения */
.app { position: relative; }
.app h3 a { color: inherit; text-decoration: none; }
.app-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app:hover .app-link { color: var(--accent); }
.app .store { position: relative; z-index: 1; }
.more { font-size: 14px; font-weight: 600; color: var(--accent); }

/* Страница приложения */
.app-hero {
  background:
    radial-gradient(800px 360px at 90% 0%, rgba(25, 191, 243, .16), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 28px 0 48px;
}
.back { display: inline-block; margin-bottom: 28px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--accent); }
.app-hero-in { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
.app-hero-icon { width: 128px; height: 128px; border-radius: 22%; box-shadow: 0 0 0 1px rgba(14, 34, 53, .08), 0 14px 32px rgba(14, 34, 53, .14); }
.app-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.app-hero .eyebrow { margin-bottom: 10px; }
.app-hero .lead { margin: 14px 0 24px; max-width: 680px; }

.shots-wrap { padding: 40px 0 0; }
.shots {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; -webkit-overflow-scrolling: touch;
}
.shots img {
  height: 440px; width: auto; flex: none; scroll-snap-align: start;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
}
.shots-wide img { height: 340px; border-radius: 10px; }

.app-body { padding-top: 48px; }
.app-body-in { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.app-text h2, .facts h2 { font-size: 22px; margin-bottom: 16px; }
.app-text p { margin: 0 0 14px; color: #33475a; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.facts dl { margin: 0; }
.facts dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dl div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.privacy-link { display: inline-block; margin-top: 16px; font-size: 14px; }
.others-title { margin-bottom: 28px; }

@media (max-width: 860px) {
  .app-body-in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app-hero-in { grid-template-columns: 1fr; gap: 20px; }
  .app-hero-icon { width: 96px; height: 96px; }
  .shots img { height: 380px; }
  .shots-wide img { height: 200px; }
}
