/*
  コピペ改変でここまで出来る！
  研修生ページに使用したCSSコードの参考元リンク集

  Loading Animation 参考：幻想的でキレイ
  https://photopizza.design/css_loading/

  Count Animation 参考
  https://satokotadesign.com/blog/css_loading/

  Background Animation 参考：ステップ1. CSSでグラデーション背景の作成
  https://ics.media/entry/10141/

  Cat Animation 参考：17. 最小限のネコ
  https://cohamu.com/entry/20240430/1714440600

  PageTop Button Animation 参考：その15. ボタンの拡大アニメーション
  https://baigie.me/officialblog/2021/02/25/css-tips-1/

  heading 1 参考：20. グリッチをリアルに再現したテキストアニメーション
  https://goworkship.com/magazine/text-effect-typography/

  heading 2,3 参考：シンボルを追加した見出し4、シンボルを追加した見出し5
  https://jajaaan.co.jp/css/css-headline/

  Hover Animation 参考：ラインが引かれる[テキスト]
  https://b-risk.jp/blog/2021/11/hover-reference/

*/



/* Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #70acce;
}

a {
  text-decoration: none;
}

p {
  line-height: 1.5rem;
}

summary {
  display: block;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}



/* Loading Animation */
#loading-screen {
  z-index: 9999;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  background-color: black;
  animation: animateTheBodyBg 10s linear infinite;
}

@keyframes animateTheBodyBg {
  from {
    filter: hue-rotate(0deg)
  }

  to {
    filter: hue-rotate(360deg)
  }
}

#loading-screen.fade-out {
  animation: fadeOut 1.5s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

#count {
  position: absolute;
  top: 58px;
  right: 22px;
  font-size: 3rem;
  font-family: "Iceland", sans-serif;
  color: #222;
}

.loader {
  position: relative;
  width: 160px;
  height: 160px;
}

.loader span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(calc(18deg * var(--i)))
}

.loader span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #4747ed;
  box-shadow: 0 0 10px #4747ed,
    0 0 20px #4747ed,
    0 0 30px #4747ed,
    0 0 40px #4747ed,
    0 0 60px #4747ed,
    0 0 80px #4747ed,
    0 0 100px #4747ed;
  animation: animateTheSpan 2s linear infinite calc(.1s * var(--i));
}

@keyframes animateTheSpan {
  0% {
    transform: scale(1)
  }

  80%,
  90% {
    transform: scale(0)
  }
}



/* Background Animation */
#bg {
  background: linear-gradient(to bottom,
      hsl(180, 80%, 40%),
      hsl(240, 80%, 60%),
      hsl(300, 80%, 40%));
  background-size: 400% 400%;
  animation: BackgroundAnimation 10s ease infinite;
}

@keyframes BackgroundAnimation {
  0% {
    background-position: 50% 0%;
  }

  50% {
    background-position: 50% 100%;
  }

  100% {
    background-position: 50% 0%;
  }
}



/* Cat Animation */
.cat {
  position: relative;
  margin: 7rem auto 0;
  height: 170px;
  width: 192px;
}

.face {
  position: absolute;
  height: 100%;
  width: 100%;
  background: black;
  border-radius: 50%;
}

.muzzle {
  position: absolute;
  top: 60%;
  left: 50%;
  height: 6%;
  width: 10%;
  background: white;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
}

.ear {
  position: absolute;
  top: -30%;
  height: 60%;
  width: 25%;
  background: white;
}

.ear::before,
.ear::after {
  content: '';
  position: absolute;
  bottom: 24%;
  height: 10%;
  width: 5%;
  border-radius: 50%;
  background: black;
}

.ear::after {
  transform-origin: 50% 100%;
}

.ear--left {
  left: -7%;
  border-radius: 70% 30% 0% 0% / 100% 100% 0% 0%;
  transform: rotate(-15deg);
}

.ear--left::before,
.ear--left::after {
  right: 10%;
}

.ear--left::after {
  transform: rotate(-45deg);
}

.ear--right {
  right: -7%;
  border-radius: 30% 70% 0% 0% / 100% 100% 0% 0%;
  transform: rotate(15deg);
}

.ear--right::before,
.ear--right::after {
  left: 10%;
}

.ear--right::after {
  transform: rotate(45deg);
}

