/* h1フォント */
@import url('https://fonts.googleapis.com/css2?family=Grechen+Fuemen&display=swap');

/* スムーズスクロールを有効化 */
html {
  scroll-behavior: smooth;
}

body {
  font-size: 18px;
  font-family: "Grechen Fuemen", serif;
}

.header {
  position: relative;
  /* スクロール時にヘッダーを固定 */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: auto;
  background: #000;
  color: #fff;
  padding: 10px;
  text-align: center;
}

header h1 {
  font-size: 48px;
  margin: 0;
}

.logo-menu-img {
  width: 100px;
  height: auto;
  margin: 0 auto;
}

.main-top {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  color: #fff;
  text-align: center;
  align-items: center;
  padding: 40px 20px;
  background-image: url("/img/main/Earth.jpg");
  /* 画面中央表示にしてる */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.catch {
  margin-bottom: 30px;
  font-size: 32px;
  color: #fff;
}

.en {
  font-size: 24px;
  color: #fff;
}

.en-a {
  color: #fff;
  font-size: 3rem;
  text-decoration: underline;
}

.top-link {
  font-size: 1.5rem;
}

.en-a:hover {
  color: tomato;
}

/* メイン画像アニメーションここから */
.logo-main {
  transition: opacity 0.6s;
  opacity: 1;
}

.logo-main.fade-in {
  opacity: 0;
}

/* メイン画像アニメーションここまで */

.intro {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.image-box {
  width: 500px;
  height: 500px;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.intro-text {
  text-align: left;
}

.intro-text h2 {
  font-size: 48px;
  margin-top: 100px;
  margin-bottom: 30px;
}

.intro-text p {
  font-size: 24px;
  line-height: 1.2;
}

.top-btn {
  display: inline-block;
  cursor: pointer;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
}

.top-btn-img {
  width: 100px;
  height: auto;
}

.footer {
  height: auto;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 20px 10px;
}

.skills {
  margin: 20px 0;
}

.skills img {
  height: 30px;
  margin: 0 4px;
}

.sns-icons {
  margin-bottom: 20px;
}

.sns-icons img {
  height: 24px;
  margin: 2px;
}

/* メニュー項目ここから */
.overlay-menu {
  z-index: 10;
  position: fixed;
  inset: 0;
  background-image: url("/img/main/menu.jpg");
  justify-content: center;
  align-items: center;
  display: flex;
  /* 常にflex */
  opacity: 0;
  pointer-events: none;
  /* 非表示時はクリックできない */
  clip-path: circle(0% at 50% 50%);
  transition: opacity 1.5s, clip-path 2s;
}

.overlay-menu.active {
  opacity: 1;
  pointer-events: auto;
  /* 表示時はクリックできる */
  clip-path: circle(150% at 50% 50%);
  transition: opacity 1.5s, clip-path 2s;
}

.overlay-menu.active {
  display: flex;
}

.overlay-content {
  text-align: center;
}

.overlay-content li {
  font-size: 3rem;
  color: #fff;
  list-style: none;
  margin-bottom: 50px;
  font-weight: bold;
}

.overlay-content li:hover {
  color: tomato;
}

.overlay-menu .overlay-menu-img {
  z-index: 20;
  position: absolute;
  top: 120px;
  left: 50%;
  right: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: auto;
  pointer-events: auto;
}

body.no-scroll {
  overflow: hidden;
  /* スクロール禁止用 */
}

/* メニューの枠 */
.overlay-content a.active {
  border: 2px solid #FFD600;
  /* お好みの色や太さに変更可能 */
  border-radius: 6px;
  /* 角丸にしたい場合 */
  padding: 4px 8px;
  /* 枠線が重ならないように余白を追加 */
  box-sizing: border-box;
}

/* メニュー項目ここまで */

/* ! ロード画面 */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out;
  overflow: hidden;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.meteor-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}
/* ★の形 */
.meteor {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 16px #fff);
  animation: meteorFall linear infinite;
  z-index: 2;
}

/* 流星の尾 */
.meteor::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 80%;
  transform: translateX(-50%);
  width: 10px;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 0, 255, 0.979) 0%,
    rgb(2, 255, 56) 60%,
    rgb(255, 5, 5) 100%
  );
  border-radius: 2px;
  pointer-events: none;
  z-index: 999;
  animation: meteorTailFade 2s linear infinite;
}

