@import url("https://fonts.googleapis.com/css2?family=Geologica:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --black: #000000;
  --ink: #111111;
  --muted: #5e5e5e;
  --line: #e8e8e8;
  --gray: #f3f3f3;
  --white: #ffffff;
  --green: #0b6b4d;
  --green-soft: #e7f5ef;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  background: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
}

.icon-train { --icon-url: url("assets/icons/train.svg"); }
.icon-truck { --icon-url: url("assets/icons/truck.svg"); }
.icon-warehouse { --icon-url: url("assets/icons/building-warehouse.svg"); }
.icon-route { --icon-url: url("assets/icons/route.svg"); }
.icon-pin { --icon-url: url("assets/icons/map-pin.svg"); }
.icon-calculator { --icon-url: url("assets/icons/calculator.svg"); }
.icon-bolt { --icon-url: url("assets/icons/bolt.svg"); }
.icon-shield { --icon-url: url("assets/icons/shield-check.svg"); }
.icon-crane { --icon-url: url("assets/icons/crane.svg"); }
.icon-forklift { --icon-url: url("assets/icons/forklift.svg"); }
.icon-camera { --icon-url: url("assets/icons/camera.svg"); }
.icon-video { --icon-url: url("assets/icons/video.svg"); }
.icon-photo { --icon-url: url("assets/icons/photo.svg"); }
.icon-send { --icon-url: url("assets/icons/send.svg"); }
.icon-menu { --icon-url: url("assets/icons/menu-2.svg"); }
.icon-x { --icon-url: url("assets/icons/x.svg"); }
.icon-arrow { --icon-url: url("assets/icons/arrow-right.svg"); }
.icon-road { --icon-url: url("assets/icons/road.svg"); }
.icon-package { --icon-url: url("assets/icons/package.svg"); }
.icon-ruler { --icon-url: url("assets/icons/ruler-measure.svg"); }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 64px);
  color: var(--white);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.panel-head,
.video-strip,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--black);
  background: var(--white);
  border-radius: 999px;
  font-weight: 800;
}

.nav {
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.nav a,
.login-link,
.top-cta,
.primary-button,
.secondary-button,
.panel-link,
.map-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav a,
.login-link {
  position: relative;
  padding: 10px 0;
}

.nav a::after,
.login-link::after,
.panel-link::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}

.nav a:hover::after,
.login-link:hover::after,
.panel-link:hover::after {
  transform: scaleX(1);
}

.login-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.top-cta,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.top-cta,
.primary-button {
  padding: 12px 22px;
  color: var(--black);
  background: var(--white);
}

.primary-button {
  color: var(--white);
  background: var(--black);
}

.top-cta:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  padding: 12px 22px;
  color: var(--black);
  background: var(--gray);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--white);
  background: transparent;
}

.menu-button .icon {
  width: 22px;
  height: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
  gap: clamp(34px, 5vw, 80px);
  align-items: center;
  min-height: 100vh;
  padding: 122px clamp(18px, 5vw, 76px) 64px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0 48%, rgba(255, 255, 255, 0.76) 70%, rgba(255, 255, 255, 0.45)),
    url("assets/images/photo-18.webp") center / cover;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(48px, 7.8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

h1,
h2,
h3,
.brand,
.eyebrow {
  font-family: "Geologica", "Inter", Arial, Helvetica, sans-serif;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 680px;
  margin-bottom: 32px;
  color: #333333;
  font-size: clamp(19px, 2vw, 25px);
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.hero-panel {
  padding: clamp(22px, 3vw, 34px);
  background: var(--white);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.panel-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 800;
}

.panel-title,
.field-label,
.tariff-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel-title .icon {
  width: 26px;
  height: 26px;
}

.panel-head strong {
  padding: 8px 12px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 14px;
}

.field {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.field-label .icon,
.tariff .icon {
  color: var(--black);
}

.field span,
.calc-result span,
.lead-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--black);
}

output {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1;
}

.tariff-switcher {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.tariff {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.tariff:hover,
.tariff.is-active {
  transform: translateX(4px);
  border-color: var(--black);
  background: var(--gray);
}

.tariff span {
  color: var(--muted);
  font-size: 14px;
}

.tariff strong {
  white-space: nowrap;
}

.calc-result {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--white);
  background: var(--black);
}

.calc-result strong {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
}

.calc-result small {
  color: rgba(255, 255, 255, 0.72);
}

.panel-link {
  position: relative;
  display: inline-block;
  margin-top: 18px;
  font-weight: 800;
}

section:not(.hero) {
  padding: clamp(70px, 9vw, 126px) clamp(18px, 5vw, 76px);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-top: 1px !important;
  padding-bottom: 1px !important;
  background: var(--line);
}

.metrics-band div {
  min-height: 170px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--white);
}

.metric-icon,
.spec-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  place-items: center;
  color: var(--black);
  background: var(--gray);
  border-radius: 50%;
}

