/* ========================================================
   NexusChat Landing — Design System
   Aesthetic: Dark / Mono base + одиночный градиентный акцент
   Type: Onest (display/body) + JetBrains Mono (technical labels)
   ======================================================== */

:root {
  /* Color tokens (dark theme defaults) */
  --bg:         #0a0a0c;
  --bg-soft:    #0f0f12;
  --surface:    #131318;
  --surface-2:  #1a1a20;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(255,255,255,0.14);
  --text:       #f4f4f6;
  --text-2:     #c8c8ce;
  --muted:      #8a8a93;
  --muted-2:    #6a6a72;

  /* Accent (changeable via data-accent) */
  --accent:        oklch(0.70 0.16 270);
  --accent-2:      oklch(0.62 0.20 290);
  --accent-soft:   color-mix(in oklch, var(--accent) 18%, transparent);
  --accent-glow:   color-mix(in oklch, var(--accent) 28%, transparent);

  /* Channel colors */
  --tg:  oklch(0.72 0.13 230);
  --vk:  oklch(0.70 0.12 250);
  --web: oklch(0.75 0.12 160);

  /* Radii & spacing */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --section-y: 120px;

  /* Type */
  --font-sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Easing */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Enables height:auto transitions (FAQ). Progressive: ignored where unsupported. */
:root { interpolate-size: allow-keywords; }

/* ===== Theme variants ===== */
body[data-theme="light"] {
  --bg:         #f6f5f1;
  --bg-soft:    #efede7;
  --surface:    #ffffff;
  --surface-2:  #f1efe9;
  --border:     rgba(10,10,12,0.10);
  --border-2:   rgba(10,10,12,0.18);
  --text:       #131318;
  --text-2:     #2c2c33;
  --muted:      #6b6b72;
  --muted-2:    #8e8e95;
}

/* ===== Accent palette ===== */
body[data-accent="indigo"]  { --accent: oklch(0.70 0.16 275); --accent-2: oklch(0.62 0.20 295); }
body[data-accent="violet"]  { --accent: oklch(0.70 0.18 310); --accent-2: oklch(0.60 0.20 330); }
body[data-accent="emerald"] { --accent: oklch(0.72 0.16 165); --accent-2: oklch(0.60 0.18 180); }
body[data-accent="amber"]   { --accent: oklch(0.78 0.16 70);  --accent-2: oklch(0.68 0.18 50); }

/* ===== Density ===== */
body[data-density="compact"] { --section-y: 88px; }

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  width: min(1280px, 100% - 48px);
  margin: 0 auto;
}
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .15s var(--ease-out), background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { background: color-mix(in oklch, var(--text) 92%, var(--accent) 8%); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-arrow {
  display: inline-block;
  transition: transform .2s ease;
  font-family: var(--font-mono);
  font-weight: 400;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--accent);
}
.logo-word {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 13px;
}
.nav-menu {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-2);
}
.nav-menu a { transition: color .2s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-signup-label-short { display: none; }
@media (max-width: 880px) {
  .nav-menu { display: none; }
}
@media (max-width: 560px) {
  .nav-inner { gap: 8px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .nav-signup-label-full { display: none; }
  .nav-signup-label-short { display: inline; }
  .logo-word { font-size: 11px; letter-spacing: 0.06em; }
}
@media (max-width: 360px) {
  .nav .logo-word { display: none; }
}

/* ===== Typography scale ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 28px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.eyebrow .mono { color: var(--text-2); }

.display {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 24px;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}
.display-sm {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 12px;
  text-wrap: balance;
}
.display-sm em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}
.display-md {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 24px;
  text-wrap: balance;
}
.display-md em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.display-xs {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.display-xs em { font-style: normal; color: var(--muted); font-weight: 500; }
.lede {
  font-size: clamp(16px, 1.25vw, 18.5px);
  color: var(--text-2);
  max-width: 56ch;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.section-sub {
  color: var(--muted);
  max-width: 64ch;
  margin: 12px 0 0;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 var(--section-y);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy { min-width: 0; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.hero-contact {
  margin: 0 0 28px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.hero-contact a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.hero-marks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--text-2);
  font-size: 14px;
}
.hero-marks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mono-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 6px;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--muted);
}

/* Hero strip */
.hero-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0 0;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.hero-strip .mono { color: var(--muted-2); }
.hero-strip-channels {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--text-2);
  font-size: 14px;
  flex-wrap: wrap;
}
.hero-strip-channels .sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border-2);
}

