/* Sadia Nails — молочная база, сливовый акцент, антиква Spectral + гротеск Commissioner.
   Ничего из палитры и шрифтов предыдущих клиентов вертикали (Хакимова — тёмное с золотом,
   Dilafruz — Cormorant, San'atbek — Playfair+Manrope). */

@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../assets/fonts/spectral-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Commissioner";
  src: url("../assets/fonts/commissioner.woff2") format("woff2-variations"),
       url("../assets/fonts/commissioner.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbf7f4;
  --paper-2: #f4ebe4;
  --paper-3: #efe3da;
  --ink: #241820;
  --ink-2: #6d5a62;
  --ink-3: #766169;  /* AA на молочном и на кремовом: 5.35 и 4.85 */
  --plum: #6e2a45;
  --plum-deep: #4c1a2e;
  --plum-tint: #f0e3e6;
  --line: #e3d5cc;
  --line-strong: #cdb9ae;
  --display: "Spectral", "Times New Roman", Georgia, serif;
  --body: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gut: 20px;
  --sticky-h: 0px;
}

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

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(--body);
  font-size: 17px;
  font-weight: 350;
  line-height: 1.62;
  letter-spacing: 0.002em;
  overflow-x: hidden;
  padding-bottom: var(--sticky-h);
}

/* плёночное зерно — глубина без единого килобайта JS */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--plum); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--plum);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 200;
}
.skip:focus { left: 8px; top: 8px; }

/* ─────────────────────────── шапка ─────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.brand {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
}
.brand span { color: var(--plum); }
.brand::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--plum);
  transform: translateY(-2px);
}

.nav { display: none; gap: 26px; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--ink); border-color: var(--plum); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--line-strong); }

.header-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav + .header-side { margin-left: 0; }

.lang {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: 0 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lang:hover { color: var(--plum); border-color: var(--plum); background: var(--plum-tint); }
.lang .long { display: none; }
.lang .short { display: inline; }

/* кнопка записи в шапке — только на десктопе: на мобильном её роль
   играют меню и липкая панель, иначе строка шапки не влезает в 390px */
.header-side > .btn { display: none; }

.burger {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  background: none;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.burger i { display: block; width: 18px; height: 1px; background: var(--ink); transition: transform 0.25s, opacity 0.2s; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 0 18px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 19px;
  font-family: var(--display);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav .btn { margin-top: 14px; width: 100%; }

/* ─────────────────────────── кнопки ─────────────────────────── */

.btn {
  --btn-bg: var(--plum);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: 2px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--plum-deep); border-color: var(--plum-deep); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(76, 26, 46, 0.18); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--plum-tint); border-color: var(--plum); color: var(--plum); box-shadow: none; }

.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn--wide { width: 100%; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--plum);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s, gap 0.2s;
}
.link-more:hover { border-color: var(--plum); gap: 14px; }

/* ─────────────────────────── секции ─────────────────────────── */

section { padding: 62px 0; }
.section--tint { background: var(--paper-2); }

.kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::after { content: ""; height: 1px; flex: 1; background: var(--line-strong); }

.section-title { font-size: clamp(1.9rem, 5.2vw, 2.9rem); margin-bottom: 10px; }
.section-note { color: var(--ink-2); font-size: 15.5px; max-width: 60ch; }
.section-head { margin-bottom: 30px; }

.lead { font-size: clamp(1.02rem, 2.6vw, 1.18rem); color: var(--ink-2); max-width: 62ch; }

/* ─────────────────────────── герой ─────────────────────────── */

.hero { padding: 30px 0 54px; }
.hero-grid { display: grid; gap: 30px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(2.7rem, 11.5vw, 5.4rem);
  line-height: 0.97;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--plum);
}
.hero .lead { margin-bottom: 26px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media { position: relative; }
.hero-shot { position: relative; display: block; }
/* волосяная рамка со сдвигом: глубина без единого килобайта */
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 18px -16px -16px 18px;
  border: 1px solid var(--plum);
  opacity: 0.35;
  pointer-events: none;
}
.hero-media video,
.hero-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper-3);
  position: relative;
}
/* цена той самой работы, что на фото — правило «конкретика клиента на панели» */
.hero-tag {
  position: absolute;
  right: -10px;
  bottom: -18px;
  margin: 0;
  max-width: calc(100% - 26px);
  padding: 10px 16px 11px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--plum);
  box-shadow: 0 12px 28px rgba(36, 24, 32, 0.14);
}
.hero-tag b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.1;
  color: var(--plum);
}
.hero-tag span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.hero-media--916 video { aspect-ratio: 9 / 16; }
.hero-media figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.hero-shot + figcaption { margin-top: 34px; }

