/* =============================================================
   OSBC Main Design — Common (Reset + Tokens + Layout + Header + Footer)
   ============================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--ff-base);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

/* SR-only */
.blind {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.blind-focus:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto; margin: 0;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand — OSBC CI 파랑(#37AAE0) 기반 톤 다운 */
  --c-primary: #1F7FB3;
  --c-primary-dark: #155A85;
  --c-primary-soft: #E1F1FA;

  /* Text */
  --c-text: #1a1a1a;
  --c-text-sub: #555;
  --c-text-mute: #888;
  --c-text-soft: #ccc;
  --c-text-on-dark: #fff;

  /* Background */
  --c-bg: #fff;
  --c-bg-alt: #f6f7fa;
  --c-bg-dark: #14192a;
  --c-bg-dark-2: #0f1428;
  --c-border: #e3e6ee;
  --c-border-soft: #eef0f5;

  /* Layout */
  --container-w: 1280px;
  --header-h: 80px;
  --pad-x: 40px;
  --gap: 20px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-header: 0 4px 16px rgba(0, 34, 122, 0.06);

  /* Type — 국문/영문 모두 Pretendard */
  --ff-base: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---------- Icon utility (currentColor 기반) ---------- */
.ico-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  flex-shrink: 0;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14M13 6l6 6-6 6'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14M13 6l6 6-6 6'/></svg>") center/contain no-repeat;
}
.ico-arrow-45 {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  flex-shrink: 0;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M7 17L17 7M9 7h8v8'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M7 17L17 7M9 7h8v8'/></svg>") center/contain no-repeat;
}

/* =============================================================
   Header (GNB) — design3 기반
   - 풀와이드 fixed, inner는 1280
   - 기본: 투명 + 흰 글씨
   - 스크롤시(.is-scrolled): 흰 배경 + 남색 글씨
   ============================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header-inner {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  height: 100%;
}
.header-logo a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.header-logo img {
  display: block;
  height: 22px;
  width: auto;
}

/* Nav (GNB) */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.header-nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-nav-item {
  position: relative;
}
.header-link {
  display: inline-flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.3s ease;
}
.header-link:hover { opacity: 0.75; }

/* Mega Menu — 통합 패널 (4 카테고리 동시 노출, DB Hitek 패턴) */
.header-mega {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--c-border);
  box-shadow: 0 16px 40px rgba(0, 34, 122, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}
.header-nav:hover .header-mega,
.header-mega:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header-mega-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 32px var(--pad-x) 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.header-mega-cat {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-primary);
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
}
.header-mega-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-mega-list a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}
.header-mega-list a:hover {
  background: var(--c-primary-soft);
}
.header-mega-list strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  transition: color 0.2s ease;
}
.header-mega-list a:hover strong {
  color: var(--c-primary);
}
.header-mega-list span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--c-text-mute);
  line-height: 1.4;
}

/* 메가메뉴 펼친 상태 — 헤더 자체도 흰 배경 + 남색 글씨 */
.header:has(.header-nav:hover),
.header:has(.header-mega:hover) {
  background: #fff;
  box-shadow: var(--shadow-header);
}
.header:has(.header-nav:hover) .header-link,
.header:has(.header-mega:hover) .header-link {
  color: var(--c-text);
}
.header:has(.header-nav:hover) .header-link:hover,
.header:has(.header-mega:hover) .header-link:hover {
  color: var(--c-primary);
  opacity: 1;
}
.header:has(.header-nav:hover) .header-cta,
.header:has(.header-mega:hover) .header-cta {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.header:has(.header-nav:hover) .header-cta:hover,
.header:has(.header-mega:hover) .header-cta:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: #fff;
}

/* Right CTA — "CONTACT US" 캡슐 버튼 */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  height: 40px;
  padding: 0 22px;
  border: 1.5px solid #fff;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.header-cta:hover {
  background: #fff;
  color: var(--c-primary);
  border-color: #fff;
}

/* Scrolled / Light state */
.header.is-scrolled,
.header.is-light {
  background: #fff;
  box-shadow: var(--shadow-header);
}
.header.is-scrolled .header-link,
.header.is-light .header-link {
  color: var(--c-text);
}
.header.is-scrolled .header-link:hover,
.header.is-light .header-link:hover {
  color: var(--c-primary);
  opacity: 1;
}
.header.is-scrolled .header-cta,
.header.is-light .header-cta {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.header.is-scrolled .header-cta:hover,
.header.is-light .header-cta:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: #fff;
}

/* =============================================================
   Footer — 와이어프레임 형태 그대로
   ============================================================= */
.footer {
  background: var(--c-bg-dark);
  color: #bbb;
  padding: 80px var(--pad-x) 40px;
}
.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #333;
}
.footer-brand .footer-logo {
  margin-bottom: 24px;
  line-height: 1;
}
.footer-brand .footer-logo img {
  display: block;
  height: 26px;
  width: auto;
}
.footer-info {
  font-size: 15px;
  line-height: 1.75;
  color: #999;
}
.footer-info strong {
  color: #fff;
  font-weight: 600;
}
.footer-col-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: #999;
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-size: 12px;
  color: #666;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a {
  color: #999;
  transition: color 0.2s ease;
}
.footer-legal a:hover { color: #fff; }