/* ===== Console (hero visual) ===== */
.hero-visual {
  position: relative;
  min-width: 0;
}
.hero-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at 70% 30%, var(--accent-glow), transparent 55%);
  filter: blur(40px);
  z-index: -1;
  opacity: 0.6;
}
.console {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,0.7),
    0 0 0 1px var(--border) inset;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--surface) 70%, var(--bg) 30%);
}
.console-dots { display: inline-flex; gap: 6px; }
.console-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-2);
}
.console-title { color: var(--text-2); flex: 1; }
.console-meta {
  color: var(--accent);
  position: relative;
  padding-left: 14px;
}
.console-meta::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.console-body {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  min-height: 460px;
}
.console-col {
  padding: 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.console-col:last-child { border-right: 0; }
.col-head {
  font-size: 10px;
  color: var(--muted-2);
  margin-bottom: 6px;
}

/* Channel rows */
.channel-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 13px;
}
.channel-row.active {
  border-color: var(--border-2);
  background: var(--surface-2);
}
.ch-ico {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--bg);
}
.ch-ico.tg { background: var(--tg); }
.ch-ico.vk { background: var(--vk); }
.ch-ico.web { background: var(--web); }
.ch-name { color: var(--text-2); }
.ch-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Thread */
.col-thread { background: color-mix(in oklch, var(--bg) 60%, var(--surface) 40%); }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 92%;
}
.msg-meta {
  font-size: 9.5px;
  color: var(--muted-2);
  padding: 0 4px;
}
.msg-client p {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
}
.msg-ai p {
  align-self: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  color: var(--text);
}
.msg-op p {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
}
.msg-typing {
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-self: flex-start;
  width: fit-content;
}
.msg-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s infinite;
}
.msg-typing span:nth-child(2) { animation-delay: .15s; }
.msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* Route */
.route-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.route-label { font-size: 9.5px; color: var(--muted-2); }
.route-value { font-size: 13px; color: var(--text); font-weight: 500; }
.route-bar {
  margin-top: 6px;
  height: 4px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.route-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.ok-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--web) 22%, transparent);
  color: var(--web);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  margin-left: 4px;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .console-body { grid-template-columns: 1fr; min-height: auto; }
  .console-col { border-right: 0; border-bottom: 1px solid var(--border); }
  .console-col:last-child { border-bottom: 0; }
}

/* ===== Section heads ===== */
.section-head {
  margin: 0 0 48px;
  max-width: 940px;
}
.section-num {
  display: block;
  color: var(--muted-2);
  margin-bottom: 16px;
}

/* ===== Problems ===== */
.problems { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.problems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.problem-card {
  padding: 28px 28px 36px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  transition: background .2s ease;
}
.problem-card:hover { background: var(--surface); }
.problem-head { display: flex; justify-content: space-between; align-items: center; }
.problem-num { color: var(--accent); }
.problem-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.problem-card p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
@media (max-width: 980px) { .problems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .problems-grid { grid-template-columns: 1fr; } }

/* ===== Channels ===== */
.channels { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  transition: border-color .2s ease, transform .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .channel-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
}
.channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.channel-badge {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
}
.channel-badge.tg { background: var(--tg); }
.channel-badge.vk { background: var(--vk); }
.channel-badge.web { background: var(--web); }
.channel-card h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-2);
  font-size: 14.5px;
}
.check-list li {
  padding-left: 22px;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}
@media (max-width: 880px) { .channels-grid { grid-template-columns: 1fr; } }

/* ===== Features grid ===== */
.features { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.feature-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  transition: background .2s ease;
}
.feature-card:hover { background: var(--surface); }
.feature-card.span-2 { grid-column: span 2; min-height: 280px; }
.feature-card.feature-hero {
  background: linear-gradient(135deg, var(--surface), var(--bg-soft));
  position: relative;
}
.feature-card.feature-hero::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}
.feature-num { color: var(--accent); }
.feature-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.feature-card.feature-hero h3 { font-size: 32px; }
.hl {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature-card p { margin: 0; color: var(--text-2); font-size: 15px; }
.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: auto;
  color: var(--muted);
}
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card.span-2 { grid-column: span 2; }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card.span-2 { grid-column: span 1; }
}

