/* =====================================================================
   BTONE — 회사 소개 · 연혁  (Figma: DragDocs 리뉴얼 / 비티원 메인)
   디자인: 흰 배경 · 원형 썸네일 + 연도 타임라인(연도 + 라인 + 불릿)
   동작: 원형 정지 썸네일 → 스크롤 도달 시 전체 영상 배경 확장 + 제목 오버레이
   ===================================================================== */

:root {
  --ink: #111317;
  --ink-soft: #5b616e;
  --line: #d9dce1;
  --content: 880px;
  --circle: 300px;
  --clip: 150px; /* JS 갱신 */
  --ring: 1;     /* JS 갱신 */
  --scrim: 0;    /* JS 갱신 */
}

html { scroll-behavior: smooth; }

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ Header */
.hh {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: var(--ink);
  /* 불투명 고정 바: 비디오가 헤더 아래로 지나가며 침범하지 않도록 */
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.hh__brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
}
.hh__brand img { height: 24px; width: auto; display: block; }
.hh__icon-img { display: block; }
.hh__actions { display: flex; align-items: center; gap: 8px; }
.hh__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.hh__icon:hover { background: rgba(125, 125, 125, 0.16); }

/* 언어 선택 드롭다운 */
.lang { position: relative; display: inline-flex; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 144px;
  padding: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-menu__item:hover { background: #f3f4f6; }
.lang-menu__item.is-active { color: #006eff; font-weight: 700; }

/* ------------------------------------------------------------ Intro hero (white) */
.intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  text-align: center;
  padding: 160px 24px 24px;
}
.intro__lead {
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* 회사소개서 — 드래그앤드롭으로 DragDocs Viewer 열기 */
.intro__doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* 끌어다 놓을 PDF 파일 카드 */
.docfile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  cursor: grab;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.docfile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12); }
.docfile:active { cursor: grabbing; }
.docfile__icon {
  position: relative;
  display: inline-flex;
  color: #e2483d;
}
.docfile__icon svg { width: 48px; height: 48px; }
.docfile__badge {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: #e2483d;
  padding: 1px 5px;
  border-radius: 3px;
}
.docfile__name { font-size: 17px; font-weight: 600; color: var(--ink); }

/* 드래그 중: 파일 카드는 흐려지고 드롭존이 강조됨 */
.intro__doc.is-dragging .docfile { opacity: 0.45; }
.intro__doc.is-dragging .dropzone { border-color: #006eff; background: rgba(0, 110, 255, 0.04); }

/* DragDocs 스타일 드롭존 */
.dropzone {
  width: min(460px, 86vw);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 2px dashed rgba(0, 0, 0, 0.18);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.015);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.dropzone.is-over {
  border-color: #006eff;
  background: rgba(0, 110, 255, 0.08);
  transform: scale(1.02);
}
.dropzone__icon { display: inline-flex; color: #006eff; }
.dropzone__icon svg { width: 38px; height: 38px; }
.dropzone__text {
  font-size: 19px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
}
.dropzone__text strong { color: var(--ink); font-weight: 700; }

/* 다운로드 링크 */
.intro__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  transition: color 0.16s ease;
}
.intro__download:hover { color: var(--ink); }
.intro__download svg { opacity: 0.85; }
/* ------------------------------------------------------------ Chapter (원 → 전체 영상 확장) */
.chapter { position: relative; }

/* 핀 고정 없이 자연 스크롤 — 스테이지가 화면을 지나가며 원↔전체화면 전환 */
.chapter__pin { position: relative; }

.chapter__stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

.chapter__video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--mw, var(--circle));
  height: var(--mh, var(--circle));
  border-radius: var(--mr, 50%);
  object-fit: cover;
  will-change: width, height, border-radius;
}

/* 썸네일(원형) 글로우 — 확장되면 사라짐 */
.chapter__stage::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--circle);
  height: var(--circle);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 30px 70px rgba(0, 90, 220, 0.22);
  opacity: var(--ring);
}
.chapter[data-theme="dark"] .chapter__stage::after { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 30px 70px rgba(0,0,0,.22); }