/* カラー流星 */
.meteor.colored {
  background: var(--meteor-color);
  filter: drop-shadow(0 0 8px var(--meteor-color)) drop-shadow(0 0 16px var(--meteor-color));
}

.meteor.colored::after {
  background: linear-gradient(
    to bottom,
    var(--meteor-color, #fff) 0%,
    rgba(255,255,255,0.3) 60%,
    rgba(255,255,255,0) 100%
  );
}

/* 大きな流星 */
.meteor.large {
  width: 36px;
  height: 36px;
}

.meteor.large::after {
  width: 6px;
  height: 90px;
}

@keyframes meteorTailFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

.meteor.colored {
  background: var(--meteor-color);
  filter: drop-shadow(0 0 8px var(--meteor-color)) drop-shadow(0 0 16px var(--meteor-color));
}

.meteor.large {
  width: 36px;
  height: 36px;
}

.meteor::before {
  content: '';
  position: absolute;
  left: -10px;
  top: -5px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 7px solid #ffffff;
  transform: rotate(-70deg);
}

.meteor::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 2px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 7px solid #ffffff;
  transform: rotate(70deg);
}

/* カラー流星 */
.meteor.colored {
  border-bottom-color: var(--meteor-color);
  filter: drop-shadow(0 0 8px var(--meteor-color)) drop-shadow(0 0 16px var(--meteor-color));
  animation: meteorFall linear infinite, meteorColorGlow linear infinite;
}

.meteor.colored::before {
  border-bottom-color: var(--meteor-color);
}

.meteor.colored::after {
  border-bottom-color: var(--meteor-color);
}

/* 大きな流星 */
.meteor.large {
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 11px solid #ffffff;
  filter: drop-shadow(0 0 12px #ffffff) drop-shadow(0 0 24px #ffffff);
  animation: meteorFall linear infinite, meteorLargeGlow linear infinite;
}

.meteor.large::before {
  left: -15px;
  top: -8px;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 11px solid #ffffff;
}

.meteor.large::after {
  left: -15px;
  top: 3px;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 11px solid #ffffff;
}

/* 大きなカラー流星 */
.meteor.large.colored {
  border-bottom-color: var(--meteor-color);
  filter: drop-shadow(0 0 12px var(--meteor-color)) drop-shadow(0 0 24px var(--meteor-color));
  animation: meteorFall linear infinite, meteorLargeColorGlow linear infinite;
}

.meteor.large.colored::before {
  border-bottom-color: var(--meteor-color);
}

.meteor.large.colored::after {
  border-bottom-color: var(--meteor-color);
}

.chaotic-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  opacity: 0.8;
  animation: chaosMove 6s linear infinite;
}

.shape-circle {
  border-radius: 50%;
  border: 2px solid;
}

.shape-square {
  border: 2px solid;
  transform: rotate(45deg);
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 35px solid;
}

.shape-ellipse {
  border-radius: 50%;
  border: 2px solid;
  transform: scaleX(1);
}

.shape-heart {
  width: 20px;
  height: 18px;
  position: relative;
  transform: rotate(-45deg);
}

.shape-heart::before,
.shape-heart::after {
  content: '';
  width: 10px;
  height: 16px;
  position: absolute;
  left: 10px;
  top: 0;
  background: currentColor;
  border-radius: 10px 10px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.shape-heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.loading-content {
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  z-index: 2;
  position: relative;
  width: 100%;
}

.studio-name {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b, #fb5607);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  opacity: 0;
}

/* グラデーションをサポートするブラウザでのみ透明にする */
@supports (-webkit-background-clip: text) {
  .studio-name {
    -webkit-text-fill-color: transparent;
  }
}

.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  color: #06ffa5;
  text-shadow: 0 0 20px rgba(6, 255, 165, 0.5);
  font-family: 'Courier New', monospace;
}

.typewriter-cursor {
  display: inline-block;
  background-color: #06ffa5;
  width: 3px;
  margin-left: 2px;
  animation: none;
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  color: #ffffff;
  opacity: 0;
}

.loading-percentage {
  font-size: 2rem;
  font-weight: 900;
  color: #ff006e;
  opacity: 0;
  animation: numberPulse 1s ease-out 2.5s forwards;
  text-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
}

