* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  overflow: hidden;
}

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

header {
  position: fixed;
  right: 1%;
  top: 1%;
  width: 400px;
  height: 70px;

  /* 수직 중앙 정렬 */
  display: flex;
  flex-direction: column;
  justify-content: center;

  border-radius: 5px;
  z-index: 1;
}

header nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
}

header nav ul li {
  display: flex;
}

header nav ul li .link {
  border-radius: 100%;
  width: 60px;
  height: 60px;
  line-height: 70px;
  text-align: center;
  margin-left: 10px;
  color: #fff;
  background-color: yellowgreen;
  transition: transform 0.2s ease;

  text-decoration: none;
  aspect-ratio: 1 / 1;
  /* 원 비율 1:1 */
}

header nav ul li:nth-child(1) a {
  background-color: #FEFAE0;
}

header nav ul li:nth-child(1) span {
  color: black;

}

header nav ul li:nth-child(2) a {
  background-color: #DDA15E;
}

header nav ul li:nth-child(2) span {
  color: whitesmoke;
}

header nav ul li:nth-child(3) a {
  background-color: #BC6C25;
}

header nav ul li:nth-child(3) span {
  color: whitesmoke;

}

header nav ul li:nth-child(4) a {
  background-color: #606C38;
}

header nav ul li:nth-child(4) span {
  color: whitesmoke;
}

/* 호버 시 효과들 */
header nav ul li .link:hover {
  background-color: #ccc;
  transform: scale(1.1);
}

.main {
  height: 100%;
  display: flex;
}

.slides {
  position: relative;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

section {
  min-width: 100vw;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* 슬라이드 배경색 */
#Intro {
  /* background-color: rgb(255, 253, 228); */
}

#about {
  /* background-color: lightsalmon; */
}

#project {
  background-color: lightyellow;
}

#blackHole {
  background-color: rgb(255, 255, 160);
}

#contact {
  background-color: white;
}

/* 인트로 부분 */
/* 언덕 배경 만들기 */
.scene {
  width: 100%;
  height: 100%;

  position: relative;
  /* 기준점 추가 */

  overflow: hidden;
  /* slide 화면 벗어나는거 없애기 */
}

.sky {
  /* border: 1px solid skyblue; */
}

.cloud1 {
  position: absolute;
  background: #caf0f8;
  width: 20%;
  height: 10%;
  border-radius: 50px;
  top: 30%;
  left: 20%;
  opacity: 0.7;
  box-shadow: 10px 10px 22px rgba(0, 0, 0, 0.1);
  animation: moveClouds 20s linear infinite;
}

.cloud1::before,
.cloud1::after {
  content: '';
  position: absolute;
  border-radius: 50px;
  box-shadow: 10px 10px 22px rgba(0, 0, 0, 0.1);
}

.cloud1::before {
  width: 77%;
  height: 77%;
  top: 120%;
  left: 100%;
  background: #ade8f4;
}

.cloud1::after {
  width: 120%;
  height: 110%;
  top: -200%;
  left: 100%;
  background: #90e0ef;
}

.cloud1>span {
  border: 1px solid red;

}

@keyframes moveClouds {
  0% {
    left: -46%;
  }

  100% {
    left: 100%;
  }
}

.cloud2 {
  position: absolute;
  background: #48cae4;
  width: 15%;
  height: 10%;
  border-radius: 50px;
  top: 25%;
  left: 76%;
  opacity: 0.8;
  box-shadow: 10px 10px 22px rgba(0, 0, 0, 0.1);
  /* animation: moveClouds 10s linear infinite; */
}

.cloud2::before,
.cloud2::after {
  content: '';
  position: absolute;
  border-radius: 50px;
  box-shadow: 10px 10px 22px rgba(0, 0, 0, 0.1);

}

.cloud2::before {
  width: 77%;
  height: 77%;
  top: 120%;
  right: 400%;
  background: #caf0f8;
}

.cloud2::after {
  width: 77%;
  height: 77%;
  top: -90%;
  right: 200%;
  background: #ade8f4;
}

