@font-face {
  font-family: 'Simplon Norm Bold';
  src: url('assets/fonts/SimplonNorm-Bold.woff2') format('woff2'),
      url('assets/fonts/SimplonNorm-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Simplon Mono';
  src: url('assets/fonts/SimplonMonoTrial.woff2') format('woff2'),
      url('assets/fonts/SimplonMonoTrial.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Simplon Norm Regular';
  src: url('assets/fonts/SimplonNorm-Regular.woff2') format('woff2'),
      url('assets/fonts/SimplonNorm-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --primary-color: #8E6B4D;
  --secondary-color: #8E6B4D66;
  --white: #f7f6f2;
}

body {
  font-family: "neue-haas-unica", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: var(--white);
  color: var(--primary-color);
  font-size: clamp(16px, 1.5vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

::-webkit-selection {
  background-color: var(--primary-color);
  color: var(--white);
}

::selection {
  background-color: var(--primary-color);
  color: var(--white);
}

h1 {
  grid-column: 9 / 13;
  margin: 0;
  grid-row: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  font-size: clamp(32px, 3vw, 48px);
}

h1 span {
  display: block;
  opacity: 0.4;
}

img {
  width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--primary-color);
}

.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 20px;
  padding: 0 40px;
  height: 100%;
  min-height: calc(100dvh - 80px);
}

.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
}

.logo {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 102px;
  height: 30px;
  /* animation: fadeIn 1s ease forwards;
  opacity: 0; */
}

.logo svg {
  width: 100%;
  height: auto;
  display: block;
}

.content {
  grid-row: 2;
  grid-column: 9 / 13;
  margin-bottom: 30px;
}

.content > *:not(:last-child) {
  margin-bottom: 30px;
}

.content > * {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.content > *:nth-child(1) {
  animation-delay: 0.2s;
}

.content > *:nth-child(2) {
  animation-delay: 0.3s;
}

.content > *:nth-child(3) {
  animation-delay: 0.4s;
}

.content > *:nth-child(4) {
  animation-delay: 0.5s;
}

.content > *:nth-child(5) {
  animation-delay: 0.6s;
}

.social {
  grid-row: 3;
  grid-column: 9 / 13;
  align-self: end;
  list-style: none;
  display: flex;
  gap: 40px;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.7s;
}

.social a {
  position: relative;
}

.social a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  max-width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: max-width 0.35s ease;
}

.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transition: max-width 0.35s ease;
}

.carousel {
  grid-row: 1 / -1;
  grid-column: 1 / 6;
  align-self: end;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.carousel__wrapper {
  position: relative;
  width: 100%;
  bottom: 0;
  height: 0;
  padding-bottom: 66.66%;
  padding-top: 44px;
  margin-top: 70px;
}

.carousel__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.carousel__item .lazy-container {
  height: 0;
  padding-bottom: 66.67%;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  position: absolute;
}

.carousel__item span {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  padding-left: 40px;
  font-size: clamp(12px, 1.5vw, 18px);
  letter-spacing: -0.02em;
}

.carousel__item.active {
  opacity: 1;
}

.carousel__item.active span {
  animation: spanFloat 6s ease forwards;
}

.carousel__item img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.carousel__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}

.progress-circle {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}

.progress-circle__fill {
  stroke-dasharray: 56.55;
  stroke-dashoffset: 56.55;
  opacity: 0;
  animation: fillCircle 5s linear, fadeInOut 5.3s linear;
}

@keyframes fillCircle {
  from {
    stroke-dashoffset: 56.55;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  5.66% {
    opacity: 1;
  }
  94.34% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes spanFloat {
  0% {
    transform: translateY(5px);
    opacity: 0;
  }
  20% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-5px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  85% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media only screen and (hover: hover) {
  .link-underline:hover::after {
    max-width: 0;
  }

  .social a:hover::after {
    max-width: 100%;
  }
}

@media screen and (max-width: 1200px) {
  .carousel {
    grid-column: 1 / 7;
  }

  h1,
  .content,
  .social {
    grid-column: 8 / 13;
  }
}

@media screen and (max-width: 940px) {
  .wrapper {
    min-height: 0;
    padding-top: 160px;
  }

  h1 {
    grid-column: 1 / 13;
    margin-bottom: 40px;
  }

  .carousel {
    grid-column: 1 / 13;
    grid-row: 2;
    margin-bottom: 80px;
  }

  .carousel__wrapper {
    margin-top: 0;
    padding-top: 36px;
  }

  .carousel__item span {
    padding-left: 30px;
    line-height: 16px;
  }

  .carousel__progress {
    width: 16px;
    height: 16px;
  }

  .content {
    grid-column: 1 / 13;
    grid-row: 3;
    margin-bottom: 120px;
  }

  .social {
    grid-column: 1 / 13;
    grid-row: 4;
  }
}

@media screen and (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .wrapper {
    padding-top: 140px;
    padding-bottom: 20px;
  }

  .link-underline::after {
    height: 1px;
    bottom: -1px;
  }

  .social a::after {
    height: 1px;
    bottom: -1px;
  }

  .logo {
    width: 68px;
    height: 20px;
    top: 20px;
    left: 20px;
  }
}