/* ==========================================================================
   Каменный двор — визуальный язык карьера.
   Палитра: базальт, мокрый сланец, известняковая пыль, жила пирита.
   Шрифты: Oswald (заголовки, узкий стенсил) / Golos Text (текст) /
           JetBrains Mono (характеристики, цены, метки).
   Вёрстка строго mobile-first: базовые правила — телефон, медиа — шире.
   ========================================================================== */

:root {
  --basalt:   #14181B;
  --slate:    #2B3439;
  --slate-2:  #3D4A50;
  --stone:    #77848A;
  --dust:     #E9EAE5;
  --paper:    #F7F7F4;
  --pyrite:   #C9A227;
  --pyrite-d: #A8851A;

  --ink:      #14181B;
  --ink-soft: #5C666B;
  --line:     rgba(20, 24, 27, .13);
  --line-dim: rgba(20, 24, 27, .07);

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body:    "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --gutter: 18px;
  --radius: 3px;
  --header-h: 58px;
  --bar-h: 62px;

  --shadow-sm: 0 1px 2px rgba(20,24,27,.08), 0 4px 14px rgba(20,24,27,.06);
  --shadow-md: 0 10px 40px rgba(20,24,27,.16);
  --shadow-lg: 0 24px 70px rgba(20,24,27,.34);
}

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

/* hidden должен побеждать display:flex/grid — иначе фильтр каталога не прячет карточки */
[hidden] { display: none !important; }

/* Промо-уведомления в правом верхнем углу */
.promo-stack {
  position: fixed; top: calc(var(--header-h) + 10px); right: 12px; z-index: 80;
  display: flex; flex-direction: column; gap: 10px;
  width: min(320px, calc(100vw - 24px)); pointer-events: none;
  max-height: calc(100vh - var(--header-h) - var(--bar-h) - 24px);
  overflow-y: auto; scrollbar-width: none;
}
.promo-stack::-webkit-scrollbar { display: none; }
.promo {
  pointer-events: auto; position: relative;
  display: flex; gap: 11px; align-items: flex-start;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-dim); border-left: 3px solid var(--pyrite);
  border-radius: 8px; padding: 13px 34px 13px 13px;
  box-shadow: var(--shadow-md);
  transform: translateX(120%); opacity: 0;
  transition: transform .4s cubic-bezier(.2,.8,.3,1), opacity .4s ease;
}
.promo.is-in { transform: none; opacity: 1; }
.promo.is-out { transform: translateX(120%); opacity: 0; }
.promo__icon { font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.promo__body { min-width: 0; }
.promo__title { font-family: var(--display); font-size: 1rem; text-transform: uppercase;
  letter-spacing: .02em; line-height: 1.1; margin-bottom: 3px; }
.promo__text { font-size: .84rem; color: var(--ink-soft); line-height: 1.35; }
.promo__until {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.promo__until-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .03em;
  margin-bottom: 6px;
}
.promo__until-text { color: var(--pyrite-d); font-weight: 500; }
.promo__days { color: var(--ink-soft); flex: 0 0 auto; }
.promo__bar {
  height: 5px; border-radius: 4px; overflow: hidden;
  background: var(--line);
}
.promo__bar span {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--pyrite-d), var(--pyrite));
  transition: width .8s ease;
}
.promo--link { cursor: pointer; }
.promo--link:hover { border-left-color: var(--pyrite-d); }
.promo__close {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: var(--dust); color: var(--ink-soft); font-size: 1rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.promo__close:hover { background: #dfe0da; }
@media (min-width: 960px) {
  .promo-stack { top: calc(var(--header-h) + 14px); right: 20px; }
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  padding-bottom: var(--bar-h);   /* место под мобильную панель действий */
}

img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.trap { position: absolute; left: -9999px; opacity: 0; height: 0; pointer-events: none; }

/* ---------- типографика ------------------------------------------------ */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin: 0;
}
h1 { font-size: clamp(2rem, 8.6vw, 4.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 6.4vw, 2.9rem); }
h3 { font-size: 1.12rem; text-transform: none; letter-spacing: 0; line-height: 1.22; }

.eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.lede { font-size: 1.02rem; color: var(--ink-soft); margin: 14px 0 0; max-width: 56ch; }

/* ---------- подпись проекта: пласты породы ----------------------------- */

.strata { display: block; height: 13px; width: 100%; }
.strata span {
  display: block;
  background: var(--slate);
}
.strata span:nth-child(1) { height: 4px; opacity: .95; }
.strata span:nth-child(2) { height: 2px; opacity: .38; margin-top: 2px; }
.strata span:nth-child(3) { height: 1px; opacity: .8; margin-top: 3px; background: var(--pyrite); }

.strata--light span { background: rgba(255,255,255,.85); }
.strata--light span:nth-child(3) { background: var(--pyrite); }

/* ---------- кнопки ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px;
  font-family: var(--display); font-size: 1rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: transform .12s ease, background-color .16s ease, border-color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.995); }

.btn--gold { background: var(--pyrite); color: var(--basalt); }
.btn--gold:hover { background: var(--pyrite-d); }

.btn--dark { background: var(--slate); color: #fff; }
.btn--dark:hover { background: var(--basalt); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--slate); }

.btn--light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.34); }
.btn--light:hover { background: rgba(255,255,255,.2); }

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

/* ---------- шапка ------------------------------------------------------- */

.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(247,247,244,.94);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-dim);
}
.header__in { display: flex; align-items: center; gap: 14px; width: 100%; }

