/* AI Retention v3 · основа: цвета, типографика, шапка, первый экран, заявка */
:root {
  --font-d: 'Geologica', 'Golos Text', system-ui, sans-serif;
  --font-t: 'Golos Text', system-ui, sans-serif;
  --font-h: 'Pangolin', 'Golos Text', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --top-h: 66px;
}
/* 1 · Аква */
body[data-theme="1"] {
  --bg: #F2F8F8; --surface: #FFFFFF; --field: #D3EEEC; --field-2: #E8F5F4; --deep: #0D2E33;
  --ink: #0F1D21; --ink-2: #3D4F53; --ink-3: #4F6266; --line: #D2E3E2;
  --accent: #0B6B70; --accent-hover: #0F7B81; --accent-2: #8BD3CE; --on-accent: #FFFFFF; --glow: 205, 240, 238;
  --ok: #1B7550; --err: #A8262E; --g1: #0B6B70; --g2: #2F7FC4; --g3: #1B7550; --g4: #66788C; --shadow: 15, 70, 75;
}
/* 2 · Лёд */
body[data-theme="2"] {
  --bg: #F3F7FC; --surface: #FFFFFF; --field: #D8E7F7; --field-2: #EAF2FB; --deep: #0F1E33;
  --ink: #0F1A2A; --ink-2: #3E4C5F; --ink-3: #536177; --line: #D3DEEB;
  --accent: #1D4E89; --accent-hover: #255A9B; --accent-2: #9CC2EC; --on-accent: #FFFFFF; --glow: 220, 233, 250;
  --ok: #1B7550; --err: #A8262E; --g1: #1D4E89; --g2: #3D8BD9; --g3: #1B7550; --g4: #66788C; --shadow: 20, 50, 100;
}
/* 3 · Платина */
body[data-theme="3"] {
  --bg: #F5F5F7; --surface: #FFFFFF; --field: #E2E4EA; --field-2: #EFF0F3; --deep: #16191F;
  --ink: #14161B; --ink-2: #464B56; --ink-3: #5A5F6B; --line: #DBDDE3;
  --accent: #39414F; --accent-hover: #454E5E; --accent-2: #B4BCC9; --on-accent: #FFFFFF; --glow: 236, 238, 243;
  --ok: #1B7550; --err: #A8262E; --g1: #39414F; --g2: #5B7BB5; --g3: #1B7550; --g4: #8A93A3; --shadow: 30, 35, 50;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); scrollbar-color: var(--accent-2) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font-t); -webkit-font-smoothing: antialiased; transition: background-color .4s var(--ease); overflow-x: hidden; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

.h1 { font: 700 clamp(42px, 5.4vw, 80px)/1.0 var(--font-d); letter-spacing: -0.035em; margin: 0; text-wrap: balance; max-width: 11ch; }
.h2 { font: 650 clamp(32px, 4vw, 54px)/1.04 var(--font-d); letter-spacing: -0.03em; margin: 0 0 28px; text-wrap: balance; }
.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 31em; margin: 24px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px; font: 600 17px/1 var(--font-t); text-decoration: none; cursor: pointer; border: 0; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.btn-fill { background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 26px -12px rgba(var(--shadow), .6), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-fill:hover { background: var(--accent-hover); }
.btn-fill:active { transform: scale(.98); }
.btn-naked { background: none; padding: 0 4px; color: var(--ink); }
.btn-naked:hover .arr { transform: translateX(4px); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn-lg { min-height: 60px; padding: 0 34px; font-size: 18px; }
.arr { width: 20px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }

/* Шапка */
/* плавная прокрутка - только после загрузки: иначе браузер возвращает место после перезагрузки «поездкой» сверху (09.11) */
html.ready { scroll-behavior: smooth; }
.top { position: sticky; top: 0; z-index: 50; height: var(--top-h); background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.top.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.top-in { height: 100%; max-width: 1220px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand-mark svg { display: block; height: 17px; width: auto; }
.brand-product { font: 600 15px/1 var(--font-d); padding-left: 14px; border-left: 1px solid var(--line); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { font-size: 15px; color: var(--ink-2); text-decoration: none; padding: 8px 0; }
.nav a:hover { color: var(--ink); }
.neo-switch { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 6px 4px; border-radius: 999px; font-size: 15px; color: var(--ink-2); position: relative; }
.neo-switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background-color .25s var(--ease); }
.neo-switch-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--ease-out); }
.neo-switch[aria-pressed="true"] .neo-switch-track { background: var(--accent); }
.neo-switch[aria-pressed="true"] .neo-switch-knob { transform: translateX(16px); }
.neo-switch.attn::after { content: ""; position: absolute; inset: -6px -8px; border-radius: 999px; box-shadow: 0 0 0 2px var(--accent); animation: attn 1.1s var(--ease) 3; pointer-events: none; }
@keyframes attn { 0% { opacity: 0; transform: scale(.9); } 40% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }

.rv { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* 1 · Первый экран */
.hero { position: relative; isolation: isolate; padding: clamp(28px, 5vh, 64px) 0 clamp(64px, 9vh, 112px); background: linear-gradient(180deg, var(--field) 0%, var(--field-2) 62%, var(--bg) 100%); overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 1000px; height: 1000px; right: -260px; top: -320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.9), rgba(255,255,255,.4) 45%, rgba(255,255,255,0) 72%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.fit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; margin: 26px 0 0; max-width: 34em; font-size: 16px; }
.fit-l { color: var(--ink-3); margin-right: 10px; }
.fit button { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-2); transition: color .2s; }
.fit button:not(:last-child)::after { content: "·"; padding: 0 8px; color: var(--ink-3); }
.fit button:hover, .fit button[aria-selected="true"] { color: var(--accent); }
.fit button[aria-selected="true"] { font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.partner { position: relative; display: inline-flex; align-items: center; gap: 18px; margin-top: 40px; padding: 16px 22px; background: var(--surface); border-radius: 20px; box-shadow: 0 18px 40px -24px rgba(var(--shadow), .45); overflow: hidden; }
.partner-logo svg { display: block; height: 26px; width: auto; color: var(--ink); }
.partner-text { font-size: 15px; color: var(--ink-2); max-width: 15em; line-height: 1.35; padding-left: 18px; border-left: 1px solid var(--line); }
.partner::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(var(--glow), .9), transparent); transform: skewX(-18deg); }
.partner.in::after { animation: shine 1.4s var(--ease) .5s 1 forwards; }
@keyframes shine { to { left: 130%; } }

.stage { position: relative; justify-self: end; width: 100%; max-width: 560px; }
.photos { position: relative; width: 84%; margin-left: auto; aspect-ratio: 4 / 5; max-height: calc(100svh - var(--top-h) - 120px); border-radius: 36px; overflow: hidden; background: var(--field); box-shadow: 0 60px 100px -50px rgba(var(--shadow), .6); }
.photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease), transform 1.6s var(--ease-out); }
.photos img.is-on { opacity: 1; transform: none; }
.photo-tag { position: absolute; left: 16px; right: 16px; top: 16px; width: max-content; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 14px; font-size: 14px; color: var(--ink); background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .3s; }
.float { position: absolute; background: var(--surface); border-radius: 20px; box-shadow: 0 24px 50px -24px rgba(var(--shadow), .55), 0 1px 3px rgba(var(--shadow), .08); opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.float.show { opacity: 1; transform: none; }
.f-client { left: -4%; top: 12%; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; }
.ava { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--accent); font: 650 18px/1 var(--font-d); }
.fc-txt { display: flex; flex-direction: column; line-height: 1.25; }
.fc-txt b { font-size: 16px; }
.fc-txt span { font-size: 14px; color: var(--ink-3); }
.f-msg { left: -10%; top: 33%; width: min(330px, 76%); padding: 13px 16px 10px; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 7px; font-size: 15.5px; line-height: 1.42; }
.msg-meta { display: inline-flex; align-items: center; gap: 4px; float: right; margin: 6px 0 0 10px; font-size: 12.5px; opacity: .85; }
.ticks { width: 17px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.f-reply { left: 22%; top: 60%; padding: 12px 16px; font-size: 15.5px; border-bottom-left-radius: 7px; }
.f-ok { left: 2%; bottom: 9%; display: flex; align-items: center; gap: 10px; padding: 13px 18px; font: 600 16px/1.2 var(--font-t); color: var(--ok); }
.f-ok svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Заявка */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10, 20, 24, .46); opacity: 0; transition: opacity .3s var(--ease); }
.modal.open { opacity: 1; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(640px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--surface); border-radius: 28px; padding: clamp(24px, 4vw, 40px); transform: translateY(16px) scale(.985); transition: transform .4s var(--ease-out); box-shadow: 0 40px 90px -30px rgba(0,0,0,.45); }
.modal.open .modal-card { transform: none; }
.modal-x { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--field-2); cursor: pointer; display: grid; place-items: center; }
.modal-x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.modal-h { font: 650 clamp(26px, 3vw, 34px)/1.1 var(--font-d); letter-spacing: -0.025em; margin: 0 48px 8px 0; }
.modal-sub { color: var(--ink-2); margin: 0 0 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.fld input, .fld textarea { font: 400 17px/1.4 var(--font-t); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; min-height: 52px; resize: vertical; transition: border-color .2s; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--accent); }
.fld input[aria-invalid="true"] { border-color: var(--err); }
.chips { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.chips button { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 15px; transition: border-color .2s, color .2s, background-color .2s; }
.chips button:hover { border-color: var(--accent-2); }
.chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--field-2); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 4px 0 14px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.err { color: var(--err); font-size: 15px; margin: 0 0 12px; min-height: 0; }
.err:empty { display: none; }
.send { width: 100%; }
.send[disabled] { opacity: .6; cursor: progress; }
.done { text-align: center; padding: 20px 0 8px; }
.done svg { width: 64px; height: 64px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 14px; }
.done .modal-h { margin-right: 0; }
.done .modal-sub { margin: 0; }

