/* ============================================================
   AICube — components.css
   헤더/GNB · 푸터 · 플로팅 상담 · 히어로 · 스탯 밴드 · 카드 ·
   표(신뢰센터 규격) · 상태 배지 · 타임라인 · 폼 · CTA 밴드
   ============================================================ */

/* --- 버튼 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-deep); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--blue-soft); }
.btn--ghost-light { border-color: rgba(255,255,255,0.4); color: #fff; background: transparent; }
.btn--ghost-light:hover { border-color: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* --- 헤더 / GNB --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h); background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow); }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; }
.logo__img { height: 28px; width: auto; }
.gnb { margin-left: auto; }
.gnb__list { list-style: none; display: flex; gap: 6px; }
.gnb__item { position: relative; }
.gnb__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px; font-size: 15px; font-weight: 600;
  color: var(--ink); border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.gnb__link:hover { color: var(--blue); background: var(--blue-soft); }
.gnb__item.is-active > .gnb__link { color: var(--blue); }
/* 헤더 우측 '상담 문의' CTA와 중복되는 항목 — 데스크톱에서는 감춘다 */
.gnb__item--cta-dup { display: none; }
.gnb__caret { font-size: 10px; color: var(--muted); }
.gnb__drop {
  list-style: none;
  position: absolute; top: calc(100% + 6px); left: 6px; min-width: 184px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.gnb__item:hover > .gnb__drop,
.gnb__item:focus-within > .gnb__drop { opacity: 1; visibility: visible; transform: none; }
.gnb__drop a {
  display: block; padding: 9px 12px;
  font-size: 14px; font-weight: 500; color: var(--ink); border-radius: 4px;
}
.gnb__drop a:hover { background: var(--blue-soft); color: var(--blue); }
.gnb__drop a.is-active { color: var(--blue); font-weight: 700; }
.header__actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
}
.menu-toggle span {
  width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(14, 28, 56, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.nav-scrim.is-show { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

/* --- 히어로 (다크+퍼플 — 홈·클로징 전용 톤) --- */
.hero {
  background: linear-gradient(135deg, var(--hero-bg) 0%, var(--hero-bg-2) 58%, #34255c 100%);
  color: #fff;
  padding: 88px 0 96px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.78); max-width: 520px; margin-top: 18px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero__chips span {
  font-size: 13px; font-weight: 600; padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__visual { margin: 0; min-width: 0; }
.hero__visual img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero__visual figcaption { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 8px; }

/* 히어로 이미지 교차 전환 — 같은 자리에 겹쳐 놓고 opacity만 바꾼다.
   자바스크립트가 없으면 첫 장이 그대로 보인다(정적 폴백). */
.hero__visual--slides { position: relative; }
.hero__visual--slides img { transition: opacity 0.9s ease; }
.hero__visual--slides img + img { position: absolute; inset: 0; height: 100%; opacity: 0; }
.hero__visual--slides img.is-current { opacity: 1; }
.hero__visual--slides img:not(.is-current) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero__visual--slides img { transition: none; }
}

/* --- 스탯 밴드 --- */
.stats-band { background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  text-align: center;
}
.stat-item {
  display: block;
  padding: 12px 6px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
a.stat-item:hover { background: var(--blue-soft); }
.stat-item strong { display: block; font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.stat-item span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* --- 카드: 사업축 라우팅 --- */
.axis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.axis-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.axis-card:hover { border-color: var(--blue); }
.axis-card__media { aspect-ratio: 16 / 9; background: var(--bg-alt); overflow: hidden; }
.axis-card__media img { width: 100%; height: 100%; object-fit: cover; }
.axis-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.axis-card h3 { font-size: 19px; }
.axis-card__value { font-size: 14px; color: var(--muted); flex: 1; }
.axis-card__proof { font-size: 13px; color: var(--blue-dark); font-weight: 600; }
.axis-card .btn { margin-top: 8px; align-self: flex-start; }

/* --- 카드: 역량 파이프라인 --- */
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.cap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.cap-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cap-grid--2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
.cap-card__no { font-size: 13px; font-weight: 700; color: var(--blue); }
.cap-card__cat { font-size: 13px; color: var(--muted); margin-left: 6px; }
.cap-card h3 { font-size: 20px; margin: 8px 0 8px; }
.cap-card p { font-size: 14px; color: var(--muted); }
.cap-card__link {
  display: inline-block; margin-top: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--blue);
}
.cap-card__link:hover { text-decoration: underline; text-underline-offset: 2px; }
.dark-banner {
  background: var(--navy-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

/* --- 칩 목록 (벤더·협력기관 등 나열) --- */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip-list li {
  font-size: 14px; font-weight: 600; color: var(--navy);
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}

/* --- 본문 인라인 링크 --- */
.text-link { color: var(--blue-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.text-link:hover { color: var(--blue); }

/* --- 콜아웃 (출처 고지·주의 문구 — 본문 톤) --- */
.callout {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.75;
}
.callout > strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 6px;
}

/* --- 표 (신뢰센터 표 규격 공통) --- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { min-width: 720px; font-size: 14px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; vertical-align: top; }
.data-table thead th {
  background: var(--navy-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.data-table tbody tr { border-top: 1px solid var(--line); }
.data-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.data-table tbody th { font-weight: 700; color: var(--navy); white-space: nowrap; }
.data-table td { color: var(--ink); }
.data-table .td-muted { color: var(--muted); }
.data-table .cell-list { list-style: none; display: grid; gap: 5px; }
.data-table .cell-list li { padding-left: 12px; position: relative; }
.data-table .cell-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--blue);
}
.data-table .td-strong { font-weight: 700; }

/* --- 상태 배지 --- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.5;
}
.badge--available { background: var(--st-available-bg); color: var(--st-available); }
.badge--poc { background: var(--st-poc-bg); color: var(--st-poc); }
.badge--green { background: var(--st-green-bg); color: var(--st-green); }
.badge--rnd { background: var(--st-rnd-bg); color: var(--st-rnd); }
.badge--b2g { background: var(--blue-soft); color: var(--blue-dark); }
.badge--b2b { background: var(--purple-soft); color: var(--st-rnd); }
.badge--neutral { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); }
.outlink-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}
.outlink-badge:hover { background: var(--blue-soft); }

/* --- 인증 배지 스트립 --- */
.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 96px; }
.badge-item img { width: 64px; height: 64px; }
.badge-item span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* --- 타임라인 (연혁 3구간 / 구축 절차 3단계 공용) --- */
.timeline-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  margin-bottom: 28px;
  /* 줄바꿈된 행의 마지막 항목이 그리는 선 끝을 트랙 안에서 잘라낸다. */
  overflow: hidden;
}
.timeline-item { position: relative; padding-top: 34px; }
/* 연결선은 트랙 전체 폭이 아니라 이웃한 두 점 사이에만 그린다.
   트랙 기준 퍼센트로 그리면 점 위치와 어긋난다 — 첫 점이 선에서 떨어지고
   마지막 점 뒤로 선이 남으며, 열이 3개가 아닌 변형(--4/--5)에서는 더 크게 벌어진다.
   점은 각 칼럼의 left:0에 20px로 찍히므로, 선을 점의 오른쪽 끝(20px)에서
   시작해 칼럼 폭(100%)만큼 그으면 다음 점의 왼쪽 끝에 정확히 닿는다.
   칼럼 수와 무관하게 성립하고 gap(20px)이 바뀔 때만 같이 조정하면 된다. */
.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 20px;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue);
  border: 4px solid var(--blue-soft);
}
.timeline-item__label { font-size: 14px; font-weight: 800; color: var(--blue); display: block; margin-bottom: 6px; }
.timeline-item h3 { font-size: 18px; margin-bottom: 10px; }
.timeline-item ul { list-style: none; display: grid; gap: 6px; }
.timeline-item li { font-size: 14px; color: var(--muted); padding-left: 14px; position: relative; }
.timeline-item li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.timeline-item li b { color: var(--ink); font-weight: 600; }

/* --- 대표 실적 풀블리드 배너 --- */
.featured { position: relative; min-height: min(64vh, 560px); color: #fff; overflow: hidden; }
.featured__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured__overlay {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: flex;
  align-items: flex-end;
  padding: 80px 0 64px;
  background: linear-gradient(180deg, rgba(14,28,56,0.2) 0%, rgba(14,28,56,0.62) 45%, rgba(14,28,56,0.92) 100%);
}
.featured__copy { max-width: 600px; }
.featured__copy .eyebrow { color: #9cc4ec; }
.featured__copy h2 { color: #fff; margin-bottom: 14px; }
.featured__copy p { color: rgba(255,255,255,0.85); margin-bottom: 26px; font-size: 16px; line-height: 1.7; }

/* --- 다운로드(자료실) 카드 --- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dl-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dl-card__meta { display: grid; gap: 5px; }
.dl-card__meta strong { font-size: 15px; color: var(--navy); }
.dl-card--disabled { background: var(--bg-alt); }
.dl-card--disabled .dl-card__meta strong { color: var(--muted); }

/* --- 폼 --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .form-field--full { grid-column: 1 / -1; }
.form-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 400;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form-check input { width: auto; margin-top: 3px; }
.form-note {
  grid-column: 1 / -1;
  padding: 16px 18px;
  background: var(--blue-soft);
  border: 1px solid #c8dcf0;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--navy);
  line-height: 1.7;
}
.form-note a { color: var(--blue-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.form-note[hidden] { display: none; }

/* --- 탭 (문의 B2B/B2G) --- */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--blue); }

/* --- CTA 밴드 (클로징 — 다크+퍼플 톤) --- */
.cta-band {
  background: linear-gradient(120deg, var(--hero-bg) 0%, var(--hero-bg-2) 55%, #3a2a63 100%);
  color: #fff;
  padding: 88px 0;
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); }
.cta-band .cta-band__slogan { color: var(--purple-bright); }
.cta-band p { color: rgba(255,255,255,0.78); margin-top: 16px; font-size: 16px; max-width: 620px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* --- 플로팅 상담 버튼 --- */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.floating-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}
.floating-contact__kakao { background: #fee500; color: #191919; }
.floating-contact__kakao:hover { background: #f5da00; }
.floating-contact__main { background: var(--navy); color: #fff; }
.floating-contact__main:hover { background: var(--navy-deep); }

/* --- 푸터 --- */
.site-footer { background: var(--navy-deep); color: #9fb0c8; padding: 56px 0 24px; }
/* GNB 항목 수가 늘어도 한 줄을 유지하도록 브랜드 열 + 자동 열 구성 */
.footer__grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(auto-fit, minmax(112px, 1fr));
  gap: 28px 20px;
  margin-bottom: 36px;
}
.footer__brand img { height: 36px; width: auto; margin-bottom: 16px; }
.footer__brand p { font-size: 13.5px; line-height: 1.7; }
.footer__brand a { color: #c4d3e8; text-decoration: underline; text-underline-offset: 2px; }
.site-footer strong { display: block; color: #fff; font-size: 13px; margin-bottom: 12px; }
.footer__col a { display: block; font-size: 14px; margin-bottom: 8px; transition: color 0.15s; }
.footer__col a:hover { color: #fff; }
.footer__copy { padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13px; display: grid; gap: 6px; }
.footer__copy a { text-decoration: underline; text-underline-offset: 2px; }
.footer__copy a:hover { color: #fff; }

/* --- 반응형: 1040 / 860 / 620 --- */
@media (max-width: 1040px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .axis-grid { grid-template-columns: 1fr; }
  .cap-grid, .cap-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .gnb {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 95;
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 12px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
  }
  .gnb.is-open { transform: none; opacity: 1; visibility: visible; }
  .gnb__list { flex-direction: column; gap: 2px; }
  .gnb__link { display: flex; width: 100%; padding: 12px 6px; font-size: 16px; }
  .gnb__caret { display: none; }
  .gnb__drop {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    padding: 0 0 6px 14px;
    margin-left: 6px;
  }
  .gnb__drop a { font-size: 14px; padding: 9px 6px; }
  .menu-toggle { display: flex; }
  .header__actions .btn { display: none; }
  /* 모바일은 CTA 버튼이 사라지므로 GNB '문의' 항목을 다시 노출 */
  .gnb__item--cta-dup { display: block; }
  /* 1열로 쌓이면 가로 연결선은 의미가 없다. */
  .timeline-track { grid-template-columns: 1fr; }
  .timeline-item:not(:last-child)::after { display: none; }
  .cta-band { padding: 68px 0; }
  .dl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid, .cap-grid--2, .cap-grid--3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .featured { min-height: 480px; }
  .floating-contact { right: 14px; bottom: 14px; }
  .floating-contact a { min-height: 42px; padding: 0 14px; font-size: 13px; }
}