.glitch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(90deg,
      transparent,
      transparent 2px,
      rgba(255, 0, 110, 0.03) 2px,
      rgba(255, 0, 110, 0.03) 4px);
  animation: glitchScan 4s linear infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes meteorFall {
  0% {
    transform: translateX(-100px) translateY(-100px);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateX(100vw) translateY(100vh);
    opacity: 0;
  }
}

@keyframes meteorGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px #ffffff) drop-shadow(0 0 16px #ffffff);
  }
  50% {
    filter: drop-shadow(0 0 16px #ffffff) drop-shadow(0 0 32px #ffffff);
  }
}

@keyframes meteorColorGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px var(--meteor-color)) drop-shadow(0 0 16px var(--meteor-color));
  }
  50% {
    filter: drop-shadow(0 0 16px var(--meteor-color)) drop-shadow(0 0 32px var(--meteor-color));
  }
}

@keyframes meteorLargeGlow {
  0%, 100% {
    filter: drop-shadow(0 0 12px #ffffff) drop-shadow(0 0 24px #ffffff);
  }
  50% {
    filter: drop-shadow(0 0 24px #ffffff) drop-shadow(0 0 48px #ffffff);
  }
}

@keyframes meteorLargeColorGlow {
  0%, 100% {
    filter: drop-shadow(0 0 12px var(--meteor-color)) drop-shadow(0 0 24px var(--meteor-color));
  }
  50% {
    filter: drop-shadow(0 0 24px var(--meteor-color)) drop-shadow(0 0 48px var(--meteor-color));
  }
}

@keyframes chaosMove {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  25% {
    transform: translate(200px, -150px) rotate(90deg) scale(1.2);
  }

  50% {
    transform: translate(-100px, 100px) rotate(180deg) scale(0.8);
  }

  75% {
    transform: translate(150px, 200px) rotate(270deg) scale(1.5);
  }

  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
  }
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes textChaos {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(5px);
  }

  30% {
    opacity: 0.5;
    transform: translateY(-5px);
    filter: blur(2px);
  }

  60% {
    opacity: 0.8;
    transform: translateY(2px);
    filter: blur(1px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

@keyframes numberPulse {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes glitchScan {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 768px) {
  .studio-name {
    font-size: 2rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
  }

  .project-name {
    font-size: 1.2rem;
  }

  .loading-content {
    padding: 0 10px;
    max-width: 100%;
  }
}

/* ! スマホ用 */
@media screen and (max-width: 1440px) {
  .top-btn-img {
    width: 50px;
    height: auto;
  }

  .logo-menu-img {
    width: 80px;
  }

  .overlay-menu .overlay-menu-img {
    width: 80px;
  }

  .overlay-menu .overlay-menu-img {
    top: 70px;
  }

  .overlay-content li {
    font-size: 2rem;
  }
  .catch {
    margin-top: 150px;
  }
}

@media screen and (max-width: 1200px) {
  .main {
    display: block;
    width: 100%;
    height: auto;
    padding: 20px;
  }

  .main-top {
    display: block;
    width: 100%;
    height: auto;
    padding: 20px;
  }

  .catch {
    margin-bottom: 0;
  }

  .image-box {
    width: 100%;
    height: auto;
  }

  .intro-text {
    text-align: center;
  }

  .intro-text h2 {
    margin-top: 0;
    margin-bottom: 20px;
  }

  .catch {
    margin-top: 170px;
  }

  .icon-open img,
  .icon-close img {
    width: 30px;
    height: 30px;
  }
}

@media screen and (max-width: 768px) {
  header h1 {
    font-size: 32px;
  }

  .catch {
    font-size: 24px;
    color: #fff;
    margin-top: 100px;
  }

  .en {
    font-size: 18px;
    color: #fff;
  }

  .top-link {
  font-size: 1rem;
  }

  .intro-text h2 {
    font-size: 32px;
  }

  .intro-text p {
    font-size: 18px;
  }

  .top-btn-img {
    width: 50px;
    height: auto;
  }

  .logo-menu-img {
    width: 50px;
  }

  .overlay-menu .overlay-menu-img {
    width: 50px;
  }

  .overlay-menu .overlay-menu-img {
    top: 70px;
  }

  .overlay-content li {
    font-size: 1.5rem;
  }

  .has-submenu .submenu li {
    padding: 4px;
  }

  .en-a {
    font-size: 2rem;
  }
}

@media screen and (max-width: 350px) {
  .overlay-menu .overlay-menu-img {
    top: 30px;
  }
}