/* ==========================================================================
   MILENA MAJOROVA · miely — PREMIUM PHOTOGRAPHY PORTFOLIO
   Ботанический тёмно-зелёный · шалфей + патинированное золото
   Cormorant + Manrope · кастомный курсор · masonry · lightbox
   ========================================================================== */

:root {
  /* — Палитра: глубокий ботанический зелёный — */
  --bg: #0a1510;
  --bg-soft: #0e1c14;
  --bg-card: #132319;
  --bg-card-hover: #182a20;
  --line: rgba(158, 197, 160, 0.17);
  --line-strong: rgba(158, 197, 160, 0.32);
  --text: #eef4ec;
  --text-soft: #a8bba6;
  --text-dim: #78907a;

  /* — Акцент: благородный шалфей — */
  --accent: #9dc79f;
  --accent-deep: #86b388;
  --accent-soft: rgba(157, 199, 159, 0.18);
  --accent-line: rgba(157, 199, 159, 0.5);

  /* — Вторичный акцент: люкс-золотистая патина (цены, номера) — */
  --accent-gold: #c9a96e;
  --gold-soft: rgba(201, 169, 110, 0.14);
  --gold-line: rgba(201, 169, 110, 0.38);

  --danger: #e0705a;

  --font-display: 'Cormorant', 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;

  --header-h: 72px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background:
    radial-gradient(ellipse 90% 46% at 50% -8%, rgba(157, 199, 159, 0.11), transparent 62%),
    radial-gradient(ellipse 70% 40% at 85% 110%, rgba(134, 179, 136, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html { overflow-x: clip; }

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
.hidden { display: none !important; }

::selection { background: var(--accent); color: #0a1510; }

/* Тонкий скроллбар: тёмно-зелёный трек, приглушённый шалфейный ползунок */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0c1510; }
::-webkit-scrollbar-thumb { background: rgba(157, 199, 159, 0.34); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(157, 199, 159, 0.48); }

/* ---------- ТИПОГРАФИКА ---------- */
.container { width: min(1280px, 100% - 48px); margin-inline: auto; }

.section { padding: clamp(90px, 12vw, 160px) 0; position: relative; }

.section__eyebrow {
  font-size: 11px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section__eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--accent-line);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 14ch;
}
.section__title em {
  font-style: italic;
  color: var(--accent);
}

/* ---------- КНОПКИ ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 0.45s var(--ease);
  position: relative;
  white-space: nowrap;
}

.btn--solid {
  background: linear-gradient(135deg, #a9d4ab 0%, var(--accent) 45%, var(--accent-deep) 100%);
  color: #0a120e;
}
.btn--solid:hover {
  background: linear-gradient(135deg, #b4dcb6 0%, var(--accent) 45%, var(--accent-deep) 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 44px -12px rgba(157, 199, 159, 0.62), 0 0 0 1px var(--accent-line);
}

.btn--ghost {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 32px -20px rgba(157, 199, 159, 0.3);
  background: rgba(157, 199, 159, 0.04);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line), 0 14px 34px -16px rgba(157, 199, 159, 0.4); background: rgba(157, 199, 159, 0.07); transform: translateY(-2px); }

/* ---------- КУРСОР ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(157, 199, 159, 0.45);
  transition: opacity 0.3s, width 0.35s var(--ease), height 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.cursor-ring.is-active {
  width: 58px; height: 58px;
  background: rgba(157, 199, 159, 0.1);
  border-color: var(--accent);
}
.cursor-ring.is-hover .cursor-label { opacity: 1; }

.cursor-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { opacity: 1; }
}

/* ---------- ПРЕЛОАДЕР ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }

/* деликатное зелёное свечение из центра */
.preloader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 46%, rgba(157, 199, 159, 0.1), transparent 70%);
  pointer-events: none;
}

.preloader__content { text-align: center; position: relative; }

.preloader__name {
  font-family: var(--font-display);
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
}
.preloader__name span { color: var(--accent); font-style: italic; }

/* счётчик загрузки (если добавляется разметкой) */
.preloader__count {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
}

.preloader__bar {
  width: 180px;
  height: 1px;
  background: var(--line-strong);
  margin: 30px auto 18px;
  overflow: hidden;
}
.preloader__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  animation: preload-bar 1.9s var(--ease) forwards;
}
@keyframes preload-bar {
  0% { width: 0; }
  55% { width: 70%; }
  100% { width: 100%; }
}

