/* ============================================================
   세경하이테크 사이트 공통 스타일시트
   Apple 미니멀 디자인 · 3개 사업부 테마 통합
   (theme-hip / theme-clavis / theme-instruments)
   ============================================================ */

/* ============ 1. CSS Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard",
               "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 22px; }
li { line-height: 1.7; }

/* ============ 2. 컬러 변수 ============ */
:root {
  /* Brand colors */
  --hip: #b91c1c;
  --hip-dark: #7f1d1d;
  --clavis: #0c5a96;
  --clavis-light: #e8f0fb;
  --clavis-navy: #0a1628;
  --instruments: #6d28d9;        /* 계측기: 보라 (HIP·CLAVIS와 명확히 구분) */
  --instruments-light: #ede9fe;

  /* Neutrals (Apple grayscale) */
  --white: #ffffff;
  --black: #1d1d1f;
  --gray1: #424245;
  --gray2: #6e6e73;
  --gray3: #86868b;
  --gray4: #a1a1a6;
  --gray5: #d2d2d7;
  --gray6: #e8e8ed;
  --gray7: #f5f5f7;
}

/* ============ 3. Typography ============ */
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--black);
  margin: 0;
}
.section-title-center { text-align: center; }
.section-lead {
  font-size: 17px;
  color: var(--gray2);
  line-height: 1.6;
  margin: 18px 0 0;
}

/* ============ 4. 상단 Navigation ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--gray6);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-mark {
  width: 128px;
  height: 30px;
  border-radius: 0;
  background: url(sekyung-logo.png) left center / contain no-repeat;
}
.nav-logo-text {
  display: none;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--gray1);
  border-radius: 980px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--gray7); color: var(--black); }
.nav-links a.active { color: var(--black); font-weight: 500; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-phone {
  font-size: 13.5px;
  color: var(--gray1);
  font-variant-numeric: tabular-nums;
}
.nav-phone:hover { color: var(--black); }
.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  padding: 8px 18px;
  border-radius: 980px;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--gray1); }

/* ============ 5. Subpage 레이아웃 (사이드바 + 콘텐츠) ============ */
.subpage-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 28px 80px;
  gap: 60px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  padding: 8px 0;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  padding: 0 0 14px;
  border-bottom: 1px solid var(--gray6);
  margin-bottom: 14px;
}
.sidebar-section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gray3);
  margin: 20px 0 6px;
  padding: 0 12px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--gray1);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-item:hover {
  background: var(--gray7);
  color: var(--black);
}
.sidebar-item.active {
  color: var(--black);
  background: var(--gray7);
  font-weight: 500;
}
.sidebar-item .num {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray3);
  font-variant-numeric: tabular-nums;
  min-width: 18px;
}

/* ============ 6. Subpage Content ============ */
.subpage-content {
  min-width: 0;
  max-width: 800px;
}
.subpage-content h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 18px 0 28px;
  color: var(--black);
}
.subpage-content h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 56px 0 18px;
  color: var(--black);
}
.subpage-content h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
  margin: 32px 0 12px;
  color: var(--black);
}
.subpage-content h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--black);
}
.subpage-content p {
  color: var(--gray1);
  line-height: 1.7;
  margin: 0 0 16px;
}
.subpage-content ul, .subpage-content ol {
  color: var(--gray1);
}
.subpage-content ul li { margin-bottom: 6px; }
.subpage-content img {
  width: 100%;
  border-radius: 10px;
  margin: 16px 0 8px;
  background: var(--gray7);
}
.subpage-content a {
  color: var(--black);
  border-bottom: 1px solid var(--gray5);
  transition: border-color 0.15s;
}
.subpage-content a:hover { border-bottom-color: var(--black); }
.subpage-content strong { font-weight: 600; color: var(--black); }

/* ============ 7. Breadcrumb ============ */
.breadcrumb {
  font-size: 12.5px;
  color: var(--gray3);
  margin-bottom: 0;
}
.breadcrumb a { color: var(--gray2); border: none; }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb .sep { margin: 0 8px; color: var(--gray4); }

