:root {
  --brand-font-text: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --fg-default: #0e1114;
  --fg-subtle: rgba(0, 0, 0, 0.6);
  --fg-inverse-default: #fff;
  --fg-inverse-subtle: rgba(255, 255, 255, 0.6);
  --comp-fill-accent-primary: #28ebf0;
  --comp-fill-track: rgba(255, 255, 255, 0.5);
  --comp-bdr-inverse-subtle: rgba(255, 255, 255, 0.3);
  --bg-container: #f3f4f6;
  --grey-96: #f4f4f5;
  --grey-90: #e4e4e7;
  --grey-98: #fafafa;
  --grey-34: #52525b;
  --grey-16: #27272a;
  --gnb-h: 72px;
  --content-w: min(990px, calc(100% - 40px));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--brand-font-text);
  color: var(--fg-default);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video { display: block; }
button { font: inherit; background: none; border: 0; cursor: pointer; }

/* ───────── GNB ───────── */
.gnb {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--gnb-h);
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--comp-fill-track);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.gnb__wrapper {
  width: var(--content-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gnb__logo img { width: 80px; height: 20px; }
.gnb__menu { display: flex; gap: 16px; }
.gnb__item {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.016px;
  transition: background-color 0.2s;
}
.gnb__item:hover { background: rgba(14, 17, 20, 0.05); }
.btn-capsule {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--comp-fill-accent-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

/* ───────── Hero (section 1 → 2) ───────── */
/* 인트로가 끝난 hero: 기존(화면 전체)의 약 절반 높이, 타이틀은 화면 상단 쪽 → 아래로 Mission이 살짝 보임 */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  padding-block: calc(var(--gnb-h) + 12vh) 4vh; /* 타이틀이 GNB와 충분히 떨어지도록 상단 여유 */
}

/* 첫 로고 등장 동안만 화면 전체를 흰색으로 덮는 가림막 (GNB 아래, 로고 위는 아님) */
.intro-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #fff;
  pointer-events: none;
  display: none;
}
.is-intro .intro-cover { display: block; }
.glyph--logo { z-index: 60; }
.hero__inner {
  width: var(--content-w);
  display: flex;
  flex-direction: column;
  gap: 75px;
}
.hero__title { display: flex; flex-direction: column; gap: 8px; }
.hero__eyebrow {
  font-size: 24px;
  font-weight: 500;
  line-height: 38px;
  letter-spacing: -0.096px;
}
/* 타이틀은 Figma의 아웃라인 벡터를 그대로 배치 (752.244 × 175.367 기준 좌표) */
.hero__headline {
  position: relative;
  width: min(752.244px, 100%);
  aspect-ratio: 752.244 / 175.367;
}
.glyph {
  position: absolute;
  left: calc(var(--x) * 100% / 752.244);
  top: calc(var(--y) * 100% / 175.367);
  width: calc(var(--w) * 100% / 752.244);
  height: calc(var(--h) * 100% / 175.367);
}
/* KDX 로고: 세로형 로고 PNG의 윗부분(KDX)만 보이도록 크롭 */
.logo-part {
  position: absolute;
  left: 0;
  top: -0.43%;
  width: 100%;
  height: 159.2%;
  transform-origin: 0 0;
  will-change: transform;
}
.logo-part--kdx { clip-path: inset(0 0 37.2% 0); }
.logo-part--sub { clip-path: inset(62.8% 0 0 0); opacity: 0; }

/* 첫 진입 민트 스캔라인 일렁임: 로고 글자 모양으로 마스킹된 캔버스 (KDX 부분만) */
.logo-scan {
  -webkit-mask: url("assets/kdx-logo-vertical.png") 0 0 / 100% 100% no-repeat;
  mask: url("assets/kdx-logo-vertical.png") 0 0 / 100% 100% no-repeat;
  clip-path: inset(0 0 37.2% 0);
  opacity: 0;
  pointer-events: none;
}

.hero__tagline {
  font-size: 37px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: -0.148px;
  color: #000;
}

.reveal {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.is-intro .reveal { opacity: 0; transform: translateY(16px); }
.is-intro .glyph--logo { opacity: 0; } /* JS가 시작 위치로 옮기기 전 깜빡임 방지 */
/* 태그라인: 타이틀이 모두 뜬 뒤 잠깐 텀을 두고 한 글자씩 타이핑 */
.type__rest { visibility: hidden; } /* 남은 글자 자리를 미리 잡아 줄바꿈·레이아웃 흔들림 방지 */
.type__caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin: 0 -3px -0.1em 0;
  background: currentColor;
  vertical-align: baseline;
  opacity: 0;
}
.is-typing .type__caret { opacity: 1; }
.is-typed .type__caret { animation: caret-blink 1s steps(1) 3 forwards; }
@keyframes caret-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

.spacer { height: 100px; }

/* ───────── 스크롤 유도 꺽쇠 화살표 (Figma Component 28) ───────── */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  color: var(--fg-default);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.scroll-cue--light { color: #fff; }
.scroll-cue.is-visible { opacity: 1; }
.scroll-cue svg { display: block; width: 100%; height: 100%; animation: cue-bounce 1.6s ease-in-out infinite; }
@keyframes cue-bounce {
  0%, 100% { transform: translateY(-6px); }
  50% { transform: translateY(8px); }
}

/* ───────── Mission / Vision: 좌측 텍스트 + 우측 이미지 ───────── */
.split {
  display: flex;
  align-items: center;
}
.split__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-right: 48px; /* 좌측 끝은 hero 타이틀 좌측 끝과 일치 */
}
.split__label {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.2px;
}
.split__body { display: flex; flex-direction: column; gap: 18px; }
.split__title {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.144px;
}
.split__desc {
  font-size: clamp(16px, 1.39vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.32px;
  color: var(--fg-subtle);
}
.split__media {
  flex: 0 0 55%; /* 990px 콘텐츠 폭 안에서 우측 이미지 */
  aspect-ratio: 10 / 11; /* 거의 정사각형, 세로가 살짝 긴 비율 */
  max-height: calc(100vh - var(--gnb-h) - 48px);
  overflow: hidden;
  background: #1a1c1e;
}
.split__media-inner { position: relative; width: 100%; height: 100%; }

/* ───────── Mission → Vision 고정 ───────── */
.pin {
  position: relative;
  height: calc(100vh + var(--pin-dist, 130vh));
}
.pin__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  /* hero와 같은 콘텐츠 폭(990px): 좌우 여백 추가 / 화면 전체 높이 대신 이미지 비율대로, GNB 아래 영역 가운데 */
  padding-inline: max(20px, calc((100% - 990px) / 2));
  padding-top: var(--gnb-h);
}
/* 문구 두 벌을 같은 자리에 겹쳐 두고 즉시 교체 */
.pin .split__text { display: grid; }
.pin__copy {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
/* 문구 전환: 나가는 문구는 위로 살짝 빠지며 페이드아웃, 들어오는 문구는 아래에서 올라오며 페이드인 */
.pin__copy {
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1), visibility 0s linear;
  transition-delay: 0.1s, 0.1s, 0s; /* 들어오는 쪽: 나가는 문구가 빠진 뒤 등장 */
}
.pin__copy--vision,
.pin.is-vision .pin__copy--mission {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s, 0s, 0.4s; /* 나가는 쪽: 바로 사라지고, 끝난 뒤 숨김 */
}
.pin__copy--vision { transform: translateY(28px); }
.pin.is-vision .pin__copy--mission { transform: translateY(-20px); }
.pin.is-vision .pin__copy--vision {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.1s, 0.1s, 0s;
}

.pin__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 이미지 전환: Vision 이미지가 아래에서 올라오며 Mission 이미지를 위로 밀어 올림 */
.pin__img { transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1); }
.pin__img--mission { object-position: 43% 50%; }
.pin__img--vision { object-position: 15% 50%; transform: translateY(100%); }
.pin.is-vision .pin__img--mission { transform: translateY(-100%); }
.pin.is-vision .pin__img--vision { transform: none; }

