.project-page {
  --project-accent: #00f0d4;
  --project-ink: #303030;
  --project-dark: #283636;
  --project-dark-soft: #344444;
  --project-white: #ffffff;
  --project-soft: #e6e6e6;
  --project-gutter: 5vw;
  --project-max: 1440px;
  background: var(--project-white);
  color: var(--project-ink);
  overflow-x: clip;
}

.project-page--legacy {
  min-height: 100vh;
}

.project-page figure {
  margin: 0;
}

.project-page img {
  display: block;
}

.project-hero {
  min-height: 100svh;
  padding: 0;
  background: var(--project-accent);
  color: var(--project-white);
}

.project-hero__inner {
  display: grid;
  min-height: 100svh;
}

.project-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 57svh;
  padding: 8rem var(--project-gutter) 3.5rem;
}

.project-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.65rem;
  margin-bottom: clamp(2rem, 5vw, 5rem);
  padding: 0.35rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-back span {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.project-back:hover span,
.project-back:focus-visible span {
  transform: translateX(-0.3rem);
}

.project-hero__eyebrow {
    margin: 0 0 1.25rem;
    color: var(--project-ink);
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.project-hero__title {
  max-width: 25ch;
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.project-hero__title span{
  color: var(--project-ink);
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 4rem);
  position: relative;
  display: block;
  margin: 0 0 1rem;
  &:after{
    content: '';
    display: block;
    width: 20%;
    height: .2rem;
    margin: .25rem 0 0;
    background: var(--project-ink);
  }
}

.project-hero__title .project-hero__project-name--long {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
}

.project-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 43svh;
  padding: 0;
  background: var(--project-ink);
}


.project-hero__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-hero--without-visual .project-hero__content {
  min-height: 100svh;
}

.project-intro {
  padding: 4rem var(--project-gutter);
  background: var(--project-white);
}

.project-intro__inner,
.project-showcase__heading,
.project-chapters,
.project-cta__inner {
  width: 100%;
  max-width: var(--project-max);
  margin: 0 auto;
}

.project-intro h2,
.project-showcase__heading h2,
.project-cta h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.project-intro__copy {
  margin-top: 2.75rem;
}

.project-intro__copy p {
  max-width: 48rem;
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.7;
}

.project-intro__copy p + p {
  margin-top: 1.5rem;
}

.project-showcase {
  padding: clamp(4rem, 7vw, 4rem) var(--project-gutter);
  background: var(--project-ink);
  color: var(--project-white);
}

.project-showcase__heading h2 {
  text-transform: uppercase;
}
.project-showcase__heading h2 span{
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  color: var(--project-accent);
  text-transform: initial;
  display: inline-block;
  margin: .25rem 0 0;
}

.project-chapters {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: 2rem;

}

.project-chapter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 7vw, 4.5rem);
  clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
  background-color: var(--project-white);
  position: relative;
  padding: 2.5rem 4rem 2.5rem 2.5rem;
  &:before{
    content: '';
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    background: var(--project-ink);
    position: absolute;
    top: 1px;
    left: 1px;
    clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
  }
  &:nth-child(even) {
    background-color: var(--project-accent);
    & .project-chapter__number{
      color:  var(--project-accent);
    }
  }
}

.project-chapter__number {
    width: auto;
    color: var(--team-green);
    font-size: 0.75rem;
    font-weight: 700;
    position: relative;
}


.project-chapter__content {
  max-width: 48rem;
  position: relative;
  color: var(--project-soft);
}

.project-chapter h3 {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
}

.project-chapter__content > p {
  margin: 1.75rem 0 0;
  max-width: 42rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.project-chapter__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  margin-top: 2rem;
  padding: 0.85rem 0;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
}
.project-chapter__arrow {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1rem;
  transition: transform 0.25s ease;
}


.project-cta {
  padding: clamp(2rem, 7vw, 4rem) var(--project-gutter) clamp(4rem, 11vw, 9rem) var(--project-gutter);
  background: var(--project-ink);
  color: var(--project-white);
}

.project-cta h2 {
  max-width: 24ch;
}

.project-cta__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  min-width: min(100%, 15rem);
  margin-top: 3rem;
  color: var(--project-white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: #393939;
}

.project-cta__contact {
  flex: 0 0 auto;
}

.project-related {
  min-width: 0;
  margin-top: clamp(3rem, 7vw, 6rem);
}

.project-related__title {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #00f0d4;
}

.project-related__slider:not(.swiper-initialized) {
  overflow: visible;
}

.project-related__slider:not(.swiper-initialized) .swiper-wrapper {
  flex-wrap: wrap;
  gap: 1.25rem;
}

.project-related__slider:not(.swiper-initialized) .swiper-slide {
  width: 100%;
}

