/* intro */
.p-journey-intro {
  display: grid;
  gap: 32px;
  justify-items: center;
  margin-top: clamp(64px, 49.9155px + 3.7559vw, 104px);
}

.p-journey-intro__title {
  color: var(--color-brand);
  text-align: center;
}

.p-journey-intro__text {
  display: grid;
  gap: 2.2em;
  line-height: var(--lh-lead);

  @media (width >= 768px) {
    gap: 1.8em;
    line-height: var(--lh-base);
    text-align: center;
  }
}
/* /intro */

/* process */
.p-process-journey {
  margin-top: 64px;

  @media (width >= 768px) {
    margin-top: 104px;
  }
}

.p-process-journey__head {
  margin-bottom: 64px;

  @media (width < 768px) {
    display: none;
  }
}

.p-journey {
  --journey-ease: var(--ease-out);

  display: grid;
  gap: 16px;
  width: min(100% - 50px, var(--content-width));
  margin-inline: auto;

  @media (width >= 768px) {
    display: block;
    width: min(100% - 64px, var(--content-width));
  }
}

.p-journey__tabs {
  display: none;

  @media (width >= 768px) {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 168px));
    gap: clamp(8px, -6.2222px + 1.8519vw, 16px);
    justify-content: center;
    margin-bottom: 33px;
  }
}

.p-journey__tab {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: start;
  min-height: 113px;
  padding: 16px 4px 12px;
  color: var(--color-text);
  text-align: center;
  background-color: var(--color-blue-03);
  border-radius: 16px;

  & .p-journey__num {
    color: var(--color-brand);
  }

  &::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 17px;
    height: 9px;
    margin-top: -1px;
    background-color: var(--color-brand);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0;
    translate: -50% 0;
  }

  &[aria-selected="true"] {
    color: var(--color-white);
    background-color: var(--color-brand);
    cursor: default;

    & .p-journey__num {
      color: inherit;
    }

    &::after {
      opacity: 1;
    }
  }
}

@media (any-hover: hover) {
  .p-journey__tab[aria-selected="false"]:hover {
    background-color: var(--color-blue-02);
  }
}

.p-journey__num {
  display: flex;
  gap: 4px;
  align-items: baseline;
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--ls-base);

  & span {
    font-size: 14px;
  }
}

.p-journey__name {
  font-size: clamp(13px, 7.6667px + 0.6944vw, 16px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--ls-base);
}

.p-journey__acc {
  @media (width >= 768px) {
    display: none;
  }
}

.p-journey__acc-btn {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 61px;
  padding: 10px 16px 10px 25px;
  font-family: var(--font-jp);
  color: var(--color-text);
  text-align: left;
  background-color: var(--color-blue-03);
  border-radius: 8px;
  transition: color 0.3s, background-color 0.3s, border-radius 0.3s;

  & .p-journey__num {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--color-brand);
    transition: color 0.3s;
  }

  & .p-journey__name {
    flex: 1;
    font-size: 15px;
  }

  &[aria-expanded="true"] {
    color: var(--color-white);
    background-color: var(--color-brand);
    border-radius: 8px 8px 0 0;

    & .p-journey__num {
      color: inherit;
    }
  }
}

.p-journey__icon {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-brand);

  &::before,
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    background-color: currentColor;
    transition: rotate 0.4s var(--journey-ease);
  }

  &::after {
    rotate: 90deg;
  }

  [aria-expanded="true"] > & {
    color: var(--color-white);

    &::after {
      rotate: 0deg;
    }
  }
}

.p-journey__body {
  @media (width < 768px) {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;

    .is-ready & {
      transition: grid-template-rows 0.6s var(--journey-ease), opacity 0.6s var(--journey-ease);
    }

    .is-active > & {
      grid-template-rows: 1fr;
      opacity: 1;
    }
  }
}

.p-journey__body-inner {
  min-height: 0;

  @media (width < 768px) {
    overflow: hidden;
  }
}

.p-journey__step {
  @media (width >= 768px) {
    &:not(.is-active) {
      display: none;
    }

    .is-ready &.is-active {
      animation: journey-fade 0.6s var(--journey-ease);
    }
  }
}

