/* Setting
=========================================================== */

/* Variable
=========================================================== */
#mkd {
  /* サイズ */
  --content-width: 1366px;
  --content-width-num: 1366;
  --content-width-narrow: 1080px;

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

/* Base
=========================================================== */
#mkd {
  .wrapper {
    top: 0;
  }

  #footer {
    min-width: var(--content-width);
  }
}

/* Header
=========================================================== */
.mkd-header {
  width: var(--content-width);
  padding: 15px;
  height: auto;
  translate: 0 -100%;

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

/* ロゴ */
.mkd-header__link {
  gap: 12px;
}

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

.mkd-header__img {
  width: 244px;
  height: auto;
}

/* メニューコンテンツ */
.mkd-header__menu-content {
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  position: static;
  overflow-y: hidden;
}

/* ナビゲーション */
.mkd-header__nav {
  display: block;
}

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

.mkd-header__nav-link {
  display: block;
  width: auto;
  padding-block: 0;
  position: relative;
}

/* Main Visual
=========================================================== */
.mkd-mv {
  height: 100vh;

  &::before {
    display: none;
  }
}

.mkd-mv__content {
  align-items: flex-start;
  justify-content: center;
  margin-inline: auto;
  position: relative;

  /* 動くオブジェクト用 */
  &::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: var(--black);
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;

    animation:
      extend-height .3s ease-out forwards,
      to-right .4s ease-out .3s forwards,
      extend-width .4s ease-out .7s forwards,
      change-color .2s ease-out 1.1s forwards,
      fade-out .2s ease-out 1.3s forwards;
  }
}
@keyframes extend-height {
  to {
    height: 100%;
  }
}
@keyframes to-right {
  from {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  to {
    left: calc(100% - calc(40 / var(--content-width-num) * 100%));
    transform: translate(-100%, -50%);
  }
}
@keyframes extend-width {
  to {
    width: calc(984 / var(--content-width-num) * 100%);
  }
}
@keyframes change-color {
  to {
    background: var(--white);
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.mkd-mv__desc {
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-column: 1;
  margin-block: auto;
  color: var(--text-color-default);
  position: absolute;
  left: calc(40 / var(--content-width-num) * 100%);
  top: 0;
  bottom: 0;
  z-index: 2;
}

.mkd-mv__title {
  display: flex;
  flex-direction: column;
  gap: calc(8 / var(--content-width-num) * 100%);
  margin-top: 0;
  padding-inline: 0;
  z-index: 2;
  font-weight: 400;
  transform: translate(0);
}

.mkd-mv__logo {
  width: calc(82 / var(--content-width-num) * 100vw);
  transform: translateX(-15%);
  animation: title-logo-slide-right .4s 1.5s ease-out forwards;
}
@keyframes title-logo-slide-right {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media screen and (max-height: calc(441 / 1336 * 100vw)) {
  .mkd-mv__logo {
    width: calc(140 / 768 * 100vh);
  }
}

.mkd-mv__title-content {
  margin-top: calc(8 / var(--content-width-num) * 100vw);
}

.mkd-mv__title-text {
  display: block;
  transform: translateX(-5%);
  font-size: calc(20 / var(--content-width-num) * 100vw);
  line-height: 1.5;
  animation: title-text-slide-right .4s 1.9s ease-out forwards;
}
@keyframes title-text-slide-right {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media screen and (max-height: calc(441 / 1336 * 100vw)) {
  .mkd-mv__title-text {
    font-size: calc(34 / 768 * 100vh);
  }
}

.mkd-mv__title-img {
  width: calc(440 / var(--content-width-num) * 100vw);
  transform: translateX(-5%);
  animation: title-text-slide-right .6s 2.3s ease-out forwards;
}
@keyframes title-img-slide-right {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media screen and (max-height: calc(441 / 1336 * 100vw)) {
  .mkd-mv__title-img {
    width: calc(750 / 768 * 100vh);
  }
}

.mkd-mv__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  margin-top: calc(22 / var(--content-width-num) * 100vw);
  padding-inline: 0;
  font-size: calc(14 / var(--content-width-num) * 100vw);
  line-height: 1.7;
  z-index: 2;
  transform: translateX(-5%);
  animation: title-text-slide-right .6s 2.7s ease-out forwards;
}
@keyframes text-slide-right {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media screen and (max-height: calc(441 / 1336 * 100vw)) {
  .mkd-mv__text {
    font-size: calc(23.9 / 768 * 100vh);
  }
}

.mkd-mv__img {
  grid-column: 2 / 4;
  width: calc(984 / var(--content-width-num) * 100%);
  height: 100%;
  z-index: 1;
  animation: show-img 0s 1.2s forwards;
  margin: unset;
  margin-right: calc(40 / var(--content-width-num) * 100%);
  margin-left: auto;
  position: static;
  inset: unset;
}
@keyframes show-img {
  to {
    opacity: 1;
  }
}

/* Main
=========================================================== */
.mkd-main section {
  margin-inline: auto;
}

/* Profile
=========================================================== */
.mkd-profile {
  display: flex;
  align-items: center;
  height: calc(648 / var(--content-width-num) * 100vw);
  margin-block: calc(80 / var(--content-width-num) * 100vw);
  overflow-x: hidden;
  position: relative;
}

.mkd-profile__content {
  width: 100%;
  padding: 40px 0;
  position: static;
}

.mkd-profile__desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(calc(330 / var(--content-width-num) * 100vw), 330px);
}

.mkd-profile__heading {
  gap: calc(6 / var(--content-width-num) * 100vw);

  > img {
    width: calc(187 / var(--content-width-num) * 100vw);
    height: auto;
  }
}

.mkd-profile__text {
  font-size: min(calc(16 / var(--content-width-num) * 100vw), 16px);
}

.mkd-profile__img {
  height: calc(648 / var(--content-width-num) * 100vw);
}

.mkd-profile__img01 {
  width: calc(251 / var(--content-width-num) * 100vw);
  top: 0;
  left: -40px;
  z-index: 2;
  transform: translateX(-30px);
}

.mkd-profile__img02 {
  width: calc(251 / var(--content-width-num) * 100vw);
  top: unset;
  bottom: 0;
  right: unset;
  left: calc(168 / var(--content-width-num) * 100vw);
  z-index: 1;
  transition-delay: 1s;
  transform: translateX(-30px);
}

.mkd-profile__img03 {
  width: calc(460 / var(--content-width-num) * 100vw);
  top: 0;
  right: 0;
  border: unset;
  left: unset;
  transition-delay: .5s;
  transform: translateX(30px);
}

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

/* Biography
=========================================================== */
.mkd-bio {
  width: 100%;
  margin-inline: auto;
}

.mkd-bio__heading {
  padding-inline: 40px;

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

.mkd-bio__content {
  cursor: grab;

  /* ドラッグ中 */
  &.is-dragging {
    cursor: grabbing;
    user-select: none;
  }
}

.mkd-bio__list {
  column-gap: 46px;
  // width: max-content;
  padding-right: 40px;
  padding-left: max(0px, calc(50% - 456px / 2));

  &::before {
    right: 16px;
  }
}

.mkd-bio__item {
  width: 456px;
  height: 316px;
  padding-inline: 16px;
  scroll-snap-align: center;

  /* 背景 */
  &::before {
    height: calc(100% - 74px);
  }
}

.mkd-bio__article {
  row-gap: 20px;
}

.mkd-bio__header {
  row-gap: 8px;
  margin-top: 43px;
}

.mkd-bio__year {
  min-height: 80px;

  > img {
    width: 178px;
  }
}

.mkd-bio__age {
  font-size: 18px;
  font-size: 1.8rem;
}

.mkd-bio__text {
  font-size: 16px;
  font-size: 1.6rem;
}

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

.mkd-bio__img {
  transform: translateX(16px);
}

/* Articles
=========================================================== */
.mkd-articles {
  margin-top: 80px;
  background: transparent;
}

.mkd-articles__content {
  min-width: var(--content-width);
  display: flex;
  margin-inline: auto;
  padding-bottom: 0;
  background: rgb(0, 0, 0, .2);
}

.mkd-articles__headingArea {
  flex: 1 1 0;
  height: 952px;
  max-height: 952px;
  padding-top: 52px;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;

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

.mkd-articles__heading {
  font-size: 32px;
  font-size: 3.2rem;
  color: var(--text-color-default);
}

.mkd-articles__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px 40px;
  width: 899px;
  margin-top: 16px;
  padding: 60px 80px 66px 80px;
}

.mkd-articles__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
  transition: opacity .3s ease;

  &:hover,
  &:focus-visible {
    opacity: .6;
  }
}

.mkd-articles__link {
  display: block;

  &:hover,
  &:focus-visible {
    opacity: .7;
  }
}

.mkd-articles__img {
  width: 100%;

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

  /* newアイコン、最初の要素にだけ付ける */
  .mkd-articles__item.-new &::before {
    width: 78px;
    height: 30px;
    position: absolute;
    top: -11px;
    left: -11px;
  }
}

.mkd-articles__title {
  width: 100%;
  margin-top: 12px;
  color: var(--text-color-default);

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

.mkd-articles__title-main {
  font-size: 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

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

.mkd-articles__authors {
  margin-top: 0;
}

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

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

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

.mkd-articles__date {
  align-self: start;
  padding-left: .5em;
  font-size: 14px;
  font-size: 1.4rem;
  color: var(--text-color-default);
  font-weight: 400;
  text-align: right;
}

/* Books
=========================================================== */
.mkd-books {
  width: var(--content-width-narrow);
  margin-inline: auto;
  padding: 80px 40px;
  box-sizing: content-box;
}

.mkd-books__heading {
  width: fit-content;
  margin-inline: auto;
}

.mkd-books__headingImg {
  width: 176px;
  height: auto;
}

.mkd-books__list {
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 24px;
  padding-inline: 0;
}

.mkd-books__link {
  color: var(--text-color-default);
  transition: opacity .5s;

  &:hover,
  &:focus-visible {
    opacity: .6;
    color: var(--text-color-default);
  }
}

.mkd-books__img {
  width: 100%;
}

.mkd-books__title {
  font-size: 18px;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}
