/* Тема: тёмно-серый, белый, акцент сине-зелёный */
:root {
  --bg: #12151a;
  --bg-elevated: #1a1f26;
  --bg-card: #222831;
  --text: #e8eaef;
  --text-muted: #9aa3b2;
  --accent: #2a9d8f;
  --accent-hover: #238b7e;
  --accent-subtle: rgba(42, 157, 143, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --warning-bg: rgba(234, 179, 8, 0.08);
  --warning-border: rgba(234, 179, 8, 0.45);
  --warning-text: #fcd34d;
  --container: min(1120px, 100% - 2 * clamp(1rem, 4vw, 2rem));
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 12px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 21, 26, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-height: var(--header-h);
  gap: clamp(0.5rem, 2vw, 1.25rem);
}

.header__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--text);
}

.logo__accent {
  color: var(--accent);
}

.logo__city {
  font-weight: 500;
  font-size: 0.88em;
  color: var(--text-muted);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch__link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  line-height: 1;
}

.lang-switch__link:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

.lang-switch__link.is-active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.lang-switch__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-switch__sep {
  color: var(--border);
  font-weight: 400;
  user-select: none;
  pointer-events: none;
}

.nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav__list a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .header__inner {
    flex-wrap: wrap;
  }

  .logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header__tools {
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    flex: none;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list li {
    border-bottom: 1px solid var(--border);
  }

  .nav__list li:last-child {
    border-bottom: none;
  }

  .nav__list a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .lang-switch {
    font-size: 0.75rem;
  }

  .lang-switch__link {
    padding: 0.35rem 0.4rem;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-toggle__bar {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: #1a1f26;
  /* Фото: реалистичная инженерная зона (Unsplash). Замените локальным файлом при необходимости. */
  background-image: url("https://images.unsplash.com/photo-1581092160562-40aa08f78844?auto=format&fit=crop&w=2400&q=86");
  background-size: cover;
  background-position: 38% 45%;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero__bg {
    background-position: 56% center;
  }
}

@media (max-width: 480px) {
  .hero__bg {
    background-position: 60% center;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(12, 14, 18, 0.94) 0%,
    rgba(12, 14, 18, 0.78) 42%,
    rgba(12, 14, 18, 0.45) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw + 1rem, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 22ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

@media (min-width: 900px) {
  .hero__title {
    max-width: 26ch;
  }
}

.hero__subtitle {
  margin: 0 0 2rem;
  font-size: clamp(1rem, 1vw + 0.9rem, 1.2rem);
  color: rgba(232, 234, 239, 0.88);
  max-width: min(52ch, 100%);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  text-decoration: none;
}

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

/* Sections */
.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--alt {
  background: var(--bg-elevated);
}

.section--warning {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2vw + 1rem, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.section__lead code {
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: var(--bg-card);
  border-radius: 6px;
  color: var(--accent);
}

/* Cards grid */
.card-grid {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-grid--repair {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card-grid--why {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 700px) {
  .card--wide {
    grid-column: span 2;
  }
}

@media (min-width: 1000px) {
  .card--wide {
    grid-column: span 3;
  }
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card--simple .card__text {
  font-size: 1rem;
  color: var(--text);
}

/* Services list */
.services-list {
  column-count: 1;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.35rem;
  border-bottom: 1px solid var(--border);
  break-inside: avoid;
}

.services-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

@media (min-width: 640px) {
  .services-list {
    column-count: 2;
  }
}

/* Info panel */
.info-panel {
  background: var(--accent-subtle);
  border: 1px solid rgba(42, 157, 143, 0.35);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.info-panel__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.info-panel__list li {
  margin-bottom: 0.65rem;
}

.info-panel__list li:last-child {
  margin-bottom: 0;
}

.info-panel__list strong {
  color: var(--accent);
  font-weight: 600;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline__item:last-child {
  border-bottom: none;
}

.timeline__step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9375rem;
}

.timeline__text {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  color: var(--text);
}

@media (min-width: 900px) {
  .timeline {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }

  .timeline__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border-bottom: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
  }

  .timeline__text {
    margin-top: 1rem;
    font-size: 0.9375rem;
  }
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portfolio-item {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.portfolio-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg);
}

.portfolio-item figcaption {
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Callout */
.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.callout--warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.callout__icon {
  flex-shrink: 0;
  color: var(--warning-text);
  margin-top: 2px;
}

.callout__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--warning-text);
}

.callout__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info__block {
  margin: 0;
}

.contact-info__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.contact-info__value {
  font-size: 1.05rem;
  color: var(--text);
  white-space: pre-line;
}

/* Form */
.form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form__row {
  margin-bottom: 1.1rem;
}

.form__row:last-of-type {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form__input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.form__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.form__file {
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form__submit {
  border: none;
}

.form-feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--accent-subtle);
  border: 1px solid rgba(42, 157, 143, 0.4);
  color: var(--text);
  font-size: 0.9375rem;
}

.form-feedback.is-visible:not([hidden]) {
  display: block;
}

.form-feedback[hidden] {
  display: none !important;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__link {
  font-size: 0.875rem;
  font-weight: 500;
}
