/* =====================================================================
   BTONE 회사소개 · 연혁 (개편안) — 인트로 · 챕터(고정 카드 + 타임라인) · CTA
   ===================================================================== */

/* ---------------------------------------------------------------- Intro */
.intro { padding: 80px 0 64px; background: linear-gradient(180deg, var(--grey-98) 0%, var(--white) 100%); }
.intro__grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--sp-64); align-items: center; }
.intro__copy { display: flex; flex-direction: column; gap: var(--sp-16); }
.intro__lead { font-size: clamp(26px, 2.8vw, 40px); font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; color: var(--ink); word-break: keep-all; text-wrap: balance; }
.intro__sub { max-width: 640px; font-size: var(--fs-p2); line-height: 1.65; color: var(--text-paragraph); text-wrap: pretty; }
.periods { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-8); }
.period {
  height: 40px; padding: 0 18px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center;
  background: var(--white); border: 1px solid var(--grey-91); color: var(--text); font-size: var(--fs-p3); font-weight: 600;
}
.period--on { background: var(--ink); border-color: var(--ink); color: var(--white); font-weight: 700; }

/* 회사소개서 카드 */
.intro__doc {
  display: flex; flex-direction: column; gap: var(--sp-16); padding: var(--sp-24);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.intro__doc-label { font-size: var(--fs-p3); font-weight: 700; color: var(--text-paragraph); }
.intro__doc-row { display: flex; align-items: center; gap: 14px; }
.docfile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex: none;
  border: 1px solid var(--grey-91); border-radius: 14px; background: var(--white); color: var(--ink);
  font: inherit; cursor: grab; text-align: left;
}
.docfile:active { cursor: grabbing; }
.docfile__icon { position: relative; width: 36px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text-slate); }
.docfile__icon svg { width: 34px; height: 40px; }
.docfile__badge { position: absolute; bottom: -2px; left: -4px; padding: 1px 5px; border-radius: 4px; background: var(--danger); color: var(--white); font-size: 9px; font-weight: 800; }
.docfile__meta { display: flex; flex-direction: column; gap: 2px; }
.docfile__meta b { font-size: var(--fs-p3); }
.docfile__meta small { font-size: var(--fs-caption); color: var(--text-slate); }
.intro__doc-arrow { color: var(--text-slate); flex: none; }
.docdrop {
  flex: 1; min-height: 96px; padding: 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed rgba(0, 0, 0, 0.28); border-radius: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.docdrop img { width: 28px; height: 28px; }
.docdrop__text { font-size: var(--fs-caption); line-height: 1.5; color: var(--text-paragraph); }
.docdrop__text strong { color: var(--ink); }
.intro__doc.is-dragging .docdrop,
.docdrop.is-over { border-color: var(--accent-blue); background: var(--grey-97); }
.intro__open { display: none; }
.intro__download { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-p3); font-weight: 700; color: var(--text-paragraph); }
.intro__download:hover { color: var(--ink); }

/* -------------------------------------------------------------- Chapters */
/* 리듬: 첫 챕터(현재)는 넓게, 이후 챕터는 좁게 — 전부 같은 패딩이 아니도록 */
.chapter { padding: 56px 0; }
.chapter:first-child { padding: 96px 0 72px; }
.chapter:nth-child(even) { background: var(--grey-98); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.chapter__grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--sp-48); align-items: start; }
.chapter__card {
  position: sticky; top: calc(var(--header-h) + var(--sp-24));
  display: flex; flex-direction: column; gap: 18px; padding: var(--sp-32);
  border-radius: var(--radius-card); border: 1px solid var(--border);
  --ch-accent: var(--accent-blue);
  background: color-mix(in srgb, var(--ch-accent) 6%, white); border-color: color-mix(in srgb, var(--ch-accent) 22%, white);
}
.chapter[data-theme="cyan"] .chapter__card { --ch-accent: var(--accent-teal); }
.chapter[data-theme="dark"] .chapter__card { --ch-accent: var(--accent-sky); background: var(--ink); border-color: var(--ink); color: var(--white); }
.chapter__period { font-size: var(--fs-p3); font-weight: 700; color: var(--ch-accent); font-variant-numeric: tabular-nums; }
.chapter__title { font-size: clamp(24px, 2.2vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; color: inherit; }
.chapter__desc { font-size: 15px; line-height: 1.7; color: var(--text-paragraph); }
.chapter[data-theme="dark"] .chapter__desc { color: rgba(255, 255, 255, 0.72); }

.chapter__timeline { display: flex; flex-direction: column; padding-top: 8px; }
.year { display: grid; grid-template-columns: 96px 1fr; gap: var(--sp-24); position: relative; padding-bottom: 36px; }
.year::before { content: ""; position: absolute; left: 116px; top: 8px; bottom: 0; width: 2px; background: var(--border); }
.year:last-child { padding-bottom: 0; }
.year:last-child::before { display: none; }
.year h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; padding-top: 2px; color: var(--ink); }
.year__list { display: flex; flex-direction: column; gap: 12px; padding-left: 36px; }
.year__list li { position: relative; font-size: 15px; line-height: 1.6; color: var(--text); }
.year__list li::before { content: ""; position: absolute; left: -21px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.year__list li:first-child::before { background: var(--accent-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-blue) 15%, transparent); }

