/* Teranova Agent — оформление.
   Направление: редакционный сайт с глубиной. Тёплая бумага, графит и один
   глубокий сине-зелёный акцент. Глубина строится листами: блок другого тона
   ложится на предыдущий скруглённым краем, дело на первом экране — стопка
   листов, на странице услуги — лист с ситуацией клиента, форма — лист поверх
   графита. Без glass, glow и градиентов. Фотографий пока нет, поэтому главный
   образ типографический: дело как документ
   (дело → действие → доказательство → статус).
   Движение только transform/opacity, с prefers-reduced-motion. */

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

:root {
  --paper: oklch(96.4% 0.012 84);
  --paper-2: oklch(93.2% 0.017 82);
  --sheet: oklch(98.6% 0.006 85);
  --sheet-2: oklch(95.6% 0.012 84);
  --sheet-3: oklch(91.5% 0.016 82);
  --ink: oklch(23% 0.012 255);
  --ink-2: oklch(38% 0.012 255);
  --ink-3: oklch(52% 0.01 255);
  --line: oklch(85.5% 0.016 80);
  --line-2: oklch(78% 0.018 80);
  --accent: oklch(43% 0.075 190);
  --accent-2: oklch(35% 0.065 192);
  --accent-soft: oklch(84% 0.04 182);
  --dark: oklch(22% 0.013 250);
  --dark-2: oklch(28% 0.014 250);
  --on-dark: oklch(94% 0.01 85);
  --on-dark-2: oklch(77% 0.013 85);
  --line-dark: oklch(36% 0.013 250);
  --error: oklch(50% 0.16 28);

  --serif: 'Source Serif 4', 'Noto Serif KR', 'Noto Serif JP', 'Hiragino Mincho ProN', 'Songti SC', Georgia, serif;
  --sans: 'Manrope', 'Apple SD Gothic Neo', 'Hiragino Sans', 'PingFang SC', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --pad: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Радиус и нахлёст листа-блока; тень листа всегда со смещением и мягкая. */
  --r-layer: clamp(22px, 3.2vw, 40px);
  --lift: 0 30px 56px -36px oklch(22% 0.03 250 / 0.5);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
:lang(ko) body, :lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh) { line-break: strict; }

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1, h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.04;
}
h3 { font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.35; letter-spacing: -0.005em; }
p { margin: 0; }
:lang(ko) h1, :lang(ko) h2, :lang(ja) h1, :lang(ja) h2, :lang(zh) h1, :lang(zh) h2 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.dark :focus-visible, .request :focus-visible { outline-color: var(--accent-soft); }
.request .form :focus-visible { outline-color: var(--accent); }
html { scrollbar-color: var(--line-2) var(--paper); caret-color: var(--accent); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px;
  text-decoration: none; transition: transform 0.2s var(--ease);
}
.skip:focus { transform: translateY(72px); }

