/* Design tokens */
:root {
  --bg: #12151a;
  --bg-alt: #181c23;
  --bg-elevated: #1e232b;
  --surface: #252b35;
  --border: #2f3844;
  --border-light: #3d4856;
  --text: #e8eaed;
  --text-muted: #9aa3ad;
  --text-dim: #6d7782;
  --accent: #8b9da8;
  --accent-strong: #a8bcc9;
  --accent-warm: #7a7268;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --container: min(1120px, 100% - 2.5rem);
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

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

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.section {
  padding-block: clamp(4rem, 10vw, 6.5rem);
}

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

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0;
}

.section__header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section__header--row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .section__header--row {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.section__aside {
  margin: 0;
  color: var(--text-muted);
  max-width: 36ch;
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(18, 21, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 0.75rem;
}

.header__inner .nav-toggle {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

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

.logo__mark {
  width: 2px;
  height: 1.75rem;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent-warm));
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.logo__city {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85em;
  margin-left: 0.15em;
}

.nav {
  display: none;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header__cta {
  display: none;
}

.btn--avito {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e8f5ee;
  background: linear-gradient(145deg, rgba(58, 140, 98, 0.35), rgba(42, 95, 68, 0.5));
  border: 1px solid rgba(106, 175, 130, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.btn--avito:hover {
  color: #fff;
  background: linear-gradient(145deg, rgba(72, 165, 115, 0.55), rgba(48, 110, 78, 0.65));
  border-color: rgba(130, 200, 155, 0.75);
}

.btn--avito__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  color: #0f1419;
  background: linear-gradient(160deg, #8fd4a8, #5cb57e);
  border-radius: 3px;
}

.btn--avito__icon {
  opacity: 0.75;
  flex-shrink: 0;
}

.btn--avito:hover .btn--avito__icon {
  opacity: 1;
}

@media (max-width: 899px) {
  .btn--avito__text {
    display: none;
  }

  .btn--avito {
    padding: 0.5rem 0.65rem;
  }

  .header__cta {
    display: none !important;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}

.nav-toggle span {
  display: block;
  height: 1px;
  width: 18px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav,
  .header__cta {
    display: flex;
  }

  .header__actions {
    margin-left: 0;
  }

  .btn--avito {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .btn--avito__text {
    display: inline;
  }

  .nav-toggle {
    display: none;
  }
}

.nav.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: var(--header-h) 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .nav.is-open {
    position: static;
    flex-direction: row;
    padding: 0;
    background: transparent;
    border: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.25s, transform 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent-strong);
  color: var(--bg);
  border-color: var(--accent-strong);
}

.btn--primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
}

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

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.hero__photo {
  position: absolute;
  inset: 0;
  background:
    url("images/hero.jpg")
    center / cover no-repeat;
  transform: scale(1.03);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(18, 21, 26, 0.94) 0%, rgba(18, 21, 26, 0.78) 45%, rgba(18, 21, 26, 0.55) 100%),
    linear-gradient(180deg, transparent 50%, var(--bg-alt) 100%);
}

.hero__content {
  position: relative;
  padding-block: clamp(3rem, 8vh, 5rem);
}

.hero__label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  max-width: 14ch;
  margin-bottom: 1.5rem;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
  font-weight: 300;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.hero__stat {
  background: var(--bg-elevated);
  padding: 1.25rem 1.5rem;
}

.hero__stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

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

.section__subtitle {
  margin: 1rem 0 0;
  color: var(--text-muted);
  max-width: 52ch;
  font-size: 1rem;
}

/* Intro */
.intro__grid {
  display: grid;
  gap: 2rem;
}

.intro__visual {
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 2;
}

.intro__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.05);
}

@media (min-width: 900px) {
  .intro__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .intro__visual {
    grid-row: span 2;
  }

  .intro__card {
    grid-column: 2;
  }
}

/* Gallery */
.gallery__grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 220px);
  }

  .gallery__item--wide {
    grid-column: span 2;
  }

  .gallery__item--tall {
    grid-row: span 2;
  }
}

.gallery__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  min-height: 200px;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
  filter: saturate(0.9);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(transparent, rgba(18, 21, 26, 0.92));
  color: var(--text);
}

.intro__text p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.intro__text .section__title {
  margin-bottom: 1.5rem;
}

.intro__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 2px;
}

.intro__card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
}

.intro__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.intro__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  background: var(--accent-warm);
}

/* Cards */
.cards {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

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

.card {
  background: var(--bg);
  transition: background 0.3s var(--ease);
}

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

.card--with-img {
  display: flex;
  flex-direction: column;
}

.card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
}

.card__body {
  padding: 1.75rem 2rem 2rem;
}

.card:hover {
  background: var(--bg-elevated);
}

.card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-warm);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

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

/* Advantages */
.advantages__grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

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

@media (min-width: 960px) {
  .advantages__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.advantage {
  background: var(--bg);
  padding: 1.75rem;
}

.advantage h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.advantage p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Process layout */
.process__layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .process__layout {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.process__visual {
  border: 1px solid var(--border);
  overflow: hidden;
  max-height: 640px;
}

.process__visual img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  margin-left: 1.25rem;
}

.timeline__item {
  position: relative;
  padding: 0 0 2.5rem 2.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__step {
  position: absolute;
  left: -1.25rem;
  top: 0;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  color: var(--accent-strong);
}

.timeline__item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.timeline__item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 48ch;
}

/* Details */
.details__grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .details__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.details__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.details__table tr {
  border-bottom: 1px solid var(--border);
}

.details__table th,
.details__table td {
  padding: 1rem 0;
  text-align: left;
  vertical-align: top;
}

.details__table th {
  font-weight: 500;
  color: var(--text-muted);
  width: 45%;
  padding-right: 1rem;
}

.details__table td {
  color: var(--text);
}

.location {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 2px;
}

.location__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
}

.location__address {
  font-style: normal;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.location__district {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.location__note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.location__photo {
  margin: -2rem -2rem 1.5rem;
  overflow: hidden;
  max-height: 200px;
}

.location__photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
}

/* Yandex map */
.location__map {
  overflow: hidden;
  height: 260px;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.location__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.75) contrast(0.95);
}

.location__route {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contact */
.contact__grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact__info p {
  color: var(--text-muted);
  max-width: 42ch;
}

.contact__channels {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.contact__channels li {
  margin-bottom: 1.25rem;
}

.contact__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.contact__value {
  font-size: 1rem;
  color: var(--text);
}

.contact__form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 2px;
}

.contact__form label {
  display: block;
  margin-bottom: 1.25rem;
}

.contact__form label span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.2s;
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-dim);
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact__form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact__form-note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--accent);
  min-height: 1.25em;
}

.contact__form-note.is-error {
  color: #b89090;
}

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

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

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

.footer__top {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