.logo { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.logo__img { height: 44px; width: auto; display: block; flex: 0 0 auto; }
.logo__text { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.logo__name {
  font-family: var(--display); font-size: 1.16rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.logo__mark { color: var(--pyrite); }
.logo__tag { display: none; font-family: var(--mono); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }

.nav { display: none; }
.nav a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); padding: 6px 0;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); border-color: var(--pyrite); }

/* Соцсети */
.socials { display: flex; align-items: center; gap: 8px; }
.soc {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  transition: transform .14s ease, background-color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.soc img { width: 20px; height: 20px; display: block; }
.soc:active { transform: scale(.92); }

.socials--header .soc { background: var(--dust); color: var(--slate); }
.socials--header .soc:hover { background: #dfe0da; }

.socials--footer { display: flex; gap: 10px; margin-bottom: 18px; }
.socials--footer .soc { width: 42px; height: 42px; background: rgba(255,255,255,.09); color: #fff; }
.socials--footer .soc img { width: 22px; height: 22px; }
.socials--footer .soc:hover { background: rgba(255,255,255,.18); }
.socials--header .soc { width: 36px; height: 36px; }
.socials--header .soc img { width: 18px; height: 18px; }

.header__phone { display: none; font-family: var(--mono); font-size: .9rem; font-weight: 500; }
.header__call {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--slate); color: #fff;
}

/* ---------- первый экран ------------------------------------------------ */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h) - var(--bar-h));
  display: flex; align-items: flex-end;
  padding: 88px 0 34px;
  background: var(--basalt);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  /* если фото ещё не загружено — рисуем породу градиентами */
  background-image:
    radial-gradient(120% 80% at 20% 10%, #3A464C 0%, transparent 55%),
    radial-gradient(100% 90% at 85% 90%, #232C31 0%, transparent 60%),
    repeating-linear-gradient(102deg, rgba(255,255,255,.028) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(2deg, rgba(0,0,0,.22) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, #2A3439 0%, #14181B 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,24,27,.55) 0%, rgba(20,24,27,.35) 38%, rgba(20,24,27,.94) 100%);
}
.hero__in { position: relative; z-index: 2; color: #fff; width: 100%; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--pyrite); }
.hero__sub {
  margin: 16px 0 26px; max-width: 46ch;
  color: rgba(255,255,255,.8); font-size: 1rem;
}
.hero__strata { margin-bottom: 20px; max-width: 210px; }
.hero__cta { display: grid; gap: 10px; }

.usp { display: grid; gap: 1px; margin-top: 28px; background: rgba(255,255,255,.14); }
.usp__item { padding: 14px 2px 14px 0; background: transparent; }
.usp__num {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em;
  color: var(--pyrite); display: block; margin-bottom: 4px;
}
.usp__title { font-family: var(--display); font-size: 1.05rem; text-transform: uppercase;
  color: #fff; letter-spacing: .02em; }
.usp__text { font-size: .86rem; color: rgba(255,255,255,.62); margin-top: 2px; }

/* ---------- секции ------------------------------------------------------ */

.section { padding: 56px 0; scroll-margin-top: var(--header-h); }
.section--tint { background: var(--dust); }
.section--dark { background: var(--basalt); color: #fff; }
.section--dark .eyebrow { color: rgba(255,255,255,.5); }
.section--dark h2 { color: #fff; }
.section--dark .lede { color: rgba(255,255,255,.68); }

.section__head { margin-bottom: 26px; }
.section__head .strata { max-width: 150px; margin-bottom: 18px; }

/* ---------- каталог ----------------------------------------------------- */

.filters {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 22px;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;                       /* Firefox */
  scrollbar-color: var(--stone) transparent;
  -webkit-overflow-scrolling: touch;
}
/* Chrome, Safari, Edge — тонкий скруглённый ползунок без кнопок-стрелок */
.filters::-webkit-scrollbar { height: 6px; }
.filters::-webkit-scrollbar-track {
  background: var(--line-dim); border-radius: 20px; margin: 0 2px;
}
.filters::-webkit-scrollbar-thumb {
  background: var(--stone); border-radius: 20px;
  border: 1px solid transparent; background-clip: padding-box;
}
.filters::-webkit-scrollbar-thumb:hover { background: var(--slate); }
/* прячем стрелки-кнопки по краям (есть в некоторых десктопных браузерах) */
.filters::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.filters::-webkit-scrollbar-corner { background: transparent; }
.chip {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; min-height: 42px;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 40px;
  transition: all .15s ease;
}
.chip.is-active { background: var(--slate); border-color: var(--slate); color: #fff; }

.grid { display: grid; gap: 16px; }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line-dim); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.card__media {
  position: relative; aspect-ratio: 4 / 3; background: var(--slate);
  overflow: hidden; cursor: zoom-in; border: 0; padding: 0; width: 100%; display: block;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card__media:hover img { transform: scale(1.05); }
.card__media--empty {
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 3px, transparent 3px 12px),
    repeating-linear-gradient(4deg, rgba(0,0,0,.2) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, #46545B, #232C31);
  cursor: default;
}
.card__zoom {
  position: absolute; right: 10px; bottom: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20,24,27,.62); color: #fff; backdrop-filter: blur(4px);
}
.card__kind {
  position: absolute; left: 10px; top: 10px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--pyrite); color: var(--basalt); padding: 5px 9px; border-radius: 2px;
}
.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card__title { margin-bottom: 12px; }

.specs { border-top: 1px solid var(--line-dim); margin: 0 0 14px; }
.specs div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line-dim);
  font-family: var(--mono); font-size: .76rem;
}
.specs dt { color: var(--ink-soft); }
.specs dd { margin: 0; text-align: right; font-weight: 500; }

.card__note { font-size: .82rem; color: var(--ink-soft); margin: 0 0 14px; }
.card__foot { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 1.62rem; line-height: 1; letter-spacing: -.01em; }
.price small { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft);
  display: block; letter-spacing: .08em; margin-top: 4px; text-transform: none; }
.card__foot .btn { flex: 1 1 150px; }

.price-wrap { display: flex; flex-direction: column; gap: 8px; }
.unit-toggle {
  display: inline-flex; align-self: flex-start;
  border: 1px solid var(--line); border-radius: 40px; padding: 2px; gap: 2px;
}
.unit-btn {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .04em;
  padding: 5px 12px; min-height: 30px; border: 0; border-radius: 40px;
  background: transparent; color: var(--ink-soft); transition: all .15s ease;
}
.unit-btn.is-active { background: var(--slate); color: #fff; }

.catalog-note {
  margin-top: 24px; padding: 18px; background: #fff;
  border-left: 3px solid var(--pyrite); font-size: .9rem; color: var(--ink-soft);
}

/* ---------- галерея ----------------------------------------------------- */

.shots { display: grid; gap: 10px; }
.shot {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--slate-2);
  border-radius: var(--radius); cursor: pointer;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, opacity .3s; }
.shot:hover img { transform: scale(1.06); }
.shot__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 12px 12px; text-align: left;
  background: linear-gradient(180deg, transparent, rgba(20,24,27,.86));
  color: #fff; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
}
.shot__play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  color: #fff;
}
.shot__play span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20,24,27,.55); border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(3px);
}
.shots--empty { color: rgba(255,255,255,.5); font-size: .9rem; }

