/* ============================================================
   СОПС — стили лендинга (index.html)
   Дизайн совпадает с остальными страницами сайта:
   system-ui, --color-primary, .section-card на --color-surface
   ============================================================ */

/* ---- Шапка (как .page-header на profile/delays/admin) ---- */
#main-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  position: sticky; top: 0; z-index: 100;
}
#main-header .logo-link {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  margin-right: auto;
}
#main-header .logo-link:hover { text-decoration: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

#nav-guest { display: flex; align-items: center; gap: 8px; }
#nav-user  { display: none; align-items: center; gap: 8px; }

/* ---- Общие секции ---- */
.section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  line-height: 1.22;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}

.section-sub {
  text-align: center;
  color: var(--color-text-sec);
  margin: 0 auto 32px;
  font-size: .95rem;
  line-height: 1.6;
  max-width: 560px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  padding: 72px 16px 80px;
}

/* Мягкая синяя подсветка сверху */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 320px at 50% -10%, rgba(26,115,232,.12), transparent 70%);
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-tracks {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  height: 60%;
  color: var(--color-primary);
  opacity: .22;
}
[data-theme="dark"] .hero-tracks { opacity: .3; }

.hero-tracks .rail    { stroke: currentColor; stroke-width: 2.5; opacity: .55; }
.hero-tracks .sleeper { stroke: currentColor; opacity: .3; }

.hero-glow {
  position: absolute;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 340px;
  background: radial-gradient(ellipse, rgba(26,115,232,.16) 0%, transparent 65%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-text-sec);
  margin-bottom: 22px;
}

.hero-label-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--color-success);
  box-shadow: 0 0 0 0 rgba(52,168,83,.5);
  animation: pulse-dot 2s ease-out infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(52,168,83,.45); }
  100% { box-shadow: 0 0 0 7px transparent; }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.02em;
  color: var(--color-text);
  margin-bottom: 18px;
}
.hero-title em {
  font-style: normal;
  color: var(--color-primary);
}

.hero-sub {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--color-text-sec);
  margin: 0 auto 30px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.hero-cta .btn { padding: 12px 28px; font-size: .95rem; }

.hero-disclaimer {
  display: inline-block;
  text-align: left;
  font-size: .82rem;
  color: var(--color-text-sec);
  background: rgba(251,188,4,.12);
  border: 1px solid rgba(251,188,4,.35);
  border-radius: var(--radius);
  padding: 10px 14px;
  max-width: 560px;
  line-height: 1.55;
}

/* ---- Возможности ---- */
.features-section {
  padding: 56px 0 48px;
  background: var(--color-bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 18px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease, box-shadow .15s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-card.in-view { opacity: 1; transform: none; }
.feature-card:nth-child(2) { transition-delay: .05s; }
.feature-card:nth-child(3) { transition-delay: .1s; }
.feature-card:nth-child(4) { transition-delay: .15s; }
.feature-card:nth-child(5) { transition-delay: .05s; }
.feature-card:nth-child(6) { transition-delay: .1s; }
.feature-card:nth-child(7) { transition-delay: .15s; }
.feature-card:nth-child(8) { transition-delay: .2s; }

.feature-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 10px; }

.feature-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: .85rem;
  color: var(--color-text-sec);
  line-height: 1.6;
}

/* ---- Под капотом ---- */
.deep-section {
  padding: 56px 0 48px;
  background: var(--color-bg);
}

.deep-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.deep-row.in-view { opacity: 1; transform: none; }
.deep-row:first-of-type { border-top: none; }

/* Панель слева, текст справа — для чередования */
.deep-row--rev .deep-text  { order: 2; }
.deep-row--rev .deep-panel { order: 1; }

.deep-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}
.deep-text p {
  font-size: .9rem;
  color: var(--color-text-sec);
  line-height: 1.68;
  margin-bottom: 10px;
}
.deep-text p:last-child { margin-bottom: 0; }

.deep-note {
  border-left: 3px solid var(--color-warning);
  padding-left: 12px;
}

/* Бейдж «скоро» для готовящихся разделов */
.soon-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(251,188,4,.18);
  color: #a0761d;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
[data-theme="dark"] .soon-badge { color: var(--color-warning); }
.deep-cta { margin-top: 14px; }

/* Иллюстративная панель */
.deep-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}

.panel-head {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-sec);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.panel-foot {
  font-size: .75rem;
  color: var(--color-text-sec);
  opacity: .8;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.panel-list { list-style: none; }
.panel-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: .875rem;
  border-bottom: 1px dashed var(--color-border);
}
.panel-list li:last-child { border-bottom: none; }
.pl-key { color: var(--color-text-sec); }
.pl-val { color: var(--color-text); font-weight: 600; text-align: right; }

/* Сегменты перецепки */
.seg-row { display: flex; gap: 12px; padding: 8px 0; }
.seg-bar {
  width: 4px;
  border-radius: 2px;
  flex: none;
  background: var(--color-border);
}
.seg-bar--done { background: var(--color-primary); }
.seg-info { min-width: 0; }
.seg-title { font-size: .85rem; font-weight: 600; color: var(--color-text); }
.seg-sub {
  font-size: .8rem;
  color: var(--color-text-sec);
  margin-top: 2px;
}
.seg-sub--empty { color: var(--color-text-sec); opacity: .7; font-style: italic; }
.seg-divider {
  font-size: .78rem;
  color: var(--color-danger);
  padding: 6px 0 6px 16px;
  border-left: 4px dotted var(--color-border);
  margin-left: 0;
}