/* Выбор цвета - только для просмотра */
.pick { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: flex; align-items: center; gap: 6px; background: var(--surface); padding: 6px 8px 6px 14px; border-radius: 999px; box-shadow: 0 10px 30px -14px rgba(var(--shadow), .5), 0 0 0 1px var(--line); font-size: 13px; color: var(--ink-2); }
.pick button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--field-2); cursor: pointer; font-weight: 600; font-size: 13px; }
.pick button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* Первый экран: телефон администратора - план на сегодня из базы */
.device { position: relative; width: min(340px, 100%); margin-left: auto; margin-right: 6%; background: var(--surface); border-radius: 46px; padding: 16px 16px 18px;
  box-shadow: 0 0 0 9px #fff, 0 0 0 10px var(--line), 0 70px 110px -50px rgba(var(--shadow), .6); }
.dv-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 14px 10px; font: 600 13px/1 var(--font-t); color: var(--ink); }
.dv-bar i { width: 74px; height: 20px; border-radius: 12px; background: var(--ink); margin-right: 34%; }
.dv-head { padding: 4px 6px 12px; }
.dv-head b { display: block; font: 700 22px/1.1 var(--font-d); letter-spacing: -0.02em; }
.dv-head span { font-size: 13px; color: var(--ink-3); }
.dv-sum { display: flex; align-items: center; gap: 12px; margin: 0 2px 12px; padding: 14px 16px; border-radius: 20px; background: var(--field); }
.dv-sum b { font: 700 34px/1 var(--font-d); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dv-sum span { font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.dv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dv-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 18px; background: var(--field-2);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease-out); animation: rowIn .5s var(--ease-out) both; }
.dv-row:nth-child(2) { animation-delay: .06s; } .dv-row:nth-child(3) { animation-delay: .12s; } .dv-row:nth-child(4) { animation-delay: .18s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dv-ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); font: 650 16px/1 var(--font-d); box-shadow: inset 0 0 0 2px var(--c); }
.dv-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dv-who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-who span { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-act { font: 600 13px/1 var(--font-t); color: var(--accent); padding: 8px 11px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--accent-2); white-space: nowrap; transition: all .35s var(--ease); }
.dv-row.active { background: var(--surface); box-shadow: 0 14px 30px -18px rgba(var(--shadow), .55), inset 0 0 0 2px var(--accent); transform: scale(1.02); }
.dv-row.active .dv-act { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.dv-row.done .dv-act { background: var(--ok); color: #fff; }
.dv-note { margin: 12px 4px 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.stage .f-msg { left: -6%; top: 40%; width: min(310px, 70%); }
.stage .f-reply { left: 4%; top: 64%; }
.stage .f-ok { left: -2%; top: auto; bottom: 8%; }
@media (max-width: 760px) {
  .device { margin: 0 auto; width: min(330px, 100%); }
  .stage .f-msg { left: 0; top: auto; bottom: 26%; width: 82%; }
  .stage .f-reply { left: auto; right: 0; top: auto; bottom: 14%; }
  .stage .f-ok { left: 4px; bottom: 2%; }
}

/* «и не только!» - рукописная пометка и стрелка к кнопке заявки */
.hero-copy { position: relative; }
.fit-more { font: 400 21px/1 var(--font-h); color: var(--accent); margin-left: 10px; transform: rotate(-4deg); display: inline-block; white-space: nowrap; }
.scribble { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#scribblePath { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
.scribble.draw #scribblePath { transition: stroke-dashoffset 1.1s cubic-bezier(.6,.05,.3,1) .4s; stroke-dashoffset: 0; }
#scribbleHead { opacity: 0; }
.scribble.draw #scribbleHead { transition: opacity .2s 1.45s; opacity: 1; }
.arr-down { transform: rotate(90deg); }
.btn-naked:hover .arr-down { transform: rotate(90deg) translateX(3px); }
/* сообщения левее телефона - меньше закрывают список */
@media (min-width: 1021px) {
  .device { margin-right: 0; }
  .stage .f-msg { left: -14%; top: 42%; width: min(300px, 64%); }
  .stage .f-reply { left: -4%; top: 66%; }
  .stage .f-ok { left: -10%; bottom: 7%; }
}
@media (max-width: 760px) { .dv-who span { white-space: normal; } }
.hero-actions { margin-top: 46px; }
.fit-more { margin-left: 8px; }
