/*
 * Лендинг idamap.net (views/pageLanding.scala.html). Прототип и исходники макета — ida-meta/marketing/landing.
 *
 * Обычный CSS, а не LESS: подключается только лендингом, общих стилей (main.less) не трогает и не наследует.
 * Без CSS-переменных и rgb(… / a) — чтобы файл можно было вернуть в LESS (sbt-less 1.x) без сюрпризов.
 *
 * Фон страницы — одна живая карта (#map-canvas, map-common.js), закреплённая под всем; секции лежат поверх
 * с разной прозрачностью, как на прежнем лендинге: тёмные — чёрный 60 % и blur 2px, светлые — белый/серый
 * с blur 3px, «Город оживает» и подвал — непрозрачные.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  color: #4a5064;
  background: #fff;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[v-cloak] { visibility: hidden; }

/* Контейнер закреплён за всей страницей. Карте — явные width/height: Google Maps ставит #map-canvas
   inline position: relative, и без явного размера у неё нулевая высота. */
#map-container { position: fixed; inset: 0; }
#map-canvas { width: 100%; height: 100%; }
#map-container { z-index: 0; background: #e5e3df; }
#app { position: relative; z-index: 1; overflow-x: hidden; } /* радары шире колонки не должны давать прокрутку вбок */

.shell { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

/* Иконка из спрайта (views/icon.scala.html): цвет — currentColor, размер — font-size */
.icon { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.15em; }
.icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* ---- Шапка: поверх первого экрана прозрачная, после прокрутки — тёмная; текст белый ---- */

.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 10; border-bottom: 1px solid transparent;
  transition: background 0.2s; }
.nav .shell { display: flex; align-items: center; height: 72px; gap: 32px; }
.nav .shell { transition: height 0.2s, margin 0.2s; }
/* После прокрутки — плашка со скруглением почти на всю ширину экрана (12 px от краёв); элементы — по колонке */
.nav::before { content: ""; position: absolute; top: 12px; left: 12px; right: 12px; height: 64px; z-index: -1;
  border-radius: 18px; background: rgba(18, 18, 22, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); opacity: 0; transition: opacity 0.2s; }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled .shell { height: 64px; margin-top: 12px; }