.eye {
  position: absolute;
  top: 35%;
  height: 30%;
  width: 31%;
  background: white;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.eye::before {
  content: '';
  position: absolute;
  top: 60%;
  height: 10%;
  width: 15%;
  background: white;
  border-radius: 50%;
}

.eye::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 100%;
  border-radius: 0 0 50% 50% / 0 0 40% 40%;
  background: black;
  animation: blink 4s infinite ease-in;
}

.eye--left {
  left: 0;
}

.eye--left::before {
  right: -5%;
}

.eye--right {
  right: 0;
}

.eye--right::before {
  left: -5%;
}

@keyframes blink {
  0% {
    height: 0;
  }

  90% {
    height: 0;
  }

  92.5% {
    height: 100%;
  }

  95% {
    height: 0;
  }

  97.5% {
    height: 100%;
  }

  100% {
    height: 0;
  }
}

.eye-pupil {
  position: absolute;
  top: 25%;
  height: 50%;
  width: 20%;
  background: black;
  border-radius: 50%;
  animation: look-around 4s infinite;
}

.eye-pupil::after {
  content: '';
  position: absolute;
  top: 30%;
  right: -5%;
  height: 20%;
  width: 35%;
  border-radius: 50%;
  background: white;
}

.eye--left .eye-pupil {
  right: 30%;
}

.eye--right .eye-pupil {
  left: 30%;
}

@keyframes look-around {
  0% {
    transform: translate(0)
  }

  5% {
    transform: translate(50%, -25%)
  }

  10% {
    transform: translate(50%, -25%)
  }

  15% {
    transform: translate(-100%, -25%)
  }

  20% {
    transform: translate(-100%, -25%)
  }

  25% {
    transform: translate(0, 0)
  }

  100% {
    transform: translate(0, 0)
  }
}



/* .page-top */
.page-top {
  z-index: 10;
  position: fixed;
  bottom: 10px;
  right: 10px;
  box-sizing: border-box;
  display: block;
  width: 100px;
  height: 100px;
  border: solid 6px white;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgb(0 0 0 / 16%);
}

.page-top::before {
  content: "";
  position: absolute;
  z-index: 10;
  top: 55%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-style: solid;
  border-color: white;
  border-width: 6px 0 0 6px;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color ease 0.1s;
}

.page-top:hover::before {
  border-color: #4747ed;
}

.page-top::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background-color: black;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0, 0);
  transition: transform ease 0.4s;
}

.page-top:hover::after {
  transform: translate(-50%, -50%) scale(1.1, 1.1);
}



/* #content-screen */
#content-screen {
  width: 80%;
  max-width: 1024px;
  margin: 4rem auto;
  padding: 2rem;
  background-color: black;
  color: white;
}

header,
footer {
  text-align: center;
}

h1 {
  font-family: "Iceland", sans-serif;
  font-size: 5rem;
  position: relative;
  width: 400px;
  margin: 0 auto;
}

h1::before {
  content: attr(data-text);
  position: absolute;
  left: 26px;
  text-shadow: 1px 0 blue;
  top: 0;
  color: white;
  background: black;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim-2 3s infinite linear alternate-reverse;
}

h1::after {
  content: attr(data-text);
  position: absolute;
  left: 26px;
  text-shadow: -1px 0 red;
  top: 0;
  color: white;
  background: black;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim 2s infinite linear alternate-reverse;
}

@keyframes noise-animation {
  0% {
    clip: rect(30px, 9999px, 93px, 0);
  }

  5% {
    clip: rect(68px, 9999px, 18px, 0);
  }

  10% {
    clip: rect(76px, 9999px, 4px, 0);
  }

  15% {
    clip: rect(24px, 9999px, 49px, 0);
  }

  20% {
    clip: rect(8px, 9999px, 69px, 0);
  }

  25% {
    clip: rect(3px, 9999px, 39px, 0);
  }

  30% {
    clip: rect(33px, 9999px, 84px, 0);
  }

  35% {
    clip: rect(98px, 9999px, 36px, 0);
  }

  40% {
    clip: rect(33px, 9999px, 18px, 0);
  }

  45% {
    clip: rect(63px, 9999px, 76px, 0);
  }

  50% {
    clip: rect(67px, 9999px, 13px, 0);
  }

  55% {
    clip: rect(65px, 9999px, 23px, 0);
  }

  60% {
    clip: rect(53px, 9999px, 3px, 0);
  }

  65% {
    clip: rect(63px, 9999px, 66px, 0);
  }

  70% {
    clip: rect(1px, 9999px, 78px, 0);
  }

  75% {
    clip: rect(33px, 9999px, 12px, 0);
  }

  80% {
    clip: rect(31px, 9999px, 44px, 0);
  }

  85% {
    clip: rect(32px, 9999px, 53px, 0);
  }

  90% {
    clip: rect(42px, 9999px, 20px, 0);
  }

  95% {
    clip: rect(51px, 9999px, 23px, 0);
  }

  100% {
    clip: rect(22px, 9999px, 2px, 0);
  }
}

