@import url(lower.css);

.head {
  padding-block: 0;
  display: flex;
  align-items: center;
  img {
    width: 55%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    margin-right: -5vw;
  }
  .title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2em;
  }
  h2 {
    font-size: max(2.8vw, 1.56em);
    font-weight: 600;
    width: fit-content;
    background: radial-gradient(circle at right top, var(--primary-c), #333);
    background-clip: text;
    color: transparent;
  }
  .name {
    span {
      display: block;
      margin-top: 0.2em;
      font-size: 1.2em;
      font-weight: 500;
    }
  }
}

.q-and-a {
  display: flex;
  flex-direction: column;
  gap: max(5vw, 50px);
  padding-bottom: max(8vw, 60px);
  --r: 18px;
  .anime {
    opacity: 0;
    scale: 0.8;
    transition: opacity 0.4s, scale 0.4s cubic-bezier(0.48, 0, 0.81, 1.74);
  }
  .anime.show {
    opacity: 1;
    scale: 1;
  }
  .body {
    width: min(100%, 1500px);
    margin-inline: auto;
    --w: 16px;
  }
  h2 {
    font-size: 1.6em;
    font-weight: 500;
    color: #fff;
    padding: 1.2em 1em;
    border-radius: var(--r);
    display: flex;
    position: relative;
    margin-left: var(--w);
    background: var(--thin-c);
    &::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 calc(var(--w) * -1);
      margin-block: auto;
      width: var(--w);
      height: calc(var(--w) * 1.6);
      background-color: var(--thin-c);
      clip-path: polygon(0 50%, 100% 0, 100% 100%);
    }
  }
}
.question,
.answer {
  width: min(100%, 900px);
  display: flex;
  align-items: center;
  container-type: inline-size;
  gap: 5%;
  img {
    width: 20cqi;
  }
}
@media (width < 1260px) {
  .question {
    margin-bottom: max(5vw, 20px);
  }
}
.answer {
  margin-left: auto;
  img {
    border-radius: 50%;
  }
  > div {
    --inset: 4px;
    flex: 1;
    padding: 1.8em 2em;
    position: relative;
    margin-right: var(--w);
    border-radius: var(--r);
    background: linear-gradient(120deg, var(--primary-c), var(--secondary-c));
    p {
      line-height: 1.8;
      isolation: isolate;
    }
    .bg {
      position: absolute;
      inset: var(--inset);
      content: "";
      background-color: #fff;
      border-radius: calc(var(--r) - var(--inset));
    }
    &::before,
    &:after {
      content: "";
      position: absolute;
      inset: 0 calc(var(--w) * -1) 0 auto;
      width: var(--w);
      height: calc(var(--w) * 1.6);
      background-color: var(--secondary-c);
      clip-path: polygon(0 0, 100% 50%, 0 100%);
      margin-block: auto;
    }
    &:after {
      background-color: #fff;
      right: calc(var(--w) * -1 + var(--inset) * 1.6);
    }
  }
}

