/* LoService — фирменный стиль по брендбуку:
   индиго #322E7A · лёд #D0DFF3 · белый · акценты маскота (оранжевый, голубой, сливовый) · ёлочный паттерн */
:root {
  --indigo: #322E7A;
  --indigo-2: #4A44A8;
  --indigo-3: #242058;
  --ice: #D0DFF3;
  --ice-2: #E6EEF9;
  --ice-3: #F4F8FD;
  --orange: #F5A000;
  --orange-2: #FFB82E;
  --sky: #7CC4FA;
  --plum: #8B6493;
  --green: #1E9E6A;
  --red: #D9534F;
  /* Те же оттенки для ТЕКСТА: контраст к белому и ледяному фону не ниже 4.5:1 (сами --green/--red/--orange — для фона, точек и иконок) */
  --green-text: #147A51;
  --red-text: #B5322E;
  --amber-text: #8A5A00;

  --bg: #EDF3FB;
  --text: #322E7A;
  --text-2: #4B4790;
  /* Контраст к светлому фону: muted 5.2:1, faint 4.6:1 — выше нормы 4.5:1 */
  --muted: rgba(50, 46, 122, .78);
  --faint: rgba(50, 46, 122, .74);
  --field: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7FAFE;
  --stroke: rgba(50, 46, 122, .12);
  --stroke-2: rgba(50, 46, 122, .22);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  /* Две ступени высоты: спокойная карточка и поднятый элемент */
  --shadow-1: 0 1px 2px rgba(50, 46, 122, .05), 0 10px 22px -16px rgba(50, 46, 122, .5);
  --shadow-2: 0 18px 44px -22px rgba(50, 46, 122, .34), 0 2px 6px rgba(50, 46, 122, .06);
  --shadow: var(--shadow-2);
  --section-gap: clamp(64px, 7.5vw, 104px);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --slab: 'Roboto Slab', Georgia, serif;
  --mono: 'Onest', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
/* Атрибут hidden прячет элемент, даже если у его класса задан display */
[hidden] { display: none !important; }
/* <picture> только выбирает формат файла — в раскладке участвует сама картинка */
picture { display: contents; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; font-weight: 800; }
/* Брусковый шрифт логотипа — и в крупных заголовках */
h1, h2 { font-family: var(--slab); letter-spacing: -.015em; line-height: 1.08; }
p { margin: 0; }
::selection { background: rgba(245, 160, 0, .3); }

/* ---------- Фон: светлый лёд + ёлочный паттерн ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(255, 255, 255, .95), transparent 60%),
    radial-gradient(800px 600px at -10% 40%, rgba(208, 223, 243, .9), transparent 60%),
    linear-gradient(180deg, #F1F6FC 0%, #E3ECF8 100%);
}
.bg::after { content: ""; position: absolute; inset: 0; opacity: .2; background-image: url("../img/trees.svg"); background-size: 532px auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 60%); }
.orb { display: none; }

/* Видимый фокус для клавиатуры — контур поверх любых теней кнопок */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 10px;
}
.panel-indigo a:focus-visible, .panel-indigo button:focus-visible, .footer a:focus-visible, .side a:focus-visible, .side button:focus-visible { outline-color: var(--orange-2); }
.btn-accent:focus-visible { outline-color: var(--indigo-3); }

/* ---------- Поверхности ----------
   .glass — спокойная белая карточка (текст на ней читается лучше, чем на полупрозрачной);
   .glass.floating — «парящий» элемент поверх картинки: полупрозрачность и размытие. */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.glass.floating {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-2), 0 0 0 1px var(--stroke);
}


/* Индиго-панель с ёлками, как фирменная кружка и стойка ресепшена */
.panel-indigo { position: relative; color: #fff; background-color: var(--indigo); background-image: url("../img/trees-indigo.svg"); background-size: 532px auto;
  border-radius: var(--r-lg); box-shadow: 0 24px 60px -28px rgba(50, 46, 122, .75); }
.panel-indigo .muted { color: rgba(255, 255, 255, .84); }
.panel-indigo .faint { color: rgba(255, 255, 255, .7); }