/* ── кнопки и ссылки ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  background: var(--accent); color: oklch(98% 0.005 85);
  border: 0; border-radius: 999px;
  font: 700 15px/1.2 var(--sans); letter-spacing: 0.01em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.12s var(--ease);
}
@media (hover: hover) { .btn:hover { background: var(--accent-2); } }
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.textlink {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--accent);
  text-decoration: none; padding: 6px 0;
  border-bottom: 1px solid currentColor;
}
.textlink .arr { transition: transform 0.2s var(--ease); flex: none; }
@media (hover: hover) { .textlink:hover .arr { transform: translateX(4px); } }
.dark .textlink { color: var(--accent-soft); }

/* ── шапка ─────────────────────────────────────────────────────────────── */
.top { position: relative; z-index: 40; border-bottom: 1px solid var(--line); }
.top-in {
  max-width: 1180px; margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; gap: 22px;
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.mark-logo { height: 26px; width: auto; flex: none; display: block; }
.mark-text { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.mark-text b { font-weight: 700; }

.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-link { text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
@media (hover: hover) { .nav-link:hover { color: var(--ink); border-bottom-color: var(--accent); } }

.dd { position: relative; }
.dd summary {
  display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer;
  color: var(--ink-2); padding: 6px 0; white-space: nowrap; font-size: 14px;
}
.dd summary::-webkit-details-marker { display: none; }
.dd summary svg { transition: transform 0.2s var(--ease); }
.dd[open] summary svg { transform: rotate(180deg); }
.dd-list {
  position: absolute; top: calc(100% + 10px); left: -14px; z-index: 50;
  min-width: 260px; margin: 0; padding: 8px; list-style: none;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 18px 40px -18px oklch(20% 0.02 250 / 0.35);
  transform-origin: top left; animation: dd-in 0.16s var(--ease);
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dd-list a { display: flex; gap: 12px; padding: 9px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.35; }
.dd-list a[aria-current] { background: var(--paper-2); }
@media (hover: hover) { .dd-list a:hover { background: var(--paper-2); } }
.langs summary { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; font-size: 12px; letter-spacing: 0.08em; }
.langs .dd-list { left: auto; right: 0; min-width: 190px; transform-origin: top right; }
.lang-code { width: 24px; color: var(--ink-3); font-size: 12px; letter-spacing: 0.06em; padding-top: 1px; }

/* ── первый экран ─────────────────────────────────────────────────────── */
.hero { padding: clamp(40px, 8vw, 104px) 0 clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.kicker { font-size: 13px; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.35rem, 1rem + 4.3vw, 4.8rem); max-width: 14ch; }
.hero--sub h1 { font-size: clamp(2.1rem, 1rem + 3.4vw, 4.1rem); max-width: 16ch; }
:lang(ko) .hero h1, :lang(ja) .hero h1, :lang(zh) .hero h1 { max-width: 15em; font-size: clamp(1.95rem, 1.1rem + 3.4vw, 4rem); }
.hero .lead { margin-top: 26px; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.14rem); line-height: 1.62; color: var(--ink-2); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.note { margin-top: 14px; font-size: 14px; color: var(--ink-3); max-width: 52ch; }
.trust {
  display: flex; gap: 14px; align-items: baseline; padding-top: 22px; padding-bottom: 22px;
  border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2);
}
.trust::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--accent); transform: translateY(-2px) rotate(45deg); }

/* Авторский момент первого экрана: дело как стопка листов. Нижние листы
   расходятся веером при появлении, на широком экране слегка смещаются при
   прокрутке (свойство translate, чтобы не спорить с веером в transform).
   Верхний лист несёт запись журнала, подпись — ярлык папки над ним. */
.casefile { position: relative; margin: 0; min-width: 0; padding: 38px 16px 30px 0; }
.sheet { border-radius: 6px; border: 1px solid var(--line-2); background: var(--sheet); }
.sheet--back, .sheet--mid { position: absolute; inset: 38px 16px 30px 0; transform: var(--rest); }
.sheet--back { background: var(--sheet-3); --rest: rotate(-4.5deg) translate(-12px, 16px); }
.sheet--mid { background: var(--sheet-2); --rest: rotate(2.2deg) translate(12px, 7px); }
.sheet--top {
  position: relative; padding: 28px 28px 34px;
  box-shadow: var(--lift); container-type: inline-size;
}
.casefile figcaption {
  position: absolute; left: 22px; top: 0; transform: translateY(-100%);
  padding: 8px 14px 7px; max-width: calc(100% - 44px);
  font-size: 12px; line-height: 1.3; letter-spacing: 0.03em; color: var(--ink-3);
  background: var(--sheet); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.ledger { margin: 0; }
.lg-row { display: grid; grid-template-columns: minmax(7.4rem, 0.42fr) minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lg-row:first-child { padding-top: 2px; }
.lg-row dt { font-size: 12px; font-weight: 700; letter-spacing: 0.03em; color: var(--accent); padding-top: 3px; }
.lg-row dd { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; }
:lang(ko) .lg-row dd, :lang(ja) .lg-row dd, :lang(zh) .lg-row dd { font-family: var(--sans); font-size: 1rem; }
.lg-row:last-child { border-bottom: 0; }
.casefile--home .lg-row:last-child dd { color: var(--accent-2); }
.casefile--home .lg-row:last-child dd::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%;
  background: var(--accent); vertical-align: 0.12em;
}
@container (max-width: 380px) {
  .lg-row { grid-template-columns: minmax(0, 1fr); }
}
.ledger-rule { position: absolute; left: 28px; right: 28px; bottom: 17px; height: 2px; background: var(--accent); transform-origin: left; }

/* Страница услуги: справа лист с ситуацией клиента словами клиента. */
.hero--sub .hero-grid { align-items: center; }
.hero-side { min-width: 0; }
.casefile--sub { padding: 14px 12px 22px 0; }
.casefile--sub .sheet--back { inset: 14px 12px 22px 0; --rest: rotate(2.4deg) translate(10px, 10px); }
.casefile--sub .sheet--top { padding: 26px 28px 20px; }
.case-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
:lang(ko) .case-label, :lang(ja) .case-label, :lang(zh) .case-label { text-transform: none; letter-spacing: 0.02em; }
.quote {
  margin-top: 12px; margin-bottom: 18px;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); line-height: 1.22;
  color: var(--ink); padding-left: 18px; border-left: 2px solid var(--accent);
}
.quote::before { content: '« '; color: var(--accent); }
.quote::after { content: ' »'; color: var(--accent); }
:lang(en) .quote::before, :lang(ko) .quote::before, :lang(zh) .quote::before, :lang(ja) .quote::before,
:lang(pt) .quote::before, :lang(tr) .quote::before, :lang(de) .quote::before, :lang(it) .quote::before, :lang(es) .quote::before { content: none; }
:lang(en) .quote::after, :lang(ko) .quote::after, :lang(zh) .quote::after, :lang(ja) .quote::after,
:lang(pt) .quote::after, :lang(tr) .quote::after, :lang(de) .quote::after, :lang(it) .quote::after, :lang(es) .quote::after { content: none; }
:lang(ko) .quote, :lang(ja) .quote, :lang(zh) .quote { font-family: var(--sans); font-style: normal; font-weight: 500; }
.casefile--sub .ledger { border-top: 1px solid var(--line); }
.casefile--sub .lg-row:first-child { padding-top: 14px; }
.casefile--sub .lg-row dd { font-family: var(--sans); font-size: 0.98rem; line-height: 1.45; color: var(--ink-2); }

/* ── секции и листы ────────────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.paper2 { background: var(--paper-2); }
.dark { background: var(--dark); color: var(--on-dark); }
.dark p { color: var(--on-dark-2); }
.dark h2, .dark h3 { color: var(--on-dark); }

/* Блок другого тона — новый лист: скруглённый верх ложится на предыдущий
   блок, мягкая тень со смещением вверх. Нахлёст равен радиусу. */
.layer {
  position: relative;
  background: var(--paper);
  border-radius: var(--r-layer) var(--r-layer) 0 0;
  margin-top: calc(-1 * var(--r-layer));
  box-shadow: 0 -22px 44px -34px oklch(22% 0.03 250 / 0.4);
}
.layer.paper2 { background: var(--paper-2); }
.layer.dark, .layer.request { background: var(--dark); box-shadow: 0 -26px 50px -34px oklch(15% 0.03 250 / 0.55); }
.layer.section--tight { border-top: 0; }

.section h2 { font-size: clamp(1.95rem, 1.2rem + 2.6vw, 3.4rem); }
.sec-title { margin-bottom: clamp(28px, 4vw, 48px); max-width: 20ch; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head p { color: var(--ink-2); max-width: 52ch; }
.prose { max-width: 820px; }
.prose p { margin-top: 20px; font-size: 1.06rem; max-width: 62ch; }
.fine { margin-top: 22px; font-size: 14px; color: var(--ink-3); max-width: 62ch; }
.fine--dark { color: var(--on-dark-2); font-size: 15px; align-self: end; }

/* Ситуации: крупные строки-переходы, а не сетка карточек. */
.routes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.route {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 36px; gap: 12px 40px; align-items: center;
  padding: clamp(20px, 2.6vw, 30px) 0; border-bottom: 1px solid var(--line-2);
  text-decoration: none; position: relative;
}
.route::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.route-sit { font-family: var(--serif); font-size: clamp(1.3rem, 1rem + 1.1vw, 1.9rem); line-height: 1.18; letter-spacing: -0.01em; transition: transform 0.35s var(--ease); }
:lang(ko) .route-sit, :lang(ja) .route-sit, :lang(zh) .route-sit { font-family: var(--sans); font-weight: 600; font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.45rem); }
.route-meta { display: flex; flex-direction: column; gap: 4px; }
.route-name { font-weight: 700; font-size: 14px; color: var(--accent); letter-spacing: 0.01em; }
.route-does { font-size: 15px; color: var(--ink-2); }
.route-go { color: var(--accent); justify-self: end; transition: transform 0.25s var(--ease); }
@media (hover: hover) {
  .route:hover::after { transform: scaleX(1); }
  .route:hover .route-sit { transform: translateX(8px); }
  .route:hover .route-go { transform: translateX(6px); }
}
.routes--compact .route { grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr) 36px; padding: 18px 0; }
.routes--compact .route-sit { font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem); }