/* ---------- контакты ---------------------------------------------------- */

/* Секция контактов с фото карьера на фоне */
.section--quarry { position: relative; overflow: hidden; color: #fff; }
.quarry__bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: url('/static/img/karier-v2.webp');
  background-size: cover; background-position: center 65%;
}
.quarry__bg::after {
  content: ""; position: absolute; inset: 0;
  /* затемняем сильнее снизу и слева, где лежит текст */
  background:
    linear-gradient(180deg, rgba(20,24,27,.62) 0%, rgba(20,24,27,.78) 100%),
    linear-gradient(90deg, rgba(20,24,27,.55) 0%, rgba(20,24,27,.2) 60%, transparent 100%);
}
.quarry__in { position: relative; z-index: 1; }
.section--quarry .eyebrow { color: rgba(255,255,255,.62); }
.section--quarry h2 { color: #fff; }

.contacts { display: grid; gap: 26px; }
.contact-phone {
  font-family: var(--display); font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: .01em; display: inline-block; color: #fff;
}
.contact-note { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.66); }
.messengers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.contact-block h3 { margin-bottom: 6px; color: #fff; }
.contact-block p { margin: 0; color: rgba(255,255,255,.78); font-size: .94rem; }
.section--quarry .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.section--quarry .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.map {
  aspect-ratio: 4 / 3; background: var(--dust); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line-dim);
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map--empty { display: grid; place-items: center; text-align: center; padding: 20px;
  font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); letter-spacing: .06em; }