@keyframes journey-fade {
  from {
    opacity: 0;
    translate: 0 16px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

.p-journey__panel {
  display: grid;
  justify-items: center;
  padding: 32px 16px 40px;
  background-color: var(--color-white);
  border: 1px solid var(--color-brand);
  border-top: 0;
  border-radius: 0 0 16px 16px;

  @media (width >= 768px) {
    padding: clamp(56px, 40.1549px + 4.2254vw, 101px) clamp(24px, -3.1127px + 7.23vw, 101px);
    border: 3px solid var(--color-brand);
    border-radius: clamp(24px, 18.3662px + 1.5023vw, 40px);
  }
}

.p-journey__intro {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  padding-inline: 10px;

  @media (width >= 768px) {
    gap: 32px;
    max-width: 880px;
    padding-inline: 0;
  }
}

.p-journey__title {
  width: 100%;
  padding-bottom: 8px;
  font-family: var(--font-jp);
  font-size: clamp(20px, 16.4789px + 0.939vw, 30px);
  line-height: 1.4;
  letter-spacing: var(--ls-base);
  text-align: center;
  border-bottom: 2px solid var(--color-brand);

  @media (width >= 768px) {
    width: fit-content;
    padding-bottom: 16px;
  }
}

.p-journey__lead {
  display: grid;
  gap: 1.8em;
  width: 100%;
  font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
  line-height: var(--lh-base);

  @media (width >= 768px) {
    text-align: center;
  }
}

.p-journey__list {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 992px;
  margin-top: 32px;

  @media (width >= 768px) {
    gap: 32px;
    margin-top: 64px;

    &.p-journey__list--line::before {
      content: "";
      position: absolute;
      top: 48px;
      bottom: 48px;
      left: calc(clamp(24px, 9.9155px + 3.7559vw, 64px) + 41px);
      z-index: -1;
      width: 1px;
      background-image: linear-gradient(var(--color-brand) 50%, transparent 50%);
      background-size: 1px 4px;
    }
  }
}

.p-journey__step[data-step="step01"] .p-journey__list {
  @media (width >= 768px) {
    gap: 24px;
  }
}

.p-journey__card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 24px;
  background-color: var(--color-blue-03);
  border-radius: 16px;

  @media (width >= 768px) {
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: clamp(24px, -32.8889px + 7.4074vw, 56px);
    align-items: center;
    padding: 32px clamp(24px, 9.9155px + 3.7559vw, 64px) 40px;
    border-radius: 32px;
  }
}

.p-journey__card-body {
  display: grid;
  gap: 10px;
  width: 100%;

  @media (width >= 768px) {
    gap: 24px;
    max-width: 640px;
  }
}

.p-journey__card-head {
  display: grid;
  gap: 14px;
  justify-items: center;

  @media (width >= 768px) {
    display: flex;
    gap: 24px;
    align-items: center;
  }
}

.p-journey__badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 59px;
  padding: 6px 16px;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-brand);
  background-color: var(--color-white);
  border: 1px solid var(--color-brand);
  border-radius: 100px;

  @media (width >= 768px) {
    min-width: 83px;
    padding: 6px 28px;
    font-size: 22px;
  }
}

.p-journey__card-title {
  font-size: clamp(20px, 18.9437px + 0.2817vw, 23px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--ls-base);
  color: var(--color-brand);
  text-align: center;

  @media (width >= 768px) {
    line-height: var(--lh-base);
    text-align: left;
  }

  @media (width >= 1200px) {
    letter-spacing: 0.16em;
  }
}

.p-journey__card-text {
  display: grid;
  gap: 1.8em;
  font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
  line-height: var(--lh-base);
}

.p-journey__card-img {
  width: 168px;
  margin-top: 6px;

  @media (width >= 768px) {
    margin-top: 0;
  }
}

.p-journey__card--btn {
  @media (width >= 768px) {
    padding-bottom: 32px;
  }

  @media (width >= 1200px) {
    & .p-journey__card-body {
      grid-template-columns: minmax(0, 330px) auto;
      column-gap: 57px;
      align-items: end;
      max-width: none;
    }

    & .p-journey__card-head {
      grid-column: 1 / -1;
    }
  }
}

.p-journey__card-btn {
  --btn-w: 223px;

  justify-self: center;
  margin-top: 6px;

  @media (width >= 768px) {
    --btn-w: 251px;

    justify-self: start;
    margin-top: 0;
  }
}

.p-journey__card--photo {
  @media (width >= 768px) {
    grid-template-columns: minmax(0, 1fr);

    & .p-journey__card-body {
      max-width: none;
    }
  }
}

