/* HERO */

.project-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.project-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-hero-logo {
  display: none;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

/* INTRO */

.project-block {
  padding: 120px 0;
}

.project-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  column-gap: 270px;
}

/* LEFT */

.project-left-side h1 {
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  color: #f05a28;
  margin-bottom: 15px;
}

.project-subtitle {
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  color: #1f1f1f;
}

/* RIGHT */

.project-top-content {
  max-width: 980px;
  margin-bottom: 50px;
}

.project-top-content h2 {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  color: #222;
  line-height: 1.55;
  max-width: 980px;
  margin-bottom: 15px;
}

.project-top-content p {
  font-size: 22px;
  font-weight: 400;
  color: #333;
  line-height: 1.55;
  max-width: 1030px;
}

/* BOTTOM */

.project-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 79px;
  align-items: start;
}

.project-divider {
  width: 1px;
  background: #d9d9d9;
  height: 100%;
}

.project-info-block h3 {
  font-size: 24px;
  font-weight: 500;
  color: #222;
  margin-bottom: 5px;
}

.project-info-block p {
  font-size: 16px;
  font-weight: 400;
  color: #333;
  line-height: 1.55;

  max-width: 520px;
}

/* STAGE */

.stages {
  width: 100%;
  padding: 120px 0;
  background: linear-gradient(180deg,
      #FFFFFF 0%,
      #F6F8FF 50%,
      #FFFFFF 100%);
}

.stages__container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 159px;
}

.stages__left {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  min-width: 380px;
}

.stages__number {
  font-size: 64px;
  font-weight: 400;
  color: #f05a32;
}

.stages__title-wrap {
  display: flex;
  flex-direction: column;
}

.stages__title {
  font-size: 30px;
  font-weight: 400;
  color: #24262A;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stages__subtitle {
  font-size: 20px;
  font-weight: 400;
  color: #2f3137;
  text-transform: uppercase;
}

.stages__right {
  max-width: 1000px;
}

.stages__right p {
  font-size: 22px;
  line-height: 1.38;
  font-weight: 400;
  color: #33343a;
}

/* SEPARATOR */

.separator-block {
  width: 100%;
  padding: 120px 0;
  background: #e9e9ec;
  display: flex;
}

.separator-container {
  max-width: 1600px;
  margin: 0 auto;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 159px;
}

.separator-left {
  min-width: 420px;
}

.separator-left h2 {
  font-size: 40px;
  font-weight: 600;
  color: #f05a28;
  margin-bottom: 10px;
}

.separator-subtitle {
  margin-top: 32px;
  font-size: 20px;
  font-weight: 500;
  color: #2f2f35;
}

.separator-right {
  max-width: 1059px;
  padding-top: 6px;
}

.separator-right p {
  font-size: 22px;
  font-weight: 400;
  color: #34343a;
}

/* BASE FRAMES */

.base-frames {
  width: 100%;
  padding: 120px 0;
}

.base-frames-container {
  max-width: 1600px;
  margin: 0 auto;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 100px;
}

.base-frames-content {
  width: 360px;
  /* padding-top: 20px; */
}

.base-frames-content h3 {
  font-size: 30px;
  font-weight: 400;
  color: #ef5b2e;
  margin-bottom: 10px;
}

.base-frames-content h4 {
  font-size: 20px;
  font-weight: 400;
  color: #3b3b3b;
  margin-bottom: 30px;
}

.base-frames-content p {
  font-size: 16px;
  font-weight: 400;
  color: #444;
}

.base-frames-cards {
  display: flex;
  gap: 34px;
  align-items: flex-start;
}

.card-item {
  text-align: center;
}

.card-item span {
  display: block;
  margin-top: 22px;
  font-size: 20px;
  font-weight: 500;
  color: #2c2c2c;
}