/* Строки опозданий */
.delay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: .85rem;
}
.delay-row:last-of-type { border-bottom: none; }
.delay-num { font-weight: 700; color: var(--color-primary); flex: none; min-width: 48px; }
.delay-route {
  flex: 1;
  min-width: 0;
  color: var(--color-text-sec);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delay-badge {
  flex: none;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(52,168,83,.12);
  color: var(--color-success);
}
.delay-badge--late { background: rgba(232,69,60,.1); color: var(--color-danger); }

/* ---- Доступ ---- */
.access-section {
  padding: 56px 0 48px;
  background: var(--color-bg);
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.access-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.access-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.access-icon { font-size: 1.3rem; line-height: 1; }
.access-title { font-size: 1rem; font-weight: 700; color: var(--color-text); }

.access-list { list-style: none; }
.access-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: .875rem;
  color: var(--color-text-sec);
}
.access-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.access-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--color-surface2);
  font-size: .8rem;
  color: var(--color-text-sec);
  line-height: 1.55;
}

/* ---- Как работает ---- */
.how-section {
  padding: 56px 0 48px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.step-card {
  position: relative;
  background: var(--color-surface2);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease, border-color .15s;
}
.step-card:hover { border-color: var(--color-border); }
.step-card.in-view { opacity: 1; transform: none; }
.step-card:nth-child(2) { transition-delay: .07s; }
.step-card:nth-child(3) { transition-delay: .14s; }
.step-card:nth-child(4) { transition-delay: .21s; }

.step-num {
  position: absolute;
  top: 16px; right: 16px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-primary);
  opacity: .5;
}

.step-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.step-card p {
  font-size: .85rem;
  color: var(--color-text-sec);
  line-height: 1.6;
}

/* ---- Карма ---- */
.karma-section {
  padding: 56px 0 48px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.karma-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.karma-item {
  background: var(--color-surface2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease, border-color .15s;
}
.karma-item:hover { border-color: var(--color-border); }
.karma-item.in-view { opacity: 1; transform: none; }
.karma-item:nth-child(2) { transition-delay: .06s; }
.karma-item:nth-child(3) { transition-delay: .12s; }
.karma-item:nth-child(4) { transition-delay: .18s; }
.karma-item:nth-child(5) { transition-delay: .24s; }
.karma-item:nth-child(6) { transition-delay: .3s; }

/* Высшая ступень — акцент */
.karma-top {
  background: rgba(26,115,232,.08);
  border-color: rgba(26,115,232,.3);
}

.karma-stars {
  font-size: 1.05rem;
  color: var(--color-warning);
  letter-spacing: 2px;
}

.karma-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-text);
}

.karma-desc {
  font-size: .75rem;
  color: var(--color-text-sec);
}

/* ---- Вход / Регистрация ---- */
.auth-cta-section {
  padding: 48px 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.auth-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow .15s, transform .15s;
}
.auth-cta-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.auth-cta-card--primary {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,115,232,.25);
}
.auth-cta-card--primary:hover { color: #fff; }

.auth-cta-icon { font-size: 1.7rem; line-height: 1; }

.auth-cta-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.auth-cta-desc {
  font-size: .875rem;
  color: var(--color-text-sec);
  line-height: 1.55;
  flex: 1;
}
.auth-cta-card--primary .auth-cta-desc { color: rgba(255,255,255,.85); }

.auth-cta-btn {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 4px;
}
.auth-cta-card--primary .auth-cta-btn { color: #fff; }

/* ---- Сообщество ---- */
.community-section {
  padding: 56px 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.community-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.22;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}

.community-sub {
  color: var(--color-text-sec);
  font-size: .95rem;
  margin-bottom: 28px;
}

.community-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.community-tg-btn,
.community-vk-btn {
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 10px 24px;
  transition: opacity .15s, transform .15s;
}
.community-tg-btn { background: #229ed9; }
.community-vk-btn { background: #0077ff; }
.community-tg-btn:hover,
.community-vk-btn:hover {
  opacity: .9;
  text-decoration: none;
  transform: translateY(-1px);
  color: #fff;
}

.community-cta { margin-top: 6px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-surface2);
  border-top: 1px solid var(--color-border);
  padding: 24px 16px;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  margin-right: auto;
}

.footer-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: .875rem;
  color: var(--color-text-sec);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--color-primary); }

.footer-copy {
  width: 100%;
  font-size: .78rem;
  color: var(--color-text-sec);
  opacity: .8;
}

/* ---- Адаптив ---- */
@media (max-width: 860px) {
  .steps-grid    { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }

  /* Текст всегда над панелью, порядок из --rev сбрасываем */
  .deep-row { grid-template-columns: 1fr; gap: 20px; }
  .deep-row--rev .deep-text  { order: 0; }
  .deep-row--rev .deep-panel { order: 0; }
}

@media (max-width: 600px) {
  #main-header { padding: 0 12px; gap: 6px; }

  .hero { padding: 48px 16px 56px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  .how-section, .karma-section, .community-section,
  .auth-cta-section, .features-section, .deep-section,
  .access-section { padding: 40px 0; }

  .steps-grid    { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .karma-grid    { grid-template-columns: 1fr 1fr; }
  .auth-cta-grid { grid-template-columns: 1fr; }
  .access-grid   { grid-template-columns: 1fr; }

  .deep-panel { padding: 14px; }
  .panel-list li { font-size: .82rem; }
}
