/* ===== Variables ===== */
:root {
  --color-bg-dark: #0C0C0E;
  --color-bg-elevated: #141416;
  --color-red: #A81B0A;
  --color-red-dark: #921E18;
  --color-red-hover: #8A1508;
  --color-text-light: #FFFFFF;
  --color-text-muted: rgba(255, 255, 255, 0.72);
  --font-heading: 'Russo One', sans-serif;
  --font-body: 'Mooli', sans-serif;
  --container-width: 1440px;
  --header-height: 88px;
  --radius-btn: 4px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-light);
  background: var(--color-bg-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.btn--hero {
  background: rgba(90, 8, 8, 0.75);
  color: #ffffff;
  padding: 15px 36px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 999px;
  border: 1px solid rgba(210, 50, 40, 0.9);
  box-shadow:
    0 0 8px 1px rgba(255, 40, 30, 0.95),
    0 0 22px 8px rgba(200, 20, 10, 0.75),
    0 0 48px 18px rgba(152, 0, 0, 0.55),
    0 0 80px 32px rgba(152, 0, 0, 0.28);
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.btn--hero:hover {
  background: rgba(110, 12, 12, 0.88);
  border-color: rgba(255, 70, 55, 1);
  box-shadow:
    0 0 10px 2px rgba(255, 50, 40, 1),
    0 0 28px 12px rgba(200, 20, 10, 0.85),
    0 0 56px 24px rgba(152, 0, 0, 0.6),
    0 0 90px 40px rgba(152, 0, 0, 0.32);
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 12, 14, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  min-height: var(--header-height);
  padding-top: 14px;
  padding-bottom: 14px;
}

.header__cluster--left {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.header__cluster--right {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.header__logo {
  display: flex;
  align-items: center;
  height: 52px;
  max-width: 140px;
  z-index: 1;
}

.header__logo-img {
  display: block;
  height: 52px !important;
  width: auto !important;
  max-width: 140px;
  max-height: 52px;
  object-fit: contain;
}

.header__glow {
  justify-self: center;
  width: 3px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(168, 27, 10, 0.15) 0%,
    #ff2a14 45%,
    #A81B0A 55%,
    rgba(168, 27, 10, 0.15) 100%
  );
  box-shadow:
    0 0 6px 1px rgba(255, 50, 30, 0.95),
    0 0 16px 4px rgba(168, 27, 10, 0.75),
    0 0 32px 8px rgba(168, 27, 10, 0.35);
}

.header__brand {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(12px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  white-space: nowrap;
  margin: 0;
}

.header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 44px;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
  justify-self: end;
}

.header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.header__burger--open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__burger--open span:nth-child(2) {
  opacity: 0;
}

.header__burger--open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== Menu panel ===== */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.55);
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1200;
  width: min(360px, 88vw);
  height: 100%;
  padding: 100px 36px 40px;
  background: var(--color-bg-elevated);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  animation: menuIn 0.28s ease;
}

.menu-panel__close {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, 0.88);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.menu-panel__close:hover {
  color: var(--color-text-light);
}

@keyframes menuIn {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.menu-panel__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.menu-panel__list > li > a,
.menu-panel__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: color 0.2s;
}

.menu-panel__list > li > a:hover,
.menu-panel__toggle:hover {
  color: var(--color-red);
}

.menu-panel__chevron {
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.25s ease;
}

.menu-panel__toggle--open .menu-panel__chevron {
  transform: rotate(180deg);
}

.menu-panel__sub {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 16px;
}

.menu-panel__sub a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color 0.2s;
}

.menu-panel__sub li:last-child a {
  border-bottom: none;
}