/* Флагман на тёмном: пять этапов на линии, линия прорисовывается при
   появлении — авторский момент этого экрана. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.split--even { align-items: start; }
.split-text p { margin-top: 22px; font-size: 1.04rem; max-width: 56ch; }
.split-text .textlink { margin-top: 28px; }
.promise {
  font-family: var(--serif); font-style: italic; font-size: 1.28rem !important; line-height: 1.35;
  color: var(--on-dark) !important; padding-left: 18px; border-left: 2px solid var(--accent-soft);
}
:lang(ko) .promise, :lang(ja) .promise, :lang(zh) .promise { font-family: var(--sans); font-style: normal; font-size: 1.08rem !important; font-weight: 600; }
.track { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; counter-reset: st; }
.track::before {
  content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--line-dark);
}
.track::after {
  content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--accent-soft);
  transform-origin: top; transform: scaleY(var(--drawn, 1)); transition: transform 1.2s var(--ease);
}
.track li { position: relative; padding: 0 0 30px; counter-increment: st; font-size: 1.08rem; line-height: 1.5; color: var(--on-dark); }
.track li:last-child { padding-bottom: 0; }
.track li::before {
  content: ''; position: absolute; left: -32px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--dark); border: 1.5px solid var(--accent-soft); z-index: 1;
}
.track li:last-child::before { background: var(--accent-soft); }

/* Расчёты: тезис крупно слева; справа две линии — поставка и расчёт, сшитые
   документами. Смысл рисунка: расчёт проходит, когда обе линии описывают
   одну сделку. */
.settle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.settle-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.9rem) !important; }
.settle-body > p { font-size: 1.06rem; color: var(--ink-2); max-width: 56ch; }
.settle-body .textlink { margin-top: 26px; }
.stitch { margin: 0 0 34px; }
.rail { display: flex; align-items: center; gap: 14px; height: 22px; margin: 0; }
.rail-name { flex: none; width: 6.4rem; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.rail::after { content: ''; flex: 1; height: 1.5px; background: var(--ink); transform-origin: left; }
.rail--money .rail-name { color: var(--accent); }
.rail--money::after { height: 2px; background: var(--accent); }
.ties {
  list-style: none; margin: 0; padding: 0 0 0 calc(6.4rem + 14px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ties li { position: relative; display: flex; justify-content: center; padding: 16px 3px; }
.ties li::before { content: ''; position: absolute; left: 50%; top: -11px; bottom: -11px; width: 1px; background: var(--line-2); }
.ties span {
  position: relative; background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 5px 10px; font-size: 12.5px; line-height: 1.25; text-align: center; color: var(--ink-2);
}

/* Присутствие: слева тезис, справа два листа. Операционная работа — лист
   бумаги, профессиональные функции — графитовый лист, который ложится на него
   со сдвигом: два слоя одной услуги. */
.desk { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.desk-lead { margin-top: 22px; font-size: 1.04rem; color: var(--ink-2); max-width: 46ch; }
.desk-head .textlink { margin-top: 18px; }
.stack { display: grid; min-width: 0; }
.stack-sheet {
  min-width: 0; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 26px clamp(20px, 3vw, 32px) 34px;
}
.stack-sheet h3, .col h3, .list-title {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 4px;
}
:lang(ko) .stack-sheet h3, :lang(ja) .stack-sheet h3, :lang(zh) .stack-sheet h3,
:lang(ko) .col h3, :lang(ja) .col h3, :lang(zh) .col h3,
:lang(ko) .list-title, :lang(ja) .list-title, :lang(zh) .list-title { text-transform: none; letter-spacing: 0.02em; }
.stack-sheet--pro {
  position: relative; margin: -22px 0 0 clamp(18px, 5vw, 56px); padding-bottom: 22px;
  background: var(--dark); color: var(--on-dark); border-color: var(--dark); box-shadow: var(--lift);
}
.stack-sheet--pro h3 { color: var(--on-dark-2); border-bottom-color: var(--line-dark); }
.stack-sheet--pro .ticks li { border-bottom-color: var(--line-dark); }
.stack-sheet--pro .ticks li:last-child { border-bottom: 0; }
.stack-sheet--pro .ticks li::before { background: var(--accent-soft); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.col-title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem) !important; padding-bottom: 18px; border-bottom: 1px solid var(--ink); margin-bottom: 4px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 13px 0 13px 26px; border-bottom: 1px solid var(--line); font-size: 1rem; line-height: 1.45; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 22px; width: 12px; height: 1.5px; background: var(--accent); }
.ticks--no li::before { width: 10px; height: 10px; top: 18px; background: none; border: 1.5px solid var(--ink-3); border-radius: 50%; }
.ticks--two { columns: 2; column-gap: 48px; }
.ticks--two li { break-inside: avoid; }
.ticks--big li { font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); padding: 18px 0 18px 30px; line-height: 1.3; }
.ticks--big li::before { top: 32px; }
:lang(ko) .ticks--big li, :lang(ja) .ticks--big li, :lang(zh) .ticks--big li { font-family: var(--sans); font-weight: 500; font-size: 1.15rem; }

/* Реестр — строки дела: заголовок и пояснение. */
.register { margin: 0; border-top: 1px solid var(--ink); }
.reg-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px 48px; padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.reg-row dt { font-family: var(--serif); font-size: clamp(1.3rem, 1rem + 0.9vw, 1.75rem); line-height: 1.2; }
:lang(ko) .reg-row dt, :lang(ja) .reg-row dt, :lang(zh) .reg-row dt { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; }
.reg-row dd { margin: 0; color: var(--ink-2); font-size: 1.02rem; padding-top: 4px; }
.register--line { counter-reset: rg; }
.register--line .reg-row dt::before { counter-increment: rg; content: counter(rg); display: inline-block; min-width: 1.6em; color: var(--accent); font-family: var(--sans); font-size: 0.7em; font-weight: 700; vertical-align: 0.2em; }

/* Уровни расчётного продукта A/B/C — нарастающие ступени. */
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.level { padding: 26px 28px 30px 0; border-right: 1px solid var(--line-2); position: relative; }
.level + .level { padding-left: 28px; }
.level:last-child { border-right: 0; }
.level-mark { display: block; font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--accent); margin-bottom: 18px; }
.level:nth-child(2) .level-mark { transform: translateY(-6px); }
.level:nth-child(3) .level-mark { transform: translateY(-12px); }
.level h3 { font-size: 1.1rem; margin-bottom: 10px; }
.level p { color: var(--ink-2); font-size: 0.98rem; }

/* Как устроено дело: схема с общей линией, линия прорисовывается слева
   направо, узлы появляются по очереди. */
.scheme { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.scheme::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--ink); transform-origin: left; }
.node { position: relative; padding: 34px 20px 0 0; }
.node::before { content: ''; position: absolute; left: 0; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.node:nth-child(2)::before { background: var(--accent); border-color: var(--accent); }
.node:last-child::before { background: var(--ink); }
.node h3 { font-size: 1.02rem; margin-bottom: 8px; }
.node p { font-size: 0.94rem; color: var(--ink-2); }
.roles { margin-top: clamp(36px, 5vw, 56px); padding: 22px 0 0; border-top: 1px solid var(--line-2); font-size: 1.04rem; color: var(--ink-2); max-width: 78ch; }
.gets { margin-top: clamp(36px, 5vw, 56px); }
.gets h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
:lang(ko) .gets h3, :lang(ja) .gets h3, :lang(zh) .gets h3 { text-transform: none; letter-spacing: 0.02em; }

/* О компании: название юрлица набрано по-корейски вертикально, корейской
   антиквой, как на табличке у входа. Декор: текст рядом повторяет его. */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px clamp(40px, 8vw, 128px); align-items: center; }