/* ===== Flow ===== */
.flow { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.flow-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.flow-num { color: var(--accent); white-space: nowrap; }
.flow-line { flex: 1; height: 1px; background: var(--border-2); }
.flow-step h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.flow-step p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; }
.flow-illustration {
  margin-top: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ill-msg {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  text-align: center;
}
.flow-ill-1 { flex-direction: column; gap: 0; }
.ill-pills {
  display: flex;
  gap: 8px;
}
.ill-pills span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--muted);
}
.ill-router {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.ill-router-in { color: var(--muted); }
.ill-router-node {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  border-radius: var(--r-sm);
  color: var(--accent);
}
.ill-router-out {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-2);
}
.ill-stats {
  display: flex;
  gap: 28px;
  width: 100%;
  justify-content: space-between;
}
.ill-stats div { display: flex; flex-direction: column; gap: 4px; }
.ill-stats span { color: var(--muted-2); }
.ill-stats strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
@media (max-width: 900px) { .flow-grid { grid-template-columns: 1fr; } }

/* ===== Cases ===== */
.cases { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, background .2s ease;
}
.case-card:hover { border-color: var(--border-2); }
.case-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.case-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.case-num { color: var(--muted-2); }
.case-featured {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(160deg, var(--surface), var(--bg-soft));
  border-color: var(--border-2);
  position: relative;
  overflow: hidden;
}
.case-featured::after {
  content: "";
  position: absolute;
  bottom: -80px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.case-featured h3 { font-size: 28px; letter-spacing: -0.02em; }
.case-featured .case-num { color: var(--accent); }
.case-points {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-2);
}
.case-points li {
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
@media (max-width: 1080px) {
  .cases-grid { grid-template-columns: repeat(3, 1fr); }
  .case-featured { grid-column: span 3; grid-row: span 1; }
}
@media (max-width: 720px) {
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .case-featured { grid-column: span 2; }
}
@media (max-width: 460px) {
  .cases-grid { grid-template-columns: 1fr; }
  .case-featured { grid-column: span 1; }
}

/* ===== Pricing ===== */
.pricing { padding: var(--section-y) 0; border-top: 1px solid var(--border); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
.plan:hover { border-color: var(--border-2); }
.plan-featured {
  background: linear-gradient(160deg, color-mix(in oklch, var(--accent) 14%, var(--surface)), var(--surface));
  border-color: var(--accent);
  box-shadow: 0 30px 60px -40px var(--accent-glow);
}
.plan-ribbon {
  position: absolute;
  top: -10px;
  left: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.plan-head { display: flex; flex-direction: column; gap: 8px; }
.plan-tag { color: var(--muted); }
.plan-featured .plan-tag { color: var(--accent); }
.plan h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.plan-sub {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  min-height: 38px;
}
.plan-billing-note {
  margin-top: -8px;
  margin-bottom: -4px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  min-height: 14px;
  text-transform: none;
  transition: color .2s ease;
}
.plan-featured .plan-billing-note { color: var(--accent); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.plan-price .amount {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum";
  display: inline-block;
  transition: transform .2s ease, opacity .2s ease;
}
.plan-price .unit { color: var(--muted); font-size: 13px; }
.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.plan-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: var(--text-2);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.plan-list li:last-child { border-bottom: 0; }
.plan-list b {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  font-feature-settings: "tnum";
}
.plan-list b i {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* "Всё из X" inheritance row */
.plan-inherit {
  background: color-mix(in oklch, var(--accent) 7%, transparent);
  margin: 0 -10px 4px;
  padding: 8px 10px !important;
  border-radius: 6px;
  border-bottom: 0 !important;
}
.plan-inherit > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.plan-inherit b { color: var(--accent); }
.plan-featured .plan-inherit {
  background: color-mix(in oklch, var(--bg) 16%, transparent);
}
.plan-featured .plan-inherit > span,
.plan-featured .plan-inherit b { color: var(--text); }

/* Info tooltip inside plan list */
.plan-list li > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.info-pop {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: transparent;
  padding: 0;
  color: var(--muted);
  cursor: help;
  transition: color .2s ease, border-color .2s ease;
}
.info-pop:hover,
.info-pop:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}
.info-pop-icon {
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}
.info-pop-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  transform-origin: bottom center;
  width: 220px;
  padding: 10px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 5;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.4);
}
.info-pop-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}
.info-pop:hover .info-pop-bubble,
.info-pop:focus-visible .info-pop-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* AI Packs */
.ai-packs {
  margin-top: 72px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.ai-packs-head {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-packs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ai-pack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-pack-hl { border-color: var(--accent); }
.pack-tag { color: var(--muted); }
.ai-pack-hl .pack-tag { color: var(--accent); }
.pack-price {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.pack-tokens { color: var(--text); font-size: 15px; font-weight: 500; }
.pack-est { color: var(--muted); }
.ai-pack p { margin: 4px 0 14px; color: var(--text-2); font-size: 13.5px; flex: 1; }
@media (max-width: 800px) { .ai-packs-grid { grid-template-columns: 1fr; } .ai-packs { padding: 22px; } }

/* ===== FAQ ===== */
.faq { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.faq-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: flex-start;
}
.faq-side .section-num { display: block; margin-bottom: 16px; }
.faq-side h2 { margin-bottom: 16px; }
.faq-side .btn { margin-top: 20px; }
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.q-num { color: var(--muted-2); }
.q-text { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.q-chev {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--muted);
  width: 24px;
  text-align: center;
  transition: transform .2s ease, color .2s ease;
}
.faq-item[open] .q-chev { transform: rotate(45deg); color: var(--accent); }
/* Smooth open/close where ::details-content is supported; graceful no-op elsewhere */
.faq-item::details-content {
  height: 0;
  overflow: hidden;
  transition: height .25s var(--ease-out), content-visibility .25s allow-discrete;
}
.faq-item[open]::details-content { height: auto; }
.faq-answer {
  padding: 0 0 24px 90px;
  color: var(--text-2);
  font-size: 15px;
  max-width: 70ch;
  text-wrap: pretty;
}
@media (max-width: 880px) {
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-answer { padding-left: 70px; }
}

/* ===== Final CTA ===== */
.final-cta {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}
.final-cta-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-cta .section-num { margin-bottom: 18px; }
.final-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.final-cta-marks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--muted);
  justify-content: center;
}

/* ===== Footer ===== */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-desc { color: var(--muted); margin: 0; font-size: 14px; max-width: 36ch; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title { color: var(--muted-2); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-2); transition: color .2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 16px 16px 18px;
  z-index: 100;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  display: none;
  font-size: 13px;
}
.tweaks.open { display: block; }
.tweaks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tweaks-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text); }
.tweaks-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.tweaks-section { margin-bottom: 14px; }
.tweaks-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.tweaks-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tweaks-btn:hover { border-color: var(--text); color: var(--text); }
.tweaks-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.tweaks-swatch {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  cursor: pointer;
  position: relative;
}
.tweaks-swatch.active::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
}

/* Selection */
::selection { background: var(--accent); color: var(--bg); }

/* ===== Promo banner (WELCOME) ===== */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--accent-soft);
}
.promo-badge {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.promo-text { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.promo-text strong { color: var(--accent); letter-spacing: 0.04em; }
.promo-limit { color: var(--muted); }
.pricing-note-year {
  text-align: center;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 14px;
}
.pricing-note-year a { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) {
  .promo-banner { flex-direction: column; align-items: flex-start; }
}

/* ===== Scenarios band ===== */
.scenarios { padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.scenarios-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.scenarios-copy { flex: 1 1 420px; }
.scenarios-copy .section-num { display: block; margin-bottom: 14px; }
.scenarios-copy h2 { margin: 0 0 12px; }
.scenarios-inner .btn { flex: none; }
@media (max-width: 640px) {
  .scenarios-inner { flex-direction: column; align-items: flex-start; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