.mountain {
  width: 36%;
  height: 50%;
  background: linear-gradient(to right, green 0%, yellowgreen 66%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  /* 위 왼 오, x% y% 깎이는 정도*/

  position: absolute;
  left: 0%;
  bottom: 0%;

  z-index: 2;
}

.house {
  width: 20%;
  height: 20%;

  position: absolute;

  top: 60%;
  left: 20%;

  z-index: 4;
}

.chimney {
  width: 10%;
  height: 40%;
  background-color: #577399;

  position: absolute;
  top: 5%;
  left: 46%;

  z-index: 0;

  box-shadow: 0px 0px 10px 1px gainsboro;
}

.up_house {
  background-color: #22333b;
  width: 70%;
  height: 50%;

  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
  /* x% y% 만 보면 된다*/
  box-shadow: 0px 0px 10px 1px gainsboro;
}

.down_house {
  background-color: #eae0d5;
  width: 50%;
  height: 50%;

  margin-top: -1%;
  margin-left: 10%;
  box-shadow: 0px 0px 10px 1px gainsboro;
}

.door {
  position: absolute;
  top: 80%;
  left: 25%;
  width: 20%;
  height: 20%;
  margin-top: -1%;
}

.house .door a {
  background-color: blanchedalmond;

  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: row;

  /* animation: scaleUpCenter 1s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; */

  z-index: 2;
}

/* 따로 만든 애니메이션 */
.scaleUpCenter {
  animation: scaleUpCenter 1s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

@keyframes scaleUpCenter {
  0% {
    transform: scale(1);
    transform-origin: 38% 70%;
  }

  100% {
    transform: scale(50);
    transform-origin: 38% 70%;
  }
}


.house .door a::before,
.house .door a::after {
  content: '';
  width: 100%;
  height: 100%;

}

.house .door a::before {
  width: 100%;
  height: 100%;
  background-color: #d08c60;
  /* animation: scaleUpleft 1s cubic-bezier(0.550, 0.055, 0.675, 0.190) both; */
}

.house .door a::after {
  width: 100%;
  height: 100%;
  background-color: #997b66;
  /* animation: scaleUpRight 1s cubic-bezier(0.550, 0.055, 0.675, 0.190) both; */
}

/* 왼쪽을 향해 커지는거 */
@keyframes scaleUpleft {
  0% {
    transform: scale(1);
    transform-origin: 60% 50%;
  }

  100% {
    transform: scale(100);
    transform-origin: 15% 70%;
  }
}

/* 우측 */
@keyframes scaleUpRight {
  0% {
    transform: scale(1);
    transform-origin: -26% 50%;
  }

  100% {
    transform: scale(100);
    transform-origin: -12% 70%;
  }
}

.hill {
  position: relative;
  width: 100%;
  height: 21%;
  top: 80%;
}

/* hill을 기준으로 배치한다 */
.hill>span:nth-child(1) {
  width: 80%;
  height: 240%;
  background: linear-gradient(to right, green 0%, yellowgreen 100%);
  clip-path: ellipse(50% 80% at 53% 80%);
  position: absolute;
  bottom: -120%;
  left: -12%;
  z-index: 3;
}

.hill>span:nth-child(2) {
  width: 70%;
  height: 110%;
  background: linear-gradient(to left, green 0%, yellowgreen 100%);
  clip-path: ellipse(50% 100% at 55% 100%);

  position: absolute;
  bottom: 0%;
  right: 0%;

  z-index: 2;
}

.hill>span:nth-child(3) {
  width: 80%;
  height: 180%;
  background: linear-gradient(to right, green 0%, yellowgreen 100%);
  clip-path: ellipse(50% 100% at 50% 100%);

  position: absolute;
  bottom: -3%;
  left: 8%;

  z-index: 1;
}

.tree {
  background-color: rgb(104, 219, 104);
  position: absolute;
  top: -60%;
  left: 80%;

  width: 10%;
  aspect-ratio: 1;
  /* 가로세로 비율 1:1 */
  border-radius: 100%;

  z-index: 1;
}

.sun {
  background-color: #d62828;
  width: 10%;
  aspect-ratio: 1;
  /* 가로세로 비율 1:1 */
  border-radius: 100%;

  position: absolute;
  top: 66%;
  left: 66%;

  display: flex;
  justify-content: center;
  align-items: center;

  /* animation: name duration timing-function delay iteration-count direction fill-mode; */
  animation: rotateSun 5s infinite linear, upSun 1s forwards ease-in-out;
}

@keyframes rotateSun {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(90deg);
    ;
  }
}

@keyframes upSun {
  0% {
    top: 66%;
  }

  50% {
    top: 22%
  }

  100% {
    top: 33%;
  }
}

.sun :nth-child(odd) {
  background-color: #fcbf49;
  width: 10%;
  height: 40%;
}

.sun :nth-child(even) {
  background-color: #f77f00;
  width: 8%;
  height: 60%;
}

.sun :nth-child(1) {
  position: absolute;
  transform: rotate(0deg) translate(0%, -200%);
  /* 돌아가는 도형의 기준점 바꾸기 */
}

.sun :nth-child(3) {
  position: absolute;
  transform: rotate(90deg) translate(0%, -200%);
}

.sun :nth-child(5) {
  position: absolute;
  transform: rotate(180deg) translate(0%, -200%);
}

.sun :nth-child(7) {
  position: absolute;
  transform: rotate(270deg) translate(0%, -200%);
}

.sun :nth-child(2) {
  position: absolute;
  transform: rotate(45deg) translate(0%, -140%);
}

.sun :nth-child(4) {
  position: absolute;
  transform: rotate(135deg) translate(0%, -140%);
}

.sun :nth-child(6) {
  position: absolute;
  transform: rotate(225deg) translate(0%, -140%);
}

.sun :nth-child(8) {
  position: absolute;
  transform: rotate(315deg) translate(0%, -140%);
}


/* 정리해보면 */
/* 1. 오프닝 태그를 만들고, 공기방울 태그와 안에 방울용 태그 3개를 넣는다 v*/
/* 2. css로 배치 후 만들어주고 실행해본다. 
    2-1. 방울 모양, 방울 울퉁불퉁 애니메이션, 빛 배치, 빛 효과...*/
/* 3. js로 옮겨 2번째 슬라이드일때 속성을 추가하도록 한다*/
/* 오프닝 */
.opening {
  background-color: #480A0A;
  position: fixed;

  width: 100vw;
  height: 100vh;

  /* pointer-events: none;  */
  /*이벤트 막는거는 메뉴에 있어야 막히겠지 */

  transition: opacity 1s ease-in-out;
  opacity: 1;
  z-index: 5;
}

.opening.fadeOut{
  opacity: 0;
}


.opening .airBubbles:nth-of-type(n) {
  width: 10px;
  height: 10px;
  position: fixed;
  top: 200%;
  left: 200%;
}

.opening .airBubbles:nth-of-type(1) {
  animation: left_up_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

.opening .airBubbles:nth-of-type(3) {
  animation: left_up_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 2s;
}

.opening .airBubbles:nth-of-type(4) {
  animation: right_up_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(5) {
  animation: right_up_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(6) {
  animation: left_down_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

.opening .airBubbles:nth-of-type(7) {
  animation: left_down_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 2s;
}

.opening .airBubbles:nth-of-type(8) {
  animation: right_down_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(9) {
  animation: right_down_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(10) {
  animation: left_up_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(11) {
  animation: left_up_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(12) {
  animation: right_up_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 5s;
}

.opening .airBubbles:nth-of-type(13) {
  animation: right_up_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 6s;
}

.opening .airBubbles:nth-of-type(14) {
  animation: left_down_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(15) {
  animation: left_down_bubble2 20s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(16) {
  animation: right_down_bubble 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 5s;
}

.opening .airBubbles:nth-of-type(17) {
  animation: right_down_bubble2 6s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 6s;
}

.opening .airBubbles:nth-of-type(18) {
  animation: left_up_bubble 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

.opening .airBubbles:nth-of-type(19) {
  animation: left_up_bubble2 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 2s;
}

.opening .airBubbles:nth-of-type(20) {
  animation: right_up_bubble 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(21) {
  animation: right_up_bubble2 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(22) {
  animation: left_down_bubble 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

.opening .airBubbles:nth-of-type(23) {
  animation: left_down_bubble2 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 2s;
}

.opening .airBubbles:nth-of-type(24) {
  animation: right_down_bubble 20s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

.opening .airBubbles:nth-of-type(25) {
  animation: right_down_bubble2 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

.opening .airBubbles:nth-of-type(26) {
  animation: right_down_bubble2 12s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

/* 왼쪽 부분 */
.opening .airBubbles:nth-of-type(27) {
  animation: left_up_bubble3 9s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 2s;
}

.opening .airBubbles:nth-of-type(28) {
  animation: left_up_bubble3 8s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 3s;
}

.opening .airBubbles:nth-of-type(29) {
  animation: left_up_bubble3 10s forwards;
  animation-timing-function: ease-in-out;
  animation-delay: 4s;
}

/* 처음엔 작게 하다가 점점 크게하면서 위치 변경 */
@keyframes left_up_bubble {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: -90%;
    left: -100%;
  }
}

@keyframes left_up_bubble2 {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: -100%;
    left: -40%;
  }
}

@keyframes left_up_bubble3 {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: -20%;
    left: -100%;
  }
}


@keyframes right_up_bubble {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: -100%;
    left: 100%;
  }
}

@keyframes right_up_bubble2 {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: -70%;
    left: 300%;
  }
}

@keyframes left_down_bubble {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: 100%;
    left: -100%;
  }
}

@keyframes left_down_bubble2 {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: 100%;
    left: -7%;
  }
}

@keyframes right_down_bubble {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: 100%;
    left: 20%;
  }
}

@keyframes right_down_bubble2 {
  0% {
    scale: 0.1;
    top: 50%;
    left: 50%;
  }

  100% {
    scale: 10;
    top: 100%;
    left: 100%;
  }
}


/* 각 물방울 */
.airBubbles :nth-child(1) {
  border: 0px solid whitesmoke;
  position: absolute;
  top: 15px;
  left: 5px;

  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.1));
  box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.2);
  animation: bubble_wave 1s alternate infinite linear;
}

.airBubbles div:nth-child(2) {
  border: 0px solid whitesmoke;
  position: absolute;
  top: 6px;
  left: 7px;

  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.1));
  box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.2);
  animation: bubble_wave 1s alternate-reverse infinite linear;
}

.airBubbles div:nth-child(3) {
  border: 0px solid whitesmoke;
  position: absolute;
  top: 10px;
  left: 10px;

  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.2));
  box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.3);

  animation: bubble_wave 1s alternate forwards infinite linear;
}

@keyframes bubble_wave {
  0% {
    transform: translate(2%, 2%);
    border-radius: 43% 57% 49% 51% / 45% 55% 45% 55%;
  }

  33% {
    transform: translate(-2%, -2%);
    border-radius: 56% 44% 56% 44% / 57% 42% 58% 43%;
  }

  66% {
    transform: translate(-2%, 2%);
    border-radius: 43% 57% 42% 58% / 45% 31% 69% 55%;
  }

  100% {
    transform: translate(2%, -2%);
    border-radius: 43% 57% 49% 51% / 60% 56% 44% 40%;
  }
}

/* 이제 빛을 하면된다 가상선*/
/* 펼쳐지는 느낌은 알겠는데

1. 여러개의 태그를 사방으로 퍼지게 추가해야한다
2. 똑같은 태그를 추가하고 애니메이션을 다르게 넣으면 되겠지
*/

.light {
  /* border: 2px solid red; */
  width: 100px;
  height: 100px;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.light::after {
  content: '';
  background: whitesmoke;

  position: absolute;
  top: 50%;
  left: 50%;


  box-shadow: 0px 0px 50px #fff200,
    0px 0px 20px #fff200;

  transform: translate(-50%, -50%);
  animation: expand 7s forwards ease-in-out;
  animation-delay: 5s;
}

@keyframes expand {
  0% {
    width: 0vw;
    height: 10vh;
  }

  40% {
    width: 1vw;
    height: 100vh;
  }

  70% {
    width: 5vw;
  }

  100% {
    width: 100vw;
    height: 100vh;
  }
}

/* .light::before {
  content: '';
  border: 2px solid yellow;
  width: 300px;
  height: 300px;

  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
} */






