/* ============================================================
   ИСКРА Гаранта — сайт агента · V1
   Дизайн-система: редакционный LegalTech (тёплая бумага + «искра»)
   Токены унаследованы от скелета saas-landing example.html
   ============================================================ */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --ink: #1A1A1F;
  --ink-soft: #4A4A52;
  --muted: #6B675C;
  --border: #E6E2D9;
  --accent: #C2410C;
  --accent-soft: rgba(194, 65, 12, 0.08);
  --paper-2: #F5F3ED;
  --danger: #B42318;

  --display: 'Cormorant', Georgia, 'Times New Roman', serif;
  --body: 'Golos Text', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --radius: 8px;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-feature-settings: "tnum" 1; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 18px; z-index: 100; }
.skip-link:focus { left: 0; }

/* ─── типографика ─── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}
.lede { color: var(--ink-soft); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
h1 em, h2 em, .pull em { font-style: italic; }
.h2 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 14px; margin-bottom: 14px; }

/* ─── шапка ─── */
.site-head { border-bottom: 1px solid var(--border); background: var(--bg); position: relative; z-index: 50; }
.site-head .wrap { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.logo { margin-right: auto; font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; line-height: 1; }
.logo::before { content: '✦ '; color: var(--accent); font-size: 17px; }
.logo .logo-sub { color: var(--muted); font-weight: 400; }
.main-nav { order: 1; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; letter-spacing: 0.01em; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--ink); }
.main-nav .btn { padding: 9px 18px; font-size: 13px; }
.nav-toggle { order: 3; display: none; background: none; border: 1px solid var(--border); border-radius: 6px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { display: block; }
.header-form-btn { order: 2; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1.5px solid var(--accent); border-radius: 8px; }
.header-form-btn img { width: 26px; height: 26px; object-fit: contain; display: block; }
.header-form-btn:hover { background: var(--accent-soft); }

/* ─── хлебные крошки ─── */
.breadcrumbs { padding: 20px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs li { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.breadcrumbs li + li::before { content: '/ '; color: var(--border); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink-soft); }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); }

/* ─── кнопки ─── */
.btn {
  display: inline-block; font: inherit; cursor: pointer;
  padding: 12px 22px; border-radius: 6px; font-weight: 500;
  font-size: 14px; letter-spacing: 0.01em; text-decoration: none;
  border: 1px solid transparent;
  transition: opacity 120ms ease, background 120ms ease;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); border-color: var(--muted); }
