/* Setting
=========================================================== */
:root {
  scroll-behavior: smooth;
}

#mkd {
  font-family: "IBM Plex Sans JP", sans-serif;
  font-weight: 500;
}

/* Variable
=========================================================== */
#mkd {
  /* 色 */
  --primary-color: #9eb4bb;
  --white: #fff;
  --black: #160201;
  --body-gradation: linear-gradient(180deg, #9eb5bb 27.86%, #b7a796 100%);

  /* テキスト */
  --content-width-num: 390;
  --text-color-default: var(--white);

  /* サイズ */
  --header-height: 55px;

  /* 余白 */
  --margin-inline: 14px;
}

/* Base
=========================================================== */
#mkd {
  &.menu-open {
    overflow: hidden;
  }

  /* 背景色 */
  &::before {
    content: "";
    width: 100vw;
    height: 100lvh;
    background: var(--body-gradation);
    position: fixed;
    inset: 0;
    z-index: -1;
  }

  #footer {
    background-color: var(--white);
  }
}

/* Header
=========================================================== */
.mkd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-inline: auto;
  padding-left: var(--margin-inline);
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  visibility: hidden;
  transition: translate .3s ease, visibility .3s ease;
  translate: 0 -100%;

  /* スクロール後 */
  &.passed-scroll {
    visibility: visible;
    translate: 0;
  }
}

/* ロゴ */
.mkd-header__link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkd-header__logoImg {
  width: 31px;
  height: auto;
}

.mkd-header__textImg {
  width: 174px;
  height: auto;
}

/* ハンバーガーメニューボタン */
.mkd-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 54px;
  height: 54px;
  margin-bottom: 1px;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;

  /* 上の線 */
  &::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform .3s ease;
    transform: translateY(-7px);
  }

  /* 下の線 */
  &::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform .3s ease;
    transform: translateY(7px);
  }

  /* ハンバーガーアクティブ状態 */
  &[aria-expanded="true"] {
    &::before {
      transform: translateY(0) rotate(45deg);
    }

    &::after {
      transform: translateY(0) rotate(-45deg);
    }

    & .mkd-header__menu-btn-text::before {
      opacity: 0;
    }
  }
}

/* ボタンテキスト（視覚的に非表示、スクリーンリーダー用） */
.mkd-header__menu-btn-text {
  font-size: 0;
  color: transparent;
  position: relative;
  display: block;

  /* 真ん中の線 */
  &::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* メニューコンテンツ */
.mkd-header__menu-content {
  display: flex;
  flex-direction: column;
  width: 67%;
  height: 100vh;
  background: var(--body-gradation);
  transition: right .35s cubic-bezier(.4, 0, .2, 1);
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 999;
  overflow-y: auto;
}

.mkd-header[data-state="open"] .mkd-header__menu-content {
  right: 0;
}

/* ナビゲーション */
.mkd-header__nav {
  display: grid;
  place-items: center;
  flex: 1;
}

.mkd-header__nav-list {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
}

#mkd:not(:has(.mkd-articles)) .mkd-header__nav-item.-articles {
  display: none;
}

.mkd-header__nav-link {
  display: block;
  width: 138px;
  padding-block: 10px;
  color: var(--text-color-default);
  text-decoration: none;
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 500;
  transition: color .25s ease;
  position: relative;

  &:hover,
  &:focus {
    color: var(--text-color-default);
  }
}

/* バックドロップ（オーバーレイ） */
.mkd-header__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  background-color: rgba(255, 255, 255, .85);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 998;
}

.mkd-header[data-state="open"] .mkd-header__backdrop {
  opacity: 1;
  visibility: visible;
}