.p-journey__photos {
  display: grid;
  gap: 16px;
  width: 100%;

  @media (width >= 768px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.p-journey__photo {
  display: grid;
  gap: 4px;
  justify-items: center;
  font-size: 14px;
  line-height: 2.4;

  & img {
    width: 100%;
    aspect-ratio: 277 / 193;
    object-fit: cover;
    border-radius: 16px;
  }

  @media (width >= 768px) {
    gap: 8px;
  }
}

.p-journey__sub {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  margin-top: 64px;

  @media (width >= 768px) {
    gap: 24px;
    max-width: 808px;
    margin-top: 104px;
  }
}

.p-journey__sub-title {
  font-size: clamp(22px, 20.9437px + 0.2817vw, 25px);
  line-height: 1.5;
  letter-spacing: var(--ls-base);
  color: var(--color-brand);
  text-align: center;

  @media (width >= 768px) {
    line-height: 1.4;
  }
}

.p-journey__sub-title--reqs {
  margin-top: 64px;
  font-size: clamp(22px, 19.8873px + 0.5634vw, 28px);

  @media (width >= 768px) {
    margin-top: 104px;
  }
}

.p-journey__sub-text {
  display: grid;
  gap: 1.8em;
  width: 100%;
  padding-inline: 10px;
  font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
  line-height: var(--lh-base);

  @media (width >= 768px) {
    padding-inline: 0;
    text-align: center;
  }
}

.p-journey__sub--last {
  @media (width >= 768px) {
    gap: 40px;
    margin-top: 64px;

    & .p-journey__sub-title {
      font-size: 28px;
    }
  }
}

.p-journey__staff {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  margin-top: 32px;
  padding: 32px 24px;
  background-color: var(--color-blue-03);
  border-radius: 24px;

  @media (width >= 768px) {
    grid-template-columns: 185px auto;
    gap: clamp(24px, -32.8889px + 7.4074vw, 56px);
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 64px;
    padding: 32px clamp(24px, 15.5493px + 2.2535vw, 48px);
    border: 1px solid var(--color-brand);
  }
}

.p-journey__staff-img {
  width: 185px;
  border-radius: 16px;
}

.p-journey__staff-body {
  display: grid;
  gap: 16px;
  justify-items: center;

  @media (width >= 768px) {
    gap: 32px;
    justify-items: end;
  }
}

.p-journey__staff-text {
  font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
  line-height: var(--lh-base);
}

.p-journey__staff-btn {
  --btn-w: auto;

  gap: 16px;
  padding: 22px 24px;

  @media (width >= 768px) {
    padding-block: 24px;
  }
}

.p-journey__reqs {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 1040px;
  margin-top: 32px;

  @media (width >= 768px) {
    gap: clamp(16px, 1.7778px + 1.8519vw, 24px);
    justify-self: stretch;
    width: auto;
    margin: 64px calc(-1 * clamp(0px, -42.6667px + 5.5556vw, 24px)) 0;
  }

  @media (width >= 1024px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.p-journey__step[data-step="step06"] .p-journey__reqs {
  margin-top: 32px;

  @media (width >= 768px) {
    margin-top: 40px;
  }
}

.p-journey__req {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background-color: var(--color-blue-03);
  border-radius: 16px;

  @media (width >= 768px) {
    gap: 8px;
    padding: 32px clamp(16px, -12.4444px + 3.7037vw, 32px);
    border-radius: 24px;
  }
}

.p-journey__req-title {
  font-size: clamp(20px, 18.9437px + 0.2817vw, 23px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--ls-base);
  color: var(--color-brand);

  @media (width >= 768px) {
    font-family: var(--font-heading);
  }
}

.p-journey__req-text {
  font-size: 14px;
  line-height: var(--lh-base);

  @media (768px <= width < 1200px) {
    & br {
      display: none;
    }
  }

  @media (width >= 1200px) {
    font-size: 17px;
  }
}

.p-journey__req-img {
  width: 279px;
  margin-top: 14px;
  align-self: end;

  @media (width >= 768px) {
    margin-top: 16px;
  }
}

.p-journey__req--line {
  grid-template-rows: auto auto 1fr;
  align-content: start;

  & .p-journey__req-title {
    width: 100%;
    padding-bottom: 16px;
    background-image: linear-gradient(to right, var(--color-brand) 50%, transparent 50%);
    background-repeat: repeat-x;
    background-position: left bottom;
    background-size: 4px 2px;
  }

  & .p-journey__req-text {
    margin-top: 6px;
  }

  @media (width >= 768px) {
    & .p-journey__req-text {
      margin-top: 16px;
    }
  }
}

.p-journey__flow {
  position: relative;
  width: 2px;
  height: 32px;
  margin-block: 8px;
  background-color: var(--color-brand);

  &::after {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 11px;
    height: 11px;
    border-right: 2px solid var(--color-brand);
    border-bottom: 2px solid var(--color-brand);
    translate: -50% 0;
    rotate: 45deg;
  }

  @media (width >= 1024px) {
    width: calc((min(100% + 2 * clamp(0px, -42.6667px + 5.5556vw, 24px), 1040px) - 2 * clamp(16px, 1.7778px + 1.8519vw, 24px)) / 3 * 2 + 2 * clamp(16px, 1.7778px + 1.8519vw, 24px));
    height: 85px;
    margin-block: 16px;
    background-color: transparent;
    background-image: linear-gradient(var(--color-brand), var(--color-brand));
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 2px calc(100% - 2px);

    &::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: 46px;
      border: 2px solid var(--color-brand);
      border-top: 0;
      border-radius: 0 0 16px 16px;
    }

    &::after {
      bottom: 1px;
      width: 12px;
      height: 12px;
    }
  }
}

.p-journey__goal {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  padding: 32px 24px;
  background-color: #ffefef;
  border-radius: 16px;

  @media (width >= 768px) {
    grid-template-columns: 78px minmax(0, 1fr);
    column-gap: 36px;
    align-items: center;
    justify-items: start;
    max-width: 716px;
    min-height: 150px;
    padding: 20px 24px 20px clamp(24px, 15.5493px + 2.2535vw, 48px);
  }
}

.p-journey__goal-img {
  order: 1;
  width: 78px;

  @media (width >= 768px) {
    order: 0;
  }
}

.p-journey__goal-body {
  display: grid;
  gap: 16px;
  justify-items: center;

  @media (width >= 768px) {
    gap: 8px;
    justify-items: start;
  }
}

.p-journey__goal-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 18.2394px + 0.4695vw, 25px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--ls-base);
  color: var(--color-brand);
  text-align: center;

  @media (width >= 768px) {
    text-align: left;
  }
}

.p-journey__goal-text {
  font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
  line-height: var(--lh-base);
}

.p-journey__goal--center {
  gap: 8px;

  & .p-journey__goal-img {
    width: 86px;
  }

  @media (width >= 768px) {
    grid-template-columns: 86px auto;
    column-gap: 24px;
    justify-content: center;
  }
}

.p-journey__result {
  display: grid;
  gap: 24px;
  justify-items: center;
  width: 100%;
  max-width: 1040px;
  margin-top: 64px;

  @media (width >= 768px) {
    gap: 40px;
    justify-self: stretch;
    width: auto;
    margin: 104px calc(-1 * clamp(0px, -42.6667px + 5.5556vw, 24px)) 0;
  }

  & .p-result__box {
    width: 100%;
    margin-top: 0;
  }
}

.p-journey__result-title {
  font-size: clamp(22px, 19.8873px + 0.5634vw, 28px);
  line-height: 1.5;
  letter-spacing: var(--ls-base);

  @media (width >= 768px) {
    line-height: 1.4;
  }
}
/* /process */

/* result */
.p-result__box {
  padding: clamp(24px, 18.3662px + 1.5023vw, 40px);
  text-align: center;
  background-color: var(--color-blue-03);
  border: 1px solid var(--color-blue-01);
  border-radius: 24px;
}

.p-result__list {
  display: grid;
  gap: clamp(20px, 15.7746px + 1.1268vw, 32px);
  font-weight: 700;
  line-height: var(--lh-base);

  & dt {
    font-size: clamp(16px, 14.5915px + 0.3756vw, 20px);
    color: var(--color-brand);
  }

  & dd {
    font-size: clamp(14px, 12.5915px + 0.3756vw, 18px);
  }
}

.p-result__note {
  margin-top: clamp(20px, 15.7746px + 1.1268vw, 32px);
  font-size: clamp(11px, 10.6479px + 0.0939vw, 12px);
  line-height: var(--lh-base);
}
/* /result */

/* admissions */
.p-admissions {
  margin-top: 80px;
  padding-block: clamp(64px, 49.9155px + 3.7559vw, 104px);
  background-color: var(--color-gray-01);

  @media (width >= 768px) {
    margin-top: 104px;
  }
}

.p-admissions__group {
  margin-top: clamp(56px, 66.8169px - 0.7512vw, 64px);

  .c-section-head + & {
    margin-top: clamp(40px, 31.5493px + 2.2535vw, 64px);
  }
}

.p-admissions__title {
  padding-bottom: clamp(8px, 5.1831px + 0.7512vw, 16px);
  font-size: clamp(22px, 20.5915px + 0.3756vw, 26px);
  line-height: var(--lh-base);
  letter-spacing: var(--ls-base);
  color: var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
}

.p-admissions__table {
  margin-top: 32px;
  overflow: hidden;
  background-color: var(--color-white);
  border-radius: 8px;
}

.p-admissions__row {
  @media (width >= 768px) {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);

    &:not(:last-child) {
      border-bottom: 1px solid #d5e8f1;
    }
  }

  & dt {
    padding: 10px 16px;
    font-size: clamp(16px, 15.6479px + 0.0939vw, 17px);
    font-weight: 700;
    line-height: var(--lh-base);
    color: var(--color-brand);
    background-color: var(--color-blue-02);

    @media (width >= 768px) {
      display: grid;
      place-items: center;
      padding: 24px;
    }
  }

  & dd {
    display: grid;
    gap: 1.8em;
    padding: clamp(16px, 13.1831px + 0.7512vw, 24px);
    font-size: clamp(14px, 13.2958px + 0.1878vw, 16px);
    line-height: var(--lh-base);
  }
}
/* /admissions */