.facts {
  display: grid;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 8px;
}
.fact-n { font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--plum); }
.fact-t { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; max-width: 34ch; }

/* ─────────────────────────── работы ─────────────────────────── */

.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.works--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.works--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.work {
  position: relative;
  margin: 0;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  /* flex-column вместо block: у <button> содержимое иначе центрируется по вертикали
     и карточки с однострочной подписью съезжают вниз относительно соседей */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
}
.work-shot {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--line);
}
.work-shot img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work:hover .work-shot img,
.work:focus-visible .work-shot img { transform: scale(1.04); }
.work-cap {
  display: block;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 9px;
  line-height: 1.4;
}
.work:hover .work-cap { color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: none;
  border-radius: 2px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--plum); color: var(--plum); }
.chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: var(--paper); }

/* карточки услуг на /uslugi/ */
.scards { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scard {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.scard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.scard-body { display: block; padding: 16px 16px 20px; }
.scard h3 { font-size: 1.25rem; margin-bottom: 8px; }
.scard p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.scard span { display: inline-flex; align-items: center; min-height: 40px; color: var(--plum); font-size: 14.5px; font-weight: 500; }
.scard:hover { border-color: var(--plum); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(76, 26, 46, 0.1); }
.scard:hover h3 { color: var(--plum); }

/* ─────────────────────────── прайс ─────────────────────────── */

.price-list { border-top: 1px solid var(--line); }
.price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.2s, padding 0.2s;
}
a.price-row:hover { background: var(--paper-2); padding-left: 10px; padding-right: 10px; }
.price-name { font-family: var(--display); font-size: clamp(1.05rem, 3.4vw, 1.35rem); }
a.price-row:hover .price-name { color: var(--plum); }
.price-dots { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); min-width: 16px; }
.price-val { font-size: 16px; font-weight: 500; white-space: nowrap; }
.price-val small { font-weight: 350; color: var(--ink-2); font-size: 14px; }
.price-val--soft { color: var(--ink-3); font-weight: 350; font-size: 15px; }
.price-note { font-size: 14px; color: var(--ink-3); margin-top: 16px; max-width: 62ch; }

/* ─────────────────────────── типовые блоки ─────────────────────────── */

.split { display: grid; gap: 28px; }
.split figure { margin: 0; }
.split img { width: 100%; border: 1px solid var(--line); object-fit: cover; }

.stack > * + * { margin-top: 14px; }

.marks { list-style: none; margin: 0; padding: 0; }
.marks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 16px;
}
.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 14px;
  height: 1px;
  background: var(--plum);
}

.card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px;
}
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }

.breadcrumbs {
  font-size: 13.5px;
  color: var(--ink-3);
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  align-items: center;
}
.breadcrumbs a, .breadcrumbs span { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumbs a:hover { color: var(--plum); border-color: var(--plum); }

.page-head { padding: 26px 0 12px; }
.page-head h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); margin-bottom: 16px; }

.price-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  margin: 22px 0 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-hero b { font-family: var(--display); font-weight: 500; font-size: 1.7rem; color: var(--plum); }
.price-hero span { font-size: 15px; color: var(--ink-2); }

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 1.15rem;
  padding: 14px 34px 14px 0;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--plum); }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 1px solid var(--plum);
  border-bottom: 1px solid var(--plum);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq p { color: var(--ink-2); font-size: 16px; padding: 0 0 18px; margin: 0; max-width: 68ch; }

/* ─────────────────────────── форма записи ─────────────────────────── */

.form-grid { display: grid; gap: 26px; }

fieldset { border: 0; margin: 0 0 22px; padding: 0; }
legend, .field-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 12px;
  padding: 0;
  display: block;
}

.opt { display: block; margin-bottom: 8px; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.opt span b { font-family: var(--display); font-weight: 500; font-size: 1.06rem; }
.opt span i { font-style: normal; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.opt:hover span { border-color: var(--plum); }
.opt input:checked + span { border-color: var(--plum); background: var(--plum-tint); }
.opt input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }

input[type="text"], input[type="date"], textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(110, 42, 69, 0.12);
}
.hint { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; }

