@charset "UTF-8";

:root {
  /* フォント */
  --font-heading:
    'Pacifico',
    'Noto Sans JP',
    cursive;
  --font-sub:
    'Playwrite AU TAS',
    'Noto Sans JP',
    cursive;
  --font-body:
    'Kiwi Maru',
    'Noto Sans JP',
    sans-serif;

  /* z-index */
  --z-main: 10;
  --z-header: 500;
  --slide-menu: 1000;
  --cluds: 5;
  --stars: 4;

  /* header-height */
  --header-height: 5rem;
}

html, body {
  overflow-x: hidden;
}

body {
  min-width: 280px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ------------------------------ヘッダー部分------------------------------ */
header {
  background-color: rgba(255, 255, 255, 0.9);
  height: var(--header-height);
  margin: 0;
  font-size: 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
}

.night header {
  background-color: rgba(60, 64, 67, 0.9); /*ダークモード用header*/
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
  height: 5rem;
}

.header-icon {
  width: 4rem;
  height: auto;
}

.heading {
  font-family: var(--font-heading);
}

/* ------------------------------モバイルスライドメニュー------------------------------ */
.global-nav {
  display: none;
}

.btn-menu {
  z-index: var(--slide-menu);
  transition: .4s;
  display: inline-block;
  transition: transform 0.15s ease;
}

.btn-menu img {
  width: 8rem;
  height: auto;
}

.btn-menu:hover {
  transform: scale(1.2);
}

#menu-panel {
  position: fixed;
  display: grid;
  place-items: center;
  z-index: var(--slide-menu);
  width: 100%;
  height: 100svh;
  background-color: rgba(255, 255, 255, 0.9);
  translate: 0 -100vh;    /*アニメーションはJSで管理している */
}

.night #menu-panel {
    background-color: rgba(0, 0, 0, 0.9);
}

#menu-open,
#menu-close {
  position: fixed;
  top: .5rem;
  right: 3rem;
}

.menu-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.menu-list li {
  margin: 1.5rem 0;
  opacity: 0;
}

.menu-list a {
  text-align: center;
  font-family: var(--font-sub);
  font-size: 2rem;
  text-decoration: none;
  position: relative;
  text-decoration: none;
  color: #000;
  transition: color 0.3s ease;
}

.night .menu-list a {
  color: #ffffff;
}

.menu-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;              
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.menu-list a:hover {
  color: #3aaed8; 
}
.menu-list a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

#menu-close {
  opacity: 0;
  pointer-events: none;
}
/* メニュー開いてる時は open を消す */
.menu-opened #menu-open {
  opacity: 0;
  pointer-events: none;
  translate: 0 0;
  transition-delay: 0s; /* 開く時は即 */
}

.menu-opened #menu-close {
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------------PC画面------------------------------ */
@media (min-width: 800px) {
  /* ------------------------------モバイルメニューパネル取り消し------------------------------ */
  #menu-open,
  #menu-panel {
    display: none;
  }

  /* ------------------------------header調整------------------------------ */
  .header-icon {
    width: 4rem;
    height: auto;
    margin: 0;
  }

  .header-inner {
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 0 ;
  }

  .header-inner a {
    justify-self: end;
  }

  /* ------------------------------nav------------------------------ */
  .global-nav {
    display: flex;
    align-items: center;
  }

  .global-nav-list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .global-nav-list a {
    text-decoration: none;
    font-family: var(--font-sub);
    position: relative;
    color: #000;
    transition: color 0.3s ease;
  }

  .night .global-nav-list a {
    color: #ffffff;
  }

  .global-nav-list a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;              
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .global-nav-list a:hover {
    color: #3aaed8; 
  }

  .global-nav-list a:hover::after {
    transform: translateX(-50%) scaleX(1);
  }
}