/* 처음 화면에 들어올 때: 문구는 아래에서 위로, 이미지는 살짝 확대된 상태에서 제자리로 */
.js-reveal.is-armed .pin__copy--mission :is(.split__label, .split__title, .split__desc) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.js-reveal.is-armed .pin__copy--mission .split__title { transition-delay: 0.1s; }
.js-reveal.is-armed .pin__copy--mission .split__desc { transition-delay: 0.2s; }
.js-reveal.is-armed .split__media-inner {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s ease, transform 1.6s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.js-reveal.is-armed.is-inview .pin__copy--mission :is(.split__label, .split__title, .split__desc),
.js-reveal.is-armed.is-inview .split__media-inner { opacity: 1; transform: none; }

/* ───────── Core Value ───────── */
.core {
  min-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.core__inner { width: var(--content-w); display: flex; flex-direction: column; gap: 50px; }
.section-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.128px;
}
.core__cards { display: flex; gap: 6px; }
.card {
  flex: 1 1 0;
  min-height: 385px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 27px;
  padding: 24px 16px 0;
  background: var(--bg-container);
  border: 1px solid #fff;
  text-align: center;
}
/* 카드 등장: 섹션이 보이면 한 장씩 아래에서 위로 */
.core.is-armed .card {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.8s ease, transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.18s);
}
.core.is-armed.is-inview .card { opacity: 1; transform: none; }
.card__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: -0.112px;
  color: #000;
}
.card__desc {
  font-size: 16px;
  line-height: 21.6px;
  letter-spacing: -0.016px;
  color: rgba(10, 18, 23, 0.85);
}

