:root {
  --color-dark: #1e2836;
  --color-dark-2: #002137;
  --color-accent: #448ac8;
  --color-white: #ffffff;
  --font-heavy: 'Museo Sans Cyrl', Arial, sans-serif; /* weight 900 in design */
  --font-bold: 'Museo Sans Cyrl', Arial, sans-serif;  /* weight 700 */
  --font-medium: 'Museo Sans Cyrl', Arial, sans-serif; /* weight 500 */
  --font-light: 'Museo Sans Cyrl', Arial, sans-serif;  /* weight 300 */
  --container-width: 1530px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--color-white);
  font-family: var(--font-medium);
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-head {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 400px;
}

.section-head h2 {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 40px;
  color: var(--color-dark);
  margin-bottom: 16px;
  transition: color 900ms ease;
}

.section-head p {
  font-size: 16px;
  color: rgba(30, 40, 54, 0.5);
  transition: color 900ms ease;
}

.section-head--light h2 {
  color: var(--color-white);
}

.section-head--light p {
  color: rgba(255, 255, 255, 0.7);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--color-accent);
  font-weight: 500;
  transition: color 900ms ease;
}

.link-arrow img {
  width: 24px;
  height: 24px;
  transition: filter 900ms ease, transform 250ms ease;
}

.link-arrow:hover img {
  transform: translateX(4px);
}

.link-arrow--center {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* Header */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 30px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img {
  height: 50px;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header__phone {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 24px;
}

.header__divider {
  width: 2px;
  height: 30px;
  background: var(--color-white);
}

.header__search,
.header__menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.header__search img,
.header__menu img {
  height: 24px;
}

/* Search panel — slides down from the top */
.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 210;
  background: var(--color-dark-2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-100%);
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.search-panel.is-open {
  transform: translateY(0);
}

.search-panel__inner {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px 20px;
}

.search-panel__form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 16px;
}

.search-panel__icon {
  height: 22px;
  flex-shrink: 0;
}

.search-panel__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-white);
  font-family: var(--font-medium);
  font-size: 24px;
}

.search-panel__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-panel__close {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.search-panel__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 2px;
  background: var(--color-white);
}

.search-panel__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.search-panel__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 600px) {
  .search-panel__input {
    font-size: 18px;
  }
}