.project-related__slider:not(.swiper-initialized) .tranding-slider-control {
  display: none;
}

.project-related__link {
  display: block;
  color: var(--project-white);
  text-decoration: none;
}

.project-related__link img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-related__link span {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-related__link:hover img,
.project-related__link:focus-visible img {
  opacity: 1;
  transform: translateY(-0.25rem);
}

.project-related__link:focus-visible {
  outline: 2px solid var(--project-accent);
  outline-offset: 0.3rem;
}

.project-related__slider.swiper-initialized {
  padding-bottom: 3.5rem;
}

.project-related__slider.swiper-initialized .tranding-slider-control {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-related__slider .slider-arrow {
  display: grid;
  position: static;
  width: 2rem;
  height: 2rem;
  margin: 0 1rem;
  padding: 0;
  place-items: center;
  color: var(--project-white);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.project-related__slider .slider-arrow::after {
  content: none;
}

.project-related__slider .slider-arrow svg {
  width: 2rem;
  height: 2rem;
  stroke: var(--project-accent);
  stroke-width: 1px;
}

.project-related__slider .swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

.project-related__slider .swiper-pagination {
  position: static;
  width: auto;
  margin: 0;
  display: flex;
  align-items: center;
  transform: none !important;
}

.project-related__slider .swiper-pagination-bullet {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  margin: 0 4px;
  background-color: transparent;
  border: 1px solid var(--project-accent);
  opacity: 1;
  transform: scale(0.8);
  transition: background-color 0.2s cubic-bezier(0, 0.07, 0.57, 0.99), transform 0.4s cubic-bezier(0, 0.07, 0.57, 0.99);
}

.project-related__slider .swiper-pagination-bullet-active {
  background-color: var(--project-accent);
  transform: scale(1);
}


.project-back:focus-visible,
.project-cta__link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}

@media screen and (min-width: 768px) {
  .project-hero__content {
    min-height: 54svh;
    padding-top: 9rem;
  }

  .project-hero__visual,
  .project-hero__visual img {
    min-height: 46svh;
  }

  .project-hero__visual img {
    min-height: 0;
  }

  .project-intro h2 {
    grid-column: 1;
  }
  
}

@media screen and (min-width: 1024px) {
  .project-hero__inner {
    grid-template-columns: minmax(0, 56%) minmax(0, 44%);
  }

  .project-hero__content,
  .project-hero__visual {
    min-height: 100svh;
  }

  .project-hero__content {
    padding-top: 10rem;
    padding-right: clamp(3rem, 6vw, 7rem);
  }

  .project-hero__title {
    max-width: 25ch;
  }
  .project-hero__title span {
    max-width: 25ch;
  }

  .project-hero__visual img {
    width: min(100%, 48rem);
    min-height: 0;
    transform: translate(-25%,0);
  }

  .project-hero--without-visual .project-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-hero--without-visual .project-hero__title {
    max-width: 20ch;
  }

  .project-intro{
    padding-top: 10rem;
    padding-bottom: 10rem;
  }
  .project-intro__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
  .project-intro__copy {
    grid-column: 2;
    margin-top: 0;
  }
  .project-showcase{
    padding-top: 10rem;
    display: grid;
    grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1.5fr);
    align-items: start;
    gap: 2.5rem clamp(2.5rem, 4vw, 5rem);
  }
  

 
  .project-chapters {
    margin-top: 0;
  }
  .project-chapter {
    min-width: 0;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: start;
    gap: 1.5rem .5rem;
    min-height: 15rem;
     &:nth-child(odd) {
     margin-right: 8%;
    }
    &:nth-child(even) {
     margin-left: 8%;
    }
  }

  .project-chapter__content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: none;
  }

  .project-chapter h3 {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
  }

  .project-chapter__link {
      grid-column: 2;
      align-self: end;
      margin-top: 0;
  }


  .project-cta__inner {
    display: block;
  }

  .project-cta__contact {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: clamp(3rem, 7vw, 7rem);
  }

  .project-related {
    margin-top: clamp(3rem, 7vw, 6rem);
  }

  .project-related__slider:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - 2.5rem) / 3);
  }

  .project-cta__link {
    margin-top: 0;
  }
}

@media (max-width: 1023px) {
  .project-page {
    --project-gutter: 10vw;
  }
  .project-hero {
      min-height: 1px;
  }
  .project-hero__inner {
      min-height: 1px;
  }
  .project-hero__content {
      min-height: 1px;
      padding: 8rem var(--project-gutter) 2.5rem;
  }
  .project-hero__visual {
      min-height: 1px;
  }
}

@media (max-width:640px){
  .project-showcase {
      padding-right: 5vw;
      padding-left: 5vw;
  }
  .project-showcase__heading{
    padding-right: 5vw;
    padding-left: 5vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-back span {
    transition: none;
  }
}