.about-mark {
  display: flex; gap: 0.2em; margin: 0;
  writing-mode: vertical-rl;
  font-family: 'Noto Serif KR', var(--serif); font-weight: 300;
  font-size: clamp(3rem, 1.6rem + 3vw, 4.6rem); line-height: 1.1; letter-spacing: 0.1em;
  color: oklch(79% 0.022 80); user-select: none;
}
.about-mark span { display: block; }
.about-text { max-width: 60ch; }
.about-text p { margin-top: 16px; color: var(--ink-2); }
.about-text h2 { margin-bottom: 8px; }

/* ── форма ─────────────────────────────────────────────────────────────── */
.request { background: var(--dark); color: var(--on-dark); overflow: hidden; }
.req-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.req-intro h2 { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.6rem); }
.req-intro p { margin-top: 18px; color: var(--on-dark-2); max-width: 44ch; }
.req-intro .req-hint { font-size: 14px; padding-top: 18px; border-top: 1px solid var(--line-dark); margin-top: 26px; }

/* Форма — верхний лист, под ним ещё один, повёрнутый: тот же мотив дела. */
.form-stack { position: relative; min-width: 0; }
.form-stack::before {
  content: ''; position: absolute; inset: 0; border-radius: 8px;
  background: oklch(84% 0.014 84); transform: rotate(1.4deg) translate(10px, 12px);
}
.form { position: relative; background: var(--sheet); color: var(--ink); border-radius: 8px; padding: clamp(20px, 3.4vw, 36px); min-width: 0; box-shadow: var(--lift); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sits { border: 0; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
.sits legend { font-weight: 700; font-size: 14px; margin-bottom: 12px; padding: 0; }
.sit { position: relative; display: flex; min-width: 0; }
.sit input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sit span {
  display: block; width: 100%; padding: 11px 14px 11px 38px; border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 14px; line-height: 1.35; cursor: pointer; position: relative; background: var(--sheet);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.sit span::before { content: ''; position: absolute; left: 13px; top: 13px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.sit input:checked + span { border-color: var(--accent); background: oklch(95% 0.02 185); }
.sit input:checked + span::before { border: 4.5px solid var(--accent); }
.sit input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sits.is-error .sit span { border-color: var(--error); }

.fgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld[hidden] { display: none; }
.fld--full, .fgrid .fld--full { grid-column: 1 / -1; }
.form > .fld { margin-bottom: 16px; }
.fld label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.req { font-weight: 500; font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.fld input, .fld textarea {
  width: 100%; min-width: 0; font: 16px/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; padding: 11px 13px;
  transition: border-color 0.15s var(--ease);
}
.fld textarea { resize: vertical; min-height: 86px; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
.fld input:focus, .fld textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px oklch(84% 0.04 182 / 0.55); }
.is-error { border-color: var(--error) !important; }

.more { margin: 18px 0 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.more summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; color: var(--accent); padding: 12px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary svg { transition: transform 0.2s var(--ease); }
.more[open] summary svg { transform: rotate(180deg); }
.more .fgrid { padding: 6px 0 8px; }

.err, .ok { margin: 16px 0 0; font-size: 14px; padding: 10px 13px; border-radius: 6px; }
.err { color: var(--error); background: oklch(95% 0.03 28); }
.ok { color: var(--accent-2); background: oklch(95% 0.02 185); }
.submit { margin-top: 22px; width: 100%; }
.privacy { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.privacy a, .err a { color: inherit; }

/* ── благодарность ─────────────────────────────────────────────────────── */
.hero--thanks { min-height: 60vh; display: flex; align-items: center; }
.thanks { max-width: 760px; }
.thanks h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); }
.thanks .lead { margin-top: 24px; font-size: 1.08rem; color: var(--ink-2); max-width: 58ch; }
.ref { margin-top: 28px; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 14px 20px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); background: var(--sheet); border-radius: 4px; }
.ref span { font-size: 13px; color: var(--ink-3); }
.ref b { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.02em; }
.thanks .textlink { margin-top: 32px; }

/* ── подвал ────────────────────────────────────────────────────────────── */
.foot { background: var(--dark-2); color: var(--on-dark-2); padding: 48px 0 56px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 28px 48px; align-items: start; }
.foot-brand { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 10px; }
.foot-text { max-width: 44ch; }
.foot-mail { margin-top: 14px; }
.foot-mail span { display: block; font-size: 12px; opacity: 0.8; }
.foot a { color: var(--on-dark); }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-links a { text-decoration: none; }
@media (hover: hover) { .foot-links a:hover { text-decoration: underline; } }
.foot-back a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }

/* ── появление: только с JS и без reduced-motion ──────────────────────── */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .track { --drawn: 0; }
.js .track.in { --drawn: 1; }
.js .ledger-rule { transform: scaleX(0); transition: transform 1s 0.5s var(--ease); }
.js .casefile.in .ledger-rule { transform: scaleX(0.72); }
.js .casefile .sheet--back, .js .casefile .sheet--mid { transition: transform 1.1s var(--ease) 0.12s; }
.js .casefile .sheet--mid { transition-delay: 0.22s; }
.js .casefile:not(.in) .sheet--back, .js .casefile:not(.in) .sheet--mid { transform: none; }
.js .casefile .sheet--top { transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }
.js .casefile:not(.in) .sheet--top { opacity: 0; transform: translateY(12px); }
.js .stitch .rail::after { transform: scaleX(0); transition: transform 1s var(--ease); }
.js .stitch .rail--money::after { transition-delay: 0.15s; }
.js .stitch.in .rail::after { transform: none; }
.js .stitch .ties li { opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: calc(0.45s + var(--i, 0) * 0.09s); }
.js .stitch.in .ties li { opacity: 1; transform: none; }
.js .scheme::before { transform: scaleX(0); transition: transform 1.2s var(--ease); }
.js .scheme.in::before { transform: none; }
.js .scheme .node { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: calc(0.25s + var(--i, 0) * 0.12s); }
.js .scheme.in .node { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .scheme .node, .js .stitch .ties li { opacity: 1; transform: none; transition: none; }
  .js .track { --drawn: 1; }
  .js .ledger-rule { transform: scaleX(0.72); transition: none; }
  .js .casefile .sheet--back, .js .casefile .sheet--mid { transform: var(--rest); transition: none; }
  .js .casefile .sheet--top { opacity: 1; transform: none; transition: none; }
  .js .stitch .rail::after, .js .scheme::before { transform: none; transition: none; }
  .dd-list { animation: none; }
  .route-sit { transition: none; }
}

/* ── адаптив ───────────────────────────────────────────────────────────── */
@media (min-width: 860px) {
  /* Тезис блока присутствия остаётся на экране, пока читаются оба листа. */
  .desk-head { position: sticky; top: 40px; }
}

@media (max-width: 1080px) {
  .nav { gap: 16px; }
  .nav .nav-link:nth-of-type(2) { display: none; }
}

@media (max-width: 859px) {
  .top-in { gap: 14px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; gap: 20px; padding-top: 6px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .nav .nav-link:nth-of-type(2) { display: inline; }
  .hero-grid, .split, .settle, .sec-head, .cols, .req-grid, .foot-grid, .desk { grid-template-columns: minmax(0, 1fr); }
  .hero h1, .hero--sub h1 { max-width: none; }
  .casefile { max-width: 520px; width: 100%; }
  .route { grid-template-columns: minmax(0, 1fr) 30px; }
  .route-meta { grid-column: 1; }
  .route-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .routes--compact .route { grid-template-columns: minmax(0, 1fr) 30px; }
  .levels { grid-template-columns: minmax(0, 1fr); }
  .level, .level + .level { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .level-mark, .level:nth-child(2) .level-mark, .level:nth-child(3) .level-mark { transform: none; font-size: 2.6rem; }
  .scheme { grid-template-columns: minmax(0, 1fr); padding-left: 30px; }
  .scheme::before { left: 6px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; transform-origin: top; }
  .js .scheme::before { transform: scaleY(0); }
  .js .scheme.in::before { transform: none; }
  .node { padding: 0 0 24px; }
  .node::before { left: -30px; top: 4px; }
  .ticks--two { columns: 1; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-mark { writing-mode: horizontal-tb; flex-wrap: wrap; gap: 0 0.35em; font-size: clamp(2rem, 1.2rem + 4vw, 3rem); letter-spacing: 0.04em; }
  .stack-sheet--pro { margin-left: 18px; }
  .dd-list { position: fixed; left: var(--pad); right: var(--pad); top: auto; min-width: 0; }
  .services .dd-list { transform-origin: top center; }
  .langs .dd-list { left: auto; right: var(--pad); width: 220px; }
}

@media (max-width: 559px) {
  .mark-logo { height: 22px; }
  .mark-text { font-size: 12px; letter-spacing: 0.12em; }
  .top-cta { display: none; }
  /* Навигация переносится по строкам: горизонтальный свайп в шапке
     пользователь не обязан угадывать. */
  .nav { overflow-x: visible; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; }
  .hero { padding-top: 12px; padding-bottom: 36px; }
  .kicker { margin-bottom: 10px; font-size: 12px; }
  /* Заголовок обязан оставаться внутри экрана, а не прятаться под overflow. */
  .hero h1, .hero--sub h1 { font-size: clamp(1.6rem, 1rem + 2.2vw, 2.15rem); line-height: 1.16; max-width: 100%; overflow-wrap: break-word; }
  /* На узком экране кнопка идёт сразу за заголовком, чтобы первый экран
     320×568 заканчивался действием, а не серединой абзаца. */
  /* Первый экран 320x568 обязан заканчиваться на законченном абзаце,
     поэтому верх композиции уплотнён, а не подрезан по высоте. */
  .top-in { padding: 12px 0; gap: 10px; }
  .hero-copy .actions { order: 3; margin-top: 10px; gap: 6px 14px; }
  .actions .btn { padding: 11px 18px; font-size: 14px; }
  .kicker { margin-bottom: 6px; font-size: 11px; letter-spacing: 0.05em; }
  .hero-copy .note { order: 4; margin-top: 8px; font-size: 12.5px; }
  .hero-copy .lead { order: 5; margin-top: 10px; font-size: 0.9rem; line-height: 1.45; }
  .hero-copy .lead { order: 5; margin-top: 18px; }
  .actions { gap: 10px 22px; }
  .sits, .fgrid { grid-template-columns: minmax(0, 1fr); }
  .reg-row { grid-template-columns: minmax(0, 1fr); }
  .sheet--top { padding: 22px 18px 28px; }
  .casefile { padding: 34px 6px 22px 0; }
  .sheet--back, .sheet--mid { inset: 34px 6px 22px 0; }
  .sheet--back { --rest: rotate(-2.4deg) translate(-4px, 12px); }
  .sheet--mid { --rest: rotate(1.4deg) translate(5px, 6px); }
  .casefile figcaption { left: 14px; max-width: calc(100% - 28px); }
  .casefile--sub { padding: 10px 6px 18px 0; }
  .casefile--sub .sheet--back { inset: 10px 6px 18px 0; --rest: rotate(1.6deg) translate(4px, 8px); }
  .casefile--sub .sheet--top { padding: 22px 18px 18px; }
  .ledger-rule { left: 18px; right: 18px; }
  .rail-name { width: auto; }
  .ties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 0; }
  .ties li { padding: 0; }
  .ties li::before { display: none; }
  .ties span { width: 100%; }
  .stack-sheet--pro { margin-left: 10px; }
  .form-stack::before { transform: rotate(1deg) translate(4px, 8px); }
}

/* ═══════════════════════════════════════════════════════════════════════
   ОБЛИК: зелёное сукно, тиснение, золото.
   Решение Антона 27.09.2026: тёмные изумрудные тона, элементы тиснения,
   золота и бархата, «резной» силуэт. Приём: документы лежат на сукне. Фон
   страницы — тёмный бархат, содержимое дела — светлый лист. Золото работает
   как тиснение на папке: тонкие линии, уголки, метки, но не заливка.
   Светлые поверхности переопределяют чернильные переменные внутри себя,
   поэтому текст на листе остаётся графитовым без правки каждого правила.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --velvet: oklch(19.5% 0.04 162);
  --velvet-2: oklch(24% 0.045 162);
  --velvet-deep: oklch(14% 0.032 162);
  --ivory: oklch(93% 0.016 88);
  --ivory-2: oklch(84% 0.02 88);
  --ivory-3: oklch(73% 0.022 88);
  --gold: oklch(81% 0.115 86);
  --gold-2: oklch(70% 0.105 82);
  --gold-dim: oklch(56% 0.07 86 / 0.5);
  --graphite: oklch(24% 0.012 255);
  --graphite-2: oklch(38% 0.012 255);
  --graphite-3: oklch(52% 0.01 255);
  --parchment: oklch(96.6% 0.014 86);
  --emerald: oklch(46% 0.1 162);

  --paper: var(--velvet);
  --paper-2: var(--velvet-2);
  --dark: var(--velvet-deep);
  --dark-2: var(--velvet);
  --ink: var(--ivory);
  --ink-2: var(--ivory-2);
  --ink-3: var(--ivory-3);
  --on-dark: var(--ivory);
  --on-dark-2: var(--ivory-2);
  --sheet: var(--parchment);
  --sheet-2: oklch(93.4% 0.016 86);
  --sheet-3: oklch(89.5% 0.018 86);
  --line: oklch(36% 0.03 162);
  --line-2: oklch(45% 0.035 162);
  --line-dark: oklch(32% 0.028 162);
  --accent: var(--gold);
  --accent-2: var(--gold-2);
  --accent-soft: oklch(88% 0.07 86);
  --lift: 0 34px 60px -34px oklch(10% 0.03 162 / 0.75);
}

/* Бархат: мягкие пятна света сверху и снизу плюс едва заметная диагональная
   штриховка. Всё градиентами, картинок нет. */
body {
  background-color: var(--velvet);
  background-image:
    radial-gradient(120% 78% at 50% -12%, oklch(31% 0.055 162 / 0.62), transparent 62%),
    radial-gradient(100% 62% at 50% 112%, oklch(27% 0.05 162 / 0.5), transparent 66%),
    repeating-linear-gradient(128deg, oklch(100% 0 0 / 0.012) 0 2px, transparent 2px 7px);
  background-attachment: fixed;
}

/* Светлый лист возвращает себе графитовый текст и бумажные линии.
   .stack-sheet--pro исключён: это тёмный графитовый лист со светлым
   текстом (--on-dark), а не бумага — иначе тёмный текст ложился на тёмный
   фон и становился нечитаемым. */
.sheet, .form, .stack-sheet:not(.stack-sheet--pro), .dd-list, .ref, .deck-card {
  --ink: var(--graphite);
  --ink-2: var(--graphite-2);
  --ink-3: var(--graphite-3);
  --line: oklch(86% 0.016 80);
  --line-2: oklch(79% 0.018 80);
  --accent: var(--emerald);
  --accent-2: oklch(38% 0.09 162);
  color: var(--graphite);
}

/* Тиснение: светлая грань сверху, глубокая тень снизу, золотая волосяная
   линия по краю листа. */
.sheet, .form, .stack-sheet, .deck-card {
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.75),
    inset 0 0 0 1px oklch(70% 0.06 86 / 0.18),
    var(--lift);
}

.btn {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--velvet-deep);
  box-shadow: inset 0 1px 0 oklch(97% 0.04 92 / 0.85), 0 10px 24px -14px oklch(10% 0.03 162 / 0.8);
}
@media (hover: hover) { .btn:hover { background: linear-gradient(180deg, oklch(86% 0.115 88) 0%, var(--gold) 100%); } }
.form .btn { color: var(--velvet-deep); }

/* Резьба: золотая метка-ромб с волосяными линиями перед заголовком секции. */
.carved > .wrap > .sec-head, .carved > .wrap > h2 { position: relative; padding-top: 34px; }
.carved > .wrap > .sec-head::before, .carved > .wrap > h2::before {
  content: ''; position: absolute; left: 0; top: 6px; width: min(240px, 60%); height: 7px;
  background:
    linear-gradient(90deg, var(--gold-dim) 0 34%, transparent 34% 42%) no-repeat 0 3px / 100% 1px,
    conic-gradient(from 45deg at 38% 50%, var(--gold) 0 25%, transparent 0) no-repeat 0 0 / 7px 7px;
  background-position: 0 3px, 36% 0;
  background-repeat: no-repeat;
}

.top { border-bottom: 1px solid var(--gold-dim); }
.section + .section, .section--tight { border-top-color: var(--gold-dim); }
.trust { border-top-color: var(--gold-dim); }

/* ── колода дел ────────────────────────────────────────────────────────── */
.casefile.deck { padding: 38px 14px 26px 0; }
.deck-stage { position: relative; display: grid; touch-action: pan-y; perspective: 1400px; }
.deck .sheet--back, .deck .sheet--mid { position: absolute; inset: 0; display: block; }
.deck .sheet--back { transform: rotate(-3.4deg) translate(-11px, 13px); }
.deck .sheet--mid { transform: rotate(2deg) translate(10px, 6px); }
/* Перелистывание: лист уходит/приходит поворотом вокруг вертикальной оси, как
   переворачиваемая страница. backface-visibility прячет изнанку листа, угол
   поворота не доходит до 90°, поэтому изнанка никогда не показывается. */
.deck-card {
  grid-area: 1 / 1; position: relative; border-radius: 6px; background: var(--sheet);
  border: 1px solid oklch(79% 0.018 80);
  padding: 26px 26px 34px;
  opacity: 0; transform: translateY(8px) rotateY(-64deg) scale(0.97);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  transition: opacity 0.32s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.deck-card.is-on { opacity: 1; transform: none; pointer-events: auto; }
/* Перелистывание отключено: смена мгновенная, без поворота. Правило стоит
   после базового .deck-card, иначе порядок в каскаде его перебивает. */
@media (prefers-reduced-motion: reduce) {
  .deck-card { transition: none; }
}
.deck-tag {
  margin: 0 0 14px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--emerald);
}
.deck-card .lg-row:last-child dd { color: oklch(38% 0.09 162); }
.deck-card .lg-row:last-child dd::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px;
  border-radius: 50%; background: var(--emerald); vertical-align: 0.12em;
}
.deck-card .ledger-rule { position: absolute; left: 26px; right: 26px; bottom: 16px; height: 2px; background: var(--gold-2); }
.deck-ctl { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.deck-dots { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.deck-dots button {
  width: 26px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.deck-dots button::before {
  content: ''; width: 7px; height: 7px; border-radius: 999px;
  background: oklch(55% 0.03 162); transition: background 0.2s var(--ease), width 0.24s var(--ease);
}
.deck-dots button[aria-current='true']::before { background: var(--gold); width: 20px; }

/* ── что происходит на самом деле ──────────────────────────────────────── */
.real { margin-top: clamp(34px, 5vw, 54px); display: grid; gap: clamp(18px, 2.4vw, 26px); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.real-item {
  position: relative; padding: 26px 26px 28px; border-radius: 10px;
  background: oklch(23% 0.042 162);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.06);
}
.real-item::after {
  content: ''; position: absolute; left: 26px; right: 26px; top: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent 70%);
}
.real-item h3 { font-family: var(--serif); font-size: 1.24rem; line-height: 1.22; color: var(--ivory); }
.real-what { margin-top: 12px; color: var(--ivory-3); font-size: 0.97rem; }
.real-do { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ivory-2); font-size: 0.97rem; }
.real-do::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px;
  background: var(--gold); transform: rotate(45deg); vertical-align: 0.05em;
}

/* ── оплата инвойсов ───────────────────────────────────────────────────── */
.invo { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.invo-lead { margin-top: 20px; color: var(--on-dark-2); font-size: 1.04rem; max-width: 46ch; }
.invo-text .textlink { margin-top: 22px; }
.invo-card {
  padding: clamp(22px, 3vw, 34px); border-radius: 10px;
  background: oklch(17% 0.035 162);
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.07);
}
.invo-points { margin: 0; padding: 0; list-style: none; }
.invo-points li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1px solid var(--line-dark); color: var(--ivory); font-size: 1rem; }
.invo-points li:last-child { border-bottom: 0; }
.invo-points li::before {
  content: ''; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px;
  border: 1px solid var(--gold); transform: rotate(45deg);
}
.invo-note { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gold-dim); font-size: 14px; color: var(--ivory-3); }

