@charset "UTF-8";

/* ------------------------------フォント------------------------------ */
.text-heading {
  font-family: var(--font-heading)
}

/* ------------------------------背景------------------------------ */
.back {
  min-height: 100dvh;
  background-color: #9dd2e5;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  text-align: center;
  width: 100%;
  position: relative;
  color: #000000;
}

.back-img {
  background-image: url(../img/noon/noon_background.webp);
}

/* ------------------------------夜背景------------------------------ */
.night {
  background-image: url(../img/night/night_background.webp);
  background-color: #0b1d2a;
  color: #ffffff;
}

.night .cloud {
  display: none;
}

/* ------------------------------雲------------------------------ */
.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--cluds);
  opacity: 0.7;
}

.cloud-layer,
.star-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud-layer { 
  z-index: var(--cluds);
 }

.star-layer {
  z-index: var(--stars);
  display: none; 
}

.night .star-layer {
  display: block; 
}


.cloud {
  position: absolute;
  top: 0;
  left: -300px;
  animation-name: cloud-move;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

@keyframes cloud-move {
  from {
    transform: translateX(-310px);
  }
  to {
    transform: translateX(200vw);
  }
}


/* ------------------------------星------------------------------ */
/* 共通 */
.star {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* 小さい固定星 */
.star-small {
  width: 2px;
  height: 2px;
  background: white;
  opacity: 0.6;
}

.star-twinkle {
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate ease-in-out;
}

@keyframes twinkle {
  from {
    opacity: 0.2;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1.6);
  }
}

.shooting-star {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, white, transparent);
  transform: rotate(45deg);
  animation: shoot 1s linear forwards;
  filter: drop-shadow(0 0 6px white);
}

@keyframes shoot {
  from {
    transform: translate(0, 0) rotate(45deg);
    opacity: 1;
  }
  to {
    transform: translate(400px, 400px) rotate(45deg);
    opacity: 0;
  }
}

.star-layer {
  opacity: 0;
  transition: opacity .6s ease;
}

.night .star-layer {
  opacity: 1;
}

/* ------------------------------テキスト配置------------------------------ */
#pc-icon {
  display: none;
}

.self-intro {
  position: relative;
  z-index: var(--z-main);
}

#main-text {
  display: grid;
  grid-template-columns: 1fr;
  padding-top: 10rem;
  color: #000000;
}

.night #main-text {
  color: #ffffff;
}

.role {
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.name {
  font-size: 6rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.description {
  font-family: var(--font-body);  
  font-size: 1.5rem;
  line-height: 1.9;
  margin: 0 3rem;
  text-align: left;
}

.text-body {
  margin: 3rem auto;
}

/* ------------------------------切り替えボタン------------------------------ */
.switch {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem; 
}

.back-switch {
  justify-items: center;
}

#button-night,
#button-noon {
  transform-origin: center;
  will-change: transform;
}

#button-night:hover:hover {
  transform: scale(1.25);
  filter: brightness(0.8);
}

#button-noon:hover {
  transform: scale(1.25);
  filter: brightness(0.8);
}

.night #button-night:hover:hover {
  transform: scale(1.25);
  filter: brightness(1.2);
}

.night #button-noon:hover {
  transform: scale(1.25);
  filter: brightness(1.2);
}

/* ------------------------------PC画面------------------------------ */
@media (min-width: 800px) {
  /* ------------------------------テキスト配置------------------------------ */
  #main-text {
    padding-top: 0;  /*モバイルGridリセット*/
  }

  .self-intro {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5rem;
    justify-items: center;
    align-items: center;
    padding-top: 12rem;
  }

  #pc-icon {
    display: block;
    width: 25rem;
    height: auto;
    justify-self: end;
  }

  #main-text {
    text-align: left;
    justify-self: start;
    margin-top: 3rem;
    margin-left: 3rem;
  }

  .role {
    font-size: 3rem;
  }

  .name {
    font-size: 7rem;
  }

  .description {
    margin: auto ;
    font-size: 1.8rem;
  }

  /* ------------------------------切り替えボタン------------------------------ */
  .switch {
    grid-template-columns: 1fr 1fr;
  }

  .back-switch {
    justify-items: left;
    text-align: left;
  }

  #button-night,
  #button-noon {
    transform-origin: center;
  }
}