/* ───────── 주주현황 ───────── */
.shareholders {
  min-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shareholders__inner { width: var(--content-w); display: flex; flex-direction: column; gap: 16px; }
.shareholders__table-wrap { display: flex; flex-direction: column; gap: 7px; }
.shareholders__unit {
  align-self: flex-end;
  font-size: 16px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: -0.064px;
}
.table-scroll { overflow-x: auto; }
.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.table th {
  padding: 8px 16px;
  background: var(--grey-96);
  border-block: 1px solid var(--grey-90);
  font-weight: 600;
  line-height: 21px;
  color: var(--grey-34);
}
.table td {
  padding: 13.5px 16px;
  border-bottom: 1px solid var(--grey-90);
  color: var(--grey-16);
  white-space: nowrap;
}
.table td.no { font-weight: 500; color: var(--fg-default); }
.table .total { background: var(--grey-98); }
.table .total td { padding-block: 14px; }
.table .total td:first-child { text-align: center; }

.pagination {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pagination__arrow, .pagination__page {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #6c757d;
}
.pagination__arrow { font-size: 16px; }
.pagination__page { font-size: 14px; line-height: 22px; }
.pagination__page.is-active { background: #0e0f10; color: #fff; font-weight: 600; }

/* ───────── Footer ───────── */
.footer {
  background: #121414;
  border-top: 1px solid rgba(7, 10, 15, 0.08);
  padding: 80px 0;
  display: flex;
  justify-content: center;
  font-size: 14px;
}
.footer__inner { width: var(--content-w); display: flex; flex-direction: column; gap: 48px; }
.footer__info { display: flex; flex-direction: column; gap: 16px; }
.footer__brand { display: flex; flex-direction: column; gap: 8px; color: #fff; line-height: 23px; }
.footer__brand img { width: 160px; height: 40px; }
.footer__cols, .footer__bottom { display: flex; gap: 6px; }
.footer__col { flex: 1 1 0; min-width: 0; }
.footer__col--cs { display: flex; flex-direction: column; gap: 6px; }
.footer__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  line-height: 24px;
  letter-spacing: -0.2px;
  color: var(--fg-inverse-subtle);
}
.footer__cs-title { color: #fff; font-weight: 600; line-height: 16px; }
.divider { width: 1px; height: 12px; background: var(--comp-bdr-inverse-subtle); }
.footer__quick {
  flex: 1 1 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  font-weight: 600;
  line-height: 20px;
  color: var(--fg-inverse-subtle);
}
.footer__copy { flex: 1 1 0; line-height: 22px; letter-spacing: -0.2px; color: var(--fg-inverse-subtle); }

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .gnb__menu { display: none; }
  .hero__eyebrow { font-size: 18px; line-height: 28px; }
  .hero__tagline { font-size: 26px; line-height: 34px; }
  .hero__inner { gap: 48px; }
  .pin__stage.split { flex-direction: column-reverse; justify-content: flex-end; gap: 24px; padding-top: var(--gnb-h); }
  .split__text { padding: 0 0 32px; }
  .split__media { flex: none; width: 100%; aspect-ratio: 4 / 3; max-height: 45vh; }
  .core__cards { flex-direction: column; }
  .card { min-height: 280px; }
  .footer__cols, .footer__bottom { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .js-reveal.is-armed * { transition: none !important; }
  .scroll-cue svg { animation: none; }
}

/* 타이핑 준비 전(스크립트 실행 전) 태그라인 전체 문구가 잠깐 보이는 것 방지 */
.is-intro .hero__tagline:not(:has(.type__typed)) { visibility: hidden; }