/* 스크림: 영상과 동일한 크기·모양을 따라가서 사각형이 보이지 않게 */
.chapter__scrim {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--mw, var(--circle));
  height: var(--mh, var(--circle));
  border-radius: var(--mr, 50%);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.36) 100%);
  opacity: var(--scrim);
}

/* 텍스트 오버레이 */
.chapter__intro { position: absolute; inset: 0; pointer-events: none; }
.chapter__intro p, .chapter__intro span { pointer-events: auto; }

.chapter__title {
  position: absolute;
  left: 50%;
  top: 17%;
  transform: translateX(-50%);
  width: min(90%, 820px);
  text-align: center;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.45s ease, top 0.6s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.45s ease;
}

.chapter__desc--preview {
  position: absolute;
  left: 50%;
  top: 72%;
  transform: translateX(-50%);
  width: min(90%, 660px);
  text-align: center;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.85;
  color: var(--ink-soft);
  transition: opacity 0.35s ease;
}

.chapter__sub {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translateX(-50%);
  width: min(92%, 1080px);
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease 0.05s;
}
.chapter__label {
  flex: 0 0 auto;
  padding-top: 2px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.chapter__desc--full {
  max-width: 760px;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
}

/* 활성(확장) 상태 */
.chapter.is-active .chapter__title {
  color: #fff;
  top: 30%;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}
.chapter.is-active .chapter__desc--preview { opacity: 0; }
.chapter.is-active .chapter__sub { opacity: 1; }

/* ------------------------------------------------------------ Timeline (연도 + 라인 + 불릿) */
.chapter__timeline {
  position: relative;
  z-index: 2;
  background: #fff;
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(64px, 10vh, 120px) 24px clamp(72px, 14vh, 160px);
}

.year { padding-bottom: clamp(40px, 5vw, 64px); }
.year:last-child { padding-bottom: 0; }

.year__head {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
}
.year__head h3 {
  font-family: var(--font-brand);
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.year__rule {
  height: 1px;
  background: var(--line);
  margin-left: 10px;
}

.year__list {
  padding-left: 200px;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.year__list li {
  position: relative;
  padding-left: 18px;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
  color: #2c2f37;
}
.year__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111317;
}

/* 연도 사이 생략 표시(· · ·) */
.year--dots {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 0 clamp(40px, 5vw, 64px) 60px;
  color: #b6bbc2;
  font-size: 28px;
  line-height: 0.4;
}

/* ------------------------------------------------------------ Footer */
.hf {
  position: relative;
  z-index: 3;
  background: #292929;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 32px clamp(20px, 5vw, 100px);
}
.hf__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.hf__credit {
  display: contents;
}
.hf__brand {
  display: block;
  flex: 1;
}
.hf__brand img { height: 14px; width: auto; display: block; }
.hf__copy {
  order: 10;
  flex: 0 0 100%;
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.hf__link {
  position: relative;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: opacity 0.2s ease;
}
.hf__link::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 100%;
  min-height: 20px;
  background: rgba(255, 255, 255, 0.2);
}
.hf__link:hover { opacity: 0.8; }
.hf__ext { font-size: 14px; }

/* ------------------------------------------------------------ Top button */
.topbtn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 90;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.topbtn.is-show { opacity: 1; visibility: visible; transform: none; }

/* ------------------------------------------------------------ Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative;
  width: min(820px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  padding: 32px;
  animation: modal-in 0.22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.modal__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.modal__close:hover { background: #f3f4f6; }

/* 개인정보 처리방침 모달 — 헤더 고정 + 본문 스크롤 */
.modal__panel--privacy { width: min(900px, 100%); padding: 0; }
.modal__panel--privacy .modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 22px 32px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.privacy-doc {
  padding: 18px 32px 32px;
  font-size: 14px;
  line-height: 1.75;
  color: #374151;
}
.pp-lead { color: #4b5563; margin-bottom: 4px; }
.pp-art { margin-top: 26px; }
.pp-art__title { font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 10px; }
.pp-text { margin: 6px 0; }
.pp-list { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.pp-list > li { padding-left: 4px; }
.pp-sub { list-style: disc; padding-left: 20px; margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.pp-sub--dash { list-style-type: "– "; }
.pp-table-wrap { overflow-x: auto; margin: 11px 0 2px; }
.pp-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.pp-table th, .pp-table td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; vertical-align: top; }
.pp-table th { background: #f9fafb; font-weight: 700; color: #111827; }
.pp-card { margin-top: 9px; padding: 14px 16px; background: #f9fafb; border: 1px solid #eef0f3; border-radius: 10px; }
.pp-card__title { font-weight: 700; color: #111827; margin-bottom: 4px; }
.pp-card p { margin: 2px 0; }
.pp-card a { color: #006eff; }
.pp-effective { margin-top: 28px; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 13px; }

/* contact form */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form__full,
.consent--privacy,
.btn-primary { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label .req { color: #ef4444; }
.field input,
.field select,
.field textarea {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  background: #fafafa;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field select { height: 48px; cursor: pointer; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #006eff;
  background: #fff;
}
.field textarea {
  resize: vertical;
  min-height: 112px;
}
.field input[type="file"] {
  color: var(--ink-soft);
  cursor: pointer;
  height: 48px;
  padding: 7px 14px;
}
.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: #eef4ff;
  color: #006eff;
  font-weight: 700;
  cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { background: #e0ebff; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.file-list[hidden] { display: none; }
.file-list__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #fafafa;
  font-size: 12px;
}
.file-list__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list__size { flex-shrink: 0; color: var(--ink-soft); }
.file-list__remove { flex-shrink: 0; border: 0; background: transparent; color: #ef4444; font-weight: 700; font-size: 16px; line-height: 1; cursor: pointer; }
.field__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-soft);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.consent input { margin-top: 3px; }
.consent--privacy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #fafafa;
}
.consent__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.consent__check .req { color: #ef4444; }
.privacy-summary {
  color: var(--ink-soft);
}
.privacy-summary dl {
  display: grid;
  gap: 5px;
  margin: 0;
}
.privacy-summary dl > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.privacy-summary dt {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
}
.privacy-summary dd,
.privacy-summary p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  word-break: keep-all;
}
.privacy-summary p {
  margin-top: 7px;
  color: #7a8798;
}
.btn-primary {
  margin-top: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--grad-cta);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { cursor: progress; opacity: 0.9; filter: none; }
.btn-spinner {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.form-progress { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.form-progress[hidden] { display: none; }
.form-progress > span {
  display: block; width: 40%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #9d1bff, #1378ff, #10e3d5);
  animation: progress-indeterminate 1.1s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 767px) {
  :root { --circle: 230px; }
  .hh, .hf { padding-inline: 20px; }
  .modal { padding: 16px; }
  .modal__panel { padding: 24px; border-radius: 16px; }
  .modal__panel--privacy { padding: 0; }
  .modal__panel--privacy .modal__head { padding: 18px 18px; }
  .privacy-doc { padding: 14px 18px 24px; }
  .modal__title { font-size: 20px; }
  .form { grid-template-columns: 1fr; }
  .file-list { grid-template-columns: 1fr; }
  .consent--privacy { grid-template-columns: 1fr; }
  .privacy-summary { grid-template-columns: 1fr; }
  .hf__inner { flex-wrap: wrap; }
  .chapter__sub { flex-direction: column; align-items: center; text-align: center; gap: 10px; top: 46%; }
  .chapter__label { white-space: normal; }
  .year__head { grid-template-columns: 1fr; }
  .year__rule { display: none; }
  .year__list { padding-left: 0; padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
