/* ГРАСТОН — landing, Moscow / RF market */
:root {
  --color-yellow: #ffd300;
  --color-yellow-hover: #e6bd00;
  --color-black: #141414;
  --color-gray-900: #1f1f1f;
  --color-gray-700: #3d3d3d;
  --color-gray-500: #6b6b6b;
  --color-gray-200: #ececec;
  --color-gray-100: #f5f5f5;
  --color-white: #ffffff;
  --color-accent: #c41e1e;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;
  --container: min(1180px, calc(100% - 40px));
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.1);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-700);
  background: var(--color-white);
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-black);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn--primary {
  background: var(--color-yellow);
  color: var(--color-black);
  border-color: var(--color-yellow);
}

.btn--primary:hover {
  background: var(--color-yellow-hover);
  border-color: var(--color-yellow-hover);
  box-shadow: var(--shadow-sm);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn--outline {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}

.btn--outline:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
  padding-block: 12px;
}

.header__logo,
.footer__logo {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

/* Логотип ГРАСТОН (HTML/CSS) */
.brand-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.brand-logo__bar {
  display: block;
  background: var(--color-yellow);
  padding: 6px 12px 5px;
  text-align: center;
}

.brand-logo__name {
  display: block;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--color-black);
  line-height: 1;
}

.brand-logo__first {
  color: var(--color-accent);
}

.brand-logo__tagline {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--color-black);
  text-align: center;
  line-height: 1.35;
}

.brand-logo--header .brand-logo__bar {
  padding: 7px 14px 6px;
}

.brand-logo--header .brand-logo__name {
  font-size: 1.1875rem;
  letter-spacing: 0.05em;
}

.brand-logo--header .brand-logo__tagline {
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
}

.brand-logo--footer .brand-logo__bar {
  padding: 5px 11px 4px;
}

.brand-logo--footer .brand-logo__name {
  font-size: 0.9375rem;
}

.brand-logo--footer .brand-logo__tagline {
  font-size: 0.4375rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.78);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
}

.burger__line {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--color-black);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.header__nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 32px;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-gray-700);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--color-black);
}

.header__aside {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.header__address {
  margin: 0;
  max-width: 240px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--color-gray-500);
}

.header__email {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--color-gray-700);
  text-decoration: none;
}

.header__email:hover {
  color: var(--color-black);
}

.header__phone {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-black);
  text-decoration: none;
}

.header__phone:hover {
  color: var(--color-accent);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
  padding-block: 88px 104px;
  color: var(--color-white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--color-gray-900) url("../assets/img/main.jpg") center 42% / cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 8, 8, 0.88) 0%, rgba(8, 8, 8, 0.72) 42%, rgba(8, 8, 8, 0.5) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-yellow);
}

.hero__title {
  margin: 0 0 20px;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-white);
}

.hero__lead {
  margin: 0 0 32px;
  font-size: 1.0625rem;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Sections */
.section {
  padding-block: 88px;
}

.section--muted {
  background: var(--color-gray-100);
}

.section--dark {
  background: var(--color-gray-900);
  color: rgba(255, 255, 255, 0.88);
}

.section__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

.section__title--light {
  color: var(--color-white);
}

.section__kicker {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.section__kicker--dark {
  color: var(--color-accent);
}

.section__subtitle {
  margin: 0 0 40px;
  max-width: 640px;
  color: var(--color-gray-500);
  font-size: 1rem;
}

.section__subtitle--tight {
  margin-bottom: 28px;
  line-height: 1.55;
}

.section__subtitle--light {
  color: rgba(255, 255, 255, 0.75);
}

/* Stats */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  margin-top: 24px;
}

.stats__grid--compact {
  gap: 32px 28px;
}

.stats__grid--compact .stats__label {
  max-width: 320px;
}

.stats__value {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-black);
  line-height: 1;
}

.stats__unit {
  font-size: 0.55em;
  font-weight: 700;
  margin-left: 4px;
}

.stats__percent {
  font-size: 0.65em;
}

.stats__label {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  line-height: 1.55;
}

/* Features */
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-card__icon {
  margin-bottom: 16px;
  min-height: 52px;
}

.feature-card__icon img {
  max-height: 52px;
  width: auto;
}