.preloader__hint {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- ШАПКА ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: transform 0.5s var(--ease), background 0.5s, border-color 0.5s, height 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  height: 62px;
  /* Почти непрозрачный фон выглядит так же, но не заставляет браузер
     размывать всю страницу под шапкой на каждом пикселе прокрутки. */
  background: rgba(9, 21, 15, 0.97);
  border-bottom-color: var(--line);
}

.header__inner {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.header__logo span { color: var(--accent); padding: 0 3px; }
.header__logo .js-brand { color: inherit; padding: 0; }

.header__nav { display: flex; gap: 34px; }

.nav__link {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; gap: 18px; }
.header__actions .btn { padding: 12px 26px; font-size: 10px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}
.burger span {
  width: 24px; height: 1.5px;
  background: var(--text);
  transition: all 0.4s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- МОБИЛЬНОЕ МЕНЮ ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(9, 21, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu__inner { text-align: center; display: grid; gap: 8px; }

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.3;
  color: var(--text);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
.mobile-menu__link:hover { color: var(--accent); }
.mobile-menu.is-open .mobile-menu__link {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.06s * var(--i, 0) + 0.15s);
}

.mobile-menu__socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 26px;
}
.mobile-menu__socials a {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}
.mobile-menu__socials a:hover { color: var(--accent); }

.mobile-menu__cta { margin: 34px auto 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* радиальная виньетка зелёного свечения */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 52% at 32% 42%, rgba(157, 199, 159, 0.21), transparent 68%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(6, 12, 9, 0.55) 100%);
}

/* тонкая декоративная линия справа (балансирует .hero__side слева) */
.hero::after {
  content: '';
  position: absolute;
  right: max(24px, 3vw);
  top: 32%;
  width: 1px;
  height: 96px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
}

.hero__bg { position: absolute; inset: 0; }

.hero__photo {
  position: absolute;
  inset: -6% -2%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: scale(1.1);
  animation: hero-zoom 2.6s var(--ease) 0.2s forwards;
}
@keyframes hero-zoom {
  from { transform: scale(1.18); }
  to { transform: scale(1.06); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 20, 14, 0.55) 0%, rgba(12, 25, 17, 0.25) 40%, rgba(7, 16, 11, 0.8) 100%),
    radial-gradient(ellipse 60% 50% at 30% 45%, rgba(12, 27, 18, 0.35), transparent 70%),
    radial-gradient(ellipse 90% 60% at 70% 90%, rgba(157, 199, 159, 0.12), transparent 65%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  padding-top: var(--header-h);
}

.hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.6s forwards;
}
.hero__eyebrow::before {
  content: '';
  width: 44px; height: 1px;
  background: var(--accent-line);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(56px, 10.5vw, 150px);
  line-height: 0.98;
  letter-spacing: 0.01em;
}
.hero__title-line {
  display: block;
  overflow: hidden;
}
.hero__title-line:nth-child(1) { animation: fade-up 1.1s var(--ease-out) 0.75s both; }
.hero__title-line:nth-child(2) { animation: fade-up 1.1s var(--ease-out) 0.9s both; }
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__subtitle {
  margin-top: 30px;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.1s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 46px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.25s forwards;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  opacity: 0;
  animation: hero-scroll-in 1s var(--ease-out) 1.7s forwards;
}
@keyframes hero-scroll-in {
  from { opacity: 0; transform: translate(-50%, 36px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.hero__scroll span {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: var(--line-strong);
  overflow: hidden;
  position: relative;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scroll-hint 2.2s var(--ease) infinite;
}
@keyframes scroll-hint {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

.hero__quote {
  position: absolute;
  right: max(40px, 4vw);
  bottom: 40px;
  z-index: 2;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--text-soft);
  max-width: 240px;
  line-height: 1.5;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.55s forwards;
}

.hero__side {
  position: absolute;
  left: max(24px, 3vw);
  bottom: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.7s forwards;
}
.hero__side::before {
  content: '';
  width: 1px; height: 56px;
  background: var(--line-strong);
}
.hero__side a {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}
.hero__side a:hover { color: var(--accent); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- MARQUEE ---------- */
.marquee {
  border-block: 1px solid rgba(157, 199, 159, 0.2);
  padding: 22px 0;
  overflow: hidden;
  background: linear-gradient(180deg, #0d1e13, #142818 55%, #0e1f14);
  box-shadow: inset 0 1px 0 rgba(157, 199, 159, 0.12), inset 0 -1px 0 rgba(157, 199, 159, 0.05);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 2em;
  color: var(--text-soft);
}
.marquee__item span { color: var(--accent); margin: 0 0.7em; font-size: 0.7em; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- ОБО МНЕ ---------- */
/* едва заметное ботаническое свечение секции */
.about {
  background:
    radial-gradient(ellipse 44% 40% at 74% 42%, rgba(134, 179, 136, 0.09), transparent 70%),
    radial-gradient(ellipse 40% 30% at 8% 85%, rgba(157, 199, 159, 0.06), transparent 70%);
}

.about__inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}

.about__media { position: relative; }

/* рамка-подложка со смещением в акценте */
.about__media::before {
  content: '';
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  pointer-events: none;
}

.about__photo-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
}
.about__photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  pointer-events: none;
}
.about__photo {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 1.2s var(--ease);
}
.about__photo-frame:hover .about__photo { transform: scale(1.09); }

.about__sticker {
  position: absolute;
  right: -24px;
  bottom: 36px;
  z-index: 2;
  padding: 14px 22px;
  background: var(--accent);
  color: #0a1510;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border-radius: 100px;
  box-shadow: 0 20px 50px -18px rgba(4, 10, 7, 0.85);
}

.about__text {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.85;
  color: var(--text-soft);
  max-width: 56ch;
  margin-bottom: 44px;
}
.about__text em {
  font-style: italic;
  color: var(--text);
}

/* цитата курсивом (если добавляется разметкой) */
.about__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.5;
  color: var(--text);
  padding-left: 22px;
  border-left: 1px solid var(--accent-line);
  margin-bottom: 44px;
  max-width: 34ch;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-block: 36px;
  border-block: 1px solid var(--line);
  margin-bottom: 44px;
}
.about__stat { text-align: left; }
.about__stat-value {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.4vw, 54px);
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}
.about__stat-value sup {
  font-size: 0.5em;
  color: var(--accent-gold);
  font-style: italic;
}
.about__stat-label {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.about__deco {
  position: absolute;
  right: -30px;
  bottom: 30px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(120px, 22vw, 300px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(158, 197, 160, 0.1);
  pointer-events: none;
  user-select: none;
}

/* ---------- ПОРТФОЛИО ---------- */
.portfolio {
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, rgba(157, 199, 159, 0.07), transparent 72%),
    var(--bg-soft);
}

.portfolio__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.portfolio__head .section__title { margin-bottom: 40px; }
.portfolio__count {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 46px;
}
.filter {
  padding: 11px 22px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: all 0.35s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--accent-line); }
.filter.is-active {
  background: linear-gradient(135deg, #a9d4ab, var(--accent-deep));
  border-color: var(--accent);
  color: #0a1510;
  box-shadow: 0 12px 28px -14px rgba(157, 199, 159, 0.5);
}

/* Masonry: JS-раскладка (Pinterest-style).
   CSS columns убраны: при «показать ещё» они ребалансировали ВСЕ колонки
   и сетка «прыгала». Теперь плиты раскидывает JS в самые короткие колонки,
   догрузка только дописывает вниз. */
.masonry {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.masonry__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.masonry__item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform 0.55s var(--ease), border-color 0.55s, box-shadow 0.55s var(--ease);
}
.masonry__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.masonry__item:hover {
  transform: translateY(-6px);
  border-color: var(--accent-line);
  box-shadow:
    0 30px 60px -24px rgba(4, 10, 7, 0.7),
    0 18px 48px -22px rgba(157, 199, 159, 0.42);
}
.masonry__item img {
  width: 100%;
  object-fit: cover;   /* страховка: если w/h в данных не совпали с реальным фото — не растянется */
  transform: scale(1.001);
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.masonry__item:hover img {
  transform: scale(1.06);
  filter: brightness(0.62) saturate(0.92);
}

.masonry__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: linear-gradient(180deg, rgba(9, 20, 14, 0.12) 0%, rgba(9, 20, 14, 0.06) 50%, rgba(7, 17, 12, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.masonry__item:hover .masonry__overlay { opacity: 1; }

.masonry__cat {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: flex-start;
  padding: 7px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.masonry__meta { transform: translateY(12px); transition: transform 0.5s var(--ease) 0.05s; }
.masonry__item:hover .masonry__meta { transform: none; }
.masonry__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
}
.masonry__hint {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(238, 244, 236, 0.6);
}
/* цена в подписи плитки — золотистой патиной */
.masonry__price {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
}

.portfolio__empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.1em;
}

/* Пагинация «показать ещё» */
.portfolio__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 34px 0 10px;
}
.portfolio__more.hidden { display: none; }
.portfolio__more-btn {
  min-width: 220px;
  justify-content: center;
}
.portfolio__more-hint {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Анимация появления плиток */
@keyframes tile-in {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.masonry__item.is-in { animation: tile-in 0.8s var(--ease-out) both; }

/* ---------- УСЛУГИ ---------- */
/* едва заметный зелёный тон секции — чуть теплее фона body */
.services {
  background:
    radial-gradient(ellipse 46% 30% at 88% 92%, rgba(134, 179, 136, 0.05), transparent 70%),
    linear-gradient(180deg, #0b1912 0%, #0e2015 55%, #0b1912 100%);
}
/* очень тонкое зелёное свечение сверху секции */
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 34% at 50% 0%, rgba(157, 199, 159, 0.15), transparent 72%);
}

.services__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.service-card {
  position: relative;
  padding: 44px 36px 40px;
  background:
    linear-gradient(180deg, rgba(157, 199, 159, 0.085), transparent 42%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-top-color: var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  transition: transform 0.55s var(--ease), border-color 0.55s, background 0.55s, box-shadow 0.55s var(--ease);
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-line);
  background:
    linear-gradient(180deg, rgba(157, 199, 159, 0.13), transparent 48%),
    var(--bg-card-hover);
  box-shadow:
    0 30px 60px -28px rgba(4, 10, 7, 0.7),
    0 18px 50px -22px rgba(157, 199, 159, 0.32);
}
/* Акцентное свечение карточки при наведении (шалфейный подтон) */
.service-card::before {
  content: '';
  position: absolute;
  inset: auto -40% -55% -40%;
  height: 70%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 75%);
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }

.service-card__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(34px, 3vw, 44px);
  font-weight: 300;
  line-height: 1;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 16px;
}
.service-card__num::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), transparent);
}