/* ---------- подвал и мобильная панель ----------------------------------- */

.footer { background: var(--basalt); color: rgba(255,255,255,.5); padding: 44px 0 30px;
  font-size: .8rem; }
.footer a { color: rgba(255,255,255,.8); }

.footer__grid { display: grid; gap: 30px; margin-bottom: 32px; }
.footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer__logo img { height: 40px; width: auto; }
.footer__logo span { font-family: var(--display); font-size: 1.2rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.footer__tagline { margin: 0 0 16px; color: rgba(255,255,255,.55); font-size: .84rem; }

.footer__col h4 {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin: 0 0 14px; font-weight: 500;
}
.footer__col a {
  display: block; padding: 6px 0; color: rgba(255,255,255,.78); font-size: .9rem;
  transition: color .15s;
}
.footer__col a:hover { color: var(--pyrite); }

.footer__phone { font-family: var(--display); font-size: 1.5rem; color: #fff !important;
  display: inline-block; margin-bottom: 4px; }
.footer__note { margin: 0 0 12px; font-family: var(--mono); font-size: .7rem;
  letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.footer__addr { margin: 0 0 16px; color: rgba(255,255,255,.7); font-size: .86rem; line-height: 1.5; }
.footer__contacts .btn { color: var(--basalt) !important; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.footer__bottom p { margin: 0; color: rgba(255,255,255,.45); font-size: .78rem; }

.socials--footer { margin-bottom: 0; }

@media (min-width: 620px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px 40px; }
}
@media (min-width: 960px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: var(--bar-h);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.actionbar .btn { border-radius: 0; min-height: var(--bar-h); }

/* ---------- модальное окно ---------------------------------------------- */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(20,24,27,.72); backdrop-filter: blur(4px);
  padding: 0;
}
.modal.is-open { display: flex; }
.modal__box {
  position: relative;   /* якорь для крестика — он висит в углу этой панели, не экрана */
  width: 100%; max-width: 460px; background: var(--paper);
  border-radius: 12px 12px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 92svh; overflow-y: auto;
  animation: rise .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes rise { from { transform: translateY(28px); opacity: .4; } to { transform: none; opacity: 1; } }

.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--dust); color: var(--ink);
  font-size: 1.3rem; line-height: 1;
  display: grid; place-items: center;
}
.modal__close:hover { background: #dfe0da; }
.modal__head { margin-bottom: 16px; padding-right: 40px; }
.modal__head .strata { max-width: 90px; margin-bottom: 14px; }
.modal h2 { font-size: 1.5rem; }
.modal__for {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  background: var(--dust); border-left: 2px solid var(--pyrite);
  padding: 9px 12px; margin: 12px 0 0; color: var(--ink);
}

.field { margin-bottom: 14px; }
.field label {
  display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%; padding: 14px; min-height: 52px;
  font-family: var(--body); font-size: 16px;  /* 16px — иначе iOS зумит форму */
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--slate); outline: none; }
.field.has-error input { border-color: #C0392B; }
.field__err { color: #C0392B; font-size: .78rem; margin-top: 5px; display: none; }
.field.has-error .field__err { display: block; }

.consent { font-size: .74rem; color: var(--ink-soft); margin: 12px 0 0; text-align: center; }
.form__status { font-size: .84rem; margin-top: 10px; color: #C0392B; min-height: 1em; }

.field--check { margin: 4px 0 16px; }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .82rem; line-height: 1.4; color: var(--ink-soft);
  cursor: pointer; margin-bottom: 10px; text-transform: none; letter-spacing: 0;
  font-family: var(--body);
}
.consent-check input {
  flex: 0 0 auto; width: 22px; height: 22px; margin: 0;
  accent-color: var(--pyrite); cursor: pointer;
}
.consent-check a { color: var(--slate); text-decoration: underline; }
.field--check.has-error .consent-check:first-child input { outline: 2px solid #C0392B; outline-offset: 2px; }

.policy-text p { margin: 0 0 16px; color: var(--ink-soft); line-height: 1.65; }

.done { text-align: center; padding: 16px 0 8px; }
.done__mark {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pyrite); color: var(--basalt);
}
.done h2 { margin-bottom: 8px; }
.done p { color: var(--ink-soft); margin: 0 0 20px; }

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

.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(10,12,14,.96);
}
.lightbox.is-open { display: block; }
.lightbox__stage {
  position: absolute; inset: 52px 0 76px;
  display: grid; place-items: center; padding: 0 10px;
}
.lightbox__stage img, .lightbox__stage video, .lightbox__stage iframe {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px;
}
.lightbox__stage iframe { width: 100%; aspect-ratio: 16/9; height: auto; }
.lightbox__bar {
  position: absolute; top: 0; left: 0; right: 0; height: 52px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px;
  color: rgba(255,255,255,.75); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
}
.lightbox__foot {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  color: rgba(255,255,255,.8); font-size: .84rem; text-align: center;
}
.lb-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 50%; font-size: 1.2rem;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px;
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* ---------- появление при прокрутке ------------------------------------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ==========================================================================
   Планшет
   ========================================================================== */
@media (min-width: 620px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .usp { grid-template-columns: repeat(3, 1fr); gap: 1px; }
  .usp__item { padding: 16px 14px; }
  .hero__cta { grid-auto-flow: column; justify-content: start; gap: 12px; }
  .contacts { grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
  .messengers { grid-template-columns: 1fr 1fr; max-width: 340px; }
  .modal { align-items: center; padding: 20px; }
  .modal__box { border-radius: 4px; padding: 30px; }
}

/* ==========================================================================
   Десктоп
   ========================================================================== */
@media (min-width: 960px) {
  :root { --header-h: 74px; --bar-h: 0px; }
  body { padding-bottom: 0; }
  .actionbar { display: none; }
  .header__call { display: none; }
  .nav { display: flex; gap: 26px; }
  .header__phone { display: block; }
  .logo__tag { display: block; }
  .section { padding: 88px 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .shots { grid-template-columns: repeat(3, 1fr); }
  .shots .shot:first-child { grid-column: span 2; grid-row: span 2; }
  .hero { padding: 120px 0 60px; min-height: 88svh; }
  .hero__sub { font-size: 1.1rem; }
  .lightbox__stage { inset: 60px 70px 86px; }
}
