/* Soveliq landing — dark theme matching apps/localist/lib/shared/theme/app_colors.dart */

:root {
  --bg: #0f1417;
  --bg-elev: #161b1f;
  --surface: #1c2227;
  --surface-hover: #232a30;
  --border: #232a30;
  --text: #f0f3f5;
  --muted: #8c95a0;
  --dim: #5d6770;
  --accent: #14b8a6;
  --accent-hover: #11a395;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --p1: #ef4444;
  --p2: #f59e0b;
  --p3: #3b82f6;
  --c1: #14b8a6;
  --c2: #f59e0b;
  --c3: #a855f7;
  --time: #c084fc;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --max: 1080px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
code {
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .86em;
  color: var(--text);
  /* длинные monospace-идентификаторы (`scheduleTaskReminder`) на
     узких экранах должны переноситься по любой границе, иначе
     раздвигают контейнер и весь документ. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.85rem, 3.4vw, 2.4rem); font-weight: 650; letter-spacing: -0.025em; max-width: 12ch; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 600; }

.muted { color: var(--muted); font-size: .9rem; }

/* === TOPBAR === */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand img { border-radius: 6px; }
.brand:hover { color: var(--text); }

.topnav { display: flex; gap: 24px; }
.topnav a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.topnav a:hover { color: var(--text); }

/* === HERO === */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
  max-width: var(--max);
  margin: 32px auto 64px;
  padding: 0 24px;
}

.lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 480px;
  margin: 18px 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .96rem;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-label { font-size: .96rem; }
.btn-sub { font-size: .82rem; opacity: .65; font-weight: 500; }

.btn.primary {
  background: var(--accent);
  color: #06231f;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #06231f; }
.btn.primary .btn-sub { color: #06231f; opacity: .65; }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover { background: var(--surface); border-color: var(--surface-hover); color: var(--text); }

.hero-meta {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 500;
  margin: 0;
}

/* === HERO MOCK === */
.hero-art { display: flex; justify-content: center; }
.mock {
  width: 100%;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mock-bar {
  height: 26px;
  background: #11161a;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 11px;
  gap: 6px;
}
.mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}
.mock-body { display: grid; grid-template-columns: 160px 1fr; min-height: 340px; }

.mock-side {
  background: #11161a;
  padding: 14px 8px;
  border-right: 1px solid var(--border);
  font-size: .78rem;
}
.mock-side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 14px;
  font-weight: 650;
  color: var(--text);
  font-size: .85rem;
}
.mock-logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--accent);
  color: #06231f;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: .76rem;
}
.mock-side-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
}
.mock-side-row.active {
  background: var(--accent-soft);
  color: var(--text);
}
.mock-side-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.mock-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}
.mock-bullet.accent { background: var(--accent); }
.mock-bullet.c1 { background: var(--c1); }
.mock-bullet.c2 { background: var(--c2); }
.mock-bullet.c3 { background: var(--c3); }
.mock-count {
  margin-left: auto;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: .7rem;
  padding: 1px 7px;
  border-radius: 999px;
}

.mock-main { padding: 16px 18px 12px; }
.mock-h { font-size: 1.05rem; font-weight: 650; margin-bottom: 12px; }

.mock-task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.mock-task:last-child { border-bottom: 0; }
.mock-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--dim);
  flex: none;
}
.mock-check.checked {
  background: var(--accent);
  border-color: var(--accent);
  position: relative;
}
.mock-check.checked::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 0.5px;
  width: 4px;
  height: 9px;
  border: solid #06231f;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}
.mock-task-text { flex: 1; min-width: 0; font-size: .87rem; }
.mock-task-text .strike { color: var(--dim); text-decoration: line-through; }
.mock-meta { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-size: .72rem; }
.mock-pill {
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  padding: 1px 7px;
  border-radius: 999px;
}
.mock-pill.repeat { color: var(--accent); background: var(--accent-soft); }
.mock-time {
  color: var(--time);
  background: rgba(168,85,247,0.12);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.mock-prio {
  font-size: .64rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .03em;
}
.mock-prio.p1 { background: rgba(239,68,68,.14); color: var(--p1); }
.mock-prio.p2 { background: rgba(245,158,11,.14); color: var(--p2); }

/* === FEATURES === */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  max-width: var(--max);
  margin: 64px auto;
  padding: 0 24px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.feature h3 { margin-bottom: 8px; }
.feature p {
  color: var(--muted);
  font-size: .92rem;
  margin: 0;
  line-height: 1.55;
}
.feature code { font-size: .82em; }

/* === SECTION HEAD === */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

/* === CHANGELOG === */
.changelog {
  max-width: var(--max);
  margin: 64px auto;
  padding: 0 24px;
}
.changelog-list { display: flex; flex-direction: column; gap: 12px; }
.changelog-entry {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}
.changelog-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.changelog-version {
  font-weight: 650;
  font-size: 1rem;
  color: var(--text);
}
.changelog-date {
  font-size: .82rem;
  color: var(--dim);
}
.changelog-entry ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.changelog-entry li {
  margin-bottom: 4px;
  font-size: .9rem;
  line-height: 1.55;
}
.changelog-entry li:last-child { margin-bottom: 0; }
.changelog-entry code { font-size: .82em; }

/* === FAQ === */
.faq {
  max-width: 760px;
  margin: 64px auto;
  padding: 0 24px;
}
details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
details:first-child { border-top: 1px solid var(--border); }
summary {
  font-weight: 550;
  font-size: .96rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--dim);
  transition: transform .15s ease, color .15s ease;
  line-height: 1;
}
details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid var(--border);
  margin: 64px auto 0;
  max-width: var(--max);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dim);
  font-size: .85rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 550;
}
.footer-brand img { border-radius: 5px; }

/* === RESPONSIVE === */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; margin: 24px auto 48px; }
  .hero-art { order: -1; }
  .mock { max-width: 460px; }
  .topnav { display: none; }
  .features, .changelog, .faq { margin: 56px auto; }
}

@media (max-width: 480px) {
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .topbar { padding: 16px; }
  .hero, .features, .changelog, .faq { padding-left: 16px; padding-right: 16px; }
  .footer { padding-left: 16px; padding-right: 16px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; white-space: normal; }
  h1 { font-size: 1.75rem; max-width: 100%; }
  .feature { padding: 18px; }
  .changelog-entry { padding: 16px 18px; }
  .changelog-entry ul { padding-left: 18px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* === FOCUS === */
a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