.preview {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 20px;
  position: sticky;
  top: 84px;
}
.preview h2 { font-size: 1.2rem; margin-bottom: 12px; }
.preview pre {
  font: inherit;
  font-size: 15px;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 18px;
  min-height: 120px;
}
.preview .btn + .btn { margin-top: 10px; }
.toast {
  margin-top: 12px;
  font-size: 14px;
  color: var(--plum);
  min-height: 20px;
}

/* ─────────────────────────── карта, контакты ─────────────────────────── */

.map-frame {
  border: 1px solid var(--line);
  background: var(--paper-3);
  aspect-ratio: 4 / 3;
  width: 100%;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-list { border-top: 1px solid var(--line); }
.contact-row {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row dt { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--plum); }
.contact-row dd { margin: 0; font-family: var(--display); font-size: 1.2rem; }
.contact-row dd a { display: inline-flex; align-items: center; min-height: 44px; }
.contact-row small { display: block; font-family: var(--body); font-size: 14px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }

/* ─────────────────────────── подвал и sticky ─────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 44px 0 34px;
  margin-top: 30px;
}
.footer-grid { display: grid; gap: 26px; }
.footer-nav { display: grid; gap: 0; }
.footer-nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; width: fit-content; border-bottom: 1px solid transparent; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer-nav a:hover { color: var(--plum); border-color: var(--plum); }
.footer-note { font-size: 14px; color: var(--ink-3); max-width: 46ch; }
.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-3);
}
.footer-bottom a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom a:hover { color: var(--plum); border-color: var(--plum); }

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  gap: 1px;
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-bar a {
  flex: 1;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.sticky-bar a:first-child { background: var(--plum); color: var(--paper); }
.sticky-bar a:active { background: var(--plum-deep); color: var(--paper); }

/* ─────────────────────────── лайтбокс ─────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 18, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox figure {
  margin: 0;
  max-width: min(92vw, 620px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lightbox img {
  width: 100%;
  max-width: min(92vw, 620px);
  max-height: 74vh;
  margin: 0 auto;
  object-fit: contain;
  background: #1e1218;
}
.lightbox figcaption {
  color: #f4ece9;
  font-size: 14.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
}
.lightbox figcaption a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.5); padding: 6px 0; }
.lightbox figcaption a:hover { border-color: #fff; }
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(30, 18, 24, 0.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}
.lb-btn:hover { background: var(--plum); border-color: var(--plum); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-close { top: 12px; right: 12px; transform: none; }

/* ─────────────────────────── адаптив ─────────────────────────── */

@media (max-width: 899px) {
  :root { --sticky-h: 57px; }
}

/* На 360px «Записаться» и «Смотреть работы» переставали помещаться в строку, кнопки
   вставали друг под друга и уводили фото работы под первый экран. Сжимаем поля. */
@media (max-width: 400px) {
  .hero-cta .btn { padding: 0 15px; font-size: 14px; letter-spacing: 0.02em; }
}

@media (min-width: 600px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 600px) {
  .scards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  :root { --gut: 32px; }
  body { font-size: 17.5px; }
  section { padding: 84px 0; }
  .header-side > .btn { display: inline-flex; }
  .lang .long { display: inline; }
  .lang .short { display: none; }
  .nav { display: flex; }
  .burger { display: none; }
  .mobile-nav { display: none !important; }
  .sticky-bar { display: none; }
  .hero { padding: 46px 0 76px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
  .hero-media { max-width: 420px; margin-left: auto; }
  .split { grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
  .split--media-right { grid-template-columns: 1.1fr 0.9fr; }
  .split--media-right figure { order: 2; }
  .works--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .works--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; }
  .form-grid { grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; }
  .page-head { padding: 34px 0 18px; }
  .contact-row { grid-template-columns: 200px 1fr; gap: 20px; align-items: baseline; }
}

/* редакционный сдвиг средней колонки — ритм вместо «четырёх одинаковых карточек» */
@media (min-width: 900px) {
  .works--home { padding-bottom: 30px; }
  .works--home .work:nth-child(3n + 2) { transform: translateY(30px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