.menu-panel__sub a:hover {
  color: var(--color-red);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(0.28) contrast(1.06) brightness(0.9) saturate(0.65);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, 0.5) 0%, rgba(10, 10, 12, 0.25) 50%, rgba(10, 10, 12, 0.4) 100%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.4) 0%, rgba(10, 10, 12, 0.12) 35%, rgba(10, 10, 12, 0.45) 100%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.5;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 32px;
  align-items: start;
  padding-top: 7vh;
  padding-bottom: 12vh;
  min-height: calc(100vh - var(--header-height));
  /* весь блок вбок: больше = правее, минус = левее */
  transform: translateX(185px);
}

.hero__subtitle {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2em;
  margin: 0;
  margin-top: 15vh;
  /* только этот блок; заголовок не двигается */
  transform: translateX(20px);
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: 500;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
  color: #fff;
}

.hero__subtitle span {
  display: block;
  white-space: nowrap;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  justify-self: start;
  margin-left: 0;
  margin-top: 18vh;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  line-height: 1.04;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.08em;
  color: #fff;
}

.hero__title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 1.04;
}

.hero__btn {
  flex-shrink: 0;
  /* кнопка отдельно: +X вправо, -X влево, +Y вниз, -Y вверх */
  transform: translate(70px, 25px);
  /* или так же: margin-left / margin-top */
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Services ===== */
.services {
  background: var(--color-bg-dark);
  padding: 48px 0 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, minmax(190px, 210px));
  gap: 14px;
}

.service-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  min-height: 100%;
  text-decoration: none;
  color: var(--color-text-light);
}

.service-card__bg {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  object-fit: cover;
  filter: blur(1px);
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.service-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 12, 14, 0.78) 0%,
    rgba(12, 12, 14, 0.35) 42%,
    rgba(12, 12, 14, 0.55) 100%
  );
  transition: background 0.35s ease;
}

.service-card__content {
  position: absolute;
  top: 20px;
  z-index: 2;
  padding: 0 22px;
  max-width: 90%;
}

.service-card--align-right .service-card__content {
  right: 0;
  text-align: right;
}

.service-card--align-left .service-card__content {
  left: 0;
  text-align: left;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.service-card--software .service-card__title {
  font-size: 28px;
}

.service-card__subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s ease;
}

.service-card__arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-light);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.service-card__arrow svg {
  display: block;
}

.service-card--software { grid-column: 1 / 3; grid-row: 1; }
.service-card--3d { grid-column: 3; grid-row: 1 / 3; }
.service-card--cad { grid-column: 1; grid-row: 2 / 4; }
.service-card--wood { grid-column: 2; grid-row: 2; }
.service-card--smd { grid-column: 2 / 4; grid-row: 3; }
.service-card--scan { grid-column: 1; grid-row: 4; }
.service-card--edm { grid-column: 2 / 4; grid-row: 4; }
.service-card--metal { grid-column: 1 / 3; grid-row: 5; }
.service-card--cutting { grid-column: 3; grid-row: 5; }

.service-card--software .service-card__bg {
  filter: none;
}

.service-card:hover .service-card__bg {
  transform: scale(1.06);
}

.service-card:hover .service-card__overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 14, 0.65) 0%,
    rgba(12, 12, 14, 0.28) 42%,
    rgba(12, 12, 14, 0.48) 100%
  );
}

.service-card:hover .service-card__title,
.service-card:hover .service-card__subtitle {
  color: #ff0505;
}

.service-card:hover .service-card__arrow {
  opacity: 1;
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Section divider (между hero и услугами) ===== */
.section-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Page Divider ===== */
.page-divider {
  background: var(--color-bg-dark);
  padding: 64px 0;
}

.page-divider__line {
  border: none;
  height: 1px;
  margin: 0;
  background: rgba(255, 255, 255, 0.16);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg-dark);
  padding: 0 0 72px;
}

