@charset "utf-8";
/* ============================================================
   HIST3 — 회사연혁(history.php) 본문 전용
   ------------------------------------------------------------
   본문 레이아웃은 시안 A(history.php)에서 가져왔으므로, 그 CSS 중
   이 페이지가 쓰는 블록(.hist-*)만 sub.css 에서 옮겨 적었다.
   → sub.css 는 더 이상 읽지 않는다. 여기서 무엇을 고쳐도 history.php 는 그대로다.
   클래스 이름은 원본과 같은 hist-* 를 쓴다 — 마크업을 함께 옮겨 왔기 때문이다.
   ------------------------------------------------------------
   ① .hist-intro  스크롤에 따라 어두운 배경이 좌우로 넓어지고 글이 떠오르는 구간
   ② .hist-time   왼쪽 연도 목록(스크립트가 자동 생성) + 오른쪽 연도별 내용
   ※ 본문 래퍼 .sub-body 여백은 상단 CSS(sub_top.css)가 담당한다.
   ============================================================ */

.hist-intro {
  /* ▼ 배경 시작 폭 (0.45 = 다 펼친 폭의 45%. 1 에 가까울수록 변화가 작다) */
  --hist-bg-from: 0.45;
  /* ▼ 배경이 컨테이너 밖으로 더 나가는 양 (좌우 각각). 키우면 띠가 더 길어진다
     body 에 overflow-x: clip 이 걸려 있어 가로 스크롤은 생기지 않는다 */
  --hist-stage-out: 120px;
  /* ▼ 바닥 장식 글자(.hist-intro__floor) 색 — 마지막 숫자가 진하기다.
     .04 = 아주 희미 / .07 = 지금보다 진함 / 색을 바꾸려면 앞 세 숫자(255,255,255)를 바꾼다
     예) 푸른 기 : rgba(125, 196, 255, .05) */
  --hist-floor-ink: rgba(255, 255, 255, .05);
}

.hist-intro__stage {
  position: relative;
  /* 글(위) + 연혁 목록(아래)을 세로로 담는다 — 배경은 이 상자 전체를 덮는다 */
  display: block;
  /* 컨테이너보다 좌우로 더 넓게 — 음수 마진으로 밖으로 내보낸다 */
  margin-left: calc(var(--hist-stage-out) * -1);
  margin-right: calc(var(--hist-stage-out) * -1);
  padding: 100px 0 110px;
  border-radius: 15px;         /* ▼ 배너 모서리 둥글기 */
  overflow: hidden;            /* 배경이 넓어지는 동안 밖으로 삐져나오지 않게 */
}

.hist-intro__bg {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background-color: #0a1f38;   /* 사진이 없을 때 깔리는 색 */
  background-position: 0 0; background-size: cover; background-repeat: no-repeat;
  border-radius: 15px;         /* 띠와 같은 둥글기 — 다 펼쳐졌을 때 모서리가 맞는다 */
  clip-path: inset(0 27.5% 0 27.5%);
}

.hist-intro__bg::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(120deg, rgba(10, 31, 56, .18) 0%, rgba(10, 31, 56, .75) 60%, rgba(18, 58, 99, .52) 100%);
}

/* 글 — 배경 밖(흰 바탕) 위쪽에 따로 놓인다.
   배경 안이 아니므로 글자색은 본문 색을 쓴다. */
