: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 {
  position: relative;
  min-height: max(100vh, 668px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gnb-h) 0 0;
}
.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 민트 포인트: 로고 글자 모양(PNG 알파)으로 마스킹한 레이어 안에서
   민트 빛줄기 하나가 좌→우로 흐르다 X에 도착해 꼬리가 말려 들어가며 X를 채우고, 잠깐 머문 뒤 사라진다 */
@property --tail {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 70%;
}
.logo-accent {
  position: absolute;
  left: 0;
  top: -0.43%;
  width: 100%;
  height: 159.2%;
  overflow: hidden;
  clip-path: inset(0 0 37.2% 0);
  -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;
  pointer-events: none;
}
.logo-accent__beam {
  --tail: 70%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  opacity: 0;
  /* 왼쪽: 흐려지는 꼬리(--tail까지) / 오른쪽 끝: 부드러운 빛머리 */
  background: linear-gradient(90deg, rgba(40, 235, 240, 0) 0%, var(--comp-fill-accent-primary) var(--tail), var(--comp-fill-accent-primary) 80%, rgba(40, 235, 240, 0) 100%);
}
.logo-slot-accent .logo-accent__beam { animation: accent-beam 1.25s forwards; }
@keyframes accent-beam {
  0% { left: -40%; width: 40%; --tail: 70%; opacity: 1; animation-timing-function: cubic-bezier(0.4, 0, 0.7, 0.4); }
  /* 흐르기 (0.77s) */
  61% { left: 40%; width: 40%; --tail: 70%; opacity: 1; animation-timing-function: cubic-bezier(0.2, 0.6, 0.3, 1); }
  /* X 도착 (0.2s): 왼쪽 끝이 X 시작점(65%)에 멈추고 꼬리가 말려 들어가 X가 꽉 찬다. 빛머리는 로고 밖(100% 이후)으로 */
  77% { left: 65%; width: 45%; --tail: 0%; opacity: 1; }
  /* 잠깐 머물기 (0.08s) */
  84% { left: 65%; width: 45%; --tail: 0%; opacity: 1; animation-timing-function: ease-in-out; }
  /* 사라지기 (0.2s) */
  100% { left: 65%; width: 45%; --tail: 0%; opacity: 0; }
}

.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: 32px;
  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); }
}

/* ───────── Copy block (Mission / Vision) ───────── */
.copy {
  width: var(--content-w);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.copy__label {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.2px;
}
.copy__body { display: flex; flex-direction: column; gap: 18px; }
.copy__title {
  font-size: 38.4px; /* 32px × 1.2 */
  font-weight: 700;
  line-height: 48px;
  letter-spacing: -0.128px;
}
.copy__desc {
  font-size: 19.2px; /* 16px × 1.2 */
  line-height: 26px;
  letter-spacing: -0.32px;
  color: var(--fg-subtle);
}
.copy--inverse { color: var(--fg-inverse-default); }
.copy--inverse .copy__desc { color: var(--fg-inverse-subtle); }

/* ───────── Mission / Vision: 스크롤 영상 확장 + 타이틀 반전 ───────── */
.media-scroll {
  position: relative;
  height: calc(100vh + var(--scroll-dist, 100vh));
}
.media-scroll__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.media-scroll__copy {
  position: absolute;
  top: var(--copy-top, 160px);
  left: 50%;
  translate: -50% 0;
}
.media-scroll__media {
  position: absolute;
  inset: 0;
}
.media-scroll__video {
  position: absolute;
  object-fit: cover;
  object-position: 0% 50%;
  background: #1a1c1e;
}
/* 밝은 영상 위 타이틀 가독성용 딤: 텍스트가 있는 상단을 조금 더 어둡게 */
.media-scroll__media--dim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.55) 0%, rgba(8, 12, 20, 0.42) 45%, rgba(8, 12, 20, 0.3) 100%);
  pointer-events: none;
}
.js-clip { will-change: clip-path; }

/* ───────── 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: flex-start;
  justify-content: flex-start;
  gap: 8.4px; /* 타이틀-본문 간격 7px × 1.2 */
  /* 상단 정렬: 기존 가운데 정렬에서 가장 높이 있던 카드(본문 4줄)의 타이틀 위치(≈119px)에 맞춤 */
  padding: 119px 32px 24px;
  background: var(--bg-container);
  border: 1px solid #fff;
  text-align: left;
}
/* 카드 등장: 섹션이 보이면 한 장씩 아래에서 위로 */
.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; }
  .copy__title { font-size: 28.8px; line-height: 38px; }
  .core__cards { flex-direction: column; }
  .card { min-height: 280px; padding-top: 48px; }
  .footer__cols, .footer__bottom { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .scroll-cue svg { animation: none; }
}

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