.footer__frame {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.footer__head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.footer__heading {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.footer__heading + .footer__heading {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.footer__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 24px;
  text-align: center;
  min-height: 220px;
}

.footer__cell + .footer__cell {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.footer__cell-heading {
  display: none;
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.footer__item dt {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.footer__item dd {
  font-size: 16px;
  font-weight: 500;
}

.footer__item dd a:hover {
  color: var(--color-red);
}

.footer__about {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 360px;
}

.footer__map {
  width: 100%;
  max-width: 320px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1e;
}

.footer__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.footer__address {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  max-width: 280px;
}

/* ===== Service pages ===== */
.page-service {
  min-height: 100vh;
}

.page-service__main {
  padding: 64px 40px 96px;
}

.page-service__back {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  transition: color 0.2s;
}

.page-service__back:hover {
  color: var(--color-text-light);
}

.page-service__title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.page-service__lead {
  font-size: 18px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 48px;
}

.page-service__content {
  min-height: 280px;
}

/* ===== Service detail (по макету) ===== */
.service-hero {
  background: #9a0f12;
  padding: 28px 0 80px;
}

.service-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-hero__back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 28px;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  transition: opacity 0.2s;
}

.service-hero__back:hover {
  opacity: 0.8;
}

.service-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  align-self: center;
  text-align: center;
}

.service-hero__lead {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  align-self: center;
  text-align: center;
}

.service-body {
  background: #050711;
  padding: 56px 0 96px;
  overflow: hidden;
}

.service-block + .service-block {
  margin-top: 48px;
}

.service-block__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}

.service-block__text {
  max-width: 920px;
  margin: 0;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.service-stack {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-stack__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.service-stack__label {
  font-weight: 400;
}

.service-stack__value {
  color: rgba(255, 255, 255, 0.88);
}

.service-printers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  margin: 28px 0 36px;
  max-width: 1100px;
  align-items: stretch;
}

.service-printer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-printer__role {
  margin: -4px 0 10px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.service-printers--single {
  grid-template-columns: minmax(0, 480px);
  max-width: 480px;
}

.service-printers--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
}

.service-printer__name {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}

.service-printer__specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.service-printer__note {
  margin: auto 0 0;
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.service-printer__note a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.service-printer__note a:hover {
  color: var(--color-text-light);
}

/* ===== Feedback form ===== */
.page-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 8px;
  padding-bottom: 48px;
}

.page-feedback .page-service__back {
  align-self: flex-start;
  margin-bottom: 20px;
}

.page-feedback .page-service__title {
  margin-bottom: 12px;
}

.page-feedback .page-service__lead {
  max-width: 520px;
  margin-bottom: 28px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 520px;
  margin-bottom: 28px;
  text-align: left;
}

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

.feedback-form__label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.feedback-form__input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-light);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.feedback-form__input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.feedback-form__input--invalid {
  border-color: rgba(220, 50, 40, 0.85);
}

.feedback-form__error {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 120, 110, 0.95);
}

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

.feedback-form__submit {
  align-self: center;
  margin-top: 8px;
}

.feedback-form__note {
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.feedback-form__note a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback-form__note a:hover {
  color: var(--color-text-light);
}

#services,
#contacts {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .header__brand {
    white-space: normal;
    max-width: 340px;
    font-size: 13px;
  }

  .footer__head,
  .footer__body {
    grid-template-columns: 1fr 1fr;
  }

  .footer__heading:nth-child(3),
  .footer__cell:nth-child(3) {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .footer__heading:nth-child(3) {
    border-top: none;
  }

  .footer__head .footer__heading:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .service-printers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .header__brand {
    font-size: 11px;
    max-width: 220px;
  }

  .header__glow {
    height: 26px;
    width: 2px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    row-gap: 32px;
    align-items: start;
    min-height: 0;
    padding-top: 8vh;
    padding-bottom: 8vh;
    transform: none;
  }

  .hero__subtitle {
    margin-top: 0;
    align-items: flex-start;
    text-align: left;
    transform: none;
  }

  .hero__subtitle span {
    white-space: normal;
  }

  .hero__copy {
    justify-self: start;
    margin-left: 0;
    margin-top: 0;
    width: 100%;
  }

  .hero__btn {
    transform: none;
  }

  .services__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .service-card--software,
  .service-card--3d,
  .service-card--smd,
  .service-card--cad,
  .service-card--edm,
  .service-card--metal {
    grid-column: 1 / 3;
    grid-row: auto;
    min-height: 220px;
  }

  .service-card--3d,
  .service-card--cad {
    min-height: 260px;
  }

  .service-card--wood,
  .service-card--scan,
  .service-card--cutting {
    grid-column: auto;
    grid-row: auto;
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .container {
    padding: 0 24px;
  }

  .header__inner {
    padding-top: 10px;
    padding-bottom: 10px;
    column-gap: 12px;
  }

  .header__brand {
    font-size: 10px;
    max-width: 180px;
    letter-spacing: 0.04em;
    line-height: 1.25;
  }

  .header__logo,
  .header__logo-img {
    height: 44px !important;
    max-height: 44px;
  }

  .header__logo {
    max-width: 110px;
  }

  .header__logo-img {
    max-width: 110px;
  }

  .menu-panel {
    width: min(320px, 100vw);
    padding:
      calc(var(--header-height) + 12px)
      24px
      max(28px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  .menu-panel__close {
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
  }

  .hero {
    min-height: auto;
  }

  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(8, 8, 10, 0.82) 0%, rgba(8, 8, 10, 0.5) 45%, rgba(8, 8, 10, 0.88) 100%);
  }

  .hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    min-height: min(88vh, 680px);
    padding-top: 32px;
    padding-bottom: 32px;
    text-align: center;
  }

  .hero__copy {
    display: contents;
  }

  .hero__title {
    order: 1;
    width: 100%;
    font-size: clamp(30px, 8vw, 42px);
    text-align: center;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  }

  .hero__title-line {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__subtitle {
    order: 2;
    margin: 0;
    align-items: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  }

  .hero__btn {
    order: 3;
    align-self: center;
    transform: none;
  }

  .btn--hero {
    padding: 14px 28px;
    font-size: 14px;
  }

  .services {
    padding: 36px 0 0;
  }

  .service-card {
    min-height: 210px;
    border-radius: 12px;
  }

  .service-card__overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 8, 10, 0.35) 0%,
      rgba(8, 8, 10, 0.72) 55%,
      rgba(8, 8, 10, 0.94) 100%
    );
  }

  .service-card--software .service-card__bg {
    filter: blur(4px) brightness(0.45);
    transform: scale(1.08);
  }

  .service-card__content {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    padding: 48px 18px 16px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(8, 8, 10, 0.55) 28%,
      rgba(8, 8, 10, 0.96) 100%
    );
  }

  .service-card--align-right .service-card__content,
  .service-card--align-left .service-card__content {
    left: 0;
    right: 0;
    text-align: left;
  }

  .service-card__title {
    font-size: 20px;
    margin-bottom: 6px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  }

  .service-card--software .service-card__title {
    font-size: 22px;
  }

  .service-card__subtitle {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  }

  .service-card__arrow {
    right: 14px;
    bottom: 14px;
    width: 36px;
    height: 36px;
    opacity: 1;
    transform: none;
    background: rgba(255, 255, 255, 0.18);
  }

  .page-divider {
    padding: 40px 0;
  }

  .footer {
    padding: 0 0 40px;
  }

  .footer__frame {
    border: none;
    gap: 0;
  }

  .footer__head {
    display: none;
  }

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

  .footer__cell-heading {
    display: block;
    margin: 0 0 20px;
    font-size: 13px;
    text-align: center;
    width: 100%;
  }

  .footer__cell {
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 0;
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .footer__cell:first-child {
    border-top: none;
    padding-top: 0;
  }

  .footer__cell + .footer__cell,
  .footer__cell:nth-child(3) {
    border-left: none;
  }

  .footer__list {
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .footer__item {
    width: 100%;
  }

  .footer__item dt {
    margin-bottom: 6px;
  }

  .footer__about,
  .footer__address {
    max-width: none;
    text-align: center;
  }

  .footer__map {
    width: 100%;
    max-width: none;
    height: 200px;
  }

  .footer__cell--map {
    padding-bottom: 0;
  }

  .service-printers--duo {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .service-printers--single {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (max-width: 576px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding: 0 16px;
  }

  .header__inner {
    grid-template-columns: 1fr auto;
    column-gap: 0;
  }

  .header__brand,
  .header__glow {
    display: none;
  }

  .header__cluster--left {
    grid-template-columns: auto;
  }

  .header__cluster--right {
    grid-template-columns: auto;
  }

  .header__logo,
  .header__logo-img {
    height: 36px !important;
    max-height: 36px;
  }

  .header__logo {
    max-width: 88px;
  }

  .header__logo-img {
    max-width: 88px;
  }

  .header__burger {
    width: 32px;
    min-width: 44px;
    min-height: 44px;
  }

  .hero__inner {
    min-height: min(84vh, 620px);
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .hero__title {
    font-size: clamp(26px, 9vw, 34px);
    letter-spacing: 0.02em;
  }

  .hero__subtitle {
    font-size: 11px;
  }

  .btn--hero {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    box-shadow:
      0 0 6px 1px rgba(255, 40, 30, 0.85),
      0 0 18px 6px rgba(200, 20, 10, 0.6),
      0 0 36px 14px rgba(152, 0, 0, 0.4);
  }

  .hero__grid {
    background-size: 48px 48px;
    opacity: 0.35;
  }

  .services {
    padding: 28px 0 0;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .service-card--software,
  .service-card--3d,
  .service-card--cad,
  .service-card--wood,
  .service-card--smd,
  .service-card--scan,
  .service-card--metal,
  .service-card--cutting,
  .service-card--edm {
    grid-column: 1;
    min-height: 196px;
  }

  .service-card--software,
  .service-card--smd,
  .service-card--edm,
  .service-card--metal {
    min-height: 208px;
  }

  .service-card__title {
    font-size: 18px;
  }

  .service-card--software .service-card__title {
    font-size: 20px;
  }

  .service-card__subtitle {
    font-size: 12px;
  }

  .footer__heading {
    padding: 14px 16px;
    font-size: 13px;
  }

  .footer__cell {
    padding: 20px 0;
  }

  .footer__item dd {
    font-size: 15px;
  }

  .footer__about,
  .footer__address {
    font-size: 13px;
  }

  .footer__map {
    height: 180px;
  }

  .page-service__main {
    padding: 32px 16px 64px;
  }

  .page-service__title {
    font-size: 28px;
  }

  .page-service__lead {
    font-size: 16px;
    margin-bottom: 36px;
  }

  .service-hero {
    padding: 16px 0 48px;
  }

  .service-hero__back {
    margin-bottom: 20px;
    font-size: 15px;
  }

  .service-hero__title {
    font-size: clamp(26px, 8vw, 36px);
  }

  .service-hero__lead {
    font-size: 15px;
  }

  .service-body {
    padding: 32px 0 64px;
  }

  .service-block + .service-block {
    margin-top: 32px;
  }

  .service-block__title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 14px;
  }

  .service-block__text {
    font-size: 15px;
    line-height: 1.5;
  }

  .service-printers {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 22px 0 24px;
  }

  .service-printer__name {
    font-size: 17px;
  }

  .service-printer__specs {
    font-size: 14px;
  }

  .service-printer__note {
    font-size: 13px;
  }

  .feedback-form__input {
    font-size: 16px;
  }

  .page-feedback {
    padding-bottom: 32px;
  }
}

@media (hover: none) {
  .service-card__arrow {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__video,
  .hero__copy,
  .hero__subtitle,
  .hero__btn,
  .menu-panel {
    animation: none;
  }
}