@media (max-width: 860px) {
  .invo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .casefile.deck { padding: 34px 0 22px; }
  .deck .sheet--back { transform: rotate(-2.2deg) translate(-6px, 9px); }
  .deck .sheet--mid { transform: rotate(1.4deg) translate(6px, 5px); }
  .deck-card { padding: 22px 20px 30px; }
  .deck-card .ledger-rule { left: 20px; right: 20px; }
  .real-item { padding: 22px 20px 24px; }
  .real-item::after { left: 20px; right: 20px; }
}

/* ── правки после замеров на телефоне ──────────────────────────────────── */

/* Строки журнала внутри карточки должны разворачиваться в один столбец:
   контейнерный запрос считает ширину от ближайшего контейнера, поэтому его
   объявляем на самой карточке, а не на листе старой разметки. */
.deck-card { container-type: inline-size; }

/* Подпись колоды — не «ярлычок» поверх листа, а строка над стопкой. */
.casefile.deck > figcaption {
  position: static; transform: none; max-width: none;
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 0; border: 0; background: none;
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.casefile.deck > figcaption::after {
  content: ''; width: 46px; height: 1px; background: var(--gold-dim);
}

/* Заголовок первого экрана на телефоне был 25 точек — для главного сообщения
   этого мало, читается как подзаголовок. */
@media (max-width: 620px) {
  .hero h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 2.7rem); line-height: 1.1; }
  .hero--sub h1 { font-size: clamp(1.85rem, 1.15rem + 3vw, 2.4rem); line-height: 1.12; }
  .hero .lead { margin-top: 20px; }
}

