/* ── Стартовая страница и экраны доступа (#65) ──
   Приложение стилизует style.css; здесь — только то, что видно до входа.
   Тёмные секции тёмные в любой теме, светлые следуют теме системы.
   Мокапы экранов берут токены приложения (--bg, --c-accent-light, …) из
   style.css, поэтому выглядят как приложение в той же теме. */

.rt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Режим стартовой страницы: приложение и нижняя панель скрыты, у страницы
   обычная прокрутка документа */
.landing { display: none; }
.landing.active { display: block; }
body.landing-mode > .app,
body.landing-mode > .tabbar { display: none; }
/* Бейдж стенда — в правый нижний угол, чтобы не закрывал логотип */
body.landing-mode .dev-badge { top: auto !important; left: auto !important; right: 8px; bottom: 8px; }

@media (prefers-reduced-motion: no-preference) {
  html:has(body.landing-mode) { scroll-behavior: smooth; }
}

.landing {
  --l-ink: #0E1311;
  --l-ink-2: #151B18;
  --l-ink-line: rgba(255, 255, 255, 0.09);
  --l-on-ink: #F2F1EC;
  --l-on-ink-muted: #9AA39E;
  --l-accent: #2BD49A;          /* зелёный на тёмном фоне */
  --l-brand: #1D9E75;           /* фирменный: крупные цифры, значки, кнопки */
  --l-paper: #F8F7F4;
  --l-card: #FFFFFF;
  --l-text: #1a1a18;
  --l-muted: #5f5e5a;
  --l-line: rgba(0, 0, 0, 0.1);
  --l-accent-text: #0F6E56;     /* мелкий зелёный текст на светлом — с контрастом */
  --l-display: 'Oswald', 'DM Sans', system-ui, sans-serif;

  background: var(--l-paper);
  color: var(--l-text);
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  .landing {
    --l-paper: #1a1a18;
    --l-card: #242422;
    --l-text: #e8e6de;
    --l-muted: #a3a29b;
    --l-line: rgba(255, 255, 255, 0.1);
    --l-accent-text: #5DCAA5;
  }
}