/* ============ 8. Grid / Card 컴포넌트 ============ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 18px 0 24px;
}
.grid-card {
  background: var(--gray7);
  border-radius: 12px;
  padding: 22px 22px;
}
.grid-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 10px;
}
.grid-card p {
  font-size: 14px;
  color: var(--gray1);
  margin: 0;
  line-height: 1.6;
}
.grid-card ul {
  margin: 0;
  padding-left: 18px;
}
.grid-card li {
  font-size: 13.5px;
  color: var(--gray1);
  margin-bottom: 4px;
  line-height: 1.6;
}

/* ============ 9. Callout ============ */
.callout {
  background: var(--gray7);
  border-left: 3px solid var(--gray2);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.callout p {
  font-size: 14.5px;
  color: var(--gray1);
  margin: 0;
  line-height: 1.65;
}

/* ============ 10. Spec Table ============ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 28px;
  font-size: 14px;
}
.spec-table th,
.spec-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gray6);
  line-height: 1.6;
}
.spec-table th {
  width: 28%;
  font-weight: 600;
  color: var(--black);
  background: var(--gray7);
}
.spec-table td { color: var(--gray1); }
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: none; }

/* ============ 11. Image Caption ============ */
.img-caption {
  font-size: 12.5px;
  color: var(--gray3);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
  font-style: italic;
}

/* ============ 12. Next/Prev 페이지 네비 ============ */
.next-prev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--gray6);
}
.next-prev a {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--gray7);
  border-radius: 10px;
  border: none;
  transition: background 0.15s;
}
.next-prev a:hover { background: var(--gray6); }
.next-prev a.next { text-align: right; }
.next-prev .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray3);
  margin-bottom: 4px;
  font-weight: 500;
}
.next-prev .title {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}

/* ============ 13. Footer ============ */
.site-footer {
  background: var(--gray7);
  padding: 60px 28px 28px;
  margin-top: 0;
}
.footer-top {
  max-width: 1280px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-logo-mark {
  width: 156px;
  height: 42px;
  border-radius: 0;
  background: url(sekyung-logo.png) left center / contain no-repeat;
}
.footer-brand {
  display: none;
}
.footer-brand-sub {
  font-size: 12.5px;
  color: var(--gray2);
  line-height: 1.7;
}
.footer-links-group h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray2);
  margin: 4px 0 16px;
}
.footer-links-group a {
  display: block;
  font-size: 13px;
  color: var(--gray1);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-links-group a:hover { color: var(--black); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--gray6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-copy {
  font-size: 12px;
  color: var(--gray3);
}
.footer-legal {
  display: flex;
  gap: 18px;
}
.footer-legal a {
  font-size: 12px;
  color: var(--gray3);
}
.footer-legal a:hover { color: var(--black); }

/* ============ 14. 메인 페이지 공통 (hipkorea_main.html) ============ */
.hero {
  padding: 80px 28px 60px;
  text-align: center;
  background: var(--white);
}
.hero-eyebrow {
  font-size: 12px;
  color: var(--gray2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--black);
  margin: 0 0 18px;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--gray2);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  padding: 13px 28px;
  border-radius: 980px;
  border: none;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--gray1); }
.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  background: transparent;
  padding: 12px 27px;
  border-radius: 980px;
  border: 1px solid var(--gray5);
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover { background: var(--gray7); border-color: var(--gray4); }

/* 사업 도메인 카드 (메인 페이지) */
.domains-section { padding: 80px 28px; max-width: 1280px; margin: 0 auto; }
.domains-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.domain-card {
  background: var(--gray7);
  border-radius: 18px;
  padding: 36px 30px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 3px solid transparent;
}
.domain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.06);
}
.domain-card.c-red { border-top-color: var(--hip); }
.domain-card.c-blue { border-top-color: var(--clavis); }
.domain-card.c-clavis { border-top-color: var(--clavis); }
.domain-num {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--gray2);
}
.domain-icon { font-size: 28px; }
.domain-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
}
.domain-desc {
  font-size: 14px;
  color: var(--gray2);
  line-height: 1.6;
  flex: 1;
}
.domain-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--black);
  margin-top: 4px;
}

/* feature row (메인 페이지 - 좌우 분할 섹션) */
.feature-section { padding: 80px 28px; background: var(--gray7); }
.feature-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 72px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-text h3 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 8px 0 14px;
}
.feature-text p {
  font-size: 16px;
  color: var(--gray2);
  line-height: 1.65;
  margin: 0 0 18px;
}
.feature-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  border-bottom: 1px solid var(--gray4);
  padding-bottom: 2px;
}
.feature-image {
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
  aspect-ratio: 4 / 3;
}
.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