.card {
  width: clamp(160px, 22vw, 190px);
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

/* MEDIA-GALLERY */

.media-gallery {
  display: grid;
  width: 100%;
  gap: 0;
}

/* 1–3 картинки */
.media-gallery:has(img:nth-child(1):last-child) {
  grid-template-columns: 1fr;
}

.media-gallery:has(img:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.media-gallery:has(img:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

/* 4–6 */
.media-gallery:has(img:nth-child(4)),
.media-gallery:has(img:nth-child(5)),
.media-gallery:has(img:nth-child(6)) {
  grid-template-columns: repeat(3, 1fr);
}

/* 7–12 */
.media-gallery:has(img:nth-child(7)),
.media-gallery:has(img:nth-child(8)),
.media-gallery:has(img:nth-child(9)),
.media-gallery:has(img:nth-child(10)),
.media-gallery:has(img:nth-child(11)),
.media-gallery:has(img:nth-child(12)) {
  grid-template-columns: repeat(4, 1fr);
}

/* 13+ */
.media-gallery:has(img:nth-child(13)) {
  grid-template-columns: repeat(6, 1fr);
}

.media-gallery img,
.media-gallery video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* MEDIA-VERTICAL-GALLERY */

.vertical-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.vertical-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* CAROUSEL */

.project-carousel {
  width: 100%;
  overflow: hidden;
}

.track {
  display: flex;
  align-items: center;
  will-change: transform;
}

.project-slide {
  flex: 0 0 33.3333%;
  min-width: 33.3333%;
}

.project-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* TRANSITION */

.transitions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.transition {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* контейнер сам растягивается по высоте картинки */
.transition img {
  width: 100%;
  height: auto;

  display: block;

  position: absolute;
  inset: 0;

  opacity: 0;
  transition: opacity 1.5s ease;

  user-select: none;
  pointer-events: none;
}

/* активная картинка */
.transition img.active {
  position: relative;
  opacity: 1;
}

/* PORTFOLIO */

.portfolio-block {
  width: 100%;
  padding: 120px 0;
}

.portfolio-container {
  max-width: 1600px;
  margin: 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.portfolio-left {
  max-width: 760px;
}

.portfolio-label {
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: #7a7d85;
  margin-bottom: 15px;
}

.portfolio-title {
  font-size: 44px;
  font-weight: 400;
  color: #1f2027;
  margin-bottom: 10px;
}

.portfolio-text {
  max-width: 656px;
  font-size: 16px;
  font-weight: 300;
  color: #5f636b;
}

.portfolio-divider {
  width: 1px;
  height: 220px;
  background: #d7d7db;
  margin: 0 78px 0 215px;
}

.portfolio-right {
  max-width: 420px;
  padding-top: 14px;
}

.portfolio-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #262830;
  margin-bottom: 15px;
}

.portfolio-description {
  font-size: 16px;
  font-weight: 300;
  color: #5f636b;
  margin-bottom: 30px;
}

.portfolio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 40px;

  border: 1.5px solid #ff6435;
  border-radius: 999px;

  color: #ff6435;
  text-decoration: none;

  font-size: 18px;
  font-weight: 500;

  transition: 0.25s ease;
}

.portfolio-btn:hover {
  background: #ff6435;
  color: #fff;
}

/* =========================
   1024
========================= */

@media (max-width: 1024px) {

  .project-block {
    padding: 80px 0;
  }

  .project-container {
    grid-template-columns: 1fr;
    padding: 0 40px;
    gap: 50px;
  }

  .project-left-side h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 24px;
  }

  .project-subtitle {
    font-size: 18px;
    font-weight: 400;
  }

  .project-top-content {
    margin-bottom: 40px;
  }

  .project-top-content h2 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 24px;
  }

  .project-top-content p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
  }

  .project-bottom-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .project-divider {
    display: none;
  }

  .project-info-block h3 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 10px;
  }

  .project-info-block p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
    max-width: 100%;
  }

  .stages {
    padding: 50px 40px;
  }

  .stages__container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .stages__left {
    min-width: auto;
    gap: 24px;
  }

  .stages__number {
    font-size: 52px;
    font-weight: 400;
  }

  .stages__title {
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 10px;
  }

  .stages__subtitle {
    font-size: 16px;
    font-weight: 400;
  }

  .stages__right p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
  }

  .separator-block {
    padding: 80px 40px;
  }

  .separator-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .separator-left {
    min-width: auto;
  }

  .separator-left h2 {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 0;
  }

  .separator-subtitle {
    margin-top: 24px;
    font-size: 18px;
    font-weight: 500;
  }

  .separator-right {
    padding-top: 0;
  }

  .separator-right p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
  }

  .base-frames {
    padding: 80px 40px;
  }

  .base-frames-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .base-frames-content {
    width: 100%;
  }

  .base-frames-content h3 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
  }

  .base-frames-content h4 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 24px;
  }

  .base-frames-content p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
  }

  .base-frames-cards {
    gap: 16px;
    justify-content: center;
  }

  .card-item span {
    font-size: 16px;
    font-weight: 500;
    margin-top: 14px;
  }

  .card {
    max-width: 220px;
    width: 100%;
  }

  .media-gallery {
    grid-template-columns: 1fr;
  }

  .portfolio-block {
    padding: 80px 0;
  }

  .portfolio-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    padding: 0 40px;
  }

  .portfolio-divider {
    display: none;
  }

  .portfolio-label {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .portfolio-title {
    font-size: 36px;
    margin-bottom: 24px;
  }

  .portfolio-subtitle {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .portfolio-description {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
  }

  .portfolio-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
  }
}


/* =========================
   768
========================= */