/* Диагональная штриховка бархата на тёмном фоне читалась полосами. */
body {
  background-image:
    radial-gradient(120% 78% at 50% -12%, oklch(31% 0.055 162 / 0.62), transparent 62%),
    radial-gradient(100% 62% at 50% 112%, oklch(27% 0.05 162 / 0.5), transparent 66%),
    repeating-linear-gradient(128deg, oklch(100% 0 0 / 0.006) 0 2px, transparent 2px 9px);
}

/* ── правки по разбору Codex: мобильный интерфейс и новые блоки ────────── */

/* Смежные задачи: строки со ссылкой, а не ещё один ряд карточек. */
.tasks { margin: clamp(26px, 4vw, 38px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tasks li { border-bottom: 1px solid var(--line); }
.tasks a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 56px; padding: 14px 0; text-decoration: none; color: var(--ivory);
  font-size: 1.02rem; line-height: 1.35;
}
.tasks .arr { flex: none; color: var(--gold); transition: transform 0.2s var(--ease); }
@media (hover: hover) { .tasks a:hover { color: var(--gold); } .tasks a:hover .arr { transform: translateX(5px); } }

/* Оплата инвойсов: нумерованная последовательность с золотыми номерами. */
.invo-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.invo-steps li {
  counter-increment: s; position: relative; padding: 14px 0 14px 46px;
  border-bottom: 1px solid var(--line-dark); color: var(--ivory); font-size: 1rem;
}
.invo-steps li:last-child { border-bottom: 0; }
.invo-steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 15px;
  font-family: var(--serif); font-size: 0.92rem; color: var(--gold); letter-spacing: 0.04em;
}
.deck-count { margin: 0 0 0 auto; font-size: 12.5px; letter-spacing: 0.06em; color: var(--ivory-3); }

