/* ── Ropstory AI — editorial / simple product design ─────────────────────── */
:root,
[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-soft: #ebe6db;
  --paper: #fffcf7;
  --ink: #14120f;
  --ink-soft: #3d3830;
  --muted: #6f685c;
  --line: #d9d2c4;
  --line-strong: #c4bbab;
  --accent: #c44b2a;
  --accent-hover: #a83d21;
  --accent-soft: #f3e0d8;
  --ok: #2f6b4f;
  --radius: 4px;
  --radius-lg: 12px;
  --font: "Manrope", system-ui, sans-serif;
  --serif: "Unbounded", "Manrope", system-ui, sans-serif;
  --brand: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
  --max: 1120px;
  --shadow: 0 18px 40px rgba(20, 18, 15, 0.08);
  --code-bg: #0d1117;
  --modal-scrim: rgba(20, 18, 15, 0.45);
}

/* Тёмная: тёмно-графитовые тона, без «белых засветов» */
[data-theme="dark"] {
  --bg: #141618;
  --bg-soft: #1c1f23;
  --paper: #1a1d21;
  --ink: #e6e8eb;
  --ink-soft: #b8bec6;
  --muted: #7f8791;
  --line: #2a2e34;
  --line-strong: #3a4048;
  --accent: #d4644a;
  --accent-hover: #e07860;
  --accent-soft: rgba(212, 100, 74, 0.16);
  --ok: #5cb88a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  --code-bg: #0e1012;
  --modal-scrim: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] body,
[data-theme="dark"] .app-body,
[data-theme="dark"] .app-shell {
  background: var(--bg);
  color: var(--ink);
}

[data-theme="dark"] .landing .bg-glow,
[data-theme="dark"] .landing .bg-grid {
  opacity: 0.25;
}

html {
  color-scheme: light;
}
[data-theme="dark"] {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
}

.logo-sm .logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.logo-wordmark {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  color: var(--ink);
}

.btn-line {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--ink);
}

.btn-lg {
  padding: 14px 22px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 22px;
  flex: 1;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 22px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 12px 0;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.mobile-menu a.btn {
  border: none;
  margin-top: 8px;
  color: #fff;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--ink-soft);
}

.lead {
  margin: 0 0 26px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-points li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-visual {
  position: relative;
}

.hero-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-photo figcaption {
  padding: 12px 14px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.hero-card {
  position: absolute;
  left: -18px;
  bottom: 54px;
  width: min(220px, 70%);
  padding: 14px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hero-card-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 252, 247, 0.55);
  margin-bottom: 6px;
}

.hero-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.hero-card p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 252, 247, 0.7);
}

/* strip */
.strip {
  border-block: 1px solid var(--line);
  background: var(--paper);
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.strip span[aria-hidden] {
  color: var(--line-strong);
  font-weight: 400;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 22px;
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 40px;
}

.section-intro.wide {
  max-width: 42rem;
}

.section-intro h2,
.solution-text h2,
.how-steps h2,
.price-left h2,
.final h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-intro p,
.solution-text .lead-sm,
.price-left p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* why split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: stretch;
}

.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  min-height: 320px;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}

.split-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--line);
}

.split-list article {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.split-list h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.split-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* solution */
.solution {
  padding-top: 40px;
}

.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.solution-text .lead-sm {
  margin: 0 0 24px;
  max-width: 30rem;
}

.solution-photos {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 14px;
  align-items: end;
}

.solution-photos img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.photo-a {
  aspect-ratio: 4 / 5;
  min-height: 280px;
}

.photo-b {
  aspect-ratio: 3 / 4;
  min-height: 220px;
  margin-bottom: 32px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature-item {
  padding: 24px 18px 8px 0;
  border-right: 1px solid var(--line);
  padding-right: 20px;
  margin-right: 12px;
}

.feature-item:last-child {
  border-right: none;
  margin-right: 0;
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* models as rows — not neon cards */
.models-table {
  border-top: 1px solid var(--ink);
}

.model-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.model-brand {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.model-row h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.model-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.model-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* how */
.how-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.how-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  box-shadow: var(--shadow);
}

.how-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.how-steps ol {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  counter-reset: step;
}

.how-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.how-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1.2;
}

.how-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.how-steps span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* price */
.price-box {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-left {
  padding: 40px 36px;
  border-right: 1px solid var(--line);
}

.price-left p {
  margin: 0 0 24px;
  max-width: 28rem;
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 36px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.price-list li {
  position: relative;
  padding-left: 22px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.price-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* final */
.final {
  text-align: center;
  padding-bottom: 88px;
}

.final h2 {
  margin: 0 auto 24px;
  max-width: 18ch;
}

.final h2 em {
  font-style: italic;
  color: var(--ink-soft);
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .muted {
  color: var(--line-strong);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero,
  .split,
  .solution-grid,
  .how-layout,
  .price-box {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
    margin-right: 0;
    padding-right: 0;
  }

  .model-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .model-meta {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
  }

  .price-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .hero-card {
    left: 12px;
    bottom: 64px;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-burger {
    display: inline-flex;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .solution-photos {
    grid-template-columns: 1fr 1fr;
  }

  .photo-b {
    margin-bottom: 0;
  }

  .hero {
    padding-top: 12px;
  }
}