/* Hero (background crossfades in place, text slides via Swiper) */
.hero {
  position: relative;
  min-height: 1080px;
  overflow: hidden;
  margin-bottom: -1px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero__bg-layer--active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-swiper {
  position: relative;
  z-index: 3;
  min-height: 1080px;
}

.hero__slide {
  min-height: 1080px;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 17%;
  width: 51.25%;
  max-width: 984px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.hero::before {
  top: 22.2%;
  aspect-ratio: 986 / 259;
  background-image: url('../assets/images/main_top.svg');
}

.hero::after {
  bottom: 13.8%;
  aspect-ratio: 986 / 70;
  background-image: url('../assets/images/main_botom.svg');
}

.hero__inner {
  position: absolute;
  top: 31.7%;
  left: 0;
  right: 0;
}

.hero__title {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 72px;
  line-height: 1.1;
  margin-bottom: 40px;
  max-width: 900px;
}

.hero__subtitle {
  font-family: var(--font-medium);
  font-size: 22px;
  line-height: 1.4;
  max-width: 750px;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 60px;
  padding: 18px 30px;
  background: rgba(0, 0, 0, 0.4);
  width: fit-content;
}

.hero__stats strong {
  font-family: var(--font-bold);
  font-weight: 700;
}

.hero__stats-sep {
  width: 1px;
  height: 23px;
}

/* Hero pagination (vertical swiper dots) */
.hero__pagination-line {
  position: absolute;
  right: 10.3%;
  top: -52px;
  width: 3px;
  height: 1076px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 4;
}

.hero .hero__pagination {
  position: absolute;
  right: 10.3%;
  left: auto;
  top: 215px;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 30px;
  z-index: 4;
}

.hero__pagination-bullet {
  width: 3px;
  height: 100px;
  background: rgb(255 255 255 / 20%);
  cursor: pointer;
}

.hero__pagination-bullet--active {
  width: 3px;
  background: var(--color-white);
}

/* Projects */
.projects {
  position: relative;
  background: var(--color-white);
  padding: 100px 0 60px;
  margin-bottom: -1px;
  overflow: hidden;
  transition: background-color 900ms ease;
}

.projects__watermark {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(36px, 9vw, 160px);
  line-height: 1;
  color: rgba(30, 40, 54, 0.03);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
}

.projects .container {
  position: relative;
  z-index: 1;
}

.projects--tinted {
  background-color: var(--color-accent);
}

.projects--tinted .section-head h2,
.projects--tinted .projects__lead {
  color: var(--color-white);
}

.projects--tinted .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

.projects--tinted .link-arrow {
  color: var(--color-white);
}

.projects--tinted .link-arrow img {
  filter: brightness(0) invert(1);
}

.projects__lead {
  max-width: 1200px;
  margin: 0 auto 60px;
  text-align: center;
  color: rgba(30, 40, 54, 0.7);
  font-size: 16px;
  transition: color 900ms ease;
}

.projects__grid {
  display: flex;
  gap: 2px;
  margin-bottom: 40px;
  overflow: hidden;
}

.project-card {
  position: relative;
  flex: 1 1 0%;
  min-height: 590px;
  background-size: cover;
  background-position: center;
  padding: 60px;
  color: var(--color-white);
  overflow: hidden;
  transition: flex-grow 500ms ease, opacity 500ms ease;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

/* Hover accordion: expand the hovered card horizontally, dim & shrink the rest */
.projects__grid:hover .project-card {
  flex-grow: 0.6;
  opacity: 0.5;
}

.projects__grid .project-card:hover {
  flex-grow: 2.6;
  opacity: 1;
}

.projects__grid:hover .project-card:not(:hover) .project-card__stats {
  opacity: 0;
  visibility: hidden;
}

.project-card__head,
.project-card__label,
.project-card__stats {
  position: relative;
  z-index: 1;
}

.project-card__head h3 {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 24px;
  margin-bottom: 10px;
}

.project-card__head p {
  font-size: 14px;
}

.project-card__label {
  position: absolute;
  left: 60px;
  top: 360px;
  width: 41px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__label span {
  display: inline-block;
  width: 170px;
  transform: rotate(-90deg);
  font-family: 'Gilroy', Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 5.4px;
}

.project-card__stats {
  position: absolute;
  right: 60px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: right;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.project-card__stats li {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.project-card__stats img {
  width: 24px;
  height: 24px;
}

.project-card__stats b {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.project-card__stats span {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.85;
}

/* Stats band */
.stats {
  background: var(--color-white);
  color: var(--color-dark);
  padding: 140px 0;
  margin: 0;
  margin-bottom: -1px;
  position: relative;
  overflow: hidden;
}

.stats__watermark {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 0;
    font-family: var(--font-heavy);
    font-weight: 900;
    font-size: clamp(40px, 10vw, 180px);
    line-height: 1;
    color: rgba(30, 40, 54, 0.03);
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
}

.stats .container {
  position: relative;
  z-index: 1;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat__num {
  display: block;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 3vw;
  color: var(--color-dark);
  margin-bottom: 20px;
}

.stat p {
  font-size: 18px;
  color: rgba(30, 40, 54, 0.6);
}

/* About */
.about {
  position: relative;
  background-color: var(--color-accent);
  background-image: url('../assets/icons/about/about-bg.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--color-white);
  padding: 140px 0;
  text-align: center;
  margin-bottom: -1px;
  overflow: hidden;
  transition: background-color 900ms ease, color 900ms ease;
}

.about__watermark {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(48px, 11vw, 180px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
      text-align: center;
}

.about .container {
  position: relative;
  z-index: 1;
}

.about__lead {
  max-width: 900px;
  margin: 0 auto 20px;
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-white);
  transition: color 900ms ease;
}

.about__text {
  max-width: 1100px;
  margin: 0 auto 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  transition: color 900ms ease;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 60px 0 40px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.feature__icon {
    width: 46px;
    height: 46px;
  transition: transform 300ms ease;
}

.feature:hover .feature__icon {
  transform: scale(1.15);
}

.feature h4 {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-white);
  transition: color 900ms ease;
}

.feature p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 900ms ease;
}

.about .link-arrow {
  color: var(--color-white);
  justify-content: center;
}

/* Directions */
.directions {
  background: var(--color-white);
  color: var(--color-dark);
  padding: 100px 0;
  margin-bottom: -1px;
  overflow: hidden;
  position: relative;
  transition: background-color 900ms ease;
}
.directions__watermark {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(36px, 9vw, 160px);
  line-height: 1;
  color: rgba(30, 40, 54, 0.03);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
      text-align: center;
}

.directions .container {
  position: relative;
  z-index: 1;
}

.direction-row {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 80px;
  padding-top: 80px;
  border-top: 1px solid rgba(30, 40, 54, 0.1);
}

.direction-row:first-child {
  padding-top: 0;
  border-top: none;
}

.direction-row:last-child {
  margin-bottom: 0;
}

.direction-row--reverse {
  flex-direction: row-reverse;
}

.direction-row__img {
  width: 50%;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 750 / 345;
  transition: filter 400ms ease;
}

.direction-row__img:hover {
  filter: brightness(1.08);
}

.direction-row__text {
  width: 50%;
}

.direction-row__text h3 {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-dark);
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: color 900ms ease;
}

.direction-row__text p {
  font-size: 16px;
  color: rgba(30, 40, 54, 0.6);
  margin-bottom: 30px;
  transition: color 900ms ease;
}

.directions--tinted {
  background-color: var(--color-accent);
}

.directions--tinted .section-head h2,
.directions--tinted .direction-row__text h3 {
  color: var(--color-white);
}

.directions--tinted .section-head p,
.directions--tinted .direction-row__text p {
  color: rgba(255, 255, 255, 0.7);
}

.directions--tinted .direction-row {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.directions--tinted .link-arrow {
  color: var(--color-white);
}

.directions--tinted .link-arrow img {
  filter: brightness(0) invert(1);
}

/* Clients */
.clients {
  position: relative;
  background: var(--color-accent);
  padding: 100px 0;
  margin-bottom: -1px;
  overflow: hidden;
}

.clients__watermark {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(36px, 9vw, 160px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
      text-align: center;
}

.clients .container {
  position: relative;
  z-index: 1;
}

.clients .link-arrow {
  color: var(--color-white);
}

.clients .link-arrow img {
  filter: brightness(0) invert(1);
}

.clients__marquee {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 40px 0 20px;
}

.clients__row {
  overflow: hidden;
  width: 100%;
  /* Soft fade at the edges so tracks appear to flow in/out of the page. */
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.clients__track {
  display: flex;
  align-items: center;
  gap: 30px;
  width: max-content;
  animation: clients-scroll-left 32s linear infinite;
}

.clients__row--reverse .clients__track {
  animation-name: clients-scroll-right;
  animation-duration: 38s;
}

.clients__row:hover .clients__track {
  animation-play-state: paused;
}

.clients__track span {
  flex-shrink: 0;
  height: 70px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.25);
}

@keyframes clients-scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes clients-scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .clients__track {
    animation: none;
  }
  .clients__row {
    overflow-x: auto;
  }
}

/* Footer */
.footer {
  background: var(--color-accent);
  padding-top: 40px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__logo {
    width: 250px;
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__contacts-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 20px;
}

.footer__contacts-row img {
  height: 19px;
}

.footer__hours,
.footer__legal-line,
.footer__company p {
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 16px;
}

.footer__nav {
  gap: 14px;
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 16px;
}

.footer__address-row,
.footer__company-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 16px;
  margin-bottom: 14px;
}

.footer__address-row img,
.footer__company-row img {
  height: 16px;
}

.footer__company p {
  margin-bottom: 8px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 1200px) {
  .projects__grid {
    flex-wrap: wrap;
  }
  .project-card {
    flex-basis: calc(50% - 1px);
  }
  .projects__grid:hover .project-card,
  .projects__grid .project-card:hover {
    flex-grow: 1;
    opacity: 1;
  }
  .projects__grid:hover .project-card:not(:hover) .project-card__stats {
    opacity: 1;
    visibility: visible;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero__title {
    font-size: 48px;
  }
  .hero::before,
  .hero::after {
    display: none;
  }
  .direction-row,
  .direction-row--reverse {
    flex-direction: column;
  }
  .direction-row__img,
  .direction-row__text {
    width: 100%;
  }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects__grid {
    flex-direction: column;
  }
  .project-card {
    flex-basis: auto;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .header__phone {
    display: none;
  }
  .hero__title {
    font-size: 36px;
  }
  .project-card__label {
    display: none;
  }
}

/* Fullscreen menu overlay — glitchy, piece-by-piece reveal */
body.menu-open {
  overflow: hidden;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}

.menu-overlay.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 100ms ease;
}

.menu-overlay__shards {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
}

.menu-overlay__shards span {
  flex: 1 1 0%;
  height: 100%;
  background: var(--color-dark-2);
  transform: scaleY(0);
}

.menu-overlay__shards span:nth-child(odd) {
  transform-origin: top;
}

.menu-overlay__shards span:nth-child(even) {
  transform-origin: bottom;
}

.menu-overlay.is-open .menu-overlay__shards span {
  animation: menu-shard-reveal 550ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.menu-overlay.is-open .menu-overlay__shards span:nth-child(1) { animation-delay: 0ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(2) { animation-delay: 45ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(3) { animation-delay: 90ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(4) { animation-delay: 135ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(5) { animation-delay: 180ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(6) { animation-delay: 225ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(7) { animation-delay: 270ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(8) { animation-delay: 315ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(9) { animation-delay: 360ms; }
.menu-overlay.is-open .menu-overlay__shards span:nth-child(10) { animation-delay: 405ms; }

@keyframes menu-shard-reveal {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.menu-overlay__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px clamp(24px, 5vw, 100px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 350ms ease, transform 350ms ease;
}

.menu-overlay.is-open .menu-overlay__content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 480ms;
}

.menu-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-overlay__logo img {
  height: 44px;
}

.menu-overlay__close {
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-overlay__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 2px;
  background: var(--color-white);
  transform-origin: center;
}

.menu-overlay__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-overlay__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-overlay__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: auto 0;
}

.menu-overlay__nav a {
  position: relative;
  display: inline-block;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(32px, 6vw, 64px);
  color: var(--color-white);
  line-height: 1.15;
}

.menu-overlay__nav a:hover {
  color: var(--color-accent);
}

.menu-overlay__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 600px) {
  .menu-overlay__nav {
    gap: 10px;
  }
  .menu-overlay__shards span:nth-child(n) {
    animation-delay: 0ms;
  }
}

/* Scroll-reveal: fade + rise into place the first time each block is seen */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

/* These elements already declare their own `transition` (flex-grow accordion,
   tint color-fade) — `.reveal`'s shorthand above would otherwise replace it
   wholesale (same specificity, later in file) and kill that smoothness.
   Combine both transition needs here with a more specific selector. */
.project-card.reveal {
  transition: flex-grow 500ms ease, opacity 600ms ease, transform 700ms ease;
}

.projects__lead.reveal,
.about__text.reveal {
  transition: color 900ms ease, opacity 700ms ease, transform 700ms ease;
}

.projects__grid .project-card.reveal:nth-child(1) { transition-delay: 0ms; }
.projects__grid .project-card.reveal:nth-child(2) { transition-delay: 90ms; }
.projects__grid .project-card.reveal:nth-child(3) { transition-delay: 180ms; }
.projects__grid .project-card.reveal:nth-child(4) { transition-delay: 270ms; }

.features .feature.reveal:nth-child(1) { transition-delay: 0ms; }
.features .feature.reveal:nth-child(2) { transition-delay: 80ms; }
.features .feature.reveal:nth-child(3) { transition-delay: 160ms; }
.features .feature.reveal:nth-child(4) { transition-delay: 240ms; }
.features .feature.reveal:nth-child(5) { transition-delay: 320ms; }
.features .feature.reveal:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Inner pages (projects / directions / about / contacts / detail templates)
   New components only — nothing above this line is touched, so the homepage
   is unaffected. Reuses existing tokens (--color-*, --font-*), .container,
   .section-head, .link-arrow, .feature, .stat, .direction-row patterns.
   ========================================================================== */

/* Several inner-page components (e.g. .project-tile) set their own `display`,
   which — being an author-origin rule — otherwise wins over the user-agent's
   `[hidden]{display:none}` regardless of specificity. Make `hidden` win back. */
[hidden] {
  display: none !important;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 200ms ease;
}

.breadcrumb a:hover {
  color: var(--color-white);
}

.breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

.breadcrumb--dark {
  color: rgba(30, 40, 54, 0.5);
}

.breadcrumb--dark a {
  color: var(--color-dark);
}

/* Page hero — same diagonal-blue system as the homepage's .about, not a generic photo banner */
.page-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  background-color: var(--color-accent);
  background-image: url('../assets/icons/about/about-bg.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--color-white);
  overflow: hidden;
  padding: 220px 0 70px;
  margin-bottom: -1px;
}

.page-hero__watermark {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 0;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(40px, 10vw, 170px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.page-hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46%;
  background-size: cover;
  background-position: center;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero__title {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.1;
  max-width: 1000px;
}

.page-hero__subtitle {
  margin-top: 20px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 650px;
}

/* Above the mobile breakpoint the diagonal .page-hero__photo panel is visible —
   keep long titles from running under it (the diagonal edge sits ~54% from the left). */
@media (min-width: 701px) {
  .page-hero__title,
  .page-hero__subtitle {
    max-width: 46%;
  }
}

/* Tabs (category filter) — plain text + underline, not generic pill buttons */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin: 0 0 70px;
  border-bottom: 1px solid rgba(30, 40, 54, 0.1);
}

.tabs__btn {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 15px;
  color: rgba(30, 40, 54, 0.4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 20px;
  cursor: pointer;
  transition: color 250ms ease, border-color 250ms ease;
}

.tabs__btn:hover {
  color: var(--color-dark);
}

.tabs__btn.is-active {
  color: var(--color-dark);
  border-bottom-color: var(--color-accent);
}

/* Project tiles — listing grid. Same visual DNA as the homepage's
   .project-card (flat dark overlay, Museo Sans Cyrl heavy title, plain
   uppercase meta label — no frosted pill badges or gradients that don't
   exist anywhere else on the site), just laid out as a plain multi-row
   grid instead of the homepage's 4-card flex-grow accordion. */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* .project-tile is combined with the homepage's own .project-card class
   directly in the markup (same rotated "генеральный подрядчик" label, same
   stats list, same dark overlay) — reusing that signature treatment instead
   of inventing a plainer one-off card. Only override what a grid needs
   instead of the homepage's 4-item flex row: fixed portrait aspect instead
   of flex-grow sizing, and a plain zoom on hover instead of the homepage's
   accordion (this container isn't `.projects__grid`, so that hover rule
   doesn't apply here regardless). */
.project-tile {
  flex: none;
  min-height: 0;
  aspect-ratio: 3 / 4;
  transition: background-size 500ms ease;
}

.project-tile:hover {
  background-size: 112%;
}

.tile-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(30, 40, 54, 0.15);
  border-radius: 6px;
  color: rgba(30, 40, 54, 0.5);
  font-size: 15px;
}

/* CTA banner — reused across detail pages */
.cta-banner {
  position: relative;
  background-color: var(--color-accent);
  padding: 80px 0;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.cta-banner h2 {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 34px;
}

.cta-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 16px;
  padding: 18px 34px;
  border-radius: 100px;
  transition: transform 250ms ease;
}

.cta-banner__btn:hover {
  transform: translateY(-2px);
}

/* Approach steps — small accent index number + top rule, in the same
   register as the rest of the site's typography (no giant watermark-style
   digits, that motif is reserved for the section watermarks). */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.step {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.step__num {
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 32px;
  color: var(--color-accent);
  margin-bottom: 18px;
}

.step h4 {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}

.step p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.step--dark {
  border-top-color: rgba(30, 40, 54, 0.12);
}

.step--dark h4 {
  color: var(--color-dark);
}

.step--dark p {
  color: rgba(30, 40, 54, 0.6);
}

/* Team — plain text roster (no stand-in headshots since we have none;
   a text list reads as intentional, a grid of placeholder avatars doesn't). */
/* Team — same icon-card language as the homepage's "О компании" features
   (80px icon + bold heading + description), not a bare text list and not
   stand-in photo squares. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.team-card__icon {
  width: 80px;
  height: 80px;
  transition: transform 300ms ease;
}

.team-card:hover .team-card__icon {
  transform: scale(1.15);
}

.team-card h4 {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-dark);
}

.team-card p {
  font-size: 16px;
  color: rgba(30, 40, 54, 0.6);
}

/* Cities / case map — plain grouped list (see HISTORY.md for why this isn't
   an interactive pin map). Styled like the team roster, not a boxed card. */
.city-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin-top: 50px;
}

.city-group h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heavy);
  font-weight: 900;
  font-size: 22px;
  color: var(--color-white);
  margin-bottom: 24px;
}

.city-group h4 img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.city-group ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.city-group li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.city-group li span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  white-space: nowrap;
}

/* Contact info list */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-info__item {
  display: flex;
  gap: 20px;
}

.contact-info__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(68, 138, 200, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info__icon img {
  width: 20px;
  height: 20px;
}

.contact-info__item h4 {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.contact-info__item p,
.contact-info__item a {
  font-size: 15px;
  color: rgba(30, 40, 54, 0.65);
}

.contact-info__item a:hover {
  color: var(--color-accent);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form__field label {
  font-size: 14px;
  color: rgba(30, 40, 54, 0.6);
}

.contact-form__field input,
.contact-form__field textarea {
  border: none;
  border-bottom: 2px solid rgba(30, 40, 54, 0.15);
  background: none;
  padding: 10px 0;
  font-family: var(--font-medium);
  font-size: 16px;
  color: var(--color-dark);
  outline: none;
  transition: border-color 250ms ease;
  resize: vertical;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--color-accent);
}

.contact-form__submit {
  align-self: flex-start;
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-white);
  background: var(--color-accent);
  border: none;
  border-radius: 100px;
  padding: 18px 40px;
  cursor: pointer;
  transition: transform 250ms ease, opacity 250ms ease;
}

.contact-form__submit:hover {
  transform: translateY(-2px);
}

.contact-form__note {
  font-size: 13px;
  color: rgba(30, 40, 54, 0.45);
}

.map-embed {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: none;
  border-radius: 6px;
  filter: grayscale(0.3) contrast(1.05);
}

/* Two-column layout used on Contacts + detail pages */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

/* Project detail: parameters row */
.params-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 60px;
}

.params-row__item span {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.params-row__item strong {
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 20px;
}

.params-row--light {
  border-color: rgba(30, 40, 54, 0.1);
}

.params-row--light .params-row__item span {
  color: rgba(30, 40, 54, 0.45);
}

.params-row--light .params-row__item strong {
  color: var(--color-dark);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-grid img:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 8 / 6;
}

/* Prose block — description / task / solution / result copy */
.prose {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(30, 40, 54, 0.75);
}

.prose + .prose {
  margin-top: 20px;
}

.prose--light {
  color: rgba(255, 255, 255, 0.75);
}

/* Recommendation letter */
.letter {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px;
  background: rgba(30, 40, 54, 0.03);
  border-radius: 8px;
  position: relative;
}

.letter::before {
  content: '“';
  position: absolute;
  top: 10px;
  left: 30px;
  font-family: var(--font-heavy);
  font-size: 100px;
  color: rgba(68, 138, 200, 0.15);
  line-height: 1;
}

.letter p {
  position: relative;
  font-size: 17px;
  font-style: italic;
  line-height: 1.7;
  color: rgba(30, 40, 54, 0.75);
  margin-bottom: 24px;
}

.letter__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.letter__author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.letter__author strong {
  display: block;
  font-family: var(--font-bold);
  font-weight: 700;
  color: var(--color-dark);
  font-size: 15px;
}

.letter__author span {
  font-size: 13px;
  color: rgba(30, 40, 54, 0.5);
}

@media (max-width: 1100px) {
  .tile-grid,
  .steps,
  .team-grid,
  .city-groups,
  .params-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

@media (max-width: 700px) {
  .tile-grid,
  .steps,
  .team-grid,
  .city-groups,
  .params-row,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid img:first-child {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }
  .page-hero {
    min-height: 360px;
    padding: 160px 0 50px;
  }
  .page-hero__photo {
    display: none;
  }
  .letter {
    padding: 30px;
  }
}