/* Кнопка меню на телефоне: одна строка в шапке вместо двух. */
.burger { display: none; position: relative; margin-left: auto; }
.burger > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--gold-dim); color: var(--gold);
}
.burger > summary::-webkit-details-marker { display: none; }
.burger-bars { position: relative; display: block; width: 18px; height: 2px; background: currentColor; }
.burger-bars::before, .burger-bars::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.burger-bars::before { top: -6px; }
.burger-bars::after { top: 6px; }
.burger[open] > summary { border-color: var(--gold); }
.burger-list { right: 0; min-width: min(280px, calc(100vw - 40px)); }
.burger-list a { min-height: 48px; align-items: center; }
.burger-cta { padding: 10px 12px 4px; }
.burger-cta .btn { width: 100%; }

@media (max-width: 559px) {
  .nav, .top-cta, .top-in > .langs, .top-in > .dd.lang { display: none; }
  .burger { display: block; }
  .top-in { flex-wrap: nowrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }

  /* Касание: основные действия не меньше 44 точек, поля формы не меньше 48. */
  .btn { min-height: 48px; }
  .textlink { min-height: 44px; }
  .deck-dots button { width: 44px; height: 44px; }
  .form input, .form textarea, .form select { min-height: 48px; }
  .req-grid, .fgrid, .form .cols { grid-template-columns: minmax(0, 1fr) !important; }

  /* Папка дела не должна занимать почти весь экран. */
  .deck-card { padding: 20px 18px 28px; }
  .deck-card .lg-row { padding: 10px 0; }
  .deck-card .lg-row dd { font-size: 1rem; line-height: 1.34; }
  .deck-card .ledger-rule { bottom: 13px; }
  .casefile.deck { padding-top: 26px; }

  /* Содержимое видно сразу: на телефоне появление по прокрутке выключено. */
  .reveal, .track, .casefile, .stitch, .scheme { opacity: 1 !important; transform: none !important; }
}

