:root {
  --bg: #f4f5f0;
  --bg-2: #e9ebe2;
  --panel: #ffffff;
  --ink: #141714;
  --muted: #5d645c;
  --line: #d9ddd1;
  --accent: #4d8f00;
  --accent-ink: #ffffff;
  --logo-ink: #f4f5f0;
  --error: #c2361f;
  --error-bg: #fbe9e5;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1110;
    --bg-2: #161a17;
    --panel: #1a1e1b;
    --ink: #eef1ea;
    --muted: #9aa397;
    --line: #2b312c;
    --accent: #c6f135;
    --accent-ink: #141714;
    --logo-ink: #0f1110;
    --error: #ff8a73;
    --error-bg: #3a1d17;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* ---------- brand side ---------- */
.brand {
  background: var(--bg-2);
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 40px;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--accent);
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.logo span { color: var(--ink); }
.pitch h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 12ch;
}
.pitch h1 em { font-style: normal; color: var(--accent); }
.pitch p { margin: 0; color: var(--muted); font-size: 18px; max-width: 38ch; }

.card-demo {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  max-width: 380px;
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.35);
}
.demo-head { display: flex; justify-content: space-between; align-items: center; font-weight: 650; font-size: 15px; }
.tag {
  font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
  padding: 3px 9px; border-radius: 99px;
}
.chart { width: 100%; height: 72px; margin: 14px 0 10px; display: block; }
.sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sets li {
  display: flex; gap: 12px; align-items: center;
  font-variant-numeric: tabular-nums; font-size: 14px;
  padding: 7px 10px; border-radius: 9px; background: var(--bg-2);
}
.sets b {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; background: var(--accent); color: var(--accent-ink);
}

/* ---------- auth side ---------- */
.auth {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(24px, 5vw, 64px);
  gap: 24px;
}
.panel {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column;
}
.panel h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.panel > .muted:first-of-type { margin: 0 0 24px; }

label { font-size: 14px; font-weight: 600; margin-bottom: 6px; display: block; }
label.spaced { margin-top: 16px; }
.row-label { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
input {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.eye:hover { color: var(--ink); }

.link { color: var(--accent); text-decoration: none; font-weight: 600; }
@media (prefers-color-scheme: light) { .link { color: #3d7300; } }
.link:hover { text-decoration: underline; }

.error {
  margin: 16px 0 0;
  background: var(--error-bg); color: var(--error);
  border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-weight: 550;
}

.btn {
  margin: 20px 0 18px;
  position: relative;
  font: inherit; font-weight: 700; font-size: 16px;
  color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: var(--radius);
  padding: 14px; cursor: pointer;
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.985); }
.btn:disabled { cursor: progress; }
.spinner {
  display: none;
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
.btn.loading .label { visibility: hidden; }
.btn.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.shake { animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.foot { display: flex; gap: 16px; }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand { border-right: 0; border-bottom: 1px solid var(--line); gap: 24px; }
  .card-demo { display: none; }
  .pitch h1 { max-width: none; }
}
/* ---------- phone ---------- */
@media (max-width: 560px) {
  .brand { padding: 20px 16px 22px; gap: 18px; }
  .pitch h1 { font-size: 30px; margin-bottom: 8px; }
  .pitch p { font-size: 15px; }
  .auth { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); justify-content: flex-start; }
  .panel h2 { font-size: 24px; }
  input { font-size: 16px; } /* без авто-зума в iOS */
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- simple pages (privacy, reset, waitlist, 404) ---------- */
.page {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(20px, 5vw, 48px) 16px calc(24px + env(safe-area-inset-bottom));
  gap: 32px;
}
.page-top { width: 100%; max-width: 720px; }
.page .panel { max-width: 420px; margin: auto 0; }
.page .panel > .muted:first-of-type { margin: 0 0 24px; }
.prose { width: 100%; max-width: 720px; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; margin: 0 0 8px; }
.prose h2 { font-size: 20px; margin: 32px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.success {
  margin: 16px 0 0;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--ink);
  border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-weight: 550;
}
.big-code {
  font-size: clamp(72px, 18vw, 140px); font-weight: 800; letter-spacing: -0.06em;
  line-height: 1; color: var(--accent); margin: 0 0 8px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); text-align: center; text-decoration: none; display: block; }
