/* ============================================
   HMS — CNC 정밀 금형 | 공통 스타일
   컨셉: 다크 메탈 + 인더스트리얼 오렌지
   ============================================ */

:root {
  --bg-dark: #10151b;        /* 메인 배경 (차콜) */
  --bg-panel: #1a2129;       /* 패널/카드 배경 */
  --bg-panel2: #212a34;      /* 카드 호버/보조 */
  --line: #2e3946;           /* 구분선 */
  --accent: #ff7a1a;         /* 인더스트리얼 오렌지 */
  --accent-dim: #cc5f0f;
  --steel: #8fa3b8;          /* 스틸 그레이-블루 (보조 텍스트) */
  --text: #e8edf2;
  --text-dim: #aab6c2;
  --white: #ffffff;
  --max-w: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16, 21, 27, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ffa245);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; color: #16100a; letter-spacing: 0;
}
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: 0.06em; }
.logo-text small {
  display: block; font-size: 10.5px; font-weight: 500;
  color: var(--steel); letter-spacing: 0.14em; line-height: 1.2;
}

.gnb { display: flex; gap: 4px; align-items: center; }
.gnb a {
  padding: 9px 16px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--text-dim);
  transition: all .18s;
}
.gnb a:hover { color: var(--white); background: var(--bg-panel2); }
.gnb a.active { color: var(--accent); }
.gnb a.gnb-cta {
  background: var(--accent); color: #16100a; font-weight: 700;
  margin-left: 10px;
}
.gnb a.gnb-cta:hover { background: #ff9042; color: #16100a; }

/* 모바일 메뉴 버튼 */
.menu-btn {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; color: var(--text);
  font-size: 18px; cursor: pointer;
}

/* 헤더 우측 묶음 + 언어 전환 */
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: flex; gap: 2px; border: 1px solid var(--line);
  border-radius: 8px; padding: 3px;
}
.lang-switch button {
  background: none; border: none; color: var(--steel);
  font-size: 12.5px; font-weight: 800; padding: 5px 10px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
  letter-spacing: 0.04em; transition: all .15s;
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button.on { background: var(--accent); color: #16100a; }

/* ---------- 페이지 히어로(서브페이지 상단) ---------- */
.page-hero {
  padding: 72px 0 56px;
  background:
    linear-gradient(180deg, rgba(255,122,26,0.06), transparent 60%),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,0.025) 79px, rgba(255,255,255,0.025) 80px);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-hero .crumb {
  font-size: 13px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { margin-top: 12px; color: var(--text-dim); font-size: 17px; }

/* ---------- 섹션 공통 ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-panel); }
.sec-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 12px;
}
.sec-title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.sec-desc { color: var(--text-dim); font-size: 16.5px; max-width: 640px; }
.sec-head { margin-bottom: 48px; }
.sec-head.center { text-align: center; }
.sec-head.center .sec-desc { margin: 0 auto; }

/* ---------- 카드 그리드 ---------- */
.grid { display: grid; gap: 22px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 26px;
  transition: transform .2s, border-color .2s;
}
.section.alt .card { background: var(--bg-panel2); }
.card:hover { transform: translateY(-4px); border-color: var(--accent-dim); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(255,122,26,0.12); border: 1px solid rgba(255,122,26,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--text-dim); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 32px; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all .18s; border: none;
}
.btn-primary { background: var(--accent); color: #16100a; }
.btn-primary:hover { background: #ff9042; transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 표 ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { padding: 15px 18px; text-align: center; }
table.tbl thead th {
  background: var(--bg-panel2); color: var(--white);
  font-weight: 700; border-bottom: 2px solid var(--accent);
  white-space: nowrap;
}
table.tbl tbody tr { border-bottom: 1px solid var(--line); }
table.tbl tbody tr:last-child { border-bottom: none; }
table.tbl tbody tr:hover { background: rgba(255,122,26,0.04); }
table.tbl td { color: var(--text-dim); }
table.tbl td strong { color: var(--text); }

/* ---------- 자리표시자 (자료 확보 후 교체) ---------- */
.placeholder {
  border: 2px dashed #3d4b5c; border-radius: 14px;
  background: rgba(143,163,184,0.05);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 20px; text-align: center;
  color: var(--steel); font-size: 14.5px;
}
.placeholder .ph-icon { font-size: 34px; }
.placeholder strong { color: var(--text-dim); font-size: 15.5px; }

/* ---------- CTA 밴드 ---------- */
.cta-band {
  background:
    linear-gradient(120deg, rgba(255,122,26,0.14), rgba(255,122,26,0.03)),
    var(--bg-panel);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 72px 0; text-align: center;
}
.cta-band h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: var(--text-dim); margin-bottom: 30px; font-size: 16.5px; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 40px; font-size: 14px; color: var(--steel);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  margin-bottom: 36px;
}
.footer-grid h4 { color: var(--text); font-size: 15px; margin-bottom: 14px; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px;
}

/* ---------- 스텝(공정 흐름) ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.step {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 20px; position: relative;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  font-size: 30px; font-weight: 900; color: var(--accent);
  display: block; margin-bottom: 12px; letter-spacing: -0.02em;
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-hero h1 { font-size: 32px; }
  .sec-title { font-size: 27px; }
}
@media (max-width: 640px) {
  .gnb { display: none; }
  .menu-btn { display: none; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .page-hero h1 { font-size: 27px; }
}

/* ---------- 모바일 하단 탭바 ---------- */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(16, 21, 27, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 9px 2px calc(9px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 700; color: var(--steel);
    letter-spacing: -0.02em; text-align: center;
  }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a:active { opacity: 0.7; }
}