@media (max-width: 768px) {

  .project-hero {
    min-height: 65vh;
  }

  .project-block {
    padding: 60px 0;
  }

  .project-container {
    padding: 0 24px;
    gap: 40px;
  }

  .project-left-side h1 {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .project-subtitle {
    font-size: 18px;
  }

  .project-top-content {
    margin-bottom: 32px;
  }

  .project-top-content h2 {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .project-top-content p {
    font-size: 18px;
    line-height: 1.55;
  }

  .project-bottom-grid {
    gap: 40px;
  }

  .project-info-block h3 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .project-info-block p {
    font-size: 18px;
    line-height: 1.55;
  }

  .stages {
    padding: 50px 24px;
  }

  .stages__container {
    gap: 32px;
  }

  .stages__left {
    gap: 20px;
  }

  .stages__number {
    font-size: 52px;
  }

  .stages__title {
    font-size: 26px;
  }

  .stages__subtitle {
    font-size: 16px;
  }

  .stages__right p {
    font-size: 16px;
    line-height: 1.55;
  }

  .separator-block {
    padding: 60px 24px;
  }

  .separator-container {
    gap: 32px;
  }

  .separator-left h2 {
    font-size: 42px;
  }

  .separator-subtitle {
    margin-top: 20px;
    font-size: 18px;
  }

  .separator-right p {
    font-size: 18px;
    line-height: 1.55;
  }

  .base-frames {
    padding: 60px 24px;
  }

  .base-frames-container {
    gap: 32px;
  }

  .base-frames-content h3 {
    font-size: 24px;
  }

  .base-frames-content h4 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .base-frames-content p {
    font-size: 16px;
    line-height: 1.55;
  }

  .base-frames-cards {
    gap: 12px;
    flex-wrap: wrap;
  }

  .card-item span {
    font-size: 14px;
    margin-top: 12px;
  }

  .card {
    max-width: 200px;
  }

  .project-slide {
    flex: 0 0 50%;
    min-width: 50%;
  }

  .transitions {
    display: flex;
    flex-direction: column;
  }

  .portfolio-block {
    padding: 60px 0;
  }

  .portfolio-container {
    padding: 0 24px;
    gap: 32px;
  }

  .portfolio-label {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .portfolio-title {
    font-size: 34px;
    margin-bottom: 24px;
  }

  .portfolio-subtitle {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .portfolio-description {
    font-size: 18px;
    line-height: 1.55;
    margin-bottom: 24px;
  }

  .portfolio-btn {
    width: 100%;
    padding: 16px 20px;
  }
}

@media (max-width: 640px) {
  .project-hero {
    min-height: 55vh;
  }

  .stages {
    padding: 50px 24px;
  }

  .project-block {
    padding: 50px 0;
  }

  .stages__right p {
    font-size: 16px;
  }

  .separator-block {
    padding: 50px 24px;
  }

  .project-container,
  .portfolio-container {
    padding: 0 24px;
  }

  .project-left-side h1 {
    font-size: 28px;
  }

  .project-subtitle {
    font-size: 18px;
  }

  .project-top-content h2 {
    font-size: 22px;
  }

  .project-top-content p,
  .project-info-block p,
  .separator-right p,
  .portfolio-description {
    font-size: 18px;
  }

  .project-info-block h3 {
    font-size: 22px;
  }

  .stages__number {
    font-size: 52px;
  }

  .stages__title {
    font-size: 26px;
  }

  .stages__subtitle {
    font-size: 16px;
  }

  .separator-left h2 {
    font-size: 42px;
  }

  .separator-subtitle {
    font-size: 18px;
  }

  .base-frames {
    padding: 50px 24px;
  }

  .transitions {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .portfolio-btn {
    width: 100%;
    padding: 16px 20px;
  }
}

@media (max-width: 430px) {
  .project-left-side h1 {
    font-size: clamp(1.9rem, 6vw, 2.3rem);
    margin-bottom: 24px;
  }

  .project-subtitle {
    font-size: 16px;
  }

  .card-item span {
    font-size: 12px;
    margin-top: 10px;
  }

  .project-slide {
    flex: 0 0 50%;
    min-width: 50%;
  }

  .project-top-content h2 {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .project-top-content p,
  .project-info-block p,
  .separator-right p,
  .portfolio-description {
    font-size: 16px;
  }

  .separator-left h2 {
    font-size: 34px;
    margin-bottom: 0;
  }

  .portfolio-title {
    margin-bottom: 24px;
  }

  .project-bottom-grid {
    gap: 50px;
  }

  .separator-subtitle {
    font-size: 16px;
  }

  .base-frames-content h3 {
    font-size: 24px;
  }

  .portfolio-btn {
    padding: 14px 18px;
  }
}