/**
 * Why Join - EXACT copy from OneElementScroll-main/css/base.css
 */

:root {
  --color-text: #e0e0e0;
  --color-bg: #010101;
  --color-link: #d4a574;
  --color-link-hover: #e1c093;
  --color-title: #fff;
  --page-padding: 2rem;
  --gradient-1: rgba(20, 20, 20, 0.8);
  --gradient-2: rgba(30, 15, 5, 0.4);
}

/* Section wrapper */
.section-why-join {
  color: var(--color-text);
  background-color: #010101;
  width: 100%;
  overflow-x: hidden;
}

/* Loading state */
.js .section-why-join.loading::before,
.js .section-why-join.loading::after {
  content: "";
  position: fixed;
  z-index: 10000;
}

.js .section-why-join.loading::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

.js .section-why-join.loading::after {
  top: 50%;
  left: 50%;
  width: 100px;
  height: 1px;
  margin: 0 0 0 -50px;
  background: var(--color-link);
  animation: loaderAnim 1.5s ease-in-out infinite alternate forwards;
}

@keyframes loaderAnim {
  0% {
    transform: scaleX(0);
    transform-origin: 0% 50%;
  }
  50% {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }
  50.1% {
    transform: scaleX(1);
    transform-origin: 100% 50%;
  }
  to {
    transform: scaleX(0);
    transform-origin: 100% 50%;
  }
}

/* Content sections */
.content {
  display: grid;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  grid-template-areas: 'content';
  position: relative;
  z-index: 90;
}

.content--blend {
  mix-blend-mode: overlay;
}

.content--center {
  height: 100vh;
  text-align: center;
  justify-items: center;
  display: grid;
  gap: 1.5rem;
  align-content: center;
  position: relative;
}

.content--column {
  grid-template-columns: repeat(5, 1fr);
  grid-template-areas: unset;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto 20vh;
  z-index: 80;
  justify-items: center;
}

.content--grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-template-areas: unset;
  width: 100%;
  height: 100vh;
  gap: 1rem;
  margin: 0 auto;
}

.content--grid .content__img {
  width: 100%;
  height: 100%;
}

/* Title styles */
.content__title {
  grid-area: content;
  margin: 0;
  line-height: .9;
  text-transform: uppercase;
  font-size: clamp(3rem, 19vw, 8rem);
  max-width: 1000px;
  color: var(--color-title);
  font-weight: 500;
}

.content__title span {
  display: inline-block;
}

.content__title--medium {
  line-height: 1.1;
  max-width: none;
  font-size: clamp(2rem, 12vw, 6rem);
}

/* Text styles */
.content__text {
  grid-area: content;
  padding: var(--page-padding);
  margin: 0 auto;
  font-size: 2rem;
  font-weight: 400;
  position: relative;
  font-size: clamp(1rem, 4vw, 2rem);
}

.content__text.content__text--large {
  width: 80%;
}

/* The ONE element that morphs */
.one {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 10;
  background-size: cover;
  background-position: 50% 50%;
  /* Reduced will-change for better performance */
  will-change: transform;
}

/* Image styles */
.content__img {
  background-size: cover;
  background-position: 50% 50%;
  /* Reduced will-change for better performance */
  will-change: transform;
}

.content--sides {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: 'img' 'content';
}

.content--sides .content__img {
  grid-area: img;
  height: 50vh;
}

.content--center .content__img {
  height: 38vh;
  width: auto;
  aspect-ratio: 0.8;
  grid-area: 1 / 1 / -1 / -1;
}

.content--center-tall {
  padding-top: 20vh;
  margin-bottom: 30vh;
}

.content--center-tall .content__img {
  height: 30vh;
  width: auto;
  aspect-ratio: 0.8;
}

.content--column .content__img {
  height: auto;
  width: 100%;
  max-width: 150px;
  aspect-ratio: 0.8;
  background-size: cover;
  background-position: 50% 50%;
}

.content--lines {
  display: flex;
  flex-direction: column;
}

.content--lines .content__title {
  display: flex;
  flex-wrap: wrap;
  align-self: center;
  gap: 10px;
}

.content--lines .content__img {
  height: 0.725em;
  width: auto;
  aspect-ratio: 16/9;
  background-size: cover;
  align-self: center;
  flex: none;
}

/* Responsive */
@media screen and (min-width: 53em) {
  .content--sides {
    grid-template-columns: 40% 1fr;
    grid-template-areas: 'img content';
  }
  .content--lines .content__title {
    white-space: nowrap;
    flex-wrap: nowrap;
  }
  .content--grid {
    height: 160vh;
  }
}

/* Tablet */
@media screen and (max-width: 1024px) {
  .content--column {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media screen and (max-width: 900px) {
  .content--column {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .content__title {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }

  .content--center .content__img {
    height: 32vh;
  }
}

/* Mobile */
@media screen and (max-width: 768px) {
  .section-why-join {
    padding: 0;
  }

  .content {
    height: auto;
    min-height: 100vh;
    padding: 4rem 1.5rem;
  }

  .content__title {
    font-size: clamp(2rem, 10vw, 4rem);
    line-height: 1;
  }

  .content__title--medium {
    font-size: clamp(1.5rem, 8vw, 3rem);
  }

  .content__text {
    font-size: clamp(0.9rem, 3.5vw, 1.25rem);
    padding: 1rem;
  }

  .content__text.content__text--large {
    width: 95%;
  }

  .content--column {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 3rem 1rem;
    margin-bottom: 10vh;
  }

  .content--column .content__img {
    max-width: 120px;
  }

  .content--center {
    padding: 3rem 1rem;
    gap: 1rem;
  }

  .content--center .content__img {
    height: 30vh;
  }

  .content--center-tall {
    padding-top: 10vh;
    margin-bottom: 15vh;
  }

  .content--grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    height: auto;
    min-height: 80vh;
    width: 100%;
    left: 0;
    gap: 0.5rem;
  }

  .content--lines .content__title {
    font-size: clamp(1.5rem, 8vw, 3rem);
    gap: 5px;
  }

  .content--lines .content__img {
    height: 0.6em;
  }

  .one {
    width: 100%;
    height: 100%;
  }
}

@media screen and (max-width: 480px) {
  .content__title {
    font-size: clamp(1.75rem, 12vw, 3rem);
  }

  .content--column {
    grid-template-columns: repeat(2, 1fr);
  }

  .content--column .content__img {
    max-width: 100px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .one {
    will-change: auto;
    transition: none;
  }

  .content__img {
    will-change: auto;
  }
}