/* About 섹션 (메인) */
.about-section { padding: 80px 28px; max-width: 1100px; margin: 0 auto; text-align: center; }
.about-inner { max-width: 800px; margin: 0 auto; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
.about-stat-num {
  font-size: 36px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.025em;
  line-height: 1;
}
.about-stat-label {
  font-size: 12px;
  color: var(--gray2);
  margin-top: 8px;
}

/* Contact 섹션 (메인) */
.contact-section { padding: 80px 28px; background: var(--gray7); }
.contact-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-left { padding-top: 6px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.contact-item-content { display: flex; flex-direction: column; gap: 2px; }
.contact-item-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray3);
  font-weight: 500;
}
.contact-item-val {
  font-size: 15px;
  color: var(--black);
  font-weight: 500;
}

/* ============ 15. HIP 테마 ============ */
body.theme-hip .nav-cta { background: var(--hip); }
body.theme-hip .nav-cta:hover { background: var(--hip-dark); }
body.theme-hip .nav-links a.active { color: var(--hip); }
body.theme-hip .sidebar-title { color: var(--hip); }
body.theme-hip .sidebar-item.active {
  color: var(--hip);
  background: rgba(185, 28, 28, 0.06);
  border-right: 2px solid var(--hip);
}
body.theme-hip .sidebar-item.active .num { color: var(--hip); }
body.theme-hip .breadcrumb a:hover { color: var(--hip); }
body.theme-hip .subpage-content a:hover { border-bottom-color: var(--hip); color: var(--hip); }
body.theme-hip .next-prev .label { color: var(--hip); }
body.theme-hip .callout { border-left-color: var(--hip); background: rgba(185, 28, 28, 0.04); }
/* footer 로고는 공통 SEKYUNG 로고 이미지 사용 — 테마별 색상 override 제거 */
body.theme-hip .footer-links-group a:hover { color: var(--hip); }

/* ============ 16. CLAVIS 테마 ============ */
body.theme-clavis .nav-cta { background: var(--clavis); }
body.theme-clavis .nav-cta:hover { background: var(--clavis-navy); }
body.theme-clavis .nav-links a.active { color: var(--clavis); }
body.theme-clavis .sidebar-title { color: var(--clavis); }
body.theme-clavis .sidebar-item.active {
  color: var(--clavis);
  background: var(--clavis-light);
  border-right: 2px solid var(--clavis);
}
body.theme-clavis .sidebar-item.active .num { color: var(--clavis); }
body.theme-clavis .breadcrumb a:hover { color: var(--clavis); }
body.theme-clavis .subpage-content a:hover { border-bottom-color: var(--clavis); color: var(--clavis); }
body.theme-clavis .next-prev .label { color: var(--clavis); }
body.theme-clavis .callout {
  border-left-color: var(--clavis);
  background: var(--clavis-light);
}
body.theme-clavis .footer-links-group a:hover { color: var(--clavis); }

/* ============ 17. 계측기 테마 (보라색 계열 - HIP/CLAVIS와 명확히 구분) ============ */
body.theme-instruments .nav-cta { background: var(--instruments); }
body.theme-instruments .nav-cta:hover { background: #5b21b6; }
body.theme-instruments .nav-links a.active { color: var(--instruments); }
body.theme-instruments .sidebar-title { color: var(--instruments); }
body.theme-instruments .sidebar-item.active {
  color: var(--instruments);
  background: var(--instruments-light);
  border-right: 2px solid var(--instruments);
}
body.theme-instruments .sidebar-item.active .num { color: var(--instruments); }
body.theme-instruments .breadcrumb a:hover { color: var(--instruments); }
body.theme-instruments .subpage-content a:hover { border-bottom-color: var(--instruments); color: var(--instruments); }
body.theme-instruments .next-prev .label { color: var(--instruments); }
body.theme-instruments .callout {
  border-left-color: var(--instruments);
  background: var(--instruments-light);
}
body.theme-instruments .footer-links-group a:hover { color: var(--instruments); }

/* ============ 18. 반응형 ============ */
@media (max-width: 1024px) {
  .subpage-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .sidebar {
    position: relative;
    top: 0;
    padding: 16px;
    background: var(--gray7);
    border-radius: 12px;
    margin-bottom: 16px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .domains-grid {
    grid-template-columns: 1fr;
  }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 768px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  .nav-links a { white-space: nowrap; }
  .nav-phone { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .next-prev { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .subpage-layout { padding: 24px 18px 60px; }
  .subpage-content h1 { font-size: 28px; }
  .subpage-content h2 { font-size: 20px; margin-top: 40px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
