/* Лендинг «Мини-мозг» */
.wrap { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.landing { overflow-x: hidden; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand img { border-radius: 8px; }
.brand .display { font-size: 15px; letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 14.5px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(880px, calc(100svh - 64px)); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-img, .hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; object-position: 72% 50%; transition: opacity .6s ease; }
.hero-art.ready .hero-img { opacity: 0; }
[data-theme='light'] .hero-img { opacity: 0; }
.hero-fade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 34%, color-mix(in srgb, var(--bg) 40%, transparent) 50%, transparent 64%), linear-gradient(0deg, var(--bg) 0%, transparent 22%); }
.hero-in { padding-block: 64px 96px; }
.hero-copy { max-width: 600px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 74px); line-height: 1.03; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
.hero h1 .accent { color: var(--accent-ink); text-shadow: 0 0 34px var(--accent-glow); }
.lead { margin-top: 24px; font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.6; color: var(--text-2); max-width: 47ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.hero-hint { position: absolute; right: 24px; bottom: 22px; text-align: right; opacity: .8; }

/* ---------- секции ---------- */
section.wrap { padding-block: clamp(48px, 7vw, 96px); position: relative; }
.sec-head { margin-bottom: 36px; max-width: 780px; display: grid; gap: 12px; }
.sec-head h2 { font-size: clamp(24px, 3.3vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 650; text-wrap: balance; }
.sec-note { color: var(--text-2); font-size: 15px; max-width: 70ch; }
.panel-sec { padding-top: 24px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- панель ---------- */
.panel { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; padding: 0; background: linear-gradient(180deg, var(--surface), var(--bg-2)); overflow: hidden; }
.gauge-col { padding: 26px 28px 22px; border-right: 1px solid var(--line); }
.gauge-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.gauge-val { font-size: clamp(30px, 4vw, 46px); font-weight: 500; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.gauge-val small { font-size: .38em; color: var(--text-3); letter-spacing: .08em; margin-left: 4px; }
.gauge-bar { position: relative; height: 18px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-2); overflow: hidden; }
.gauge-bar::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), color-mix(in srgb, var(--bg) 55%, transparent) calc(12.5% - 1px) 12.5%); }
.gauge-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; transition: width .9s var(--ease), left .9s var(--ease); }
.seg-node { background: var(--text-3); }
.seg-llama { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #000), var(--accent)); box-shadow: 0 0 18px var(--accent-glow); }
.seg-peak { width: 2px !important; background: var(--text); opacity: .9; }
.gauge-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--text-3); }
.gauge-scale .lim { color: var(--accent-ink); }
.gauge-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); }
.gauge-legend b { color: var(--text); font-weight: 500; margin-left: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-node { background: var(--text-3); } .sw-llama { background: var(--accent); } .sw-peak { background: var(--text); width: 3px; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 20px 24px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; align-content: start; gap: 8px; min-height: 98px; }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat dd { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.25; }
.stat dd.mono { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .unit { font-size: 12px; color: var(--text-3); margin-left: 4px; letter-spacing: .06em; }
.demo { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 20px 28px 22px; display: grid; gap: 12px; }
.demo-form { display: flex; gap: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chips .chip { cursor: pointer; transition: border-color .15s, color .15s, background .15s; min-height: 32px; }
.demo-chips .chip:hover { border-color: var(--accent-line); color: var(--text); background: var(--accent-dim); }
.demo-out { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); padding: 14px 16px; font-size: 15px; min-height: 56px; max-height: 280px; overflow: auto; }
.demo-out .demo-meta { margin-top: 10px; font: 500 11.5px/1.3 var(--font-mono); color: var(--text-3); letter-spacing: .03em; }
.demo-out .status { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 14px; }
.panel-err { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding: 14px 28px; border-top: 1px solid var(--line); color: var(--danger); background: var(--danger-dim); }

/* ---------- как устроено ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.step { padding: 26px 24px 28px; display: grid; gap: 12px; align-content: start; }
.step-n { font-size: 13px; color: var(--accent-ink); letter-spacing: .1em; }
.step h3 { font: 600 19px/1.2 var(--font-display); letter-spacing: -.02em; }
.step p { color: var(--text-2); font-size: 15px; }

/* ---------- таблица моделей ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.tbl th { text-align: left; padding: 14px 18px; font: 500 11px/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.m-name { display: grid; gap: 3px; }
.m-name b { font-weight: 600; font-size: 15.5px; }
.m-name span { color: var(--text-3); font-size: 13px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--text-2); margin-left: 8px; vertical-align: 2px; }
.tag.acc { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-dim); }
.m-q { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.m-q small { font: 500 12px/1 var(--font-mono); color: var(--text-2); }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* ---------- возможности ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.feat { background: var(--surface); padding: 26px 24px 28px; display: grid; gap: 10px; align-content: start; transition: background .2s; }
.feat:hover { background: var(--surface-2); }
.feat .ico { width: 34px; height: 34px; padding: 7px; border: 1px solid var(--accent-line); border-radius: 8px; color: var(--accent-ink); background: var(--accent-dim); margin-bottom: 6px; }
.feat h3 { font: 600 17px/1.25 var(--font-display); letter-spacing: -.02em; }
.feat p { color: var(--text-2); font-size: 14.5px; }

/* ---------- поднять у себя ---------- */
.sh-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; }
.sh-steps { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.sh-steps li { display: grid; gap: 10px; }
.sh-steps p { color: var(--text-2); font-size: 14.5px; }
.sh-steps code, .faq code { font: 500 .9em var(--font-mono); background: var(--surface-3); padding: 1px 6px; border-radius: 4px; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; background: var(--code-bg); }
.cmd code { font: 500 14.5px/1.4 var(--font-mono); color: var(--text); background: none; padding: 0; overflow-x: auto; white-space: nowrap; }
.cmd .copy.done { color: var(--accent-ink); }
.reqs { padding: 22px 24px; display: grid; gap: 14px; }
.reqs h3 { font-size: 17px; }
.reqs-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.reqs-tbl th { text-align: left; font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); padding: 11px 14px 11px 0; width: 28%; vertical-align: top; border-top: 1px solid var(--line); }
.reqs-tbl td { padding: 10px 0; color: var(--text-2); border-top: 1px solid var(--line); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font: 600 17px/1.35 var(--font-ui); transition: color .15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }
.faq summary::before, .faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 14px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details > p { padding: 0 44px 22px 0; color: var(--text-2); max-width: 70ch; animation: faq-in .3s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

.cta-card { padding: clamp(32px, 6vw, 64px); text-align: center; display: grid; gap: 14px; justify-items: center; background: radial-gradient(ellipse 60% 120% at 50% 0%, var(--accent-dim), transparent 70%), var(--surface); }
.cta-card h2 { font-size: clamp(22px, 3vw, 34px); max-width: 20ch; line-height: 1.15; letter-spacing: -.03em; text-wrap: balance; }
.cta-card p { color: var(--text-2); margin-bottom: 8px; }

.foot { border-top: 1px solid var(--line); padding: 36px 0 calc(36px + var(--safe-b)); background: var(--bg-2); }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand { font-size: 14px; letter-spacing: .08em; margin-bottom: 10px; }
.foot-note { max-width: 62ch; font-size: 13px; color: var(--text-3); }
.foot-nav { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.foot-nav a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: var(--text); }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; margin: 0; padding: 10px 20px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; animation: fade .2s ease; }
  .nav a { padding: 12px 8px; font-size: 16px; }
  .nav-toggle { display: inline-grid; }
  .top-in { gap: 8px; } .brand { margin-right: auto; }
  .panel { grid-template-columns: 1fr; }
  .gauge-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps, .feat-grid { grid-template-columns: 1fr; }
  .sh-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top-login { display: none; }
  .brand .display { font-size: 12.5px; letter-spacing: .02em; } .brand img { width: 26px; height: 26px; }
  .top-actions { gap: 2px; } .top-actions .btn-primary { padding: 0 12px; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-art { position: relative; inset: auto; width: 100%; height: min(78vw, 340px); flex: none; }
  .hero-img { object-position: 76% 30%; }
  .hero-fade { inset: 0 0 auto 0; height: min(78vw, 340px); background: linear-gradient(0deg, var(--bg) 0%, transparent 34%); }
  .hero-in { padding-block: 4px 48px; }
  .hero-hint { display: none; }
  .demo-form { flex-direction: column; }
  .gauge-col, .demo { padding-inline: 18px; }
  .stat { padding: 16px 16px; }
  /* таблица → карточки */
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 16px 16px; border-bottom: 1px solid var(--line); }
  .tbl td { padding: 0; border: 0; text-align: left !important; }
  .tbl td[data-label]::before { content: attr(data-label); display: block; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
  .tbl td:first-child, .tbl td:last-child { grid-column: 1 / -1; }
  .tbl-wrap { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