/* ---------- Бренд ---------- */
.mark { position: relative; display: inline-grid; place-items: center; width: var(--s, 40px); height: var(--s, 40px); flex: none;
  border-radius: 50%; background: var(--ice); box-shadow: inset 0 0 0 2px #fff, 0 4px 12px -4px rgba(50, 46, 122, .35); overflow: hidden; }
.mark img { width: 92%; height: 92%; object-fit: contain; transform: translateY(8%); }
.wordmark { font-family: var(--slab); font-weight: 800; letter-spacing: -.01em; color: var(--indigo); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .wordmark { font-size: 22px; line-height: 1; }
.brand small { display: block; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 5px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; font-weight: 700; font-size: 14px;
  white-space: nowrap; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, opacity .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--indigo); box-shadow: 0 10px 24px -12px rgba(50, 46, 122, .8); }
.btn-primary:hover { background: var(--indigo-2); }
.btn-accent { color: var(--indigo-3); background: linear-gradient(180deg, var(--orange-2), var(--orange)); box-shadow: 0 10px 24px -12px rgba(245, 160, 0, .9); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-glass { color: var(--indigo); background: #fff; border-color: var(--stroke-2); }
.btn-glass:hover { background: #fff; border-color: var(--indigo); }
.btn-ghost { color: var(--muted); border-color: var(--stroke-2); }
.btn-ghost:hover { color: var(--indigo); border-color: var(--indigo); }
.btn.danger { color: var(--red-text); border-color: rgba(217, 83, 79, .45); }
.btn.danger:hover { background: rgba(217, 83, 79, .08); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--stroke); color: var(--indigo); transition: .2s; flex: none; }
.icon-btn:hover { border-color: var(--indigo); }
.i { flex: none; }

/* На сенсорных экранах любая кнопка — не меньше 44px, как требуют iOS и Android */
@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .icon-btn, .nav .icon-btn { width: 44px; height: 44px; }
  .link-btn, .link { min-height: 44px; display: inline-flex; align-items: center; }
  /* Шрифт в поле меньше 16px — и iPhone сам приближает страницу при вводе */
  .input, .select, .textarea { font-size: 16px; }
  .check { min-height: 44px; }
}

/* ---------- Формы ---------- */
.field { display: grid; gap: 7px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; outline: none;
  background: var(--field); border: 1px solid var(--stroke-2); color: var(--indigo);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23322E7A' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input::placeholder, .textarea::placeholder { color: rgba(50, 46, 122, .7); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(124, 196, 250, .35); }
.input:disabled { background: var(--ice-3); color: var(--muted); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red-text); box-shadow: 0 0 0 4px rgba(217, 83, 79, .16); }
.field-err { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--red-text); }
.field-err .i { margin-top: 1px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text-2); font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--indigo); }

/* ---------- Мелочи ---------- */
.pill { --c: var(--indigo); display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--c);
  color: color-mix(in srgb, var(--c) 55%, var(--indigo-3));
  background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); }
.pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: var(--ice-2); border: 1px solid var(--stroke); color: var(--text-2); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--amber-text); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--indigo-2); }
.eyebrow::before { content: ""; width: 12px; height: 14px; flex: none; background: var(--orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 48'%3E%3Cpath d='M20 0 L28.5 15 H24.5 L33 30 H28 L38 48 H2 L12 30 H7 L15.5 15 H11.5 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 48'%3E%3Cpath d='M20 0 L28.5 15 H24.5 L33 30 H28 L38 48 H2 L12 30 H7 L15.5 15 H11.5 Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.panel-indigo .eyebrow { color: var(--ice); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--stroke-2); }

/* ---------- Тосты и модалки ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: grid; gap: 10px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 14px;
  color: #fff; background: var(--indigo); box-shadow: 0 18px 40px -16px rgba(50, 46, 122, .7); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast .i { color: #7CE0B3; flex: none; }
.toast.warn .i { color: var(--orange-2); }
.toast.err .i { color: #FF9C98; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.modal-back { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px;
  background: rgba(36, 32, 88, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px; background: rgba(255, 255, 255, .97); animation: pop .3s cubic-bezier(.2, .9, .3, 1.15); }
.modal:focus { outline: none; border-radius: var(--r-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.modal-head h2, .modal-head h3 { font: 800 20px/1.2 var(--font); letter-spacing: -.02em; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* Без JS (или если наблюдатель не сработал) содержимое видно — прятать его нечем */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s cubic-bezier(.2, .8, .2, 1), transform .5s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Шкала статуса ремонта ---------- */
.stepper { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); container-type: inline-size; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--faint); min-width: 0; }
.stepper li span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ice); background: #fff; z-index: 1; font-style: normal; font-size: 12px; color: var(--faint); }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--ice); }
.stepper li.done { color: var(--text-2); }
.stepper li.done i { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.stepper li.done::after { background: var(--indigo); }
.stepper li.now { color: var(--indigo); }
.stepper li.now i { background: var(--orange); border-color: var(--orange); color: var(--indigo-3); box-shadow: 0 0 0 6px rgba(245, 160, 0, .2); }
@container (max-width: 520px) {
  .stepper li:not(.now) span { display: none; }
  .stepper li.now span { overflow: visible; }
  .stepper li:first-child.now span { justify-self: start; }
  .stepper li:last-child.now span { justify-self: end; }
}
.stepper.ghost { opacity: .5; filter: saturate(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Сайт на обслуживании ---------- */
.maint { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.maint-card { position: relative; width: min(560px, 100%); display: grid; justify-items: center; gap: 14px; padding: 36px 28px 30px; border-radius: var(--r-lg); text-align: center; }
.maint-moose { width: 150px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 16px 24px rgba(50, 46, 122, .18)); }
.maint-card h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; }
.maint-card p { max-width: 440px; }
.maint-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.maint-brand { margin-top: 6px; font-size: 18px; opacity: .55; }
body.is-maint { overflow: hidden; }
body.is-maint > .maint-layer { position: fixed; inset: 0; z-index: 200; overflow: auto; background: var(--bg); }

/* ---------- Уведомление о cookie ---------- */
.cookie-note { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 150; width: min(440px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-2); font-size: 13.5px; color: var(--text-2); }
.cookie-note p { flex: 1; }
.cookie-note a { color: var(--indigo-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) { body[data-app="client"]:has(.cl-bottom) .cookie-note { bottom: calc(86px + env(safe-area-inset-bottom)); } }

/* Галочка согласия: текст со ссылками рядом, сама галочка крупная */
.check.consent { align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.check.consent input { margin-top: 1px; flex: none; }
.check.consent a { color: var(--indigo-2); text-decoration: underline; text-underline-offset: 3px; }
.panel-indigo .check.consent, .panel-indigo .check.consent a { color: inherit; }