.service-card__name {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.15;
}

.service-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.service-card__duration { white-space: nowrap; }
.service-card__price {
  color: var(--accent-gold);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.service-card ul {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  flex: 1;
}
.service-card li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-soft);
}
.service-card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service-card__btn {
  margin-top: 10px;
  justify-content: space-between;
  padding: 15px 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  transition: all 0.4s var(--ease);
  width: 100%;
}
.service-card__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  letter-spacing: 0.24em;
  padding-left: 30px;
}

/* ---------- ОТЗЫВЫ ---------- */
.reviews {
  background:
    radial-gradient(ellipse 50% 40% at 15% 10%, rgba(157, 199, 159, 0.09), transparent 65%),
    radial-gradient(ellipse 46% 36% at 85% 92%, rgba(134, 179, 136, 0.06), transparent 68%),
    linear-gradient(180deg, #0c1d12, #122416 60%, #0e1f13);
  border-block: 1px solid rgba(157, 199, 159, 0.2);
}

.reviews__slider {
  position: relative;
  display: grid;
}

.review {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  opacity: 0;
  transform: translateX(50px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.review.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.review__stars { color: var(--accent); letter-spacing: 0.4em; font-size: 15px; }

.review__text {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  max-width: 26ch;
  color: var(--text);
}
.review__text::before { content: '« '; color: var(--accent); font-size: 1.25em; }
.review__text::after { content: ' »'; color: var(--accent); font-size: 1.25em; }

.review__author {
  display: flex;
  align-items: center;
  gap: 16px;
}
.review__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
}
.review__name { font-weight: 500; font-size: 15px; letter-spacing: 0.04em; }
.review__role { font-size: 12px; color: var(--text-dim); letter-spacing: 0.08em; }

.reviews__nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 50px;
}
.reviews__arrow {
  width: 54px; height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--text-soft);
  transition: all 0.4s var(--ease);
}
.reviews__arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.reviews__dots { display: flex; gap: 10px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: all 0.4s var(--ease);
  padding: 0;
}
.dot.is-active { background: var(--accent); transform: scale(1.35); }

