:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #68615a;
  --paper: #fbfaf6;
  --line: #ded7ca;
  --leaf: #246b5d;
  --brick: #c84d3a;
  --gold: #e7b44f;
  --sky: #e6f0ec;
  --clay: #f1dfcf;
  --white: #ffffff;
  --header-bg: rgba(251, 250, 246, 0.9);
  --page-bg: linear-gradient(180deg, var(--paper), #eef6f2 44%, var(--paper));
  --card-bg: var(--white);
  --services-bg: linear-gradient(135deg, #fbfaf6, #eef6f2);
  --band-bg: linear-gradient(135deg, var(--sky), var(--clay));
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f1ea;
  --muted: #c5bbb0;
  --paper: #111815;
  --line: rgba(255, 255, 255, 0.14);
  --leaf: #45a086;
  --brick: #e06a52;
  --gold: #e8bd62;
  --sky: #192622;
  --clay: #2b211d;
  --header-bg: rgba(17, 24, 21, 0.9);
  --page-bg: linear-gradient(180deg, #101614, #17231f 44%, #101614);
  --card-bg: #18211e;
  --services-bg: linear-gradient(135deg, #121a17, #1d2b26);
  --band-bg: linear-gradient(135deg, #192622, #2b211d);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page-bg);
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 14px rgba(36, 107, 93, 0.18));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 15px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  padding: 9px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.locale-picker {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.locale-flag {
  width: 24px;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.locale-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.locale-picker select {
  min-width: 58px;
  color: inherit;
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
}

.theme-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(320px, calc(100vw - 36px));
  padding: 12px 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--leaf), var(--brick));
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(23, 23, 23, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.16);
}

.theme-icon {
  grid-area: 1 / 1;
  width: 21px;
  height: 21px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.moon-icon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.7);
}

:root[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(30deg) scale(0.7);
}

:root[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--brick);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: min(82vh, 760px);
  overflow: hidden;
  background: var(--ink);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.26) 58%, rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(36, 107, 93, 0.26), rgba(200, 77, 58, 0.12));
}

.hero-road-wrap {
  position: absolute;
  right: 34px;
  bottom: 20px;
  transform: scale(1.2);
  width: min(52vw, 620px);
  height: 150px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  clip-path: inset(0);
}

.hero-road {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

.road-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-dasharray: 10 14;
  stroke-linecap: round;
  stroke-width: 4;
  animation: roadMove 16s linear infinite;
}

.bus-icon {
  fill: var(--gold);
  offset-path: path("M8 188 C170 86 278 206 430 98 S690 46 812 142");
  animation: busDrive 10s ease-in-out infinite;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  padding: clamp(80px, 14vh, 150px) 0 clamp(70px, 12vh, 120px);
  margin-left: clamp(16px, 7vw, 96px);
  color: var(--white);
  animation: fadeUp 680ms ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brick);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2c36b;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.hero-text {
  max-width: 590px;
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.5;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.18);
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--brick), #d9793f);
  border-color: var(--brick);
}

.button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.section {
  position: relative;
  padding: clamp(58px, 8vw, 96px) clamp(16px, 4vw, 56px);
  overflow: hidden;
}

.section-mark {
  position: absolute;
  top: 24px;
  left: clamp(16px, 4vw, 56px);
  width: min(24vw, 180px);
  pointer-events: none;
  opacity: 0.18;
}

.section-mark.right {
  right: clamp(16px, 4vw, 56px);
  left: auto;
}

.section-mark path,
.section-mark circle {
  fill: none;
  stroke: var(--brick);
  stroke-linecap: round;
  stroke-width: 8;
  animation: drawMark 5s ease-in-out infinite alternate;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 32px;
  align-items: end;
}

.intro p:last-child,
.contacts p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.section-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.route-grid,
.service-grid,
.gallery-grid,
.video-grid {
  display: grid;
  gap: 18px;
}

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

.route-card,
.service-card,
.gallery-item,
.video-card {
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(36, 107, 93, 0.11);
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.route-card:hover,
.service-card:hover,
.gallery-item:hover,
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 62px rgba(36, 107, 93, 0.18);
}

.services {
  background: var(--services-bg);
}

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

.service-card {
  padding: 22px;
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  color: var(--leaf);
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.route-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 380ms ease;
}

.route-card:hover img,
.gallery-item:hover img {
  transform: scale(1.04);
}

.route-card div {
  padding: 18px;
}

.route-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.band {
  background: var(--band-bg);
}

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

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 380ms ease;
}

.gallery-item figcaption {
  min-height: 48px;
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

.video-grid {
  grid-template-columns: minmax(280px, 900px);
  justify-content: center;
}

.video-card {
  width: 100%;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #202020;
}

.video-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 0;
  font-weight: 700;
  text-decoration: none;
  background-color: #202020;
  background-position: center;
  background-size: cover;
}

.video-preview::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(23, 23, 23, 0.46);
}

.video-preview::after {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  content: "\25B6";
  background: var(--brick);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(23, 23, 23, 0.3);
}

.video-card h3 {
  padding: 16px 16px 8px;
  margin: 0;
}

.video-link {
  display: inline-flex;
  margin: 0 16px 18px;
  color: var(--brick);
  font-weight: 700;
  text-decoration: none;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 32px;
  align-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--leaf), #1d4e46 58%, var(--brick));
}

.contacts .eyebrow,
.contacts p {
  color: #f2e6d0;
}

.contacts .button {
  width: 100%;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px clamp(16px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, #141716, #203c36 55%, #522d27),
    #171717;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
}

.footer-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

.footer strong {
  display: block;
  color: var(--white);
  font-size: 18px;
  margin-bottom: 5px;
}

.footer p {
  margin: 0;
  line-height: 1.5;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  text-align: right;
}

.back-top {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.back-top:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.back-top svg {
  width: 20px;
  height: 20px;
  animation: arrowUp 1.35s ease-in-out infinite;
}

@keyframes arrowUp {

  0%,
  100% {
    transform: translateY(2px);
  }

  50% {
    transform: translateY(-4px);
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes roadMove {
  to {
    stroke-dashoffset: -240;
  }
}

@keyframes busDrive {

  0%,
  100% {
    offset-distance: 0%;
    transform: scale(1);
  }

  50% {
    offset-distance: 100%;
    transform: scale(1.08);
  }
}

@keyframes drawMark {
  from {
    stroke-dasharray: 20 18;
  }

  to {
    stroke-dasharray: 90 14;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 860px) {

  .intro,
  .contacts {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .site-header.menu-open .nav {
    display: flex;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    padding-top: 2px;
  }

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

  .video-grid {
    grid-template-columns: minmax(280px, 760px);
  }
}

@media (max-width: 560px) {
  .site-header {
    position: static;
  }

  .hero {
    min-height: 620px;
  }

  .hero-road {
    right: 8px;
    bottom: 18px;
    width: 380px;
    opacity: 0.58;
  }

  .hero-overlay {
    width: calc(100% - 32px);
    margin: 0 16px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.04;
  }

  .route-grid,
  .service-grid,
  .gallery-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 360px) {

  .site-header,
  .section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .site-header {
    gap: 10px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .nav {
    gap: 8px 12px;
    font-size: 14px;
  }

  .header-actions {
    gap: 8px;
  }

  .locale-picker {
    padding: 0 8px;
  }

  h1 {
    font-size: 34px;
    max-width: 11ch;
  }

  h2 {
    font-size: 29px;
  }

  .hero-text,
  .intro p:last-child,
  .contacts p {
    font-size: 17px;
  }
}