.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: calc(100vh - 5rem);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: 0.6s ease-out;
}

.hero h3 {
  margin: auto 2rem;
  padding: 0.25rem 0;
  width: calc(100% - 4rem);
  border-radius: 10px;
  background-color: var(--inkblue);
  font-size: clamp(1.6rem, 3.5vw, 4rem);
  color: var(--nearwhite);
  letter-spacing: 1.6rem;
  font-weight: 100;
  transition: 0.3s ease-out;
}
.hero h3.scrolled {
  transform: translateY(-200px);
  transition: 1s;
}

.hero h2 {
  width: 100%;
  padding: 2rem 1rem;
  font-family: poppinsFont;
  font-size: clamp(0.8rem, 3vw, 3rem);
  color: var(--nearwhite);
  letter-spacing: 1rem;
  font-weight: 100;
  transition: 1s;
}
.hero h2.scrolled {
  opacity: 0;
  transition: 1s;
}

@media screen and (min-width: 1200px) {
  .hero h3, .hero h2 {
    white-space: nowrap;
    overflow: hidden;
    animation-delay: 250ms;
  }
  .hero h3 {
    border-radius: 6px;
    animation: typing 1.6s;
  }
  .hero h2 {
    animation: typing 1.2s steps(3);
  }
}

@keyframes typing {
  from { width: 0 }
}

@media screen and (max-width: 480px) {
  .hero h2, .hero h3 {
    letter-spacing: 0.6rem;
  }
}

.flyer {
  display: flex;
  justify-content: center;
  margin: auto 2rem;
}

.flyer__container {
  display: grid;
  grid-template-columns: 0.3fr 1.7fr;
  gap: 3rem;
  justify-content: center;
  margin-bottom: 3rem;
  max-width: 1800px;
  max-height: 500px;
}

.flyer__content {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  background-color: var(--nearwhite);
  border-radius: 0 10px 10px 0;
}

.flyer__content h1 {
  margin: 2rem 0;
  padding-left: 4rem;
  padding-right: 2rem;
  font-size: 1.6rem;
  background-size: 100%;
  text-transform: uppercase;
}

.flyer__content h2 {
  padding-left: 6rem;
  padding-right: 2rem;
  font-size: 2rem;
  padding-bottom: 1rem;
  background: linear-gradient(to right, #564da4, #537ea1);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.flyer__content p {
  padding-left: 6rem;
  padding-right: 2rem;
  padding-bottom: 1rem;
}

@media screen and (min-width: 1200px) {
  .flyer__content {
    transform: translateX(3rem);
    opacity: 0;
    transition: 1s ease;
  } 
  .flyer__content.visible {
    transform: translateX(0);
    opacity: 1;
  }

  .flyer__image {
    transform: translateY(2rem);
    opacity: 0;
    transition: 1s ease;
  }
  .flyer__image.visible {
    transform: translateY(0);
    opacity: 1;
  }
}

.flyer__image--card {
  display: flex;
  justify-content: center;
}

.flyer__image--card img {
  width: 500px;
  border-radius: 10px 0 0 10px;
}

.flyer__btn {
  box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.25);
  font-size: 1.2rem;
  background: var(--slateblue);
  background: linear-gradient(to right, #4E8DB5, #224A63);
  background: -webkit-linear-gradient(to right, #4E8DB5, #224A63);
  padding: 2rem 3rem;
  border: none;
  border-radius: 6px;
  margin: auto -1rem;
  cursor: pointer;
  transition: 0.3s ease-out;
}

.flyer__btn a {
  color: var(--nearwhite);
  text-decoration: none;
}

.flyer__btn:hover {
  transform: scale(1.05);
  transition: 0.1s ease-in;
}

@media screen and (max-width: 1200px) {
  .flyer {
    margin: 1rem;
  }

  .flyer__container, .flyer__container--services {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
    max-height: none;
    gap: 1rem;
  }

  .flyer__content {
    margin: auto;
    max-width: 500px;
    width: 100%;
    border-radius: 0 0 10px 10px;  
  }

  .flyer__image--card img {
    max-width: 500px;
    width: 100%;
    border-radius: 10px 10px 0 0;
  }

  .flyer__btn {
    margin: 2rem -1rem;
    padding: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .flyer__content h1, .flyer__content h2, .flyer__content p {
    padding-left: 0;
    padding: 1rem;
  }

  .flyer__content h1 {
    margin: 1rem auto;
    font-size: 7vw;
  }
  .flyer__content h2 {
    margin: 0rem auto;
    font-size: 8vw;
  }
  .flyer__content p {
    margin: 0rem auto;
    padding: 1rem;
  }
  .flyer__btn a {
    font-size: 1rem
  }
}

.cardrow {
  background-color: var(--nearwhite);
  display: flex;
  justify-content: center;
  margin: 0 2rem 3rem 2rem;
  padding: 6rem;
  border-radius: 10px;
}

.cardrow__wrapper {
  width: 100%;
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 425px;
  gap: 3rem;
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.cardrow__card {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 10px;
  width: 100%;
  color: var(--nearwhite);
  transition: 0.3s ease-out;
  box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.5);
}

.cardrow__card:hover {
  box-shadow: 5px 5px 12px 0 rgba(0, 0, 0, 0.5);
  transform: translateZ(2rem);
  transition: 0.1s ease-in;
  cursor: pointer;
}

.cardrow a {
  padding: 3rem 2rem;
  font-size: clamp(1rem, 4vw, 1.8rem);
  font-family: PoppinsFont;
  text-decoration: none;
  font-weight: bold;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

#cardrow-card1 {
  background-image: url(../Pictures/2024_MercedesE.jpg);  
}
#cardrow-card2 {
  background-image: url(../Pictures/Services__SoundDesign.jpg);
}
#cardrow-card3 {
  background-image: url(../Pictures/Services__CreativeSystem.jpg);
}
#cardrow-card4 {
  background-image: url(../Pictures/Shortfilm.jpg);
}

