:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --muted-text: #777777;
  --accent: #808080; /* серый акцент */
  --border: #e0e0e0;
}

/* БАЗОВЫЙ СБРОС */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

a:hover {
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

/* HEADER */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
  z-index: 10;
  position: relative;
}

.site-logo {
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  position: absolute;
  left: 48px;
}

.site-logo a {
  border: none;
  color: inherit;
  text-decoration: none;
}

.site-logo span.en {
  opacity: 0.55;
  margin-left: 0.6em;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.main-nav {
  z-index: 1;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav a {
  padding-bottom: 4px;
}

.main-nav a.active {
  border-color: #000;
}

.lang-switch {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  right: 48px;
}

.lang-switch a {
  border: none;
  opacity: 0.5;
}

.lang-switch a.active {
  opacity: 1;
}

.lang-separator {
  opacity: 0.3;
}

/* ШАПКА НА ГЛАВНОЙ */

body.page-home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: 32px;
  opacity: 0;
  animation: headerFadeIn 1s ease forwards;
  animation-delay: 2.4s; /* после анимации линии */
}

body:not(.page-home) .site-header {
  position: static;
  opacity: 1;
}

/* на главной: только английская надпись вместо "волга" */

body.page-home .site-logo {
  font-size: 0;
}

body.page-home .site-logo span.en {
  opacity: 1;
  margin-left: 0;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* HERO (главная, анимация Волги) */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 48px 64px;
}

.hero-river {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-river-svg {
  width: 100%;
  height: 100%;
}

.volga-main-line {
  fill: none;
  stroke: rgba(0, 70, 139, 0.6);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    drawRiver 2.5s ease-out forwards,      /* прорисовка вдоль пути */
    fadeRiver 1.6s ease-out 1.6s forwards; /* уход в дымку */
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-logo {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 0.5em;
  opacity: 0;
  animation: heroLogoIn 1.1s ease-out forwards;
  animation-delay: 1.8s;
}

.hero-tagline {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroTaglineIn 1.1s ease-out forwards;
  animation-delay: 2.1s;
}

/* ОБЩИЕ СЕКЦИИ */

.section {
  padding: 96px 48px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: 20px;
}

.section-lead {
  max-width: 580px;
  font-size: 15px;
  color: var(--muted-text);
}

/* ПОРТФОЛИО */

.section-projects {
  padding-top: 120px;
}

.projects-header {
  max-width: 720px;
  margin-bottom: 48px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    opacity 0.25s ease;
}

.project-card a {
  display: block;
  height: 100%;
}

.project-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #e6e6e6;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.45s ease, filter 0.45s ease;
}

/* градиент под текстом */

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
  opacity: 0.85;
  transition: opacity 0.45s ease;
}

/* подпись по правому краю */

.project-meta {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 35%;
  color: #ffffff;
  text-align: right;
  padding: 0;
  z-index: 1;
}

.project-meta h2 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  background: #000;
}

.project-card:hover .project-thumb img {
  transform: scale(1.08);
  filter: brightness(0.95);
}

.project-card:hover .project-thumb::after {
  opacity: 1;
}

/* СТРАНИЦА ПРОЕКТА: полноэкранное изображение + нижняя полоса */

.project-main {
  padding: 32px 24px 24px;
}

.project-main-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.project-title {
  text-align: center;
  margin: 0 0 16px;
  font-size: 20px;
}

/* рамка под изображение */

.project-frame {
  position: relative;
  max-width: 1200px;
  height: calc(100vh - 210px); /* одинаковая высота для всех проектов */
  margin: 0 auto;
}

.project-slider-frame {
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent;
  overflow: hidden;
  cursor: none;
}

.project-slider-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-slider-frame img.is-active {
  opacity: 1;
}

/* нижняя полоса: предыдущий / больше информации / следующий */

.project-nav {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.project-nav-link {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.project-nav-link.disabled {
  opacity: 0.3;
  pointer-events: none;
  border-bottom-color: transparent;
}

/* кнопка "больше информации" */

.project-more-toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: none;
}

.project-more-toggle:hover {
  opacity: 0.8;
}

/* панель "больше информации" */

.project-info-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 70vh;
  background: #ffffff;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.project-info-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.project-info-panel-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 32px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 32px;
  font-size: 14px;
}

.project-info-panel h2 {
  font-size: 13px;
  margin-bottom: 8px;
}

/* сетка метаданных */

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 32px;
  font-size: 13px;
}

.project-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-text);
  margin-bottom: 2px;
}

.project-meta-value {
  font-size: 13px;
}

/* плейсхолдер карты */

.project-map-placeholder {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--border);
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* КОМАНДА */

.team-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  align-items: center;
}

.team-photo img {
  width: 100%;
  border-radius: 2px;
}

