/* =====================================================================
   Netbitex - 분석·계측기기 카탈로그 사이트
   style.css : 디자인 시스템 + 공통 컴포넌트 + 페이지 스타일
   목차
   1. 디자인 토큰(변수)
   2. 리셋 & 기본
   3. 레이아웃 유틸
   4. 헤더 / 네비게이션
   5. 버튼
   6. 히어로
   7. 섹션 공통
   8. 카드(카테고리/제품)
   9. 필터 바
   10. 푸터
   11. 서브 페이지(about/contact)
   12. 반응형
   ===================================================================== */

/* 1. 디자인 토큰 ----------------------------------------------------- */
:root {
  /* 색상 */
  --color-primary: #1f63b8;        /* 시그니처 블루 (로고 컬러) */
  --color-primary-dark: #154a8c;
  --color-navy: #0f1b2d;
  --color-navy-light: #1d2d44;
  --color-text: #1f2733;
  --color-text-muted: #5b6776;
  --color-border: #e4e8ee;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f7fa;
  --color-bg-dark: #0f1b2d;

  /* 타이포 */
  --font-sans: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Malgun Gothic", sans-serif;

  /* 간격 / 반경 / 그림자 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.08);
  --shadow-md: 0 6px 20px rgba(15, 27, 45, 0.1);
  --shadow-lg: 0 16px 40px rgba(15, 27, 45, 0.14);

  --container: 1180px;
  --header-h: 72px;
  --transition: 0.25s ease;
}

/* 2. 리셋 & 기본 ---------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-navy);
}

/* 3. 레이아웃 유틸 --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section--soft {
  background: var(--color-bg-soft);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

.section-head p {
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* 4. 헤더 / 네비게이션 ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

.logo .logo-img {
  height: 34px;
  width: auto;
  display: block;
}

/* 푸터(어두운 배경)에서는 로고 텍스트가 보이도록 흰색으로 반전 */
.site-footer .logo .logo-img {
  filter: brightness(0) invert(1);
  height: 32px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
}

/* 견적 문의 버튼은 파란 배경 위 흰색 글씨 유지 (.nav a 보다 우선) */
.nav a.btn--primary,
.nav a.btn--primary:hover,
.nav a.btn--primary.active {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  transition: var(--transition);
}

/* 5. 버튼 ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 6. 히어로 --------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(31, 99, 184, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 96px;
  padding-bottom: 96px;
  max-width: 820px;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #8db8ec;
  margin-bottom: 18px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin-top: 22px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 56px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stats .stat strong {
  display: block;
  font-size: 2rem;
  color: #fff;
}

.hero-stats .stat span {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

/* 7. 섹션 공통 그리드 ----------------------------------------------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid--cats {
  grid-template-columns: repeat(3, 1fr);
}

.grid--products {
  grid-template-columns: repeat(3, 1fr);
}

/* 8. 카드 ----------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* 카테고리 카드 */
.cat-card .cat-icon {
  font-size: 2rem;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  margin-bottom: 18px;
}

.cat-card h3 {
  font-size: 1.2rem;
}

.cat-card .cat-short {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.cat-card p {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.cat-card .cat-link {
  margin-top: 18px;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-card .cat-link::after {
  content: "→";
  transition: transform var(--transition);
}

.cat-card:hover .cat-link::after {
  transform: translateX(4px);
}

/* 제품 카드 */
.product-card {
  padding: 0;
  overflow: hidden;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #f3f6fb 0%, #e9eef6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform var(--transition);
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-media-fallback {
  display: none;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  opacity: 0.55;
}

.product-media.no-img .product-media-fallback {
  display: block;
}

.product-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-card .product-model {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: rgba(31, 99, 184, 0.1);
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-top: 4px;
}

.product-card .product-tagline {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.product-card .product-desc {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.product-card .product-specs {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card .product-specs li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--color-text);
}

.product-card .product-specs li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.product-card .product-cat-tag {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.badge-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--color-primary);
  padding: 4px 9px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(15, 27, 45, 0.25);
}

/* 9. 필터 바 -------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.result-count {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* 10. 푸터 ---------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .logo {
  color: #fff;
}

.site-footer p {
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* 11. 서브 페이지 --------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.page-hero p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
}

/* about */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.value-card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.value-card .num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
}

.value-card h3 {
  margin-top: 8px;
  font-size: 1.15rem;
}

.value-card p {
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose p {
  margin-top: 18px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info li {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-info .ci-icon {
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
}

.contact-info strong {
  display: block;
  color: var(--color-navy);
}

.contact-info span {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(31, 99, 184, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 7px;
  line-height: 1.5;
}

.field-warn {
  display: none;
  font-size: 0.84rem;
  color: #b3261e;
  margin-top: 7px;
  line-height: 1.5;
}

.field-warn.show {
  display: block;
}

.form-group input.invalid {
  border-color: #b3261e;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 14px;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #e7f7ed;
  color: #137a3b;
  font-size: 0.92rem;
}

.form-success.show {
  display: block;
}

.form-error {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fdecec;
  color: #b3261e;
  font-size: 0.92rem;
}

.form-error.show {
  display: block;
}

/* 스팸 봇 차단용 허니팟 — 화면에서 숨김 */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* CTA 배너 */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.cta-banner p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-banner .btn {
  margin-top: 28px;
  background: #fff;
  color: var(--color-primary);
}

.cta-banner .btn:hover {
  background: var(--color-navy);
  color: #fff;
  transform: translateY(-2px);
}

/* 12. 반응형 -------------------------------------------------------- */
@media (max-width: 960px) {
  .grid--cats,
  .grid--products {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform var(--transition);
  }
  .nav.open {
    transform: translateY(0);
  }
  .nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav .btn {
    margin-top: 12px;
    width: 100%;
  }
  .nav-toggle {
    display: flex;
  }
  .section {
    padding: 60px 0;
  }
  .grid--cats,
  .grid--products {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    padding: 40px 24px;
  }
  .hero-stats {
    gap: 28px;
  }
}