/* Main Visual
=========================================================== */
.mkd-mv {
  height: calc(700 / var(--content-width-num) * 100vw);
  position: relative;
  overflow: hidden;

  /* 動くオブジェクト用 */
  &::before {
    content: "";
    display: block;
    width: 100%;
    height: calc(5 / var(--content-width-num) * 100vw);
    background: var(--black);
    position: absolute;
    top: calc(-5 / var(--content-width-num) * 100vw);
    left: 0;
    z-index: 3;
    will-change: top;
    animation:
      slide-down .4s ease-out forwards,
      expand-height .2s ease-out .4s forwards,
      change-color .2s ease-out .6s forwards,
      fade-out .2s ease-out 1s forwards;
  }
}
@keyframes slide-down {
  from {
    top: calc(-5 / var(--content-width-num) * 100vw);
  }

  to {
    top: calc(50% - calc(2.5 / var(--content-width-num) * 100vw) - calc(8.5 / var(--content-width-num) * 100vw));
  }
}
@keyframes expand-height {
  from {
    height: calc(5 / var(--content-width-num) * 100vw);
    top: calc(50% - calc(2.5 / var(--content-width-num) * 100vw) - calc(8.5 / var(--content-width-num) * 100vw));
  }

  to {
    height: calc(410 / var(--content-width-num) * 100vw);
    top: calc(50% - calc(205 / var(--content-width-num) * 100vw) + calc(8.5 / var(--content-width-num) * 100vw));
  }
}
@keyframes change-color {
  to {
    background: var(--white);
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.mkd-mv__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.mkd-mv__desc {
  display: contents;
  color: var(--text-color-default);
}

.mkd-mv__title {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: calc(12 / var(--content-width-num) * 100vw);
  padding-inline: calc(14 / var(--content-width-num) * 100vw);
  z-index: 2;
  font-weight: 400;
  margin-top: calc(28 / var(--content-width-num) * 100vw);
}

.mkd-mv__logo {
  width: calc(56 / var(--content-width-num) * 100vw);
  height: auto;
  transform: translateY(-15%);
  opacity: 0;
  animation: title-logo-slide-down .4s 1.2s ease-out forwards;
}
@keyframes title-logo-slide-down {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mkd-mv__title-text {
  display: block;
  font-size: calc(13.6 / var(--content-width-num) * 100vw);
  line-height: 1.5;
  transform: translateY(-100%);
  opacity: 0;
  animation: title-text-slide-down .4s 1.6s ease-out forwards;
}
@keyframes title-text-slide-down {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mkd-mv__title-img {
  width: 100%;
  transform: translateY(-30px);
  opacity: 0;
  animation: title-img-slide-down 1s 2s ease-out forwards;
}
@keyframes title-img-slide-down {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mkd-mv__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: calc(120 / var(--content-width-num) * 100vw);
  padding-inline: calc(22 / var(--content-width-num) * 100vw);
  font-size: calc(14 / var(--content-width-num) * 100vw);
  line-height: 1.7;
  font-weight: 400;
  position: relative;
  z-index: 2;
  transform: translateY(-15%);
  opacity: 0;
  animation: text-slide-down 1s 3s ease-out forwards;
}
@keyframes text-slide-down {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mkd-mv__img {
  width: 100%;
  height: calc(410 / var(--content-width-num) * 100vw);
  margin: auto;
  opacity: 0;
  position: absolute;
  inset: 0;
  top: calc(17 / var(--content-width-num) * 100vw);
  z-index: 1;
  animation: show-img 0s .8s forwards;

  > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
@keyframes show-img {
  to {
    opacity: 1;
  }
}

/* Main
=========================================================== */
.mkd-main {
  overflow: visible;
}

.mkd-main section {
  margin-inline: auto;
}

/* Profile
=========================================================== */
.mkd-profile {
  display: grid;
  place-items: center;
  margin-block: 207px 345px;
  position: relative;
}

.mkd-profile__content {
  width: calc(100% - (14px * 2));
  margin-inline: auto;
  padding: 102px 14px 132px;
  background: rgba(255, 255, 255, .14);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease-in-out, transform .8s ease-in-out;
  transition-delay: 1.4s;

  /* スクロール通過後 */
  .passed-scroll & {
    opacity: 1;
    transform: translateY(0);
  }
}

.mkd-profile__desc {
  width: 100%;
  margin-inline: auto;
}

.mkd-profile__heading {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;

  &::before {
    content: "";
    display: block;
    width: 130px;
    height: 10px;
    background-image: url(/common/images/bunshun/v1/mukoda45th/heading_deco.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

.mkd-profile__text {
  margin-top: 24px;
  font-size: 16px;
  font-size: 1.6rem;
  color: var(--text-color-default);
  line-height: 1.6;
  font-weight: 400;
}

.mkd-profile__img01,
.mkd-profile__img02,
.mkd-profile__img03 {
  height: auto;
  position: absolute;
  transition: opacity .6s ease-in-out, transform .6s ease-in-out;
  opacity: 0;
  transform: translateY(-30px);
}

.mkd-profile__img01 {
  width: 142px;
  top: -162px;
  left: 0;
}

.mkd-profile__img02 {
  width: 142px;
  top: -79px;
  right: 0;
  transition-delay: .5s;
}

.mkd-profile__img03 {
  width: 282px;
  margin-inline: auto;
  bottom: -295px;
  right: 0;
  left: 0;
  transition-delay: 1s;
}

/* スクロール通過後 */
.passed-scroll {
  .mkd-profile__img01,
  .mkd-profile__img02,
  .mkd-profile__img03 {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Biography
=========================================================== */
.mkd-bio {
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease-in-out, transform .8s ease-in-out;

  /* スクロール通過後 */
  &.passed-scroll {
    opacity: 1;
    transform: translateY(0);
  }

  /* スクロール可能アイコン */
  &::after {
    content: "";
    display: block;
    width: 196px;
    height: 26px;
    margin: 18px auto 0;
    background-image: url(/common/images/bunshun/v1/mukoda45th/icon_arrow.svg);
    background-repeat: no-repeat;
    background-size: contain;
  }
}

.mkd-bio__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: var(--margin-inline);

  /* 装飾 */
  &::before {
    content: "";
    display: block;
    width: 130px;
    height: 10px;
    margin-bottom: 6px;
    background-image: url(/common/images/bunshun/v1/mukoda45th/heading_deco.svg);
    background-size: cover;
  }
}

.mkd-bio__content {
  margin-top: 24px;
  padding-inline: var(--margin-inline);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }
}

.mkd-bio__list {
  display: flex;
  column-gap: 7.692307692vw;
  width: max-content;
  list-style: none;
  color: var(--text-color-default);
}

.mkd-bio__item {
  flex-shrink: 0;
  width: 83.08vw;
  height: 227px;
  padding-inline: 12px;
  position: relative;
  box-sizing: border-box;

  /* 背景 */
  &::before {
    content: "";
    display: block;
    width: 100%;
    height: calc(100% - 61px);
    background: rgb(255, 255, 255, .2);
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
  }
}

.mkd-bio__article {
  display: grid;
  grid-template-rows: auto 1fr;
  row-gap: 14px;
  width: 100%;
  height: 100%;
}

.mkd-bio__header {
  display: flex;
  flex-direction: column;
  grid-column: 1 / 1;
  grid-row: 1 / 2;
  row-gap: 10px;
  margin-top: 29px;
  position: relative;
  z-index: 2;
}

.mkd-bio__year {
  /* 見た目を非表示にする */
  > time {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  > img {
    width: 138px;
    height: auto;
  }
}

.mkd-bio__age {
  font-size: 15px;
  font-size: 1.5rem;
  line-height: 1;
}

.mkd-bio__text {
  grid-column: 1 / 1;
  grid-row: 2 / 3;
  padding-bottom: 20px;
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  overflow-y: auto;
}

/* 年数、歳がない */
.mkd-bio__article:not(:has(.mkd-bio__header)) .mkd-bio__text {
  margin-top: 4em;
}

.mkd-bio__img {
  grid-column: 1 / 1;
  grid-row: 1 / 3;
  justify-self: end;
  align-self: start;
  transform: translateX(12px);
  position: relative;
  z-index: 1;

  &.-bottom {
    align-self: end;
  }

  > img {
    display: block;
  }
}

/* Articles
=========================================================== */
.mkd-articles {
  margin-top: 40px;
  background: rgb(0, 0, 0, .2);

  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease-in-out, transform .8s ease-in-out;

  /* スクロール通過後 */
  &.passed-scroll {
    opacity: 1;
    transform: translateY(0);
  }
}

.mkd-articles__content {
  margin-inline: auto;
  padding-bottom: 38px;
}

.mkd-articles__headingArea {
  height: 200px;
  display: flex;
  padding-top: 40px;

  /* 背景画像 */
  background-image: url(/common/images/bunshun/v1/mukoda45th/articles_heading_bg_sp.webp);
  background-repeat: no-repeat;
  background-size: cover;
}

.mkd-articles__heading {
  display: flex;
  flex-direction: column;
  padding-inline: var(--margin-inline);
  font-size: 32px;
  font-size: 3.2rem;
  color: var(--text-color-default);

  /* 装飾 */
  &::before {
    content: "";
    display: block;
    width: 130px;
    height: 10px;
    margin-bottom: 6px;
    background-image: url(/common/images/bunshun/v1/mukoda45th/heading_deco.svg);
    background-size: cover;
  }
}

.mkd-articles__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: -70px;
  padding-inline: var(--margin-inline);
}

.mkd-articles__item {
  visibility: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .4s ease-in-out, visibility .4s ease-in-out, transform .4s ease-in-out;

  /* スクロール通過後 */
  .passed-scroll & {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
}

.mkd-articles__card {
  display: grid;
  grid-template-areas:
    "img title"
    ". author"
    ". date"
  ;
  grid-template-columns: 110px 1fr;
  column-gap: 12px;
}

.mkd-articles__img {
  grid-area: img;
  width: 100%;
  position: relative;

  > img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* newアイコン、最初の要素にだけ付ける */
  .mkd-articles__item.-new &::before {
    content: "";
    display: block;
    width: 56px;
    height: 22px;
    background-image: url(/common/images/bunshun/v1/mukoda45th/icon_new.svg);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: -8px;
    left: -7px;
  }
}

.mkd-articles__title {
  grid-area: title;
  width: 100%;
  color: var(--text-color-default);

  &:hover {
    color: var(--text-color-default);
  }
}

.mkd-articles__title-main {
  font-size: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.mkd-articles__title-sub {
  margin-top: 6px;
  font-size: 14px;
  font-size: 1.4rem;
}

.mkd-articles__authors {
  grid-area: author;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}

.mkd-articles__author {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-size: 1.3rem;
  color: var(--text-color-default);
  font-weight: 400;

  &:hover {
    opacity: .7;
    color: var(--text-color-default);
  }

  > img {
    width: 18px;
    height: 18px;
    border-radius: 50vh;
    background: #00b7b5;
  }
}

.mkd-articles__date {
  grid-area: date;
  margin-top: 6px;
  padding-left: .5em;
  font-size: 13px;
  font-size: 1.3rem;
  color: var(--text-color-default);
  font-weight: 400;
  line-height: 1;
}

/* Books
=========================================================== */
.mkd-books {
  width: 100%;
  margin-inline: auto;
  padding-block: 50px;

  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease-in-out, transform .8s ease-in-out;

  /* スクロール通過後 */
  &.passed-scroll {
    opacity: 1;
    transform: translateY(0);
  }
}

.mkd-books__heading {
  padding-inline: var(--margin-inline);

  /* 装飾 */
  &::before {
    content: "";
    display: block;
    width: 130px;
    height: 10px;
    margin-bottom: 6px;
    background-image: url(/common/images/bunshun/v1/mukoda45th/heading_deco.svg);
    background-size: cover;
  }
}

.mkd-books__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  margin-top: 24px;
  padding-inline: var(--margin-inline);
}

.mkd-books__item {
  visibility: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .4s ease-in-out, visibility .4s ease-in-out, transform .4s ease-in-out;

  /* スクロール通過後 */
  .passed-scroll & {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
}

.mkd-books__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-color-default);
  transition: opacity .5s;

  &:hover {
    opacity: .7;
    color: var(--text-color-default);
  }
}

.mkd-books__img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity .5s;
}

.mkd-books__title {
  font-size: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  line-height: 1;
}

/* Socials
=========================================================== */
.mkd-socials {
  width: 50px;
  position: fixed;
  bottom: 20px;
  right: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 9998;
  transition: opacity .3s ease, visibility .3s ease;

  &.passed-scroll {
    opacity: 1;
    visibility: visible;
  }
}

.mkd-socials__list {
  display: flex;
  flex-direction: column;
  row-gap: 6px;
}

.mkd-socials__link {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 100px 0 0 100px;
  border: none;
  cursor: pointer;

  &.x {
    background: #000;
  }

  &.instagram {
    background: linear-gradient(90deg, #FEC21D 0%, #EC0017 47.78%, #C0009D 100%);
  }

  &.line,
  &.facebook {
    background: var(--white);
  }
}

.mkd-socials__img {
  margin-left: 5px;
}
