/* ----------------------------------------------------------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100..700&display=swap");

body {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  margin: 0;
  background-color: #1f2020;
  color: #f9f6ef;
}

.hero,
nav,
main {
  max-width: 75ch;
  margin: 0 auto;
  padding-inline: 1em;
}

h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 0.8;
}

p {
  text-wrap: pretty;
  line-height: 1.5;
}

nav {
  position: sticky;
  top: 0;
  left: 0;
  min-height: 3rem;
  background-color: #1f2020d0;
  backdrop-filter: blur(0.2em);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

ul {
  padding-right: 1em;
  margin: 0;
  display: inline-flex;
  gap: 1rem;
}

li {
  list-style: none;
  display: inline-block;
  cursor: pointer;
  transition: 0.5s linear;
}

.hero {
  min-height: 60vh;
  background-image: url("https://linhnga.vn/wp-content/uploads/2022/08/LOOK-2.2-SERISSA-2021.jpg");
  background-size: 73%;
  background-repeat: no-repeat;
  background-position: 100% 30%;
  mix-blend-mode: lighten;
  display: grid;
  align-content: center;
  container-type: inline-size;
}

h1 {
  font-size: clamp(2rem, 7cqi, 10rem);
  font-weight: 100;
  max-width: 50%;
  color: #e389f5;
}

.btn {
  display: inline;
  position: relative;
  padding: 0.5em 1em;
  cursor: pointer;
}

.btn:before,
.btn:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(in hsl longer hue 45deg, #f66 0 0);
  z-index: -1;
  clip-path: polygon(90% 0, 100% 50%, 90% 99%, 0% 100%, 8% 50%, 0% 0%);
}

.btn:after {
  background: #1f2020;
  inset: 3px;
}

nav:after {
  content: "";
  position: absolute;
  height: 0.05em;
  width: 100%;
  bottom: 0;
  background: linear-gradient(in hsl longer hue 90deg, #f66 0 0);
  opacity: 0;
}

.logo {
  font-weight: 900;
  font-size: 6cqi;
  background: linear-gradient(in hsl longer hue 40deg, #f66 0 0);
  background-clip: text;
  color: #0000;
}

@keyframes fade-out {
  to {
    background-size: 150%;
    opacity: 0;
  }
}

@keyframes zoom-out {
  to {
    font-size: 2rem;
    padding-left: 0.1em;
  }
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

@keyframes max-out {
  to {
    max-width: 100%;
  }
}

.hero {
  animation: fade-out linear both;
  animation-timeline: view();
  animation-range: exit -100px;
}

nav {
  animation: max-out linear both;
  animation-timeline: view();
  animation-range-start: 80vh;
  animation-range-end: 100vh;
}

nav:after {
  animation: appear linear both;
  animation-timeline: view();
  animation-range-start: 60vh;
  animation-range-end: 100vh;
}

.logo {
  animation: zoom-out linear both;
  animation-timeline: view();
  animation-range-start: 10vh;
  animation-range-end: 100vh;
}
/* ------------------------------------------------------------------- */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10vmin;
  font-family: sans-serif;
  overflow: hidden;
  transform: skew(5deg);
}

.card {
  flex: 1;
  transition: all 1s ease-in-out;
  height: 75vmin;
  position: relative;
}

.card:not(:nth-child(5)) {
  margin-right: 1em;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 1s ease-in-out;
  filter: grayscale(100%);
}

.head {
  color: black;
  background: #f57171;
  padding: 0.5em;
  transform: rotate(-90deg);
  transform-origin: 0% 0%;
  transition: all 0.5s ease-in-out;
  min-width: 60%;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 1em;
  white-space: nowrap;
}

.card:hover {
  flex-grow: 10;
}

.card:hover img {
  filter: grayscale(0);
}

.card:hover .head {
  text-align: center;
  top: calc(100% - 2em);
  color: white;
  background: #00000080;
  font-size: 2em;
  transform: rotate(0deg) skew(-5deg);
}