.landing a:focus-visible {
  outline: 2px solid var(--l-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.landing section[id] { scroll-margin-top: 64px; }

.l-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.l-dark { background: var(--l-ink); color: var(--l-on-ink); }
.l-section { padding: 88px 0; }

.l-display {
  font-family: var(--l-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
}
.l-h2 { font-size: clamp(30px, 4vw, 44px); max-width: 760px; margin-bottom: 32px; }
.l-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--l-accent-text);
  margin-bottom: 12px;
}
.l-lead { font-size: 16px; line-height: 1.6; color: var(--l-muted); max-width: 520px; }
.l-dark .l-eyebrow,
.l-dark .l-accent { color: var(--l-accent); }
.l-dark .l-lead { color: var(--l-on-ink-muted); }

/* Кнопки Google рисует GIS; высота заранее — чтобы вёрстка не прыгала */
.l-gsi-compact { min-height: 32px; margin-left: auto; }
.l-gsi-large { min-height: 44px; }

/* ── Верхняя панель ── */
.l-top {
  position: sticky; top: 0; z-index: 20;
  background: var(--l-ink);
  color: var(--l-on-ink);
  border-bottom: 1px solid var(--l-ink-line);
  padding-top: env(safe-area-inset-top);
}
.l-top-row { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.l-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  font-family: var(--l-display); font-weight: 600; font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.l-mark { width: 28px; height: 28px; flex: none; }
.l-nav { flex: 1; display: flex; justify-content: center; gap: 28px; }
.l-nav a { color: var(--l-on-ink-muted); text-decoration: none; font-size: 14px; }
.l-nav a:hover { color: var(--l-on-ink); }

/* ── Hero ── */
.l-hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.l-track { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.l-track path {
  fill: none; stroke: var(--l-accent); stroke-opacity: 0.08; stroke-width: 34px;
  vector-effect: non-scaling-stroke;
}
.l-track .l-track-lane { stroke: #fff; stroke-opacity: 0.07; stroke-width: 2px; stroke-dasharray: 14 12; }
.l-hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 48px; align-items: center;
}
.l-hero h1 { font-size: clamp(40px, 7vw, 84px); margin-bottom: 20px; }
.l-hero .l-lead { font-size: 17px; margin-bottom: 28px; }
.l-note { margin-top: 14px; max-width: 420px; font-size: 13px; color: var(--l-on-ink-muted); }

/* Телефон с экраном «Сегодня» */
.l-phone {
  justify-self: center;
  width: 264px; padding: 10px;
  border-radius: 40px; background: #000; border: 1px solid #2a2f2c;
}
.l-app {
  background: var(--bg); color: var(--text);
  border-radius: 31px; padding: 24px 16px 18px;
  font-size: 13px;
}
.l-app-head b { display: block; font-size: 19px; font-weight: 500; }
.l-app-head span, .l-app-label { font-size: 12px; color: var(--text-muted); }
.l-app-hero {
  margin: 14px 0; padding: 12px 14px; border-radius: 14px;
  background: var(--c-accent-light); color: var(--c-accent-dark);
}
.l-app-hero span { display: block; font-size: 12px; }
.l-app-hero b { font-size: 15px; font-weight: 500; }
.l-week { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 11px; color: var(--text-muted); }
.l-week span { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.l-week span::after {
  content: ''; width: 16px; height: 16px; box-sizing: border-box;
  border-radius: 50%; border: 1px solid var(--border);
}
.l-week .done::after { background: var(--c-accent); border-color: var(--c-accent); }
.l-week .missed::after { background: var(--bg-metric); border-color: transparent; }
.l-week .today { color: var(--c-accent); font-weight: 500; }
.l-week .today::after { border: 2px solid var(--c-accent); }
.l-app-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 9px 12px; margin-bottom: 14px;
  border-radius: 10px; background: var(--bg-metric);
  font-size: 12px; white-space: nowrap;
}
.l-app-row b { color: var(--c-accent); font-weight: 500; }
.l-app-label { margin-bottom: 2px; }
.l-app-run {
  padding: 7px 0; border-top: 0.5px solid var(--border);
  font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-muted);
}

/* ── Полоса фактов ── */
.l-facts {
  background: var(--l-ink-2); color: var(--l-on-ink);
  border-top: 1px solid var(--l-ink-line); border-bottom: 1px solid var(--l-ink-line);
}
.l-facts-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding-top: 28px; padding-bottom: 28px;
}
.l-facts b {
  display: block;
  font-family: var(--l-display); font-weight: 600; font-size: 22px; line-height: 1.15;
  text-transform: uppercase; color: var(--l-accent);
}
.l-facts span { font-size: 13px; color: var(--l-on-ink-muted); }

/* ── Карточки ── */
.l-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.l-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.l-card { background: var(--l-card); border: 1px solid var(--l-line); border-radius: 16px; padding: 24px; }
.l-card h3 { font-size: 17px; font-weight: 600; margin: 14px 0 6px; }
.l-card p { font-size: 14px; line-height: 1.55; color: var(--l-muted); }
.l-dark .l-card { background: var(--l-ink-2); border-color: var(--l-ink-line); }
.l-dark .l-card p { color: var(--l-on-ink-muted); }
.l-icon {
  width: 28px; height: 28px;
  fill: none; stroke: var(--l-brand); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.l-dark .l-icon { stroke: var(--l-accent); }

/* ── Блоки «текст + мокап» ── */
.l-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.l-split .l-h2 { margin-bottom: 18px; }
.l-split-rev .l-split-text { order: 2; }

/* График нагрузки */
.l-chart { background: var(--l-ink-2); border: 1px solid var(--l-ink-line); border-radius: 16px; padding: 20px; }
.l-chart-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 16px; font-size: 13px; color: var(--l-on-ink-muted);
}
.l-pill {
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; background: rgba(43, 212, 154, 0.14); color: var(--l-accent);
}
.l-bars {
  position: relative;
  display: flex; align-items: flex-end; gap: 10px;
  height: 180px; border-bottom: 1px solid var(--l-ink-line);
}
.l-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--l-accent); opacity: 0.45; }
.l-bars i.now { opacity: 1; }
.l-bars i.high { background: #EF9F27; opacity: 1; }
.l-usual {
  position: absolute; left: 0; right: 0; bottom: var(--u);
  border-top: 2px dashed rgba(242, 241, 236, 0.5);
}
.l-chart-foot {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 10px; font-size: 12px; color: var(--l-on-ink-muted);
}

/* Диалог с ИИ-тренером */
.l-chat {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; border-radius: 16px;
  background: var(--l-card); border: 1px solid var(--l-line);
  font-size: 14px; line-height: 1.5;
}
.l-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--bg-metric); color: var(--text); }
.l-msg.mine { align-self: flex-end; background: var(--c-accent-light); color: var(--c-accent-dark); }
.l-msg b { font-weight: 600; }
.l-proposal {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--l-line);
}
.l-proposal-title { font-size: 12px; color: var(--l-muted); }
.l-proposal s { color: var(--l-muted); }
.l-proposal b { font-weight: 600; }
.l-proposal-btn {
  margin-top: 2px; padding: 5px 14px; border-radius: 8px;
  background: var(--l-brand); color: #fff; font-size: 13px; font-weight: 500;
}