/* ---------- КОНТАКТЫ ---------- */
/* мягкое зелёное свечение позади контактного блока */
.contact {
  background:
    radial-gradient(ellipse 50% 36% at 16% 30%, rgba(134, 179, 136, 0.08), transparent 70%),
    radial-gradient(ellipse 44% 34% at 88% 78%, rgba(157, 199, 159, 0.06), transparent 70%);
}

.contact__inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}

.contact__title { margin-bottom: 26px; }
.contact__text {
  color: var(--text-soft);
  max-width: 44ch;
  margin-bottom: 42px;
}

.contact__links { display: grid; gap: 4px; }

.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: all 0.4s var(--ease);
}
.contact__link:hover { padding-left: 14px; border-color: var(--accent-line); }
.contact__link-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact__link-value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--text);
  transition: color 0.3s;
}
.contact__link:hover .contact__link-value { color: var(--accent); }

/* Форма */
.contact__form-wrap { position: relative; }

.form {
  display: grid;
  gap: 14px;
  padding: clamp(28px, 4vw, 48px);
  background:
    linear-gradient(180deg, rgba(157, 199, 159, 0.09), transparent 45%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-top-color: var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -50px rgba(3, 9, 6, 0.65), 0 24px 60px -38px rgba(157, 199, 159, 0.22);
}

.form__row { position: relative; }
.form__field-hint {
  display: block; margin-top: 7px; color: var(--text-muted);
  font-size: 11px; letter-spacing: .02em;
}

.form__input {
  width: 100%;
  padding: 20px 18px 9px;
  background: rgba(157, 199, 159, 0.04);
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.4s, background 0.4s;
  border-radius: 0;
}
.form__input:focus { border-color: var(--accent); box-shadow: 0 1px 0 var(--accent-line); background: rgba(157, 199, 159, 0.07); }

.form__label {
  position: absolute;
  left: 18px;
  top: 19px;
  font-size: 14px;
  color: var(--text-dim);
  pointer-events: none;
  transition: all 0.3s var(--ease);
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
  top: 5px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.form__row--select { z-index: 4; }
.form__select-native {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.custom-select__label {
  position: absolute; z-index: 2; left: 18px; top: 6px;
  color: var(--text-dim); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; pointer-events: none;
  transition: color .3s var(--ease);
}
.custom-select__trigger {
  width: 100%; min-height: 58px; padding: 21px 52px 9px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: rgba(157,199,159,.04); color: var(--text);
  font: inherit; font-size: 15px; text-align: left; cursor: pointer;
  transition: border-color .4s, background .4s, box-shadow .4s;
}
.custom-select__trigger:hover,
.custom-select__trigger:focus-visible,
.form__row--select.is-open .custom-select__trigger {
  outline: none; border-color: var(--accent); background: rgba(157,199,159,.08);
  box-shadow: 0 1px 0 var(--accent-line);
}
.form__row--select.is-open .custom-select__label { color: var(--accent); }
.custom-select__trigger:not(.has-value) #leadServiceValue { color: var(--text-dim); }
.custom-select__trigger svg {
  position: absolute; right: 17px; top: 20px; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  color: var(--accent); transition: transform .35s var(--ease), color .3s;
}
.form__row--select.is-open .custom-select__trigger svg { transform: rotate(180deg); }
.custom-select__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 9px); z-index: 20;
  padding: 8px; max-height: 330px; overflow-y: auto;
  background: rgba(13,31,22,.98); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: 0 28px 70px -26px rgba(0,0,0,.82), inset 0 1px 0 rgba(255,255,255,.025);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-10px) scale(.985); transform-origin: top center;
  transition: opacity .25s var(--ease), transform .32s var(--ease), visibility .25s;
}
.form__row--select.is-open .custom-select__menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1);
}
.custom-select__option {
  position: relative; width: 100%; min-height: 52px; padding: 11px 42px 11px 13px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: color .22s, background .22s, transform .22s var(--ease);
}
.custom-select__option + .custom-select__option { margin-top: 2px; }
.custom-select__option:hover,
.custom-select__option:focus-visible { outline: none; color: var(--accent); background: rgba(157,199,159,.09); transform: translateX(3px); }
.custom-select__option.is-selected { color: var(--accent); background: rgba(157,199,159,.07); }
.custom-select__option.is-selected::after { content: '✓'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); }
.custom-select__option-name { font-size: 14px; }
.custom-select__option-price { color: var(--text-dim); font-size: 12px; white-space: nowrap; transition: color .22s; }
.custom-select__option:hover .custom-select__option-price,
.custom-select__option.is-selected .custom-select__option-price { color: var(--text-soft); }