.metric-icon .icon,
.spec-icon .icon {
  width: 24px;
  height: 24px;
}

.metrics-band strong,
.metrics-band span {
  display: block;
}

.metrics-band strong {
  margin-bottom: 10px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
}

.metrics-band span {
  color: var(--muted);
}

.photo-feature,
.rail-section,
.contacts {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: center;
}

.feature-copy p,
.rail-copy p,
.section-heading p,
.contact-copy p,
.contact-copy address,
.spec-grid p,
.route-card p,
.route-card li {
  color: var(--muted);
  font-size: 18px;
}

.feature-media img,
.rail-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.section-black {
  color: var(--white);
  background: var(--black);
}

.section-black .eyebrow {
  color: #9ee8c6;
}

.section-black p,
.section-black li,
.section-black address {
  color: rgba(255, 255, 255, 0.72);
}

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

.section-heading {
  width: min(1120px, 100%);
  margin: 0 auto 36px;
}

.route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.route-map {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #111111;
  background-size: 46px 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.route-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 4;
  stroke-dasharray: 14 12;
  animation: dashMove 1.7s linear infinite;
}

.path-main {
  stroke: #9ee8c6;
}

.vehicle {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36);
  offset-rotate: 0deg;
}

.vehicle .icon {
  width: 24px;
  height: 24px;
}

.vehicle-train {
  offset-path: path("M75 250 C210 130 330 220 385 205");
  animation: trainToHub 7.5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.vehicle-truck {
  opacity: 0;
  color: var(--black);
  background: #9ee8c6;
  border-color: #9ee8c6;
}

.vehicle-truck-moscow {
  offset-path: path("M390 205 C470 110 585 88 680 88");
  animation: truckToMoscow 7.5s cubic-bezier(0.35, 0, 0.2, 1) infinite;
}

.vehicle-truck-minsk {
  offset-path: path("M392 212 C495 285 575 330 690 345");
  animation: truckToMinsk 7.5s cubic-bezier(0.35, 0, 0.2, 1) infinite;
}

.pulse-dot {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: pulse 1.8s ease-out infinite;
}

.dot-china {
  left: 9%;
  top: 59%;
}

.dot-hub {
  left: 50%;
  top: 48%;
  background: #9ee8c6;
}

.dot-moscow {
  right: 9%;
  top: 20%;
}

.dot-minsk {
  right: 8%;
  bottom: 16%;
}

.map-label {
  position: absolute;
  z-index: 4;
  min-width: 118px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.map-label .icon {
  width: 18px;
  height: 18px;
}

.map-label:hover,
.map-label.active {
  transform: translateY(-3px);
  color: var(--black);
  background: var(--white);
}

.map-label.china {
  left: 4%;
  top: 66%;
}

.map-label.hub {
  left: 43%;
  top: 52%;
}

.map-label.moscow {
  right: 4%;
  top: 26%;
}

.map-label.minsk {
  right: 4%;
  bottom: 22%;
}

.route-card {
  display: grid;
  align-content: center;
  padding: clamp(26px, 4vw, 46px);
  color: var(--ink);
  background: var(--white);
}

.route-card .eyebrow {
  color: #08704e;
}

.route-card .spec-icon {
  color: var(--white);
  background: var(--black);
}

.route-card h3,
.route-card p,
.route-card li {
  color: var(--black);
}

.route-card p,
.route-card li {
  opacity: 0.76;
}

.route-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.rail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  background: var(--line);
}

.rail-facts div {
  padding: 22px;
  background: var(--white);
}

.rail-facts .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 18px;
}

