/* Header and navigation */
.site-header { position: sticky; top: 10px; z-index: 100; padding-top: 10px; }
.header-shell { position: relative; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px 10px 16px; border-radius: 22px; background: rgba(251,248,243,.78); border: 1px solid rgba(39,44,49,.08); backdrop-filter: blur(20px); box-shadow: 0 14px 34px rgba(39,44,49,.10); }
.header-brand { display: flex; flex-direction: column; align-items: stretch; flex: none; width: 350px; max-width: 38vw; gap: 8px; }
.header-brand__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-brand__home { display: block; min-width: 0; line-height: 0; }
.brand-logo { display: block; width: 235px; max-width: 100%; }
.header-call-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; background: var(--color-graphite); color: #fff; box-shadow: 0 10px 22px rgba(36,40,44,.18); transition: .2s transform, .2s background; }
.header-call-button:hover { transform: translateY(-2px); background: #1f2428; }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; color: #5e5b57; }
.header-nav a:not(.button) { padding: 10px 0; }
.header-nav a[aria-current="page"] { color: var(--color-brick); font-weight: 800; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--color-line); border-radius: 14px; background: rgba(255,255,255,.82); color: var(--color-graphite); font-size: 22px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 17px; border: 0; border-radius: var(--radius-small); background: var(--color-brick); color: var(--color-white); font-weight: 850; box-shadow: 0 12px 26px rgba(191,86,56,.24); transition: .2s transform, .2s background; }
.button:hover { transform: translateY(-2px); background: var(--color-brick-dark); }
.button--secondary { background: rgba(255,255,255,.82); color: var(--color-graphite); border: 1px solid var(--color-line); box-shadow: none; }
.button--dark { background: var(--color-graphite); box-shadow: 0 12px 26px rgba(39,44,49,.20); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cards and reusable blocks */
.card { border: 1px solid var(--color-line); background: rgba(255,255,255,.88); border-radius: var(--radius-medium); box-shadow: var(--shadow-card); }
.glass { background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.36); backdrop-filter: blur(20px); box-shadow: 0 20px 46px rgba(20,22,24,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 13px; border-radius: 999px; background: rgba(255,255,255,.82); border: 1px solid var(--color-line); color: #5f5a55; font-size: 13px; font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 24px; }
.stat-card__value { font-size: 44px; line-height: 1; font-weight: 950; margin-bottom: 10px; }
.stat-card__title { font-weight: 850; margin-bottom: 7px; }
.stat-card__text { color: var(--color-text-muted); line-height: 1.5; font-size: 14px; }

.project-card { overflow: hidden; }
.project-card__image { aspect-ratio: 1.28; overflow: hidden; position: relative; }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: .35s transform; }
.project-card:hover .project-card__image img { transform: scale(1.035); }
.project-card__status { position: absolute; top: 14px; left: 14px; padding: 8px 11px; border-radius: 999px; background: rgba(251,248,243,.88); backdrop-filter: blur(12px); font-size: 12px; font-weight: 850; }
.project-card__body { padding: 19px; }
.project-card__body h3 { margin: 0 0 10px; font-size: 22px; }
.project-card__body p { margin: 0 0 16px; color: var(--color-text-muted); line-height: 1.54; }
.project-card__image-link { display: block; color: inherit; text-decoration: none; }
.project-card__image-link:focus-visible { outline: 3px solid rgba(191,86,56,.38); outline-offset: -3px; }
.project-grid--featured .project-card.is-featured-collapsed { display: none; }
.portfolio-more-actions { display: flex; justify-content: center; margin-top: 20px; }
.portfolio-more-button { min-width: 180px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.meta-tag { padding: 7px 9px; border-radius: 999px; background: #f4eee7; font-size: 12px; font-weight: 850; color: #5f5a55; }
.text-link { color: var(--color-brick); font-weight: 850; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field label { display: block; margin-bottom: 8px; color: #5d5853; font-size: 13px; font-weight: 850; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--color-line); background: #fdfbf8; color: var(--color-graphite); border-radius: 14px; padding: 14px 15px; outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(191,86,56,.55); box-shadow: 0 0 0 4px rgba(191,86,56,.08); }
.notice { padding: 15px 17px; border-radius: 16px; background: #fff4ef; border: 1px solid rgba(191,86,56,.16); color: #624f47; line-height: 1.5; }

/* Footer */
.site-footer { margin-top: 90px; padding: 0 0 28px; }
.footer-shell { display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 28px; padding: 28px; border-radius: 28px; background: var(--color-graphite); color: var(--color-white); box-shadow: var(--shadow-large); }
.footer-logo { width: 230px; filter: brightness(1.08); }
.footer-shell p { color: #d7d2cc; line-height: 1.58; }
.footer-title { margin: 0 0 12px; font-size: 16px; }
.footer-links { display: grid; gap: 9px; color: #ddd7d0; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; font-size: 13px; color: #8a837c; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 200; max-width: 330px; padding: 16px 18px; border-radius: 16px; background: var(--color-graphite); color: #fff; box-shadow: var(--shadow-large); transform: translateY(140%); transition: .25s transform; }
.toast.is-visible { transform: translateY(0); }


/* Кнопки внешних площадок: единый дизайн ВКонтакте и Profi.ru */
.platform-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.platform-buttons--header { width: 100%; max-width: none; flex-wrap: nowrap; gap: 8px; }
.platform-buttons--footer { margin-top: 7px; align-items: stretch; }
.platform-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  box-shadow: none;
  transition: .2s transform, .2s filter;
}
.platform-button:hover { transform: translateY(-2px); filter: brightness(.94); }
.platform-button--vk { background: var(--color-graphite); }
.platform-button--profi { background: var(--color-brick); }
.platform-buttons--header .platform-button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 8px 7px; border-radius: 9px; font-size: 11px; }
.platform-button--large { min-height: 48px; padding: 12px 22px; }
.site-footer .platform-button { color: #fff; }

.platform-buttons--reviews { flex-wrap: nowrap; gap: 8px; }
.platform-button--compact { min-height: 42px; padding: 10px 17px; border-radius: 10px; font-size: 12px; }


.header-call-icon { width: 22px; height: 22px; display: block; }
.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; }

.header-mobile-actions { display: none; }
.header-call-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; background: var(--color-graphite); color: #fff; box-shadow: 0 10px 22px rgba(36,40,44,.18); transition: .2s transform, .2s background; }
.header-call-button:hover { transform: translateY(-2px); background: #1f2428; }
.header-call-icon { width: 22px; height: 22px; display: block; }
.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; }

.platform-button--call { background: var(--color-graphite); }
.platform-button--icon { width: 48px; min-width: 48px; padding: 0; }
.platform-button__icon { width: 21px; height: 21px; display: block; }
.platform-buttons--header .platform-button--icon { width: 36px; min-width: 36px; min-height: 36px; }
.platform-buttons--reviews .platform-button--icon,
.platform-buttons--footer .platform-button--icon { width: 42px; min-width: 42px; min-height: 42px; }


/* Равные кнопки связи */
.platform-buttons--footer,
.contact-socials .platform-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}
.platform-buttons--footer .platform-button,
.contact-socials .platform-button {
  width: 100%;
  min-width: 0;
}
.platform-buttons--footer .platform-button--icon,
.contact-socials .platform-button--icon {
  width: 100%;
  min-width: 0;
}


/* Рабочие формы заявок */
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-consent { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 14px; color: var(--color-text-muted); font-size: 12px; line-height: 1.45; }
.form-consent input { flex: none; margin-top: 3px; }
.form-consent a { color: var(--color-brick); text-decoration: underline; text-underline-offset: 2px; }
.form-status { min-height: 20px; margin: 8px 0 12px; padding: 0; font-size: 13px; line-height: 1.4; }
.form-status--success, .form-status--error { padding: 11px 13px; border-radius: 12px; }
.form-status--success { background: #e7f4e8; color: #225d2b; }
.form-status--error { background: #fbe8e5; color: #8d2d20; }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.privacy-card { max-width: 900px; padding: clamp(22px, 4vw, 42px); }
.privacy-card h2 { margin: 28px 0 8px; font-size: 24px; }
.privacy-card p { line-height: 1.65; }
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }


/* Одностраничная навигация */
.header-shell { overflow: visible; }
.header-brand { width: 350px; max-width: min(55vw, 350px); }
.menu-toggle {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  cursor: pointer;
  z-index: 5;
}
.menu-toggle span { width: 21px; height: 2px; border-radius: 999px; background: currentColor; transition: .28s transform, .2s opacity; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-nav--dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 12px;
  z-index: 30;
  display: grid;
  width: min(360px, calc(100vw - 24px));
  overscroll-behavior: contain;
  max-height: min(70dvh, 620px, calc(100dvh - 130px));
  overflow: auto;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(39,44,49,.09);
  border-radius: 20px;
  background: rgba(251,248,243,.97);
  box-shadow: 0 24px 70px rgba(24,28,31,.19);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px) scale(.975);
  transform-origin: top right;
  transition: .24s opacity, .24s transform, .24s visibility;
}
.header-nav--dropdown.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.header-nav--dropdown a { display: block; padding: 13px 15px !important; border-radius: 13px; color: var(--color-graphite); font-weight: 800; transition: .18s background, .18s transform; }
.header-nav--dropdown a:hover { background: rgba(191,86,56,.09); transform: translateX(4px); }

/* Нажатия */
.pressable { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.pressable:active { transform: scale(.975); }
.press-ripple { position: absolute; z-index: 5; border-radius: 50%; background: rgba(255,255,255,.34); pointer-events: none; transform: scale(0); animation: press-ripple .62s ease-out forwards; }
.button--secondary .press-ripple, .filter-button .press-ripple, .text-link .press-ripple { background: rgba(191,86,56,.18); }
@keyframes press-ripple { to { transform: scale(1); opacity: 0; } }


/* Сравнение фотографий «Было / Стало» */
.before-after {
  --position: 50%;
  position: relative;
  isolation: isolate;
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  background: #d9d4ce;
}
.before-after__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none !important;
}
.before-after__after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--position)) 0 0);
}
.before-after__divider {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--position);
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 0 1px rgba(39,44,49,.16), 0 0 18px rgba(0,0,0,.28);
  pointer-events: none;
}
.before-after__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: var(--color-brick);
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.before-after__label {
  position: absolute;
  z-index: 3;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(31,35,39,.78);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.before-after__label--before { left: 14px; }
.before-after__label--after { right: 14px; }
.before-after__range {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.before-after:focus-within {
  outline: 3px solid rgba(191,86,56,.28);
  outline-offset: 3px;
}