/* ------------------------------------------------------------------- CTA */
.hcta { padding: 80px 0; background: var(--grey-98); border-top: 1px solid var(--border-soft); }
.hcta__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-24); }
.hcta__title { font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.hcta__lead { margin-top: 8px; font-size: var(--fs-p2); color: var(--text-paragraph); }
.hcta__btn { height: 52px; padding: 0 28px; font-size: var(--fs-p2); border-radius: 12px; flex: none; }

/* 맨 위로 */
.topbtn {
  position: fixed; right: var(--sp-40); bottom: var(--sp-40); z-index: var(--z-fab);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--border); color: var(--ink);
  box-shadow: 0 10px 28px rgba(13, 18, 32, 0.14);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.topbtn.is-show { opacity: 1; visibility: visible; transform: none; }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1024px) {
  .intro__grid { grid-template-columns: 1fr; gap: var(--sp-32); }
  .chapter__grid { grid-template-columns: 1fr; gap: var(--sp-24); }
  .chapter__card { position: static; }
}
@media (max-width: 767px) {
  .intro { padding: 36px 0 24px; }
  .intro__lead { font-size: 28px; }
  .intro__sub { font-size: var(--fs-p3); }
  .period { height: 36px; padding: 0 14px; font-size: 13px; }
  /* 모바일: 드래그 대신 탭 → 열기 버튼 */
  .intro__doc { padding: 14px; border-radius: 16px; }
  .intro__doc-row { gap: 10px; }
  .docfile { flex: 1; min-width: 0; padding: 0; border: 0; cursor: default; }
  .docfile__meta { min-width: 0; }
  .docfile__meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .intro__doc-arrow, .docdrop { display: none; }
  .intro__open { display: inline-flex; width: auto; flex: none; height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; box-shadow: none; }
  .docfile__meta { flex: 1; }
  .chapter { padding: 28px 0 36px; }
  .chapter:first-child { padding: 40px 0 44px; }
  .chapter__card { padding: 22px 20px; gap: 12px; border-radius: 20px; }
  .year { grid-template-columns: 1fr; gap: 10px; padding: 0 0 28px 28px; }
  .year::before { left: 7px; }
  .year h3 { font-size: 22px; position: relative; }
  .year h3::before { content: ""; position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-blue) 15%, transparent); }
  .year__list { padding-left: 0; gap: 8px; }
  .year__list li { font-size: 14px; }
  .year__list li::before { display: none; }
  .hcta { padding: 40px 0; }
  .hcta__inner { flex-direction: column; align-items: stretch; text-align: center; }
  .hcta__btn { width: 100%; }
  .topbtn { right: var(--sp-16); bottom: var(--sp-16); width: 44px; height: 44px; }
}

/* ------------------------------------------------- 디스플레이 서체 (메인과 동일 규칙) */
/* history.css 가 site.css 뒤에 로드되므로 여기서 다시 선언 — 명조는 자간 덜 조이고 행간 넓힘 */
.intro__lead, .chapter__title, .hcta__title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
}
