*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0c0e12;
  --bg-alt: #12151c;
  --surface: #1a1f28;
  --border: #2a3344;
  --text: #eef1f6;
  --muted: #8b95a8;
  --accent: #e85d2a;
  --accent-dim: #c44a1f;
  --steel: #4a90c4;
  --radius: 10px;
  --container: 1120px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 14, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.logo__text span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.nav__cta {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
}

.nav__cta:hover {
  background: var(--accent-dim);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before {
  top: -6px;
}

.nav-toggle__bar::after {
  top: 6px;
}

/* Hero */
.hero {
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(74, 144, 196, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(232, 93, 42, 0.08), transparent);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dim);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--muted);
}

.btn--light {
  background: #fff;
  color: var(--bg);
}

.hero__stats {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero__stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.hero__stats span {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero__image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hero__image {
  width: 100%;
  height: auto;
  display: block;
}

/* Оборудование */
.equipment-card--below {
  margin-top: 2rem;
}

.equipment-card--below .equipment-card__media img {
  object-position: center 32%;
}

.equipment-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.equipment-card__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.equipment-card__body {
  padding: 1.5rem 1.5rem 1.5rem 0;
}

.equipment-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.equipment-card__type {
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.35rem 0 0.75rem;
}

.equipment-card__body > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.equipment-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.equipment-card__tags li {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(232, 93, 42, 0.12);
  color: var(--accent);
  border: 1px solid rgba(232, 93, 42, 0.25);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section__head--left {
  text-align: left;
  margin-left: 0;
}

.section__head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
}

.section__desc {
  color: var(--muted);
  margin-top: 0.75rem;
}

.section__desc code {
  font-size: 0.85em;
  color: var(--steel);
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.service-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: rgba(232, 93, 42, 0.4);
  transform: translateY(-2px);
}

.service-card__icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Works */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.work-card:hover {
  border-color: var(--steel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.work-card__img-wrap {
  aspect-ratio: 16/10;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card__img--contain {
  object-fit: contain;
  object-position: center center;
}

.work-card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: linear-gradient(160deg, #1a1f28, #0c0e12);
}

.work-card__img.loaded + .work-card__fallback {
  display: none;
}

.work-card__body {
  padding: 1.25rem;
}

.work-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.work-card dl {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.work-card dt {
  color: var(--muted);
  font-weight: 500;
  display: inline;
}

.work-card dt::after {
  content: ": ";
}

.work-card dd {
  display: inline;
  color: var(--text);
}

.work-card dd::after {
  content: "";
  display: block;
  margin-bottom: 0.25rem;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  color: var(--muted);
  margin-top: 1rem;
}

.checklist {
  list-style: none;
  margin-top: 1.5rem;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 0.95rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.about__cards {
  display: grid;
  gap: 1rem;
}

.info-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--steel);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.steps li {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
}

.steps h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1rem;
}

.steps p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  padding: 0;
}

.cta-band__inner {
  padding: 3.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border-radius: var(--radius);
}

.cta-band h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
}

.cta-band p {
  margin: 0.75rem auto 1.5rem;
  max-width: 480px;
  opacity: 0.95;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.form__full {
  grid-column: 1 / -1;
}

.form input,
.form textarea {
  font: inherit;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form__submit {
  grid-column: 1 / -1;
  justify-self: start;
}

.form__note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
}

.form__note.success {
  color: #5dce8a;
}

.contact__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__block h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.contact__block a {
  display: block;
  color: var(--steel);
  font-weight: 600;
}

.contact__block a + a {
  margin-top: 0.35rem;
}

.contact__block a:hover {
  color: var(--accent);
}

.contact__block p {
  color: var(--text);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer a:hover {
  color: var(--text);
}

/* Lightbox */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}

.lightbox.is-open {
  display: flex;
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: min(96vw, 1400px);
  max-height: 96vh;
  pointer-events: auto;
}

.lightbox__figure img {
  display: block;
  max-width: 96vw;
  max-height: calc(96vh - 5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.lightbox__figure figcaption {
  text-align: center;
  max-width: 52rem;
  padding: 0 0.5rem;
  color: #c5cdd9;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid,
  .about,
  .contact,
  .equipment-card {
    grid-template-columns: 1fr;
  }

  .equipment-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .hero__visual {
    order: -1;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav__cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .hero__stats {
    gap: 1.5rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .form {
    grid-template-columns: 1fr;
  }
}