.team-text p {
  font-size: 14px;
  color: #444444;
}

.team-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.team-member {
  font-size: 14px;
}

.team-member figure {
  margin: 0 0 12px;
}

.team-member-role {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-text);
  margin-bottom: 0.35em;
}

.team-member-name {
  font-size: 13px;
  margin-bottom: 0.4em;
}

/* КОНТАКТЫ */

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
}

.contacts-list {
  margin: 24px 0 0;
}

.contacts-list dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-text);
  margin-bottom: 2px;
}

.contacts-list dd {
  margin: 0 0 16px;
  font-size: 14px;
}

.contact-form {
  margin-top: 24px;
  max-width: 420px;
}

.form-row {
  margin-bottom: 16px;
}

.contact-form label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: #fafafa;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}

/* КНОПКИ (общие) */

button {
  appearance: none;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.3);
}

/* ФОН ЛИНИИ ВОЛГИ */

body:not(.page-home) .river-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body:not(.page-home) .river-background-svg {
  width: 100%;
  height: 100%;
}

body:not(.page-home) .river-line-static {
  fill: none;
  stroke: rgba(0, 70, 139, 0.5);
  stroke-width: 1.5;
  opacity: 0.05;
}

/* КАСТОМНЫЙ КУРСОР */

@media (pointer: fine) {
  /* прячем системный курсор только когда активен кастомный */
  body.cursor-active {
    cursor: none;
  }

  /* базовый курсор — диагональная стрелка */

  .cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 21px;
    height: 21px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 171 309'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='14.1732' stroke-miterlimit='10' points='170.8,308.8 0,0 139.5,81.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    transform: translate(0, 0) rotate(0deg);
    transform-origin: 0 0;
    z-index: 9999;
    opacity: 0;
    border: none;
    border-radius: 0;
    transition:
      opacity 0.2s ease-out,
      transform 0.15s ease-out;
  }

  body.cursor-active .cursor {
    opacity: 1;
  }

  .cursor::before,
  .cursor::after {
    content: "";
    position: absolute;
    display: none;
  }

  /* cursor--hover ничего не меняет визуально (курсор остаётся стрелкой) */

  .cursor.cursor--hover {
    width: 21px;
    height: 21px;
    border: none;
    border-radius: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 171 309'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='14.1732' stroke-miterlimit='10' points='170.8,308.8 0,0 139.5,81.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(0, 0) rotate(0deg);
    transform-origin: 0 0;
  }

  /* СПЕЦИАЛЬНЫЕ СТРЕЛКИ (ВПРАВО/ВЛЕВО) ДЛЯ СЛАЙДЕРА */

  /* вправо */
  .cursor.cursor--right {
    width: 34px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 374 212'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='20' stroke-miterlimit='10' points='0,107 352.9,108.3 214,190.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(0, 0);
    transform-origin: 0 0;
  }

  /* влево */
  .cursor.cursor--left {
    width: 34px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 374 212'%3E%3Cpolyline fill='none' stroke='%23000' stroke-width='20' stroke-miterlimit='10' points='374,107 21.1,108.3 160,190.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(0, 0);
    transform-origin: 0 0;
  }

  .cursor.cursor--left.cursor--hover,
  .cursor.cursor--right.cursor--hover {
    transform: translate(0, 0);
  }

  /* КУРСОР ДЛЯ ПОЛЕЙ ВВОДА — тонкий прямоугольник */

  input,
  textarea {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 16 24'%3E%3Crect x='7' y='2' width='2' height='20' fill='%23808080'/%3E%3C/svg%3E")
        8 12,
      text;
  }

  /* на кликабельных элементах прячем системный курсор */

  a,
  button,
  .project-card,
  .team-member,
  .project-nav a,
  .site-logo,
  .lang-switch,
  [data-info-toggle] {
    cursor: none;
  }

  body.cursor-over-input .cursor {
    opacity: 0 !important;
  }
}

/* АНИМАЦИИ */

@keyframes drawRiver {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeRiver {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.16;
  }
}

@keyframes heroLogoIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroTaglineIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* АДАПТИВ */

@media (min-width: 960px) {
  .project-main {
    min-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 48px 24px;
  }

  .project-main-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .site-logo {
    position: static;
  }

  .lang-switch {
    position: static;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    z-index: 20;
    padding: 8px 12px 10px;
  }

  .main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }

  .main-nav li {
    flex: 1 1 auto;
    text-align: center;
  }

  .main-nav a {
    display: inline-block;
    padding: 4px 0;
    border: none;
  }

  .main-nav a.active {
    border: none;
    font-weight: 500;
  }

  body {
    padding-bottom: 64px;
  }

  .hero-inner {
    padding: 96px 20px 48px;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .contacts-layout,
  .team-intro {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }
}