.hist-intro__inner {
  position: relative; z-index: 1;
  width: 100%; margin-bottom: 5rem; padding: 0 20px;
  color: var(--arch-ink); text-align: center;
  /* 로딩되면 아래에서 위로 한 번 떠오른다 (스크롤과 무관 — 스크립트가 .is-in 을 붙인다)
     ▼ 올라오는 거리 40px / 시간 .9s */
  opacity: 0; transform: translate3d(0, 40px, 0);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.hist-intro__inner.is-in { opacity: 1; transform: none; }
.hist-intro__text { color: var(--arch-gray); }

/* 바닥 글자 — 펼쳐진 배경의 **아래쪽에 바짝 붙는** 장식 글자.
   · 아래를 살짝 잘라(bottom 음수 + .hist-intro__stage 의 overflow:hidden) 바닥에 놓인 느낌을 준다
   ▼ 색·진하기 : 위 .hist-intro 의 --hist-floor-ink 한 줄
   ▼ 위치     : bottom 값 (음수가 클수록 더 많이 잘린다)
   ▼ 크기     : font-size (아래 반응형과 짝) */
.hist-intro__floor {
  position: absolute; left: 50%; bottom: 0; z-index: 0;
  transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; user-select: none;
  font-size: 9rem; font-weight: 800; line-height: .82; letter-spacing: -.03em;
  /* ▼▼ 글자 색·투명도는 .hist-intro 의 --hist-floor-ink 한 줄로 바꾼다 ▼▼
         (예전에는 그라데이션을 글자에 입혀 두어 고칠 곳이 네 군데였다 — 한 곳으로 모았다) */
  color: var(--hist-floor-ink);
}

/* 바닥 글자 — 반응형 */
@media (max-width: 1199px) { .hist-intro__floor { font-size: 7rem; } }
@media (max-width: 991px)  { .hist-intro__floor { font-size: 5.5rem; } }
@media (max-width: 767px)  { .hist-intro__floor { font-size: 4rem; } }
@media (max-width: 500px)  { .hist-intro__floor { font-size: 2.9rem; } }

/* 연혁 목록 — 펼쳐지는 배경 안쪽에 놓인다.
   어두운 배경 위라 글자·선 색을 밝은 쪽으로 뒤집는다 (아래 .hist-intro__body 안 규칙들). */
.hist-intro__body {
  position: relative; z-index: 1;
  margin-top: 56px; padding: 0 60px;
}
.hist-intro__body .hist-time__year { color: #fff; }
.hist-intro__body .hist-time__line { background: rgba(255, 255, 255, .5); }
.hist-intro__body .hist-time__yearbtn { color: rgba(255, 255, 255, .45); }
.hist-intro__body .hist-time__yearbtn:hover { color: rgba(255, 255, 255, .75); }
.hist-intro__body .hist-time__yearbtn.is-active { color: #fff; }
.hist-intro__body .hist-time__label { color: #fff; }
.hist-intro__body .hist-era__items li { border-bottom-color: rgba(255, 255, 255, .18); }
.hist-intro__body .hist-era__items p { color: rgba(255, 255, 255, .82); }

.hist-intro__eyebrow {
  margin: 0 0 14px;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

.hist-intro__title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04rem;
    word-break: keep-all;
}

/* 강조 — "TNC Company".
   이 타이틀은 어두운 띠 **밖(흰 바탕)** 에 있어 밝은 하늘색은 묻힌다.
   ▼ 강조 색은 이 한 줄만 고치면 된다 */
.hist-intro__title em { 
  font-style: normal; 
  color: #125ea0;
  font-weight: 900; 
}

/* 로고 — 타이틀 위 가운데.
   ▼ 크기는 width 한 줄 (원본 120×91) */
.hist-intro__logo {
  display: block; width: 120px; height: auto;
  margin: 0 auto 18px;
}
@media (max-width: 767px) { .hist-intro__logo { width: 96px; margin-bottom: 14px; } }

.hist-intro__text {
  max-width: 900px; margin: 0 auto;
  line-height: 1.4; 
  word-break: keep-all;
}

@media (max-width: 1199px) {
  .hist-intro__inner { padding: 0 48px;
  }
}

@media (max-width: 991px) {
  .hist-intro { --hist-stage-out: 40px; }
  .hist-intro__stage { padding: 76px 0 80px; }
  .hist-intro__inner { margin-bottom: 34px; padding: 0 16px; }
  .hist-intro__body { margin-top: 40px; padding: 0 32px; }
  .hist-intro { --hist-bg-from: 0.66;
  }
  .hist-intro__stage { min-height: 400px; padding: 72px 0;
  }
  .hist-intro__inner { padding: 0 32px;
  }
  .hist-intro__facts { gap: 18px 44px;
  }
}

@media (max-width: 767px) {
  .hist-intro { --hist-stage-out: 0px; }
  .hist-intro__stage { padding: 56px 0 60px; }
  .hist-intro__inner { margin-bottom: 26px; padding: 0 4px; }
  .hist-intro__body { padding: 0 20px; }
  .hist-intro__stage { min-height: 0; padding: 56px 0;
  }
  .hist-intro__inner { padding: 0 20px;
  }
  .hist-intro__title { font-size: 1.75rem;
  }
  .hist-intro__facts { margin-top: 34px; padding-top: 28px; gap: 16px 32px;
  }
  .hist-intro__facts strong { font-size: 1.7rem;
  }
}

@media (max-width: 500px) {
  .hist-intro__title { font-size: 1.6rem;
  }
  .hist-intro__facts { gap: 14px 24px;
  }
  .hist-intro__facts strong { font-size: 1.5rem;
  }
}

.hist-time { padding-bottom: 30px;
}

.hist-time__row { max-width: 1300px; margin:0 auto;
}

.hist-time__sticky { position: sticky; top: 40px;
}

.hist-time__head { display: flex; align-items: center; gap: 24px;
}

.hist-time__year {
  display: block;
  font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  color: var(--arch-ink);
}

.hist-time__year.is-swap { animation: histYearIn .45s var(--ease) both;
}

@keyframes histYearIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hist-time__line {
  display: block; flex: 0 0 auto;
  width: 80px;
  height: 2px;
  background: #3c3c3c;
  transform: scaleX(0); transform-origin: left center;
}

.hist-time__line.is-draw { animation: histLineDraw .6s var(--ease) .12s both;
}

@keyframes histLineDraw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hist-time__years {
  display: flex; flex-direction: column; gap: 2px;
  list-style: none; margin: 28px 0 0 1rem; padding: 0;
}

.hist-time__yearbtn {
  display: block; width: 100%; padding: 3px 0;
  border: 0; background: none; text-align: left; cursor: pointer;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em;
  color: #acb5c3;                                  /* ▼ 고르지 않은 연도 색 */
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}

.hist-time__yearbtn:hover { color: var(--arch-gray);
}

.hist-time__yearbtn.is-active { color: var(--arch-blue); padding-left: 10px;
}

/* 연도별 내용을 담는 칸 — 연도마다 줄 수가 달라도 **높이가 변하지 않게** 한다.
   모든 연도를 같은 격자 칸(1행 1열)에 겹쳐 쌓으면 칸 높이가 '가장 긴 연도' 기준으로 고정된다.
   display:none 으로 숨기면 그 연도가 자리를 차지하지 않아 배경 세로 길이가 들쑥날쑥해진다. */
.hist-time__list { display: grid; overflow: hidden;
}

.hist-era {
  grid-area: 1 / 1;            /* 모든 연도가 같은 칸에 겹친다 */
  visibility: hidden; opacity: 0; pointer-events: none;
}

.hist-era.is-active {
  visibility: visible; opacity: 1; pointer-events: auto;
}

.hist-time__label {
  margin: 0 0 2rem;
  font-size: 1.6rem;
  font-weight: 700; letter-spacing: -.03rem;
}

.hist-era__items { list-style: none; margin: 0; padding: 0;
}

.hist-era__items li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid #efefef;
}

.hist-era__items li:first-child { padding-top: 0;
}

.hist-era__items p {
  margin: 0;
  font-size: 1.02rem; line-height: 1.7; 
  word-break: keep-all; font-weight: 500;
}

.hist-era .hist-time__label,
.hist-era .hist-era__items li { opacity: 0;
}

.hist-time.is-ready .hist-era.is-active .hist-time__label,
.hist-time.is-ready .hist-era.is-active .hist-era__items li { animation: histEraIn .55s var(--ease) both;
}

.hist-time.is-ready .hist-era.is-active .hist-time__label { animation-delay: .34s;
}

.hist-time.is-ready .hist-era.is-active .hist-era__items li:nth-child(1) { animation-delay: .42s;
}

.hist-time.is-ready .hist-era.is-active .hist-era__items li:nth-child(2) { animation-delay: .50s;
}

.hist-time.is-ready .hist-era.is-active .hist-era__items li:nth-child(3) { animation-delay: .58s;
}

.hist-time.is-ready .hist-era.is-active .hist-era__items li:nth-child(4) { animation-delay: .66s;
}

.hist-time.is-ready .hist-era.is-active .hist-era__items li:nth-child(5) { animation-delay: .74s;
}

@keyframes histEraIn {
  from { opacity: 0; transform: translate3d(56px, 0, 0); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 991px) {
  .hist-time__side { margin-bottom: 28px;
  }
  .hist-time__sticky { position: static;
  }
  .hist-time__year { font-size: 2.6rem;
  }
  .hist-time__head { gap: 16px;
  }
  .hist-time__line { display: none;
  }
  .hist-time__years { flex-direction: row; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; margin-left: 0;
  }
  .hist-time__yearbtn {
      width: auto; padding: 7px 14px;
      border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
     font-size: .95rem;
  }
  .hist-time__yearbtn.is-active { 
    padding-left: 14px;         
    border-color: var(--arch-blue);
    background: var(--arch-blue);;
  }
}

@media (max-width: 767px) {
  .hist-time__year { font-size: 2.2rem;
  }
  .hist-time__line { width: 72px; height: 4px;
  }
  .hist-time__label { margin-bottom: 14px;
  }
  .hist-era__items li { gap: 12px; padding: 12px 0;
  }
}

@media (max-width: 500px) {
  
  .hist-time__label {
      font-size: 1.3rem;
    }
  .hist-time__year { font-size: 2rem;
  }
  .hist-era__items li { flex-direction: column; gap: 4px;
  }
}