/* ── Как начать ── */
.l-steps {
  list-style: none; counter-reset: l-step;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  margin-bottom: 40px;
}
.l-steps li { counter-increment: l-step; padding-top: 16px; border-top: 2px solid var(--l-brand); }
.l-steps li::before {
  content: counter(l-step, decimal-leading-zero);
  display: block; margin-bottom: 12px;
  font-family: var(--l-display); font-weight: 600; font-size: 44px; line-height: 1;
  color: var(--l-brand);
}
.l-steps b { display: block; margin-bottom: 4px; font-size: 17px; font-weight: 600; }
.l-steps span { font-size: 14px; color: var(--l-muted); }
.l-trust {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  padding-top: 24px; border-top: 1px solid var(--l-line);
  font-size: 14px; color: var(--l-muted);
}
.l-trust li::before { content: '✓'; margin-right: 8px; font-weight: 600; color: var(--l-brand); }

/* ── Финальный призыв и подвал ── */
.l-cta { padding: 96px 0; text-align: center; }
.l-cta h2 { font-size: clamp(36px, 5.5vw, 64px); margin-bottom: 14px; }
.l-cta .l-lead { margin: 0 auto 28px; }
.l-cta .l-gsi-large { display: flex; justify-content: center; }
.l-foot {
  background: var(--l-ink); color: var(--l-on-ink-muted);
  border-top: 1px solid var(--l-ink-line);
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  font-size: 13px;
}
.l-foot .l-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.l-foot .l-logo { font-size: 15px; color: var(--l-on-ink); }
.l-foot .l-mark { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .l-hero-grid, .l-split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .l-split-rev .l-split-text { order: 0; }
  .l-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-nav { gap: 18px; }
}
@media (max-width: 600px) {
  .landing { font-size: 14px; }
  .l-wrap { padding: 0 16px; }
  .l-facts-grid { padding-top: 22px; padding-bottom: 22px; gap: 18px; }
  .l-nav { display: none; }
  .l-logo { font-size: 16px; }
  .l-section { padding: 56px 0; }
  .l-hero { padding: 40px 0 56px; }
  .l-cards, .l-two, .l-steps { grid-template-columns: minmax(0, 1fr); }
  .l-phone { width: 256px; }
  .l-cta { padding: 64px 0; }
}

/* ── Экраны доступа: заставка, заявка, отказ ── */
.login-card .rt-mark { display: block; width: 40px; height: 40px; margin: 0 auto 14px; }
