:root {
  --ink: #142033;
  --muted: #556277;
  --paper: #f3f0e8;
  --paper-2: #e7e1d6;
  --white: #fffcf8;
  --line: rgba(20, 32, 51, 0.12);
  --blue: #1d5fbf;
  --blue-deep: #0e3f86;
  --navy: #10192b;
  --free: #17693f;
  --free-bg: #e4f6eb;
  --queue: #8d5600;
  --queue-bg: #fff0d2;
  --busy: #9a341f;
  --busy-bg: #fde7e2;
  --shadow: 0 24px 60px rgba(16, 25, 43, 0.1);
  --header: 78px;
  --dock: 74px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(29, 95, 191, 0.12), transparent 60%),
    var(--paper);
  line-height: 1.5;
}
body.is-lock { overflow: hidden; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, .price, .contact__phone { font-family: var(--display); letter-spacing: -0.04em; }
h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.02; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 600; }
h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.03em; }

.wrap { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lead { max-width: 640px; color: var(--muted); font-size: 18px; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  background: rgba(243, 240, 232, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header__bar, .footer__grid, .hero__grid, .split, .admin-layout { display: grid; }
.header__bar {
  height: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}
.logo img { height: 34px; width: auto; display: block; }
.nav { display: flex; justify-content: center; gap: 6px; }
.nav a {
  text-decoration: none;
  font-weight: 750;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a[aria-current="page"], .nav a:hover { background: #fff; }
.header__phone, .phone-fab, .btn, .footer__contact, .dock__btn, .sortbar button, .switch button, .list button {
  border: 0;
  background: transparent;
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}
.header__phone svg, .phone-fab svg, .btn svg, .dock__btn svg { width: 18px; height: 18px; }
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero { padding: 28px 0 10px; }
.hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 42px; align-items: center; }
.hero__actions, .contact__actions, .card__foot, .editor__row, .admin-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero__actions { margin-top: 26px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.facts article, .card, .service, .quote, .contact, .sheet, .login, .editor, .list button {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.facts article { padding: 16px 16px 14px; }
.facts strong { display: block; font-family: var(--display); font-size: 28px; letter-spacing: -0.04em; }
.facts span, .meta, .specs, .card__text, .service p, .sheet__text, .footer, .note { color: var(--muted); }

.frame, .slider__viewport { aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; background: #d5deea; }
.hero__visual { position: relative; }
.hero__visual img, .slider__img, .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: 240px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(16, 25, 43, 0.88);
  color: #fff;
  text-decoration: none;
}
.hero__note b { display: block; margin-top: 2px; }

.section { padding: 64px 0; }
.section__head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 22px; }
.section__head a { font-weight: 800; color: var(--blue-deep); }

.cards, .services, .admin-photos { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.services { grid-template-columns: repeat(3, 1fr); }
.card, .service { overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.card { cursor: pointer; }
.card__media .slider__viewport, .card__media .frame { aspect-ratio: 16 / 10; border-radius: 0; }
.card__body, .service__body, .sheet__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; justify-content: space-between; }
.card__more { font-weight: 800; color: var(--blue-deep); }
.card:hover { transform: translateY(-3px); transition: transform .25s ease; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}
.tag.is-free { color: var(--free); background: var(--free-bg); }
.tag.is-queue { color: var(--queue); background: var(--queue-bg); }
.tag.is-busy { color: var(--busy); background: var(--busy-bg); }
.tag.is-heat { color: #0f4ea8; background: #e7eefb; }
.tag.is-cold { color: #5d5348; background: #f3eee7; }

.price { font-size: 22px; font-weight: 600; }
.price span { display: block; margin-top: 2px; font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.meta, .specs { display: grid; gap: 8px; margin: 0; }
.meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meta div, .specs div { min-width: 0; }
.meta dt, .specs dt { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.meta dd, .specs dd { margin: 2px 0 0; color: var(--ink); font-weight: 700; }
.specs { grid-template-columns: 1fr 1fr; }
.specs div { padding-top: 8px; border-top: 1px solid var(--line); }

.slider { position: relative; }
.slider__viewport { position: relative; }
.slider__img { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.slider__img.is-active { opacity: 1; }
.slider__nav, .icon-x {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.92);
  color: var(--ink);
}
.slider__nav svg { width: 22px; height: 22px; }
.slider__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.slider__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }
.slider__dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.slider__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.55); }
.slider__dot.is-active { width: 22px; background: #fff; }
.slider__count {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 25, 43, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.frame--empty {
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(160deg, rgba(29, 95, 191, 0.16), transparent 42%),
    linear-gradient(180deg, #f7f4ee, #e4ebf5);
}
.slider--sheet .slider__viewport, .sheet__media .frame { aspect-ratio: 4 / 3; border-radius: 0; }
.slider--lightbox .slider__viewport { aspect-ratio: 16 / 10; background: transparent; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); }
.btn--ghost { background: #fff; border: 1px solid var(--line); }
.btn--small { min-height: 40px; padding: 0 14px; }
.btn--danger { background: var(--busy-bg); color: var(--busy); }

.quote {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 20px;
  padding: 28px;
  background: var(--navy);
  color: #fff;
  border: 0;
}
.quote p { font-size: clamp(24px, 3vw, 36px); font-family: var(--display); letter-spacing: -0.04em; line-height: 1.15; }
.split { grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.checklist { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li:before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }

.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 16px 36px 16px 0; list-style: none; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:after { content: "+"; position: absolute; right: 0; top: 14px; font-family: var(--display); }
.faq__item[open] summary:after { content: "–"; }
.faq__item p { margin: 0 0 16px; color: var(--muted); max-width: 760px; }

.page-head { padding: 34px 0 8px; }
.page-head p { margin-top: 10px; }
.sortbar {
  position: sticky;
  top: var(--header);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 0;
  background: rgba(243, 240, 232, 0.92);
  backdrop-filter: blur(12px);
}
.sortbar button { min-width: 0; }
.sortbar button, .switch button {
  min-height: 44px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}
.sortbar button.is-active, .switch button.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.object-count { margin: 8px 0 16px; color: var(--muted); font-weight: 700; }

.footer { padding: 42px 0 28px; border-top: 1px solid var(--line); }
.footer__grid { grid-template-columns: 1.4fr .8fr .8fr; gap: 24px; }
.footer a, .footer__contact { display: block; padding: 4px 0; text-decoration: none; font-weight: 700; }
.footer__label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.footer__bottom a { color: var(--muted); }

.phone-fab {
  position: fixed;
  z-index: 46;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 16px 40px rgba(29, 95, 191, 0.35);
  font-weight: 800;
}
.phone-fab small { display: block; font-weight: 700; opacity: .8; font-size: 12px; }
.dock {
  display: none;
  position: fixed;
  z-index: 45;
  left: 0; right: 0; bottom: 0;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 248, 0.96);
  border-top: 1px solid var(--line);
}
.dock__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.dock__btn.is-active, .dock__btn:last-child { background: var(--navy); color: #fff; }

.layer { display: none; position: fixed; inset: 0; z-index: 80; }
.layer.is-open { display: grid; place-items: end center; }
#object-sheet, #lightbox { place-items: center; padding: 22px; }
.layer__backdrop { position: absolute; inset: 0; background: rgba(16, 25, 43, 0.62); }
.contact, .sheet, .lightbox { position: relative; z-index: 1; width: min(460px, 100%); padding: 22px 22px 26px; }
.contact__phone { font-size: 34px; margin: 8px 0 16px; }
.contact__lead, .contact__mail { color: var(--muted); }
.contact__actions { display: grid; }
.contact__actions .btn { width: 100%; }
.sheet { width: min(1080px, 100%); max-height: min(900px, calc(100vh - 44px)); overflow: auto; padding: 0; display: grid; grid-template-columns: 1.15fr .85fr; }
.sheet__body { padding: 26px 22px 22px; }
.sheet__text { color: var(--muted); }
.lightbox { width: min(1100px, 100%); padding: 12px; background: transparent; border: 0; box-shadow: none; }
.icon-x { top: 14px; right: 14px; font-size: 28px; line-height: 1; }

.admin-body { background: #eef1f6; }
.admin-top, .login-wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login, .editor { padding: 22px; }
.login { width: min(440px, 100%); }
.login h1 { font-size: 34px; margin-bottom: 8px; }
.field { display: grid; gap: 6px; margin-top: 14px; font-weight: 800; }
.field span { font-size: 13px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29, 95, 191, 0.15); }
.admin-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 0; }
.admin-layout { width: min(1180px, calc(100% - 28px)); margin: 0 auto; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; padding-bottom: 40px; }
.list b, .list small { display: block; }
.login .btn { margin-top: 16px; }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.list { display: grid; gap: 8px; }
.list button { text-align: left; padding: 10px; display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; }
.list button.is-active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 95, 191, 0.15); }
.list img, .list .ph { width: 54px; height: 42px; object-fit: cover; border-radius: 10px; background: #e4ebf5; }
.list small, .hint, .error { color: var(--muted); font-weight: 650; }
.error { color: var(--busy); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}
.heat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}
.heat input { width: 46px; height: 26px; accent-color: var(--blue); }
.admin-photos { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photo { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo img { aspect-ratio: 4 / 3; }
.photo__bar { display: flex; }
.photo__bar button { flex: 1; min-height: 36px; border: 0; background: #f4f7fb; font-weight: 800; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; max-height: 240px; overflow: auto; }
.library button { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.library img { height: 72px; width: 100%; object-fit: cover; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  transition: .25s ease;
  z-index: 90;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { padding: 24px; background: #fff; border-radius: 20px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: #c9dbff; }

@media (max-width: 980px) {
  .hero__grid, .cards, .services, .facts, .quote, .split, .footer__grid, .admin-layout, .sheet { grid-template-columns: 1fr; }
  .cards, .facts { grid-template-columns: 1fr 1fr; }
  .frame, .slider--hero .slider__viewport, .hero__visual .frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
  .wrap { width: min(1180px, calc(100% - 28px)); }
  .nav-toggle { display: inline-block; order: 2; }
  .header__bar { grid-template-columns: 1fr auto auto; }
  .header__phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .header__phone { width: 46px; padding: 0; justify-content: center; }
  .nav {
    display: none;
    position: fixed;
    z-index: 49;
    inset: var(--header) 0 var(--dock) 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px 20px;
    overflow: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 24px; padding: 14px 4px; border-radius: 12px; }
  .phone-fab { display: none; }
  .dock { display: grid; }
  .cards, .services { grid-template-columns: 1fr; }
  .sortbar, .meta { grid-template-columns: 1fr 1fr; }
  .sortbar { grid-template-columns: 1fr 1fr; }
  .section { padding: 42px 0; }
  .section__head, .footer__bottom, .admin-top { align-items: stretch; flex-direction: column; }
  #object-sheet, #lightbox { padding: 0; }
  .sheet { max-height: 100vh; height: 100%; border-radius: 0; }
  .contact { border-radius: 24px 24px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .admin-body { padding-bottom: 20px; }
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .field--wide, .stack { grid-column: 1 / -1; }
.list button { background: #fff; }
#library[hidden] { display: none !important; }
@media (min-width: 761px) {
  #contact-layer.is-open { place-items: center; padding: 22px; }
}
@media (max-width: 760px) {
  body:not(.admin-body) { padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slider__img, .card, .toast { transition: none; }
}