.timeline {
  position: relative;
  padding-bottom: max(8vw, 60px);
  background: linear-gradient(#fff, var(--bg-c), #fff);
  &::before {
    position: absolute;
    content: "";
    inset: 0 auto auto 5vw;
    width: max(40%, 260px);
    height: 1px;
    background: linear-gradient(to right, var(--primary-c), var(--secondary-c));
  }
  h2 {
    font-size: max(2vw, 1.3em);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    margin-bottom: max(5vw, 50px);
    .en {
      text-transform: capitalize;
      font-size: 1rem;
      font-weight: normal;
      color: var(--primary-c);
    }
  }
  dl {
    width: min(100%, 1000px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 1em;
  }
  .row {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    opacity: 0;
    translate: 0 -50px;
    transition-property: opacity, translate;
    transition-duration: 0.8s;
    &.show {
      opacity: 1;
      translate: 0;
    }
  }
  dt {
    width: max(25%, 200px);
    padding: 1.6em 2em;
    padding-right: 0;
  }
  .time {
    font-size: 2em;
    width: fit-content;
    background-image: radial-gradient(
      circle at right top,
      var(--primary-c),
      #333
    );
    background-clip: text;
    color: transparent;
    display: block;
    margin-bottom: 0.2em;
  }
  .data {
    padding: 1.6em 2em;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
  }
}

.other {
  padding-bottom: max(8vw, 60px);
  ul {
    width: min(100%, 800px);
    margin-inline: auto;
    display: flex;
    gap: 5vw;
  }
  li {
    flex: 1;
    aspect-ratio: 7/8;
    position: relative;
    overflow: hidden;
    position: relative;
    &::before {
      position: absolute;
      inset: 0 0 auto;
      aspect-ratio: 1;
      content: "";
      border-radius: var(--r);
      background: linear-gradient(120deg, var(--thin-c), var(--secondary-c));
      mix-blend-mode: darken;
      opacity: 0;
      transition-property: opacity, aspect-ratio;
      transition-duration: 0.5s;
    }
    a {
      position: absolute;
      inset: 0;
      z-index: 5;
    }
    img {
      width: 100%;
      height: auto;
      aspect-ratio: 1;
      object-fit: cover;
      transition: aspect-ratio 0.4s;
      border-radius: var(--r);
    }
    @media (any-hover: hover) {
      &:hover {
        &::before {
          opacity: 1;
          aspect-ratio: 7/8;
        }
        img {
          aspect-ratio: 7/8;
        }
        .name {
          translate: 0;
          transition: translate 0.3s 0.2s;
          span {
            opacity: 1;
          }
        }
      }
    }
  }
  .name {
    position: absolute;
    inset: auto auto 0 0;
    padding: 1em 2em;
    background-color: #fff;
    line-height: 1.8;
    border-radius: 0 1em 0 var(--r);
    display: flex;
    flex-direction: column;
    translate: 0 100%;
    transition: translate 0.2s;
    span {
      opacity: 0;
      transition: opacity 0.3s 0.4s;
    }
  }
}

@media (width < 768px) {
  .head {
    flex-direction: column;
    align-items: start;
    gap: 1em;
    .title {
      gap: 6px;
      width: 100%;
    }
    .name {
      display: flex;
      align-items: baseline;
      align-self: end;
      gap: 0.6em;
      span {
        font-size: 1rem;
      }
    }
    img {
      width: 100vw;
      margin-inline: -5vw;
      order: -1;
    }
  }
  .q-and-a {
    --r: 12px;
    .body {
      --w: 10px;
      h2 {
        font-size: 1em;
        font-weight: 600px;
      }
      .answer {
        flex-direction: column;
        gap: 1em;
        img {
          order: -1;
          align-self: end;
        }
        > div {
          padding: 1em 5vw;
          margin-right: 0;
          &::before,
          &:after {
            inset: calc(var(--w) * -1) 20% auto auto;
            clip-path: polygon(100% 0, 100% 100%, 0 100%);
            width: calc(var(--w) * 1.6);
            height: var(--w);
            background-color: color-mix(
              in srgb,
              var(--secondary-c),
              var(--primary-c)
            );
          }
          &:after {
            background-color: #fff;
            top: calc(var(--w) * -1 + var(--inset) * 1.6);
            right: calc(20% + 3.5px);
          }
        }
      }
    }
  }
  .timeline {
    dl {
      width: min(100%, 800px);
    }
    .row {
      flex-direction: column;
      overflow: hidden;
      translate: 0 -30px;
    }
    dt {
      width: 100%;
      background-color: var(--thin-c);
      padding: 0.4em 0;
    }
    .time {
      font-size: max(3vw, 1.2em);
      background: none;
      color: #fff;
      margin: 0 auto;
    }
    h3 {
      color: #333;
    }
    .data {
      padding: 1em max(3vw, 1em);
      gap: max(1.5vw, 0.6em);
    }
  }

  .other {
    background: transparent;
    ul {
      flex-direction: column;
      width: min(100%, 400px);
      margin-inline: auto;
      li {
        aspect-ratio: 16/9;
        img {
          aspect-ratio: auto;
          height: 100%;
          object-position: top;
        }
        &:nth-child(odd) .name {
          inset: auto 0 0 auto;
          padding-inline: 1em 0;
          border-radius: 1em 0 0 0;
        }
        &:nth-child(3) img {
          scale: -1 1;
        }
      }
    }
    .name {
      opacity: 1;
      pointer-events: auto;
      translate: 0;
      padding: 0.6em 1em 0 0;
      span {
        opacity: 1;
      }
    }
  }
  .other {
    padding-top: 60px;
  }
}
