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

// Contact
// 이 섹션만 Figma 디자인이 라이트 테마(흰 배경/검은 텍스트)임 — 다른 섹션과 색상 반전
.contact {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(13, 13, 13, 0.08);
  padding: clamp(80px, 6.25vw, 120px) clamp(24px, 6.25vw, 120px) 0;
}

.contact__inner {
  margin-bottom: 88px;
}

.contact__heading {
  font-family: $기본글꼴;
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0d0d0d;
  line-height: 1;
}

.contact__desc {
  margin-top: 60px;
  margin-bottom: 120px;
  font-size: 14px;
  font-weight: 300;
  color: #0d0d0d;
}

.contact__label {
  font-size: 32px;
  font-weight: 400;
  color: #0d0d0d;
  margin-bottom: 20px;
}

.contact__infoList {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

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

.contact__infoLabel {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7796ff;
}

.contact__infoValue {
  font-size: 16px;
  font-weight: 300;
  line-height: 26px;
  color: #0d0d0d;
}

.contact__infoLink {
  color: inherit;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.7;
  }
}

// Contact accordion
.contactAccordion {
  width: 100%;
}

.contactAccordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0 24px;
  margin: 32px 0 0;
  background: none;
  border: none;
  border-bottom: 1px solid #0d0d0d;
  cursor: pointer;
  color: #0d0d0d;
  font-size: 32px;
  font-weight: 400;
  font-family: $기본글꼴;
  text-align: left;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.7;
  }
}

.contactAccordion__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  object-fit: unset;
  filter: invert(1);
}

.contactAccordion__item.isOpen .contactAccordion__icon {
  transform: rotate(180deg);
}

.contactAccordion__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;

  &:not([hidden]) {
    max-height: 800px;
  }

  &[hidden] {
    display: block !important;
    max-height: 0;
  }
}

// 문의 폼
.contactForm {
  margin: 32px 0 0;
}

.contactForm__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contactForm__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contactForm__input,
.contactForm__textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #0d0d0d;
  border-radius: 8px;
  color: #0d0d0d;
  font-family: $기본글꼴;
  font-size: 14px;
  font-weight: 300;
  padding: 16px;
  outline: none;
  transition: border-color 0.2s;

  &::placeholder {
    color: #737373;
  }
}

.contactForm__textarea {
  resize: none;
  min-height: 180px;
  height: 100%;
}

.contactForm__agree {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.contactForm__termsTrigger {
  background: none;
  border: none;
  padding: 0;
  font-family: $기본글꼴;
  font-size: 16px;
  color: #0d0d0d;
  text-decoration: underline;
  cursor: pointer;

  &:hover {
    color: #7796ff;
  }
}

.contactForm__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-size: 16px;
  color: #0d0d0d;
}

.contactForm__checkboxInput {
  display: none;
}

.contactForm__checkboxInput:checked + .contactForm__checkboxBox {
  background: #7796ff;
  border-color: #7796ff;
}

.contactForm__checkboxInput:checked + .contactForm__checkboxBox::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid #0d0d0d;
  border-bottom: 1.5px solid #0d0d0d;
  transform: rotate(-45deg) translateY(-2px);
}

.contactForm__checkboxBox {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 4px;
  border: 1px solid #0d0d0d;

  transition:
    background 0.2s,
    border-color 0.2s;
}

.contactForm__submit {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btnSend {
  padding: 16px 32px;
  background: #7796ff;
  border: none;
  border-radius: 100px;
  color: #000000;
  font-family: $기본글꼴;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.8;
  }
}

// 채용 태그
.careerTags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}

.careerTag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border: 1px solid #0d0d0d;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 400;
  color: #0d0d0d;
  transition:
    border-color 0.2s,
    color 0.2s;

  &:hover {
    border-color: #7796ff;
    color: #7796ff;
  }
}

.careerTag__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

// 개인정보 수집·이용 동의 모달
.privacyModal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

  &[hidden] {
    display: none;
  }
}

.privacyModal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.privacyModal__panel {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.privacyModal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid #0d0d0d;
}

.privacyModal__title {
  font-family: $기본글꼴;
  font-size: 32px;
  font-weight: 400;
  color: #0d0d0d;
}

.privacyModal__close {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.privacyModal__closeLine {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: #0d0d0d;

  &:nth-child(1) {
    transform: rotate(45deg);
  }
  &:nth-child(2) {
    transform: rotate(-45deg);
  }
}

.privacyModal__body {
  padding-bottom: 24px;
  border-bottom: 1px solid #0d0d0d;
  font-family: $기본글꼴;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #0d0d0d;

  p {
    margin-bottom: 12px;
  }

  ul {
    margin-top: 4px;
    padding-left: 1em;
  }

  li {
    list-style: disc;
  }
}

@include mo {
  .contact__desc {
    margin-bottom: 32px;
  }

  .contact__infoList {
    flex-direction: column;
    gap: 24px;
  }

  .contactAccordion__header {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .contactForm {
    padding-bottom: 40px;
  }

  .contactForm__cols {
    grid-template-columns: 1fr;
  }

  .contactForm__textarea {
    height: auto;
  }

  .careerTags {
    padding-bottom: 40px;
  }

  .privacyModal__panel {
    padding: 28px 24px;
  }
}