.rail-facts strong,
.rail-facts span {
  display: block;
}

.rail-facts strong {
  font-size: 28px;
}

.rail-facts span {
  color: var(--muted);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(1200px, 100%);
  margin: 0 auto;
  background: #d9d9d9;
}

.spec-grid article {
  min-height: 260px;
  padding: 28px;
  background: var(--white);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.spec-grid article:hover {
  transform: translateY(-6px);
  background: #fbfbfb;
}

.gallery-section {
  background: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 230px;
  gap: 10px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--black);
  cursor: pointer;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18);
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.055);
  filter: grayscale(0);
}

.gallery-item span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  color: var(--black);
  background: var(--white);
  font-weight: 800;
}

.video-strip {
  justify-content: space-between;
  gap: 24px;
  background: var(--gray);
}

.contacts {
  align-items: start;
}

.contact-copy address {
  font-style: normal;
}

.lead-form {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  color: var(--ink);
  background: var(--white);
}

.lead-form label {
  display: grid;
  gap: 7px;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--line);
  padding: 14px 0;
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--black);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 5vw, 76px);
  color: rgba(255, 255, 255, 0.68);
  background: var(--black);
  font-size: 13px;
}

.media-dialog {
  width: min(1040px, calc(100% - 28px));
  padding: 0;
  border: 0;
  background: var(--black);
  box-shadow: var(--shadow);
}

.media-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.media-dialog img,
.media-dialog video {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes dashMove {
  to {
    stroke-dashoffset: -26;
  }
}

@keyframes trainToHub {
  0% {
    offset-distance: 0%;
    opacity: 0;
    transform: scale(0.86);
  }
  8% {
    opacity: 1;
    transform: scale(1);
  }
  44%,
  100% {
    offset-distance: 100%;
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes truckToMoscow {
  0%,
  45% {
    offset-distance: 0%;
    opacity: 0;
    transform: scale(0.8);
  }
  52% {
    opacity: 1;
    transform: scale(1);
  }
  88%,
  100% {
    offset-distance: 100%;
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes truckToMinsk {
  0%,
  49% {
    offset-distance: 0%;
    opacity: 0;
    transform: scale(0.8);
  }
  56% {
    opacity: 1;
    transform: scale(1);
  }
  91%,
  100% {
    offset-distance: 100%;
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1020px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav,
  .login-link,
  .top-cta {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .topbar.is-open .nav {
    display: grid;
    grid-column: 1 / -1;
    justify-content: stretch;
    gap: 0;
  }

  .topbar.is-open .nav a {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero,
  .photo-feature,
  .rail-section,
  .route-grid,
  .contacts {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 118px;
  }

  .metrics-band,
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  h1 {
    font-size: clamp(42px, 15vw, 62px);
  }

  section:not(.hero) {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero {
    min-height: auto;
    padding-right: 16px;
    padding-left: 16px;
    background:
      linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
      url("assets/images/photo-18.webp") center / cover;
  }

  .hero-actions,
  .video-strip,
  .footer {
    display: grid;
  }

  .hero-actions > *,
  .video-strip .primary-button {
    width: 100%;
  }

  .metrics-band,
  .spec-grid,
  .rail-facts,
  .gallery {
    grid-template-columns: 1fr;
  }

  .metrics-band div {
    min-height: 120px;
  }

  .route-map {
    min-height: 430px;
  }

  .map-label {
    min-width: 100px;
    padding: 10px;
    font-size: 13px;
  }

  .vehicle {
    width: 36px;
    height: 36px;
  }

  .vehicle .icon {
    width: 20px;
    height: 20px;
  }

  .gallery {
    grid-auto-rows: 240px;
  }

  .gallery-item.wide,
  .gallery-item.tall {
    grid-column: auto;
    grid-row: auto;
  }
}
