@use "../base/variable" as *;
@use "../base/mixin" as *;

// About + Expertise
.about {
  position: relative;
  min-height: 100vh;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 6.25vw, 120px) clamp(24px, 6.25vw, 120px);
  overflow: hidden;
}

.about__bg {
  position: absolute;
  inset: 0;
  background: url("../../images/unsplash_Cq5NaI0yKBE.png") center / cover no-repeat;
  // opacity: 0.2;
  pointer-events: none;
}

.about__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 10.4vw, 200px);
}

.about__head {
  .sectionTitle {
    margin: 0 0 57px;
  }
}

.about__desc {
  margin: 0 0 70px;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 300;
  line-height: 150%;
  color: #ffffff;
  opacity: 0.9;
}

.about__quote {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.about__quoteMark {
  font-size: clamp(60px, 7.6vw, 146px);
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
}

.about__quoteText {
  font-size: clamp(22px, 2.4vw, 46px);
  font-weight: 100;
  line-height: 1.2;
  color: #ffffff;
}

.about__expertiseList {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(24px, 3vw, 60px);
  list-style: none;
}

.about__expertiseItem {
  display: flex;
  flex-direction: column;
  gap: 8px;

  .num {
    font-size: clamp(14px, 0.85vw, 16px);
    font-weight: 800;
    color: #7796ff;
  }

  .name {
    font-size: clamp(24px, 2.1vw, 40px);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
    color: #ffffff;
  }

  .text {
    font-size: clamp(12px, 0.75vw, 14px);
    font-weight: 300;
    color: #ffffff;
  }
}

// History
.history {
  position: relative;
  background: #fff;
  padding: clamp(60px, 6.25vw, 120px) clamp(24px, 6.25vw, 120px) clamp(60px, 6.25vw, 120px) 0;
}

.history__photo {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: clamp(220px, 34vw, 500px);

  .img {
    position: sticky;
    top: 0;
    width: 100%;
    object-fit: cover;
  }
}

.history__title {
  position: sticky;
  top: 180px;
  margin-left: clamp(24px, 6vw, 120px);
  z-index: 1;
  color: #ffffff;
}

.history__timeline {
  margin-left: clamp(220px, 34vw, 500px);
}

.history__yearGroup {
  border-top: 1px solid #000;

  &.isOpen {
    .history__yearToggle {
      .icon::after {
        opacity: 0;
      }
    }
  }

  &:has(.history__list:empty) {
    .icon {
      display: none;
    }
  }
}

.history__yearToggle {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  padding: 30px 100px 30px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;

  .history__year {
    flex-shrink: 0;
    width: 80px;
  }

  .history__listItem {
    flex: 1;
  }

  .icon {
    position: absolute;
    top: 50%;
    right: 0;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    border: 1px solid #0d0d0d;
    border-radius: 50%;
    flex-shrink: 0;

    &::before,
    &::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 10px;
      height: 1px;
      background: #0d0d0d;
      transform: translate(-50%, -50%);
    }

    &::after {
      transform: translate(-50%, -50%) rotate(90deg);
      transition: opacity 0.2s;
    }
  }
}

.history__year {
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 500;
  color: #0d0d0d;
  line-height: 1;
}

.history__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 104px;
  margin-right: 100px;

  &[hidden] {
    display: none;
  }
}

.history__listItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  &:first-child {
    margin-top: -14px;
  }

  &:last-child {
    margin-bottom: 30px;
  }

  .main {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .title {
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 400;
    color: #0d0d0d;
  }

  .badge {
    display: inline-block;
    vertical-align: top;
    margin-left: 5px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #0071f2;
    border: 1px solid #0071f2;
    border-radius: 4px;
    vertical-align: middle;
  }

  .sub {
    font-size: 14px;
    color: #7b7b7b;
    line-height: 1.6;
  }

  .date {
    flex-shrink: 0;
    font-size: clamp(12px, 0.85vw, 14px);
    font-weight: 400;
    color: rgba(13, 13, 13, 0.65);
    white-space: nowrap;
  }
}

@include mo {
  .about {
    height: auto;
    min-height: auto;
    padding: calc(#{$gnb-height-mo} + 40px) 24px 60px;
  }

  .about__quote {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .about__expertiseList {
    flex-direction: column;
    gap: 32px;
  }

  .breakLine {
    display: none;
  }

  .history {
    padding: 60px 24px;
  }

  .history__title {
    position: static;
    margin-bottom: 32px;
    color: #0d0d0d;
  }

  .history__photo {
    display: none;
  }

  .history__timeline {
    margin-left: 0;
  }

  .history__yearToggle {
    flex-wrap: wrap;
  }

  .history__list {
    margin-left: 0;
  }

  .history__listItem {
    flex-direction: column;
    gap: 6px;
  }
}