.form__textarea { resize: vertical; min-height: 96px; }

.form__submit { margin-top: 14px; width: 100%; }
.form__hint {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.04em;
}
.form__error { margin-top:12px; color:var(--danger); font-size:12px; line-height:1.5; }

.form__success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
}
.form__success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 8px;
}
.form__success h3 { font-family: var(--font-display); font-size: 30px; font-weight: 400; }
.form__success p { color: var(--text-soft); font-size: 14px; }

/* ---------- ФУТЕР ---------- */
.footer {
  border-top: 1px solid rgba(157, 199, 159, 0.18);
  background:
    radial-gradient(ellipse 60% 42% at 50% 0%, rgba(157, 199, 159, 0.09), transparent 70%),
    linear-gradient(180deg, #0b1811, #0d1e13);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-block: 70px 40px;
}

.footer__brand p {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}
.footer__brand #footerText { white-space: pre-line; }

.footer__nav { display: grid; gap: 14px; align-content: start; }
.footer__nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.3s, padding-left 0.3s var(--ease);
}
.footer__nav a:hover { color: var(--accent); padding-left: 8px; }

.footer__socials { display: grid; gap: 14px; align-content: start; justify-items: start; }
.socials__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.3s;
}
.socials__link::before {
  content: '↗';
  color: var(--accent);
  font-size: 13px;
}
.socials__link:hover { color: var(--accent); }

