/* Юрчат — сайт. Один файл стилей на все страницы.
   Шрифт: на устройствах Apple — системный San Francisco; на остальных — Inter
   (лежит рядом, в assets/fonts, со стороны ничего не подгружается). */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1d1d1f;        /* текст и главные кнопки — графит приложения */
  --ink-2: #6e6e73;      /* второстепенный текст */
  --paper: #ffffff;
  --mist: #f5f5f7;       /* светло-серые разделы и плитки */
  --line: #d2d2d7;
  --marker: #ffd84d;     /* маркер: «откуда это взято» — единственный цвет страницы */
  --marker-soft: #fff4c7;
  --alert: #d70015;      /* критичный срок — как в приложении */
  --night: #000000;
  --radius: 28px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Inter Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

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

/* ---------- Черновик: полоса и метки «заполнить» ---------- */
.draftbar { background: #b0125a; color: #fff; text-align: center; padding: 9px 16px; font-size: 14px; }
.todo { color: #b0125a; outline: 1.5px dashed #b0125a; outline-offset: 2px; border-radius: 4px; padding: 0 3px; }

/* ---------- Верхняя полоса ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; letter-spacing: -.01em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink); opacity: .82; }
.nav-links a:hover { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 13px 24px;
  font-weight: 500; font-size: 17px; line-height: 1.2; cursor: pointer;
}
.btn:hover { background: #000; }
.btn-small { padding: 7px 15px; font-size: 14px; }
.nav-links a.btn { color: #fff; opacity: 1; }
.btn-quiet { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; padding-left: 10px; padding-right: 10px; }
.btn-quiet:hover { background: transparent; text-decoration-thickness: 2px; }

/* ---------- Заголовки ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.6vw, 80px); line-height: 1.04; letter-spacing: -.035em; }
h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -.03em; }
h3 { font-size: 24px; line-height: 1.17; letter-spacing: -.018em; }
.lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.38; color: var(--ink-2); letter-spacing: -.01em; text-wrap: pretty; }
.small { font-size: 14px; color: var(--ink-2); }

.sec { padding: clamp(72px, 10vw, 136px) 0; }
.sec-mist { background: var(--mist); }
.sec-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.sec-head .lead { margin: 18px 0 0; }

/* ---------- Первый экран ---------- */
.hero { background: var(--mist); text-align: center; padding: clamp(56px, 8vw, 104px) 0 0; overflow: hidden; }
.hero h1 { max-width: 12.5em; margin: 0 auto; }
.hero .lead { max-width: 30em; margin: 24px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px 6px; justify-content: center; margin-top: 30px; }
.hero-facts { margin: 22px auto 0; max-width: 40em; font-size: 14px; color: var(--ink-2); }
.hero-phone { margin: clamp(40px, 6vw, 68px) auto 0; height: clamp(380px, 46vw, 520px); display: flex; justify-content: center; align-items: flex-start; overflow: hidden; padding: 0 30px; }

/* ---------- iPhone ---------- */
.phone { width: 348px; flex: none; background: var(--ink); border-radius: 56px; padding: 11px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .35); }
.phone-screen { position: relative; background: #f2f2f2; border-radius: 45px; overflow: hidden; min-height: 640px; text-align: left; font-size: 13px; line-height: 1.38; }
.phone-island { width: 96px; height: 28px; border-radius: 20px; background: var(--ink); margin: 11px auto 0; }
.phone-bar { text-align: center; font-weight: 600; font-size: 15px; padding: 12px 0 10px; }
.phone-body { padding: 4px 14px 20px; display: grid; gap: 10px; }

/* Кусочки интерфейса приложения: используются в телефоне, сцене и плитках */
.ui { background: #fff; border-radius: 16px; padding: 14px 15px; }
.ui-title { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.ui-title i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex: none; }
.ui-title i.red { background: var(--alert); }
.ui-title i.blue { background: #0a84ff; }
.ui-title i.teal { background: #30b0c7; }
.ui p { margin: 0; }
.ui p + p { margin-top: 7px; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 3px 9px; background: #f2f2f2; }
.chip-red { color: var(--alert); background: rgba(215, 0, 21, .1); }
.chip-amber { color: #b25e00; background: rgba(255, 149, 0, .16); }
.kase { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kase b { font-weight: 600; }
.kase span { color: var(--ink-2); font-size: 12px; }

/* ---------- Сцена: разговор → карточка ---------- */
.scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 20px; align-items: start; }
.pane { border-radius: var(--radius); padding: 26px; }
.pane-talk { background: var(--mist); }
.pane-card { background: #f2f2f2; }
.pane-head .chip { background: #fff; }
@media (min-width: 901px) { .pane-talk { position: sticky; top: 72px; } }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.rec { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--alert); }
.scene[data-state="done"] .rec::before { background: var(--ink-2); }

.line { margin: 0 0 14px; font-size: 17px; line-height: 1.45; }
.line:last-child { margin-bottom: 0; }
.who { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 1px; }
.line-lawyer { color: var(--ink-2); }

mark[data-q] {
  color: inherit; border-radius: 3px; padding: 1px 0;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 60% / 0% 78%;
  transition: background-size .45s ease;
}
mark[data-q].lit { background-size: 100% 78%; }

.card-stack { display: grid; gap: 10px; }
.card-stack .ui { font-size: 15px; line-height: 1.42; padding: 16px 16px 8px; }
.item {
  display: block; width: 100%; text-align: left; background: none; border: 0; margin: 0 -8px 6px; padding: 7px 8px; width: calc(100% + 16px);
  border-radius: 10px; cursor: pointer;
}
.item:hover { background: #f5f5f7; }
.item.active { background: var(--marker-soft); }
.item .norm { color: var(--ink-2); }
.item .src { display: none; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.item.active .src { display: block; }
.item .src::before { content: "Из разговора: "; font-weight: 600; }
.due { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.due b { font-weight: 600; }

/* Появление по шагам — только когда работает скрипт */
.scene.js [data-step] { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.scene.js [data-step].on { opacity: 1; transform: none; }

.scene-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 22px; }
.scene-foot p { margin: 0; max-width: 46em; }
.replay { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.replay:hover { border-color: var(--ink); }

/* ---------- Плитки ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.tile { background: var(--paper); border-radius: var(--radius); padding: 30px 30px 0; display: flex; flex-direction: column; overflow: hidden; min-height: 380px; }
.tile > p { margin: 10px 0 0; color: var(--ink-2); max-width: 30em; }
.tile-shot { margin-top: auto; padding-top: 28px; }
.tile-shot .ui { border-radius: 18px 18px 0 0; background: #f2f2f2; padding: 16px 16px 20px; font-size: 14px; line-height: 1.4; }
.tile-shot .ui .ui { background: #fff; border-radius: 14px; padding: 13px 14px; }
.t-4 { grid-column: span 4; }
.t-3 { grid-column: span 3; }
.t-2 { grid-column: span 2; }
.beta { font-size: 12px; font-weight: 600; color: #b25e00; background: rgba(255, 149, 0, .16); border-radius: 99px; padding: 2px 9px; vertical-align: 3px; margin-left: 4px; letter-spacing: 0; }

.bars { display: flex; align-items: center; gap: 5px; height: 64px; }
.bars span { width: 6px; border-radius: 3px; background: var(--ink); height: 20%; animation: bar 1.3s ease-in-out infinite; }
.bars span:nth-child(3n) { animation-delay: -.4s; }
.bars span:nth-child(3n+1) { animation-delay: -.8s; }
.bars span:nth-child(4n) { animation-duration: 1.7s; }
.bars span:nth-child(5n) { animation-duration: 1s; }
@keyframes bar { 0%, 100% { height: 18%; } 50% { height: 92%; } }

.askline { display: flex; gap: 8px; margin-top: 6px; }
.askline::before { content: "—"; color: var(--ink-2); }
.sheet { background: #fff; border-radius: 6px 6px 0 0; padding: 22px 24px 26px; font-family: "Times New Roman", Times, serif; font-size: 14px; line-height: 1.45; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .25); }
.sheet h4 { margin: 12px 0 10px; text-align: center; font-size: 15px; letter-spacing: .08em; }
.sheet .to { text-align: right; }
.sheet .gap { background: var(--marker-soft); border-radius: 3px; padding: 0 3px; }
.sign { height: 86px; }
.sign path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Данные (тёмный раздел) ---------- */
.sec-night { background: var(--night); color: #f5f5f7; }
.sec-night .lead { color: #a1a1a6; }
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: p; }
.path li { position: relative; padding: 34px 22px 0 0; }
.path li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: #424245; }
.path li::after { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; background: #f5f5f7; }
.path li:last-child::after { background: var(--marker); }
.path b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.path span { color: #a1a1a6; font-size: 15px; line-height: 1.42; display: block; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; margin-top: clamp(48px, 7vw, 88px); padding-top: 34px; border-top: 1px solid #424245; }
.facts p { margin: 0; color: #a1a1a6; font-size: 15px; }
.facts b { display: block; color: #f5f5f7; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.sec-night a { color: #f5f5f7; text-underline-offset: 4px; }

/* ---------- Два столбца: клиент, Екатерина ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.duo .lead { margin: 18px 0 26px; }
.qa { background: var(--mist); border-radius: var(--radius); padding: 14px 28px; }
.qa div { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 19px; letter-spacing: -.01em; }
.qa div:last-child { border-bottom: 0; }
.portrait { aspect-ratio: 4 / 5; border-radius: var(--radius); background: #e8e8ed; display: grid; place-items: center; max-width: 420px; }
.quote { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -.018em; font-weight: 500; margin: 0 0 22px; }
img.portrait { display: block; width: 100%; height: auto; object-fit: cover; background: #d9d9de; }
.team h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 24px; }
.team .quote { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.4; margin: 0 0 14px; }
.team .quote-more { font-size: 17px; line-height: 1.55; margin: 0 0 24px; text-wrap: pretty; }

/* ---------- Цена ---------- */
.price { text-align: center; }
.price-box { margin: 30px auto 0; max-width: 520px; background: var(--mist); border-radius: var(--radius); padding: 34px 30px; }
.price-sum { font-size: clamp(40px, 6vw, 64px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.price-box p { margin: 12px 0 0; color: var(--ink-2); }

/* ---------- Заявка ---------- */
.form { max-width: 560px; margin: 0 auto; background: var(--paper); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 20px; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 600; margin: 0 0 7px; padding: 0; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 13px; padding: 0 15px; background: #fff; font-size: 17px; }
.field input:focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 3px rgba(0, 0, 0, .1); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--mist); border-radius: 13px; padding: 3px; }
.seg label { margin: 0; font-weight: 500; font-size: 15px; text-align: center; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { display: block; margin: -10px -6px; padding: 10px 6px; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.seg input:focus-visible + span { outline: 3px solid #0071e3; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.form .btn { width: 100%; height: 54px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-size: 15px; }
.form-msg.bad { color: var(--alert); }
.form-alt { text-align: center; margin: 22px 0 0; color: var(--ink-2); }

/* ---------- Подвал ---------- */
.foot { padding: 34px 0 54px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; }
.foot a { color: var(--ink-2); text-underline-offset: 3px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- Текстовые страницы: клиенту, политика ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) 22px clamp(64px, 9vw, 112px); }
.doc h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.07; }
.doc .lead { margin: 20px 0 0; }
.doc h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; letter-spacing: -.02em; margin: 48px 0 12px; }
.doc p, .doc li { margin: 0 0 12px; text-wrap: pretty; }
.doc ul { padding-left: 22px; margin: 0 0 12px; }
.doc .answer { font-size: 19px; line-height: 1.45; }
.doc .note { background: var(--mist); border-radius: 20px; padding: 22px 24px; margin-top: 44px; }
.doc .note p:last-child { margin-bottom: 0; }
.tablewrap { overflow-x: auto; margin: 0 0 16px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--mist); border-radius: 16px; overflow: hidden; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
  .scene { grid-template-columns: minmax(0, 1fr); }
  .t-4, .t-3, .t-2 { grid-column: span 3; }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 320px; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .t-4, .t-3, .t-2 { grid-column: span 6; }
  .tile { min-height: 0; padding: 26px 22px 0; }
  .bento { gap: 14px; }
  .pane { padding: 20px 18px; border-radius: 22px; }
  .path { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .path li { padding: 0 0 26px 30px; }
  .path li::before { top: 6px; bottom: -6px; left: 6px; right: auto; width: 1px; height: auto; }
  .path li:last-child::before { display: none; }
  .path li::after { top: 4px; }
  .phone { width: 318px; }
  .qa div { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bars span { animation: none; height: 50%; }
  .bars span:nth-child(odd) { height: 80%; }
  mark[data-q] { transition: none; }
  .scene.js [data-step] { transition: none; }
}