@media screen and (max-width: 1200px) {
  .cardrow {
    margin: 0rem 1rem 0rem 1rem;
  }
}

@media screen and (max-width: 640px) {  
  .cardrow {
    padding: 2rem;
  }
  .cardrow__wrapper {
    grid-template-columns: 1fr;
    grid-auto-rows: 325px;
    gap: 2rem;
  }
}

.work__title h2 {
  text-align: center;
  margin: 1rem auto;
  font-size: clamp(1rem, 10vw, 4rem);
  background: linear-gradient(to right, #e4e4ed, #cbdeee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.mediablock-row {
  display: flex;
  background-color: var(--inkblue);
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
  margin: auto;
  width: 100%;
  padding: 2rem;
}

.mediablock-row img {
  width: 25%;
}

.mediablock-left, .mediablock-right, .mediablock-center {
  background-color: var(--nearwhite);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  margin: 2rem auto;
  width: 80%;
}
.mediablock-left {
  flex-direction: row-reverse; 
}
.mediablock-right, .mediablock-center {
  flex-direction: row;
}

.mediablock-left, .mediablock-right { 
  animation: fade-in linear;
  animation-timeline: view();
}

@keyframes fade-in {
  0%, 100% {scale: .97; opacity: 0;}
  25%, 70% { scale: 1; opacity: 1; }
}

.mediablock__text {
  display: flex;
  text-align: left;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem;
  width: 40%;
}

.mediablock__text-solo {
  width: 100%;
  padding: 2rem;
}

.mediablock__media { 
  width: 60%;
  align-content: center;
  max-width: 1000px;
}

#legals_page h1 {
  margin: 2rem 0;
  padding-left: 3rem;
}
#legals_page p, #legals_page a, #legals_page li {
  margin: 0.6rem 0;
  padding-left: 2rem;
}

.mediablock__text h1 {
  margin: 2rem 0 2rem 0;
  padding: 0 2rem;
  background-size: 100%;
  font-size: clamp(1.2rem, 6vw, 2.5rem);
}

.mediablock__text p, .mediablock__text ul {
  margin: 1rem 3rem;
  padding: 0 2rem;
}

.mediablock__media iframe, .mediablock__media img {
  padding: 2rem;
  width: 100%;
}

.mediablock__media iframe {
  aspect-ratio: 16/9;
}

@media screen and (max-width: 1200px) {
  .mediablock-left, .mediablock-right {
    flex-direction: column;
    margin: 2rem 1rem;
    width: calc(100% - 2rem);
  }

  .mediablock__text {
    width: 100%;
  }

  .mediablock__text h1 {
    text-align: center;
  }

  .mediablock__text p {
    margin: 1rem 1rem;
  }

  .mediablock__media {
    margin: auto;
    width: 100%;
  }

  .mediablock__text ul {
    margin: 1rem 2rem;
  }
}
@media screen and (max-width: 640px) {
  .mediablock__text {
    padding: 0;
  }
  .mediablock-row {
    flex-direction: column;
  }
  .mediablock-row img {
    width: auto;
  }
  .mediablock__media iframe, .mediablock__media img {
    padding: 1rem;
  }
}
@media screen and (max-width: 480px) {
  #legals_page h1 {
    font-size: 4vw;
    margin: 0.6rem 0;
  }
  #legals_page p, #legals_page a, #legals_page li {
    font-size: 3vw;
  }
}

.spotify {
  display: flex;
  justify-content: center;  
}

.spotify__container {
  width: 80%;
}

@media screen and (max-width: 480px) {
  .indexyoutube__wrapper {
    margin: 1rem 0;
  }
}

.carousel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding: 2rem;
}

.carousel__title {
  align-content: center;
}

.carousel__title h1 {
  padding: 1.8rem;
  text-decoration: none;
  font-size: 3rem;
  background: linear-gradient(to right, #e4e4ed, #cbdeee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.carousel__title a {
  padding: 1.8rem;
  text-decoration: none;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.5);
  transition: font-size 0.3s ease-out, color 0.3s ease-out;
}

.carousel__title a:hover {
  padding: 2rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.75);
  transition: font-size 0.1s ease-in, color 0.1s ease-in;
}

@media screen and (max-width: 1200px) {
  .carousel__title h1 {
    font-size: 4vw;
    padding: 0.6rem;
  }
  .carousel__title a {
    font-size: 2.6vw;
    padding: 0.6rem;
  }
  .carousel__title a:hover {
    font-size: 3vw;
    padding: 0.8rem;
  }
}

.gallery__container {
  width: 100%;
  max-width: 1800px;
  padding: 4rem;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-template-rows: masonry;
  gap: 3rem;
}

.gallery__box {
  width: 100%;
}

.gallery__box img {
  width: 100%;
  border-radius: 1rem;
}

@media screen and (max-width: 1200px) {
  .gallery__container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .gallery__container {
    padding: 1rem;
    gap: 1rem;
  }
}