.feature-card__title {
  margin: 0 0 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-black);
}

.feature-card__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  line-height: 1.55;
}

/* Card grids */
.card-grid {
  display: grid;
  gap: 24px;
}

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

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.section--muted .product-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.product-card__media {
  background: var(--color-gray-200);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-card__media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.product-card__name {
  margin: 0;
  padding: 20px 20px 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-black);
}

.product-card__price {
  margin: 0;
  padding: 0 20px 16px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.product-card__btn {
  margin: 0 20px 20px;
  align-self: flex-start;
}

.prices-beton__footer {
  margin-top: 36px;
  text-align: center;
}

/* ЖБИ — производство (фото + преимущества) */
.zhbi-showcase__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.zhbi-showcase__media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-gray-900);
}

.zhbi-showcase__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(52vw, 420px);
  object-fit: cover;
  object-position: center;
}

.zhbi-showcase__content {
  padding-block: 4px;
}

.zhbi-showcase__content > .section__title {
  margin-bottom: 16px;
}

.zhbi-showcase__lead {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-gray-700);
}

.zhbi-showcase__kicker {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.zhbi-showcase__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zhbi-showcase__list li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-gray-700);
}

.zhbi-showcase__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-yellow);
  box-shadow: 0 0 0 2px var(--color-black);
}

.zhbi-showcase__list strong {
  color: var(--color-black);
  font-weight: 700;
}

.zhbi-showcase__note {
  margin: 0 0 24px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-gray-500);
}

.zhbi-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.zhbi-showcase .btn--outline {
  background: var(--color-white);
}

/* Order beton CTA */
.order-beton {
  position: relative;
  padding-block: 96px 108px;
  color: var(--color-white);
  overflow: hidden;
}

.order-beton__bg {
  position: absolute;
  inset: 0;
  background: var(--color-gray-900) url("../assets/img/order-beton-bg2.jpg") center / cover no-repeat;
}

.order-beton__overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 44, 44, 0.55);
}

.order-beton__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.order-beton .section__title {
  margin-bottom: 16px;
}

.order-beton__lead {
  margin: 0 0 32px;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.95);
}

.order-beton__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.order-beton__input {
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.order-beton__input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.order-beton__input:focus {
  outline: none;
  border-color: var(--color-yellow);
  background: rgba(255, 255, 255, 0.18);
}

.order-beton__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 28px;
}

.order-beton__submit {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  padding-inline: 32px;
}

.order-beton__call {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.order-beton__call a {
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
}

.order-beton__call a:hover {
  color: var(--color-yellow);
}

.order-beton__errors .js-rule-error-all {
  margin: 0 0 10px;
  color: #ffc9c9;
  font-size: 0.875rem;
  font-weight: 600;
}

.order-beton__success {
  margin-top: 20px;
  padding: 14px 18px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 211, 0, 0.22);
  color: var(--color-white);
  border: 1px solid rgba(255, 211, 0, 0.5);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Фото БСУ — сетка как на realizaciya-betona */
.bsu-gallery__wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bsu-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: minmax(200px, min(26vw, 280px));
  gap: 10px;
}

.bsu-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bsu-gallery__item:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-card);
}

.bsu-gallery__item:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

.bsu-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__img {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1200px);
  max-height: min(88vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.bsu-gallery__intro {
  margin-top: 0;
}

/* Forms */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__field--full {
  grid-column: 1 / -1;
}

.form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-gray-700);
}

.form__input {
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form__input:focus {
  outline: none;
  border-color: var(--color-yellow);
  box-shadow: 0 0 0 3px rgba(255, 211, 0, 0.25);
}

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

.form .btn--lg {
  grid-column: 1 / -1;
  justify-self: start;
}

.form__hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.form__hint a {
  color: var(--color-black);
  font-weight: 600;
}

.form__status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(37, 211, 102, 0.12);
  color: var(--color-gray-700);
  font-size: 0.9375rem;
  font-weight: 600;
}

.form__status--modal {
  margin-top: 12px;
}

.modal .js-errorbox-all {
  grid-column: 1 / -1;
}