@keyframes noise-anim-2 {
  0% {
    clip: rect(63px, 9999px, 57px, 0);
  }

  5% {
    clip: rect(25px, 9999px, 45px, 0);
  }

  10% {
    clip: rect(17px, 9999px, 15px, 0);
  }

  15% {
    clip: rect(90px, 9999px, 68px, 0);
  }

  20% {
    clip: rect(6px, 9999px, 50px, 0);
  }

  25% {
    clip: rect(25px, 9999px, 61px, 0);
  }

  30% {
    clip: rect(40px, 9999px, 63px, 0);
  }

  35% {
    clip: rect(64px, 9999px, 52px, 0);
  }

  40% {
    clip: rect(53px, 9999px, 20px, 0);
  }

  45% {
    clip: rect(38px, 9999px, 25px, 0);
  }

  50% {
    clip: rect(21px, 9999px, 19px, 0);
  }

  55% {
    clip: rect(31px, 9999px, 98px, 0);
  }

  60% {
    clip: rect(2px, 9999px, 54px, 0);
  }

  65% {
    clip: rect(23px, 9999px, 11px, 0);
  }

  70% {
    clip: rect(5px, 9999px, 30px, 0);
  }

  75% {
    clip: rect(21px, 9999px, 25px, 0);
  }

  80% {
    clip: rect(87px, 9999px, 20px, 0);
  }

  85% {
    clip: rect(16px, 9999px, 94px, 0);
  }

  90% {
    clip: rect(11px, 9999px, 100px, 0);
  }

  95% {
    clip: rect(94px, 9999px, 16px, 0);
  }

  100% {
    clip: rect(10px, 9999px, 76px, 0);
  }
}

.photo {
  margin: 2rem 0 0 0;
  object-fit: cover;
  width: 100%;
  height: 280px;
}

details summary:hover,
details[open] summary {
  background: #4747ed;
}

h2 {
  position: relative;
  height: 75px;
  margin-top: 32px;
  margin-right: 120px;
  padding: 1.25rem 0 0 2rem;
  word-break: break-all;
  color: black;
  background: white;
}

h2::after {
  position: absolute;
  top: 0;
  right: -80px;
  width: 0;
  height: 0;
  content: '';
  border-width: 75px 80px 0 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

h2 span {
  font-family: "Iceland", sans-serif;
  font-size: 4rem;
  position: absolute;
  bottom: -5px;
  right: -116px;
  display: block;
  padding-top: 0.rem;
  color: white;
}

h3 {
  position: relative;
  padding: 0 1rem 0.5rem 4rem;
  border-bottom: 3px solid white;
  margin-top: 1.5rem;
}

h3 span {
  color: white;
  font-family: "Iceland", sans-serif;
  font-size: 3rem;
  line-height: 1;
  position: absolute;
  bottom: 0;
  left: 0;
}

ul li {
  padding: 1.5rem 0.5rem 0;
  margin-left: 3.5rem;
  list-style-type: none;
}

#back {
  color: white;
  font-family: "Iceland", sans-serif;
  font-size: 3rem;
  padding-bottom: 5px;
  position: relative;
}

#back::before {
  background: white;
  content: '';
  width: 100%;
  height: 3px;
  position: absolute;
  left: 0;
  bottom: 0;
  transform-origin: right top;
  transform: scale(0, 1);
  transition: transform .3s;
}

#back:hover::before {
  transform-origin: left top;
  transform: scale(1, 1);
}

@media screen and (max-width: 580px) {
  #content-screen{
    width: 100%;
  }
}