.btn-accent { background: var(--accent); color: #FFF; }
.btn-accent:hover { opacity: 0.9; }
.btn-white { background: #FFF; color: var(--accent); }
.btn-white:hover { opacity: 0.92; }
.btn-link { background: transparent; border: none; color: var(--accent); padding: 12px 0; font-weight: 500; }
.btn-link::after { content: ' →'; }
.btn-link:hover { opacity: 0.8; }

/* ─── секции ─── */
section { padding: 88px 0; }
.sec-lg { padding: 120px 0; }
.sec-tight { padding: 64px 0; }
.band-surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { margin-bottom: 52px; max-width: 640px; }
.section-header .h2 { margin-top: 14px; margin-bottom: 12px; }
.section-header p { color: var(--ink-soft); font-size: 16px; max-width: 56ch; }

/* ─── герой ─── */
.hero { padding: 96px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(42px, 5.2vw, 68px); line-height: 1.02; margin-bottom: 24px; }
.hero h1 em { color: var(--accent); }
.hero .lede { font-size: 18px; max-width: 52ch; margin-bottom: 36px; line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.hero-note { font-size: 13px; color: var(--muted); max-width: 46ch; }
.hero-note a { color: var(--ink-soft); }

/* ─── демо-карточка «задача → запрос → результат» ─── */
.demo-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.demo-head { padding: 14px 24px; border-bottom: 1px solid var(--border); }
.dlg-row { padding: 20px 24px; }
.dlg-row + .dlg-row { border-top: 1px solid var(--border); }
.dlg-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.dlg-row p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.dlg-row.is-answer { background: var(--paper-2); }
.dlg-row.is-answer p { color: var(--ink); }
.dlg-foot { padding: 14px 24px; border-top: 1px solid var(--border); }
.dlg-foot a { font-size: 13.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.dlg-foot a::after { content: ' →'; }

/* ─── карточки-возможности (асимметричная сетка) ─── */
.feature-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 20px 40px; }
.feature { padding: 22px 0; }
.feature.span-2 { grid-column: span 2; }
.feature .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 12px; }
.feature h3 { font-size: 23px; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 48ch; }

/* ─── номерной значок (для перечислений: практика, запросы, FAQ, роли) ─── */
.num-badge {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
}

/* ─── строки-кейсы (редакционные ряды) ─── */
.case-rows { border-top: 1px solid var(--border); }
.case-row { display: block; text-decoration: none; padding: 26px 0; border-bottom: 1px solid var(--border); }
.case-row:hover .case-title { color: var(--accent); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.case-meta span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.case-title { font-family: var(--display); font-size: 25px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 6px; transition: color 120ms ease; }
.case-row p { color: var(--ink-soft); font-size: 15px; max-width: 72ch; }
.case-row .arrow { color: var(--accent); font-weight: 500; }

/* ─── карточки ролей ─── */
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.role-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 26px 26px 22px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: border-color 120ms ease; }
.role-card:hover { border-color: var(--ink-soft); }
.role-card .num-badge { position: absolute; top: 16px; right: 16px; }
.role-card .role-body { flex: 1; overflow: hidden; }
.role-card .role-icon { float: left; height: 148px; width: auto; max-width: 190px; margin: 0 16px 10px 0; border-radius: 14px; }
.role-card .who { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.role-card h3 { font-size: 22px; font-weight: 700; display: inline-block; align-self: flex-start; border: 1.5px solid var(--ink); border-radius: 8px; padding: 4px 12px; margin: 2px 0 8px; }
.role-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; flex: 1; }
.role-card .go { color: var(--accent); font-size: 13.5px; font-weight: 500; clear: both; }
.role-card .go::after { content: ' →'; }

/* ─── проза статей ─── */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 18px; color: var(--ink-soft); line-height: 1.68; font-size: 16.5px; }
.prose p strong, .prose li strong { color: var(--ink); }
.prose p strong.lead-accent { color: var(--accent); }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 44px 0 14px; }
.prose h3 { font-size: 22px; margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: var(--ink-soft); line-height: 1.68; font-size: 16.5px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a.btn { text-decoration: none; }
.prose a.btn-accent { color: #FFF; }
.prose a.btn-white { color: var(--accent); }
.prose .art-cta { margin-top: 40px; padding: 24px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose .art-cta p { margin-bottom: 14px; }

/* ─── цитата-врезка (без контейнера, редакционная) ─── */
.pull { font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 400; color: var(--ink); max-width: 30ch; margin: 44px 0; }

/* ─── служебная врезка / дисклеймер ─── */
.notice { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px 24px; margin: 28px 0; }
.notice .notice-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.notice p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ─── шаги кейса ─── */
.case-step { display: grid; grid-template-columns: 200px 1fr; gap: 36px; padding: 40px 0; border-top: 1px solid var(--border); }
.case-step .step-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.case-step .step-label b { display: block; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.case-step .step-body { max-width: 68ch; }
.case-step .step-body p { margin-bottom: 14px; color: var(--ink-soft); line-height: 1.68; font-size: 16px; }
.case-step .step-body ul { margin: 0 0 14px 20px; color: var(--ink-soft); line-height: 1.68; font-size: 16px; }
.case-step .step-body li { margin-bottom: 6px; }

/* ─── чипы-фильтры ─── */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip { font: inherit; font-size: 13.5px; letter-spacing: 0.01em; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; color: var(--ink-soft); }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ─── карточка готового запроса ─── */
.prompt-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; margin-bottom: 18px; }
.prompt-card .prompt-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 21px; font-weight: 500; margin-bottom: 10px; }
.prompt-card .prompt-text { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink-soft); background: var(--paper-2); border-radius: 6px; padding: 14px 16px; margin-bottom: 14px; white-space: pre-line; }
.prompt-card .prompt-actions { display: flex; gap: 12px; align-items: center; }
.prompt-card .copied { color: var(--accent); }

/* ─── формы ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; max-width: 640px; }
.form-grid .field-full { grid-column: span 2; }
.field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: 6px; padding: 10px 14px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--accent); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-group-label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: -4px; }
.field input:user-invalid { border-color: var(--danger); }
.field .form-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field .form-error { font-size: 12.5px; color: var(--danger); margin-top: 5px; }
.fieldset-radio { border: none; display: flex; flex-direction: column; gap: 8px; }
.fieldset-radio legend { font-size: 13.5px; font-weight: 500; margin-bottom: 8px; }
.radio-row { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink-soft); }
.radio-row input { width: auto; }
.call-time-toggle .fieldset-radio { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.form-success { margin-top: 18px; border: 1px solid var(--border); border-left: none; border-radius: var(--radius); background: var(--paper-2); padding: 16px 20px; font-size: 14.5px; color: var(--ink-soft); max-width: 640px; }
.form-error-box { margin-top: 18px; border: 1px solid var(--danger); border-radius: var(--radius); background: rgba(180, 35, 24, 0.06); padding: 16px 20px; font-size: 14.5px; color: var(--danger); max-width: 640px; }
.form-error-box a { color: var(--danger); text-decoration: underline; }

/* ─── FAQ ─── */
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 16px; padding: 20px 0; font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); font-size: 20px; color: var(--muted); flex-shrink: 0; margin-left: auto; }
.faq details[open] summary::after { content: '–'; }
.faq .faq-a { padding: 0 0 22px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.68; max-width: 68ch; }