.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.footer__bottom p { font-size: 12px; color: var(--text-dim); letter-spacing: 0.06em; }
.footer__credit {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: 11px; letter-spacing: .06em;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.footer__credit span { color: var(--accent-gold); font-size: 15px; line-height: 1; transition: transform .3s var(--ease); }
.footer__credit b { color: var(--text-soft); font-weight: 400; transition: color .3s; }
.footer__credit:hover { color: var(--text-soft); transform: translateY(-2px); }
.footer__credit:hover span { transform: scale(1.18); }
.footer__credit:hover b { color: var(--accent); }

/* кнопка «наверх» — круглая с рамкой */
.to-top {
  width: 62px;
  height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: center;
  transition: all 0.4s var(--ease);
}
.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 34px -18px rgba(157, 199, 159, 0.35);
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 15, 10, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure {
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: 0 40px 120px -30px rgba(2, 6, 4, 0.9), 0 0 100px -34px rgba(157, 199, 159, 0.28);
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s;
}
.lightbox.is-open .lightbox__img { transform: none; opacity: 1; }

.lightbox__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.lightbox__title { font-family: var(--font-display); font-size: 22px; }
.lightbox__counter { font-size: 11px; letter-spacing: 0.24em; color: var(--accent-gold); }

.lightbox__close {
  position: absolute;
  top: 26px; right: 34px;
  width: 56px; height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 26px;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  transition: all 0.4s var(--ease);
  z-index: 2;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px; height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  transition: all 0.4s var(--ease);
  z-index: 2;
}
.lightbox__nav:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lightbox__nav--prev { left: 34px; }
.lightbox__nav--next { right: 34px; }

/* ---------- REVEAL-АНИМАЦИИ ---------- */
.reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(0.08s * var(--d, 0));
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- АДАПТИВ ---------- */
@media (max-width: 1100px) {
  /* колонки считает JS (colCount) */
  .about__deco { display: none; }
}

@media (max-width: 1024px) {
  .header__nav { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: flex; }

  .about__inner, .contact__inner { grid-template-columns: 1fr; }
  .about__media { max-width: 480px; }

  .hero__quote { display: none; }
  .hero__side { display: none; }
  .hero::after { display: none; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }

  .container { width: calc(100% - 32px); }
  .section { padding: 72px 0; }
  .section__eyebrow { margin-bottom: 16px; font-size: 9px; letter-spacing: .34em; gap: 10px; }
  .section__eyebrow::before { width: 26px; }
  .section__title { max-width: 100%; margin-bottom: 34px; font-size: clamp(38px, 12vw, 48px); line-height: 1; }

  .header__inner { width: calc(100% - 32px); gap: 14px; }
  .header__logo { font-size: 20px; }
  .burger { width: 42px; height: 42px; margin-right: -7px; }

  .mobile-menu { align-items: flex-start; overflow-y: auto; padding: calc(var(--header-h) + 26px) 18px 34px; }
  .mobile-menu__inner { width: 100%; margin: auto 0; gap: 4px; }
  .mobile-menu__link { font-size: clamp(32px, 11vw, 44px); line-height: 1.16; }
  .mobile-menu__socials { flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; }
  .mobile-menu__cta { width: 100%; margin-top: 24px; }

  .hero { min-height: 100svh; align-items: flex-start; }
  .hero__photo { inset: 0; background-position: 54% center; }
  .hero__content {
    width: calc(100% - 36px);
    padding-top: 108px;
    padding-bottom: 100px;
  }
  .hero__eyebrow {
    max-width: 100%; margin-bottom: 20px; gap: 10px;
    font-size: 8.5px; line-height: 1.65; letter-spacing: .28em;
  }
  .hero__eyebrow::before { width: 26px; flex: 0 0 26px; }
  .hero__title {
    max-width: 100%;
    font-size: clamp(43px, 13.5vw, 54px);
    line-height: .94;
    letter-spacing: -.015em;
  }
  .hero__title-line { overflow: visible; }
  .hero__title-line + .hero__title-line { margin-top: 8px; }
  .hero__subtitle {
    max-width: 31ch; margin-top: 22px;
    font-size: 10px; line-height: 1.7; letter-spacing: .16em;
  }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; margin-top: 28px; }
  .hero__actions .btn { width: 100%; min-height: 54px; padding: 14px 18px; font-size: 10px; }
  .hero__scroll { left: 50%; right: auto; bottom: 12px; width: max-content; transform: translateX(-50%); gap: 9px; text-align: center; }
  .hero__scroll span { display: block; white-space: nowrap; font-size: 8px; letter-spacing: .24em; }
  .hero__scroll-line { height: 34px; }

  .marquee { padding: 17px 0; }
  .marquee__item { font-size: 21px; }

  /* одна колонка — colCount() в JS */

  .about__media { width: calc(100% - 8px); }
  .about__media::before { inset: 10px -8px -10px 8px; }
  .about__sticker { right: 10px; bottom: 18px; padding: 11px 17px; }
  .about__text { margin-bottom: 32px; font-size: 15px; line-height: 1.75; }
  .about__stats { gap: 8px; padding-block: 26px; margin-bottom: 32px; }
  .about__stat { min-width: 0; text-align: center; }
  .about__stat-value { font-size: 36px; }
  .about__stat-label { font-size: 8px; line-height: 1.45; letter-spacing: .08em; overflow-wrap: anywhere; }
  .about__btn { width: 100%; }

  .portfolio__head { display: block; }
  .portfolio__head .section__title { margin-bottom: 14px; }
  .portfolio__count { padding: 0; margin-bottom: 28px; }
  .filters {
    flex-wrap: nowrap; gap: 8px; margin: 0 -16px 30px; padding: 0 16px 5px;
    overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; padding: 10px 16px; font-size: 9px; }
  .masonry, .masonry__col { gap: 14px; }
  .portfolio__more { margin-top: 26px; }
  .portfolio__more-btn { width: 100%; min-width: 0; }

  .services__grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .service-card { min-width: 0; padding: 30px 22px 26px; gap: 20px; }
  .service-card__name { font-size: 30px; }
  .service-card__meta { flex-wrap: wrap; gap: 8px 14px; line-height: 1.45; }
  .service-card li { font-size: 13px; }
  .service-card__btn { padding-inline: 12px; }
  .services__note { line-height: 1.65; }

  .review { gap: 22px; }
  .review__text { max-width: 100%; font-size: 24px; line-height: 1.38; overflow-wrap: anywhere; }
  .reviews__nav { justify-content: space-between; gap: 14px; margin-top: 34px; }
  .reviews__arrow { width: 48px; height: 48px; flex: 0 0 48px; }
  .reviews__dots { gap: 8px; }

  .contact__inner { gap: 42px; }
  .contact__text { margin-bottom: 28px; }
  .contact__link { align-items: flex-start; flex-direction: column; gap: 5px; padding: 16px 2px; }
  .contact__link-value { max-width: 100%; font-size: 21px; overflow-wrap: anywhere; }
  .form { padding: 24px 18px; }
  .form__input, .custom-select__trigger { font-size: 16px; }
  .custom-select__option { align-items: flex-start; flex-direction: column; gap: 3px; padding-right: 40px; }
  .custom-select__option-price { white-space: normal; }

  .about__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .reviews__slider { min-height: 0; }

  .footer__inner { grid-template-columns: 1fr; gap: 30px; padding-block: 54px 30px; }
  .footer__bottom { align-items: center; gap: 16px; }
  .form__submit { padding: 18px; }

  .to-top { width: 54px; height: 54px; }
  .footer__credit { order: 3; width: 100%; margin-top: -12px; }

  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
  .lightbox__close { right: 12px; top: 12px; }
  .lightbox__nav { top: auto; bottom: 22px; width: 48px; height: 48px; transform: none; }
  .lightbox__figure { max-width: calc(100vw - 28px); max-height: calc(100svh - 110px); }
  .lightbox__img { max-height: calc(100svh - 170px); }
  .lightbox__caption { gap: 10px; }
}