.nav.scrolled .brand { font-size: 24px; }
.nav.scrolled .brand img { width: 36px; height: 36px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: #14162b; }
.brand img { width: 34px; height: 34px; }
/* В шапке логотип крупнее, чем в подвале */
.nav .brand { font-size: 28px; gap: 12px; font-weight: 700; }
.nav .brand img { width: 42px; height: 42px; }
.nav .brand { color: #fff; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 15px; font-weight: 600; color: #fff; }
.nav-links a:hover { color: #4cc3ff; }
.lang { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.55); display: flex; gap: 8px; }
.lang a.on { color: #fff; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px;
  background: #0091e7; color: #fff; font-weight: 700; font-size: 15px; }
.btn:hover { background: #0083d1; }

/* ---- Слои над картой ---- */

.dark { position: relative; color: rgba(255, 255, 255, 0.8); background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dark h1, .dark h2 { color: #fff; }
.dark .lead, .dark .head p { color: rgba(255, 255, 255, 0.8); }
.dark .eyebrow { color: #4cc3ff; }
.glass { background: rgba(255, 255, 255, 0.85); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.frost { background: rgba(244, 246, 251, 0.82); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.opaque { background: #f4f6fb; }
footer.opaque { background: #fff; }

/* ---- Первый экран ---- */

.hero { padding: 144px 0 96px; }
.hero .shell { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .shell > *, .feature > * { min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #0091e7; }
h1 { font-size: clamp(42px, 5.4vw, 68px); line-height: 1.05; letter-spacing: -0.03em; color: #14162b; font-weight: 800;
  text-wrap: balance; }
/* Градиент по фразе «места, события и люди»: синий — места, бирюзовый — события, фиолетовый — люди */
.accent { -webkit-box-decoration-break: slice; box-decoration-break: slice;
  background: linear-gradient(90deg, #22b8ff 0%, #1de9d2 55%, #9a5bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: 19px; max-width: 520px; }
/* Кнопки сторов — как на лендинге Эфира: тёмная плашка, значок и подпись в две строки */
.stores { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.store { display: inline-flex; align-items: center; gap: 11px; padding: 12px 22px; border-radius: 15px;
  background: rgba(13, 18, 25, 0.85); color: #fff; text-align: left; transition: background 0.15s; }
.store:hover { background: rgba(40, 46, 60, 0.92); }
.store-label { display: flex; flex-direction: column; line-height: 1.1; }
.store-kicker { font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.store-name { font-size: 16px; font-weight: 700; }

/* Телефон: экран приложения (скриншоты 603 × 1311) в тонкой рамке */
.phone { width: 290px; border-radius: 43px; border: 6px solid #2b2f45; background: #2b2f45; overflow: hidden; }
.phone img { width: 100%; border-radius: 37px; }

/* Один телефон на первом экране: покачивается (как на лендинге Эфира), экраны сменяются по кругу */
.hero-phone { position: relative; display: flex; justify-content: center; animation: floaty 6s ease-in-out infinite; }
.hero-phone .phone { position: relative; width: 320px; }
.hero-phone .radar { width: 640px; height: 640px; color: #fff; opacity: 0.55; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
/* Размер задаёт первая картинка, остальные лежат поверх неё */
.slides { position: relative; }
.slides img { opacity: 0; animation: slide 12s ease-in-out infinite; }
.slides img + img { position: absolute; left: 0; top: 0; }
/* 4 с на экран, перетекание 1.2 с: следующий проявляется, пока текущий гаснет. Первый стартует уже видимым. */
.slides img:nth-child(1) { animation-delay: -1.2s; }
.slides img:nth-child(2) { animation-delay: 2.8s; }
.slides img:nth-child(3) { animation-delay: 6.8s; }
@keyframes slide { 0% { opacity: 0; } 10%, 33.3% { opacity: 1; } 43.3%, 100% { opacity: 0; } }
.slides img:first-child { opacity: 1; }

/* ---- Секции ---- */

section { padding: 96px 0; }
.head { max-width: 640px; }
.head.center { margin: 0 auto; text-align: center; }
h2 { margin-top: 12px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -0.02em; color: #14162b;
  font-weight: 800; text-wrap: balance; }
.head p { margin-top: 14px; font-size: 18px; }

/* «Город оживает» */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card { background: #fff; border-radius: 20px; padding: 28px; }
.badge-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; }
.card h3 { margin-top: 20px; font-size: 21px; color: #14162b; font-weight: 800; }
.card p { margin-top: 8px; font-size: 16px; }

/* «Что на карте»: телефон на «радаре», вокруг покачиваются маркеры; ряды через один зеркально */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; margin-top: 40px; }
.feature.flip .media { order: 2; }
.feature h3 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; color: #14162b; text-wrap: balance; }
.points { list-style: none; margin-top: 22px; display: grid; gap: 18px; }
.points li { display: flex; gap: 14px; font-size: 17px; }
.points .icon { font-size: 26px; margin-top: 1px; }
.points b { color: #14162b; }
.media { position: relative; display: grid; place-items: center; padding: 40px 0; }
.media .phone { position: relative; }
.media.places { color: #0091e7; }
.media.events { color: #00e6ce; }
.media.people { color: #6d0fff; }
.pin { position: absolute; animation: floaty 6s ease-in-out infinite; }
.pin img { width: 46px; height: auto; }
.radar { position: absolute; width: 560px; height: 560px; left: 50%; top: 50%; transform: translate(-50%, -50%);
  pointer-events: none; }
.radar svg { width: 100%; height: 100%; overflow: visible; }
.radar .spin { transform-origin: 280px 280px; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Статистика */
.stats-top { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.big { background: #fff; border-radius: 20px; padding: 28px 32px; display: flex; align-items: center; gap: 20px; }
.big .badge-icon { width: 60px; height: 60px; font-size: 32px; }
.num { font-size: 44px; font-weight: 800; color: #14162b; letter-spacing: -0.02em; line-height: 1; }
.lbl { color: #8a90a2; font-weight: 600; margin-top: 6px; }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.cat { background: #fff; border-radius: 16px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.cat .icon { font-size: 26px; color: #0091e7; }
.cat .num { font-size: 22px; line-height: 1.1; }
.cat .lbl { font-size: 14px; margin-top: 0; font-weight: 400; }

/* Интересы: размер — по популярности (как облако прежнего лендинга) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; justify-content: center; align-items: center; }
.chip { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: #fff;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); }
.chip:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.35); }
.chip.w1 { font-size: 14px; padding: 6px 13px; }
.chip.w2 { font-size: 16px; padding: 7px 15px; }
.chip.w3 { font-size: 20px; padding: 9px 18px; font-weight: 700; }
.chip.w4 { font-size: 25px; padding: 10px 22px; font-weight: 700; }

/* Финальный призыв */
.cta { text-align: center; padding-top: 0; }
.cta img.logo { width: 76px; height: 76px; margin: 0 auto; }
.cta .stores { justify-content: center; }

/* Подвал */
footer { border-top: 1px solid #e7e9f0; padding: 48px 0 40px; font-size: 15px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a90a2; margin-bottom: 12px; }
.foot a { display: block; padding: 3px 0; }
.foot a.brand { display: flex; }
.foot a:hover { color: #0091e7; }
.social { display: flex; gap: 14px; margin-top: 4px; }
/* Значки соцсетей белые (общие с другими страницами) — здесь красим в тёмно-серый */
.social img { width: 24px; height: 24px; filter: brightness(0); opacity: 0.55; }
.social a:hover img { opacity: 0.9; }
.copy { margin-top: 40px; color: #8a90a2; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .slides img, .hero-phone, .pin, .radar .spin { animation: none; }
}

@media (max-width: 900px) {
  .hero { padding-top: 112px; }
  .hero .shell, .feature, .stats-top { grid-template-columns: 1fr; }
  /* Первый экран на узких — по центру, как на прежнем лендинге */
  .hero .shell { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .stores { justify-content: center; flex-wrap: wrap; }
  .cards { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .feature.flip .media { order: 0; }
  /* Вертикально: телефон вплотную к своему описанию, а между разделами — большой отступ */
  .feature { gap: 20px; margin-top: 88px; }
  .head + .feature { margin-top: 48px; }
  .media { padding: 0; }
  .radar, .hero-phone .radar { width: 420px; height: 420px; }
  .hero-phone .phone, .phone { width: 260px; }
  .pin { display: none; }
  .nav-links { display: none; }
  /* Без ссылок и кнопки язык прижат вправо; поля внутри плавающей плашки (она в 12 px от краёв) — 28 px */
  .nav .lang { margin-left: auto; }
  .nav .shell { padding: 0 28px; }
  .foot { grid-template-columns: 1fr; gap: 28px; }
}

/* =====================================================================================================
   Тёмная тема: html.theme-dark. Включается по системной настройке (prefers-color-scheme) или кнопкой ◐
   в шапке — выбор запоминается (localStorage «ida-theme»); ставит класс инлайн-скрипт в <head>, до отрисовки.
   Карта — ночной стиль приложения (landing.js, NIGHT_STYLE), скриншоты — тёмная тема приложения (*_dark_*.jpg).
   ===================================================================================================== */

.theme-dark body { background: #06080e; color: #a8afc2; }
.theme-dark #map-container { background: #1d2c4d; }
.theme-dark .dark { background: rgba(4, 6, 12, 0.72); }
.theme-dark .opaque { background: #0b0e17; }
.theme-dark footer.opaque { background: #06080e; }
.theme-dark .glass { background: rgba(8, 10, 18, 0.86); }
.theme-dark .frost { background: rgba(8, 10, 18, 0.78); }
.theme-dark .eyebrow { color: #4cc3ff; }
.theme-dark h1, .theme-dark h2, .theme-dark .card h3, .theme-dark .feature h3, .theme-dark .points b,
.theme-dark .num, .theme-dark .brand { color: #eef1f8; }
.theme-dark .lbl, .theme-dark .foot h4, .theme-dark .copy { color: #6f7790; }
/* Текст пунктов «Что на карте» — цвет задан инлайн в шаблоне */
.theme-dark .points li > span { color: #a8afc2 !important; }

/* Карточки: тёмная плашка, тонкая обводка, сверху — светлая кромка */
.theme-dark .card, .theme-dark .big, .theme-dark .cat {
  background: linear-gradient(180deg, #171c2e, #121625); border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 40px -24px rgba(0, 0, 0, 0.8); }
.theme-dark .card:hover { border-color: rgba(34, 176, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 4px rgba(34, 176, 255, 0.18); }
/* Плашка иконки — тонированная цветом иконки (цвет задан инлайн в шаблоне), без свечения */
.theme-dark .badge-icon { background: color-mix(in srgb, currentColor 14%, transparent) !important; }
.theme-dark .cat .icon { color: #22b0ff; }

/* Телефоны: рамка чуть светлее фона, у «Что на карте» — мягкое свечение цвета раздела */
.theme-dark .phone { border-color: #262b40; background: #262b40;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px -30px #000; }
.theme-dark .media .phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
  0 0 60px -10px color-mix(in srgb, currentColor 45%, transparent); }
.theme-dark .media.places { color: #22b0ff; }
.theme-dark .media.people { color: #8a4dff; }

.theme-dark .chip { background: rgba(255, 255, 255, 0.06); color: #eef1f8; }
.theme-dark footer { border-top-color: rgba(255, 255, 255, 0.08); }
.theme-dark .social img { filter: none; opacity: 0.6; }
.theme-dark .social a:hover img { opacity: 1; }
.theme-dark .foot a:hover { color: #22b0ff; }

/* Переключатель темы в шапке */
.theme-toggle { background: none; border: 0; color: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  opacity: 0.7; padding: 0 4px; }
.theme-toggle:hover { opacity: 1; }