/* ─── финальная CTA-полоса ─── */
.closing { background: var(--accent); color: #FFF; text-align: center; padding: 96px 0; }
.closing h2 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 14px; }
.closing h2 em { opacity: 0.9; }
.closing p { opacity: 0.88; max-width: 52ch; margin: 0 auto 30px; font-size: 16.5px; }
.closing .btn-white { margin-right: 12px; }
.closing .closing-ghost { color: #FFF; font-size: 14px; opacity: 0.85; }

/* ─── заголовок статьи ─── */
.art-head { padding: 40px 0 36px; }
.art-head h1 { font-size: clamp(36px, 4.6vw, 58px); margin: 16px 0 18px; max-width: 22ch; }
.art-head .lede { font-size: 18px; max-width: 56ch; margin-bottom: 20px; line-height: 1.55; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }

/* ─── источники ─── */
.src-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.src-list li { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: 12px 16px; font-size: 14px; color: var(--ink-soft); }
.src-list li::before { content: '§ '; color: var(--muted); font-family: var(--mono); }
.src-list a { color: var(--accent); text-decoration: none; }
.src-list a:hover { text-decoration: underline; }

/* ─── подвал ─── */
.site-foot { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.foot-brand p { font-size: 13.5px; color: var(--muted); margin-top: 12px; max-width: 34ch; line-height: 1.6; }
.foot-col .foot-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 14px; }
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 9px; }
.foot-col a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-disclaimer { font-size: 12px; color: var(--muted); max-width: 72ch; line-height: 1.6; }
.foot-bottom .mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }

/* ─── адаптив ─── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature.span-2 { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; padding: 22px 32px 26px; gap: 18px; }
  body.nav-open .main-nav { display: flex; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .case-step { grid-template-columns: 1fr; gap: 10px; padding: 32px 0; }
}
@media (max-width: 820px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature.span-2 { grid-column: span 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-full { grid-column: span 1; }
  section, .hero { padding: 64px 0; }
  .sec-lg { padding: 80px 0; }
  .closing .btn-white { display: block; margin: 0 auto 16px; }
}
.home-intro-short { display: none; }
.home-contacts-btn { display: none; background: transparent; border: 2px solid var(--accent); color: var(--accent); font-size: 29px; font-weight: 700; }
.home-contacts-btn-icon { width: 52px; height: 52px; object-fit: contain; background: transparent; }
/* ─── компактная плитка ролей на телефоне (по образцу лаунчера) ─── */
@media (max-width: 640px) {
  #two-paths, #not-found-cta { display: none; }
  #home-intro { margin-bottom: 20px; }
  #home-intro .eyebrow, #home-intro > p:not(.home-intro-short) { display: none; }
  #home-intro .h2 { display: none; }
  #home-intro .home-intro-short { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
  .role-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .role-card { padding: 16px 14px; gap: 6px; }
  .role-card .num-badge { top: 10px; right: 10px; min-width: 22px; height: 22px; font-size: 10px; }
  .role-card .role-body { overflow: visible; }
  .role-card .role-icon { float: none; display: block; height: 52px; width: auto; max-width: 100%; margin: 0 0 10px; }
  .role-card h3 { display: block; border: none; padding: 0; font-size: 15px; line-height: 1.25; margin: 0 0 4px; }
  .role-card .role-body p {
    font-size: 12px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .role-card .go { display: none; }
  .home-contacts-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto; padding: 8px 16px; }
  #home-footer .foot-grid, #home-footer .foot-bottom { display: none; }
  #home-footer { padding: 10px 0 16px; }
  #role-section { padding-bottom: 16px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .main-nav { padding-left: 20px; padding-right: 20px; }
  .case-title { font-size: 21px; }
  .site-head .wrap { padding-top: 6px; padding-bottom: 6px; }
  .logo { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