@media (max-width: 380px) {
  .hero__content { width: calc(100% - 28px); }
  .hero__title { font-size: clamp(40px, 13vw, 49px); }
  .hero__subtitle { font-size: 9.5px; }
  .about__stats { gap: 5px; }
  .about__stat-value { font-size: 32px; }
  .about__stat-label { font-size: 7.5px; }
  .footer__bottom p { width: calc(100% - 70px); }
}

/* Телефон в альбомной ориентации: отдельная компактная композиция Hero.
   Ширины 844–932 px уже не должны включать тяжёлую десктопную шапку. */
@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  :root { --header-h: 56px; }
  .header, .header.is-scrolled { height: 56px; }
  .header__inner { width: calc(100% - 36px); }
  .header__logo { font-size: 20px; }
  .hero { min-height: 100svh; align-items: center; }
  .hero__photo { inset: 0; background-position: center 43%; }
  .hero__content { width: calc(100% - 48px); padding: 58px 0 16px; }
  .hero__eyebrow { margin-bottom: 10px; font-size: 8px; letter-spacing: .27em; }
  .hero__eyebrow::before { width: 28px; }
  .hero__title { max-width: 92%; font-size: clamp(42px, 7vw, 64px); line-height: .88; letter-spacing: -.01em; }
  .hero__title-line { overflow: visible; }
  .hero__title-line + .hero__title-line { margin-top: 6px; }
  .hero__subtitle { max-width: 68ch; margin-top: 13px; font-size: 9px; line-height: 1.45; letter-spacing: .16em; }
  .hero__actions { gap: 10px; margin-top: 17px; }
  .hero__actions .btn { min-width: 190px; padding: 11px 22px; font-size: 9px; }
  .hero__scroll { display: none; }
  .marquee { padding-block: 14px; }
  .mobile-menu { padding-top: 66px; }
  .mobile-menu__inner { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; column-gap: 28px; }
  .mobile-menu__link { font-size: 30px; }
  .mobile-menu__socials, .mobile-menu__cta { grid-column: 1 / -1; margin-top: 10px; }
  .mobile-menu__cta { width: auto; }
}

@media (hover: none) {
  .masonry__overlay { opacity: 1; }
  .masonry__meta { transform: none; }
}

/* ---------- ПОДДЕРЖКА JS-СОСТОЯНИЙ ---------- */
@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.masonry.is-switching .masonry__item { animation: card-in 0.6s var(--ease-out) backwards; }

.form__row--error input,
.form__row--error textarea,
.form__row--error .custom-select__trigger {
  border-color: var(--danger) !important;
}
.form__row--error input::placeholder { color: var(--danger); }

.hidden { display: none !important; }

/* ---------- ДОСТУПНОСТЬ ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* file:// без сервера — заметная, но не кричащая плашка */
.portfolio__empty-note {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-dim);
  line-height: 1.6;
}
.portfolio__empty-note code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-gold);
  background: var(--bg-card);
}