.modal .js-errorbox-all .js-rule-error-all {
  margin: 0 0 10px;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.form__successbox {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(37, 211, 102, 0.14);
  color: var(--color-gray-700);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* О заводе */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 56px;
  align-items: center;
}

.about__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  object-fit: cover;
  max-height: 560px;
}

.about__text p {
  margin: 0 0 16px;
  color: var(--color-gray-700);
  line-height: 1.7;
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* Принципы */
.principles__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.principle-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid var(--color-gray-200);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.principle-card:hover {
  border-color: rgba(255, 211, 0, 0.65);
  box-shadow: var(--shadow-sm);
}

.principle-card__icon {
  margin-bottom: 12px;
}

.principle-card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-black);
}

.principle-card__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  line-height: 1.5;
}

/* Контакты + карта */
.contacts-block__grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  min-height: 400px;
}

.contacts-block__card {
  background: var(--color-gray-100);
  border-radius: var(--radius);
  padding: 28px 26px;
  border: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.contacts-block__heading {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-black);
}

.contacts-block__list {
  margin: 0;
  width: 100%;
}

.contacts-block__row {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-gray-200);
}

.contacts-block__row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contacts-block__row dt {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.contacts-block__row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.45;
}

.contacts-block__row a {
  text-decoration: none;
  color: var(--color-black);
}

.contacts-block__row a:hover {
  color: var(--color-accent);
}

.contacts-block__hint {
  display: block;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin-top: 4px;
}

.contacts-block__btn {
  margin-top: auto;
}

.contacts-block__map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
}

.contacts-block__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

/* Кнопка «наверх» */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 45;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-yellow);
  color: var(--color-black);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
}

.back-top__icon {
  font-size: 1.35rem;
  margin-top: -2px;
}

.back-top.back-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--color-yellow-hover);
  color: var(--color-black);
}

.back-top:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

/* Footer */
.footer {
  background: var(--color-black);
  color: rgba(255, 255, 255, 0.72);
  padding-block: 40px 32px;
  font-size: 0.875rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  justify-content: space-between;
}


.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer__nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
}

.footer__nav a:hover {
  color: var(--color-yellow);
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.footer__contacts a {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
}

.footer__contacts a:hover {
  color: var(--color-yellow);
}

.footer__contacts > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.875rem;
  font-weight: 500;
}

.footer__copy {
  margin: 0;
  width: 100%;
  flex-basis: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-card);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-gray-100);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-gray-700);
}

.modal__close:hover {
  background: var(--color-gray-200);
}

.modal__title.section__title {
  margin: 0 0 10px;
  text-align: left;
}

.modal__lead {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  line-height: 1.5;
}

.modal .form {
  grid-template-columns: 1fr;
}

.modal__note {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* Responsive */
@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .principles__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-block__grid {
    grid-template-columns: 1fr;
  }

  .zhbi-showcase__grid {
    grid-template-columns: 1fr;
  }

  .zhbi-showcase__media img {
    min-height: 280px;
    max-height: 420px;
  }

  .bsu-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(200px, 38vw));
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__contacts {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .order-beton__fields {
    grid-template-columns: 1fr;
  }

  .order-beton__actions {
    flex-direction: column;
    text-align: center;
  }

  .order-beton__call {
    text-align: center;
  }

  .bsu-gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(200px, 55vw);
  }

  .bsu-gallery__grid .bsu-gallery__item:nth-child(1),
  .bsu-gallery__grid .bsu-gallery__item:nth-child(2),
  .bsu-gallery__grid .bsu-gallery__item:nth-child(3),
  .bsu-gallery__grid .bsu-gallery__item:nth-child(4) {
    grid-area: auto;
  }

  .burger {
    display: flex;
  }

  .header__nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    gap: 12px;
  }

  .header__aside {
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
    padding-top: 12px;
    border-top: 1px solid var(--color-gray-200);
  }

  .stats__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .form .btn--lg {
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  :root {
    --container: calc(100% - 28px);
  }

  .section {
    padding-block: 64px;
  }

  .hero {
    min-height: 70vh;
    padding-block: 64px 72px;
  }

  .card-grid--3,
  .card-grid--2,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

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

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

  .zhbi-showcase__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .zhbi-showcase__actions .btn--lg {
    width: 100%;
    justify-content: center;
  }
}

body.nav-open {
  overflow: hidden;
}
