/* ────────────────────────────────────────────────────────────────────────
   Стили публичного сайта ticketsapp.ru.
   Раздаются nginx как статика напрямую из /var/www/ticketsapp.ru/.
   Ничего динамического — никакого JS, никаких трекеров.
   ──────────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ── Welcome (тёмная hero-страница) ────────────────────────────────────── */

body.welcome {
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.welcome-wrap { max-width: 720px; width: 100%; }

.welcome-wrap h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}
.welcome-wrap .lead {
  font-size: 18px;
  line-height: 1.6;
  color: #9a9a9a;
  margin: 0 0 36px;
  max-width: 580px;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.store-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.store-btn {
  display: block;
  background: #1a1a1a;
  color: #888;
  border-radius: 12px;
  padding: 14px 22px;
  min-width: 180px;
  opacity: 0.6;
  cursor: default;
  text-decoration: none;
}
.store-btn--active {
  background: #fff;
  color: #0a0a0a;
  opacity: 1;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.store-btn--active:hover { transform: translateY(-1px); }
.store-btn .label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
}
.store-btn .name {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

.qr-blocks {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr-frame {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  line-height: 0;
}
.qr-frame svg,
.qr-frame img {
  display: block;
  width: 140px;
  height: 140px;
}
.qr-caption {
  font-size: 12px;
  color: #9a9a9a;
  line-height: 1.4;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 560px) {
  .qr-blocks { display: none; }
  .store-row { gap: 0; }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.feature .title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature .text {
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.5;
}

/* ── Скриншоты приложения ─────────────────────────────────────────────── */
.screens {
  margin: 8px 0 56px;
  padding-top: 36px;
  border-top: 1px solid #1f1f1f;
}
.screens-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.screens-lead {
  font-size: 14px;
  color: #9a9a9a;
  margin: 0 0 22px;
}
.screens-row {
  /* На широком экране — сетка 4 колонки. На узком — горизонтальный скролл,
     чтобы не сжимать скриншоты до нечитаемого размера. */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .screens-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin: 0 -20px;       /* компенсируем padding контейнера body.welcome */
    padding-left: 20px;
    padding-right: 20px;
  }
  .screen {
    flex: 0 0 60%;          /* виден ~1.5 экрана за раз */
    scroll-snap-align: start;
  }
}
.screen {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.screen img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #161616;
  display: block;
}
.screen figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: #9a9a9a;
  text-align: center;
  line-height: 1.35;
}

/* ── Сайты операторов ─────────────────────────────────────────────────── */
.operators {
  margin: 8px 0 56px;
  padding-top: 36px;
  border-top: 1px solid #1f1f1f;
}
.operators-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.operators-lead {
  font-size: 14px;
  color: #9a9a9a;
  margin: 0 0 22px;
}
.operators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.operator {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #161616;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.operator-logo {
  width: 40px;
  height: auto;
  flex-shrink: 0;
  opacity: 0.95;
}
.operator-text {
  min-width: 0;
}
.operator:hover {
  background: #1f1f1f;
  border-color: #3a3a3a;
  transform: translateY(-1px);
}
.operator-city {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.operator-domain {
  font-size: 13px;
  color: #888;
}
.operator-domain::after {
  content: ' ↗';
  opacity: 0.5;
}

.welcome-footer {
  padding-top: 28px;
  border-top: 1px solid #1f1f1f;
  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

/* ── Legal pages (светлый длинный текст) ───────────────────────────────── */

body.legal {
  background: #fff;
  color: #1d1d1f;
  padding: 40px 20px;
  min-height: 100vh;
}

.legal-wrap { max-width: 760px; margin: 0 auto; }

.legal-wrap .back {
  display: inline-block;
  color: #86868b;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
}
.legal-wrap .back:hover { color: #1d1d1f; }

.legal-wrap .updated-at {
  font-size: 14px;
  color: #86868b;
  margin-bottom: 4px;
}

.legal-wrap h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 24px 0 16px;
}
.legal-wrap h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 32px 0 12px;
}
.legal-wrap h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin: 24px 0 8px;
}
.legal-wrap p {
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0;
  color: #333;
}
.legal-wrap .bullet {
  position: relative;
  padding-left: 20px;
  margin: 6px 0;
}
.legal-wrap .bullet::before {
  content: "•";
  position: absolute;
  left: 0;
}

.legal-wrap .note {
  font-size: 15px;
  line-height: 1.5;
  margin: 16px 0;
  padding: 12px 16px;
  background: #fff8e1;
  border: 1px solid #ffe0a0;
  border-radius: 8px;
  color: #5a4500;
}

.legal-wrap table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.legal-wrap th,
.legal-wrap td {
  border: 1px solid #d8d8d8;
  padding: 10px 12px;
  text-align: left;
}
.legal-wrap th {
  font-weight: 700;
  background: #f5f5f7;
}

.legal-wrap .footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e5ea;
  font-size: 14px;
  color: #86868b;
}