/* ── глубина разделов: одна композиция из трёх слоёв ─────────────────────
   T-20260927-009. Каждый .layer-раздел (тёмный, «сукно» paper2 или без
   модификатора) и форма заявки раньше стояли плоской заливкой — правило
   .layer* задавало background шорт-кодом и тем самым обнуляло background-
   image, поэтому текстура и пятно света с body под ними не показывались.
   Глубина здесь — ровно три слоя одной композиции: свой базовый цвет
   раздела (уже задан выше в .layer/.layer.dark/.layer.paper2/.layer.request),
   поверх него мягкое световое пятно сверху и тонкая диагональная фактура —
   тот же приём, что уже несёт фон body, применённый теперь и к разделам,
   которые раньше его перекрывали своей плотной заливкой. Названные ключевые
   разделы главной: «когда сделка встала» (#stopped), «оплата инвойсов»
   (#invoices), «присутствие в Корее» (#desk) — плюс #settle, #how и форма
   заявки получают ту же композицию тем же правилом. */
.layer,
.layer.dark,
.layer.paper2,
.layer.request {
  --depth-spot: oklch(46% 0.06 162 / 0.3);
  --depth-line: oklch(100% 0 0 / 0.014);
  background-image:
    radial-gradient(128% 90% at 50% -16%, var(--depth-spot), transparent 60%),
    repeating-linear-gradient(128deg, var(--depth-line) 0 2px, transparent 2px 9px);
}

/* ── добор после замеров: переполнение меню и мелкие цели ──────────────── */

/* Базовое правило выпадающего списка прижимает его левым краем; для меню в
   правом углу это выносило список за экран на 220 точек. */
.burger-list { left: auto; right: 0; }

@media (max-width: 559px) {
  /* Управление картотекой не помещалось в одну строку вместе со счётчиком. */
  .deck-ctl { flex-wrap: wrap; row-gap: 10px; }
  .deck-count { width: 100%; margin: 0; order: 3; }

  /* Логотип в шапке был высотой 19 точек — мало для касания. */
  .mark { min-height: 44px; align-items: center; }
  .foot a, .foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }

  /* Папка дела: цель около 400 точек. */
  .deck-card { padding: 18px 16px 26px; }
  .deck-card .lg-row { padding: 9px 0; }
  /* Основной текст на телефоне не опускаем ниже 16 точек. */
  .deck-card .lg-row dd { font-size: 1rem; line-height: 1.34; }
  .deck-tag { margin-bottom: 10px; }
}
