/* ------------------------------------------------------------------
   S.O.X — 디자인 시스템 (Industry blueprint)
   "S.O.X 홈페이지 제작" 시안(_ds/industry.../styles.css)을 정적 사이트용으로
   정리한 파일. main.jsp / technology.jsp 가 공통으로 사용한다.
   ------------------------------------------------------------------ */

:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --color-neutral-100: #f5f5f8;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --font-heading: "Barlow Condensed", "IBM Plex Sans KR", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", "IBM Plex Sans KR", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;

  --radius-md: 4px;
  --radius-lg: 7px;

  --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2b2d 22%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  text-wrap: pretty;
  word-break: keep-all;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }

p { margin: 0 0 var(--space-3); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px;
  margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

a { color: var(--color-accent-700); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-900); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — 블루프린트 프레임 — */
.blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
.blueprint.duotone { overflow: visible; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before,
.blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* — 이미지 프레임 (시안의 image-slot 대체) — */
.frame { position: relative; overflow: hidden; background: #fff; }
.frame > img { width: 100%; height: 100%; object-fit: cover; }
.frame.contain > img { object-fit: contain; background: #fff; }
/* 이미지에 살짝 안쪽 여백 — 박스 테두리에 그림이 닿지 않게 */
.frame-pad { padding: 10px; background: #fff; }
.frame-pad > img { width: 100%; height: 100%; object-fit: contain; }
.frame.duotone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--color-accent); mix-blend-mode: color;
}
.blueprint > .frame-inner { position: absolute; inset: 0; overflow: hidden; }

/* — 버튼 — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 0;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-600); color: #d4d4d7; }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* — 폼 — */
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: 0;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }

/* — 태그 — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 0;
}

/* — 네비게이션 — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.nav a:not(.btn) { color: inherit; text-decoration: none; font-size: 14px; }

/* — 표 — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.table td.notice-title { cursor: pointer; }
.table td.notice-title:hover { color: var(--color-accent-700); }

/* — 다이얼로그 — */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: 0;
  background: var(--color-bg); border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-lg);
}
.dialog-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 20px; }
.dialog-body { font-size: 14px; opacity: 0.85; }

/* — 언어 전환 — 헤더의 .btn 과 같은 높이·타이포로 맞춘 드롭다운 — */
.lang-select {
  flex: none; align-self: center;
  box-sizing: border-box; height: 30px;
  padding: 0 27px 0 10px; margin: 0;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 28px; letter-spacing: 0.04em;
  color: var(--color-text);
  background-color: transparent;
  border: 1px solid var(--color-divider); border-radius: 0;
  cursor: pointer;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  /* 각진 시안 톤에 맞춘 얇은 셰브런 */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M0.5 0.5 L4.5 4.5 L8.5 0.5' fill='none' stroke='%231d1f20' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 9px 6px;
}
.lang-select::-ms-expand { display: none; }
.lang-select:hover { background-color: color-mix(in srgb, var(--color-text) 7%, transparent); }
.lang-select:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.lang-select option {
  font-family: var(--font-body); font-size: 14px;
  color: var(--color-text); background: var(--color-bg);
}

/* 펼쳐진 목록까지 디자인에 맞추기 — 표준 커스터마이즈 가능 select(base-select)를
   지원하는 브라우저에서 적용된다. 미지원 브라우저는 위의 기본 목록으로 동작한다. */
@supports (appearance: base-select) {
  .lang-select {
    appearance: base-select;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 10px; background-image: none;
  }
  .lang-select::picker-icon {
    color: color-mix(in srgb, var(--color-text) 55%, transparent);
    transition: transform 140ms ease;
  }
  .lang-select:open::picker-icon { transform: rotate(180deg); }

  .lang-select::picker(select) {
    appearance: base-select;
    margin-top: 5px; padding: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-divider); border-radius: 0;
    box-shadow: var(--shadow-lg);
  }
  .lang-select option {
    display: block; padding: 8px 12px; border: 0; border-radius: 0;
    font-family: var(--font-body); font-size: 13px; line-height: 1.5;
    color: var(--color-text); background: transparent;
  }
  .lang-select option + option { border-top: 1px solid var(--color-divider); }
  .lang-select option:hover,
  .lang-select option:focus { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
  .lang-select option:checked { background: var(--color-accent); color: var(--color-bg); }
  .lang-select option::checkmark { display: none; }
}

/* — 진입 공지 토스트 (우측 하단) — */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: min(340px, calc(100vw - 36px));
  display: none; flex-direction: column; gap: var(--space-3);
  padding: 18px; background: var(--color-bg);
  box-shadow: var(--shadow-lg);
  animation: toast-in 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.is-open { display: flex; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 640px) {
  .toast { right: 14px; left: 14px; bottom: 14px; width: auto; }
}

/* — 페이지 레이아웃 — */
.page { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.topbar { position: sticky; top: 0; z-index: 40; background: var(--color-bg); }
.topbar .nav {
  border-bottom: 1px solid var(--color-divider);
  padding: 13px max(24px, calc((100% - 1240px) / 2 + 24px));
  gap: 26px; flex-wrap: wrap;
}
.nav-link {
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
  border-bottom: 2px solid transparent; padding-bottom: 3px;
}
.nav-link[aria-current="page"] { color: var(--color-text); border-bottom-color: var(--color-accent); }
.subnav { border-bottom: 1px solid var(--color-divider); background: color-mix(in srgb, var(--color-text) 4%, transparent); overflow-x: auto; }
.subnav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 26px; white-space: nowrap; }
.subnav a {
  display: flex; gap: 7px; padding: 10px 0; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.subnav a > span { font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--color-text) 40%, transparent); }

.section-kicker {
  margin: 0 0 12px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700);
}
.rule { height: 1px; border: 0; background: var(--color-divider); }
.label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.muted { color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.num { font-variant-numeric: tabular-nums; }

/* — 반응형 — */
@media (max-width: 900px) {
  .cols-7-5, .cols-6-5, .cols-5-6 { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-figs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .history-row { grid-template-columns: 64px minmax(0, 1fr) !important; gap: 0 18px !important; }
  .side-label { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) {
  .topbar .nav { gap: 14px; padding: 11px 18px; }
  .page { padding: 0 18px; }
  .hero-figs { grid-template-columns: minmax(0, 1fr) !important; }
  .stat-row { grid-template-columns: minmax(0, 1fr) !important; }
  .stat-row > div { border-right: 0 !important; padding: 12px 0 !important; border-bottom: 1px solid var(--color-divider); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Industries: 대표 이미지 + 썸네일 */
.ind-media { min-width: 0; }
.ind-thumbs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px; margin-top: 10px;
}
.ind-thumb {
  padding: 0; margin: 0; cursor: pointer; overflow: hidden;
  aspect-ratio: 4/3; border: 1px solid var(--color-divider);
  background: transparent; border-radius: 0;
  transition: border-color 160ms ease, opacity 160ms ease;
  opacity: 0.65;
}
.ind-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ind-thumb:hover { opacity: 1; }
.ind-thumb.is-active { border-color: var(--color-accent); opacity: 1; }
@media (max-width: 720px) {
  .ind-thumbs { gap: 6px; }
}

/* Industries: 이미지 확대 보기 */
.ind-media [data-ind-main] { cursor: zoom-in; }
/* 링크 안에 있지 않은 프레임 이미지는 클릭해서 크게 볼 수 있다. */
.frame > img { cursor: zoom-in; }
a .frame > img { cursor: pointer; }
.no-zoom .frame > img, [data-no-zoom] .frame > img { cursor: default; }
.ind-lb-img { cursor: default; }
.ind-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, #000 82%, transparent);
}
.ind-lb-img {
  max-width: min(1200px, 100%); max-height: 100%;
  object-fit: contain; display: block; background: #000;
}
.ind-lb-nav, .ind-lb-close {
  flex: none; cursor: pointer; border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35); color: #fff; border-radius: 0;
  font-family: var(--font-heading); font-size: 16px; line-height: 1;
  width: 42px; height: 42px; padding: 0;
  transition: background 160ms ease, border-color 160ms ease;
}
.ind-lb-nav:hover, .ind-lb-close:hover { background: rgba(255,255,255,0.16); border-color: #fff; }
.ind-lb-close { position: absolute; top: 18px; right: 18px; }
.ind-lb-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
}
@media (max-width: 720px) {
  .ind-lightbox { gap: 8px; padding: 12px; }
  .ind-lb-nav, .ind-lb-close { width: 36px; height: 36px; font-size: 14px; }
}

/* Service 카드: 해당 서비스 이미지를 워터마크 배경으로 */
.svc-card { position: relative; isolation: isolate; }  /* corner 가 밖으로 나가므로 overflow 는 visible 유지 */
.svc-card > * { position: relative; z-index: 1; }
/* 배경이 진해진 만큼 본문 가독성을 위해 카드 안쪽에 옅은 막을 한 겹 더 깐다. */
.svc-card::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: color-mix(in srgb, var(--color-bg) 38%, transparent);
}
.svc-card > .corner { z-index: 2; }
.svc-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--svc-bg);
  background-size: cover; background-position: center;
  opacity: 0.32;
  filter: saturate(1.15) contrast(1.05);
  -webkit-mask-image: linear-gradient(200deg, color-mix(in srgb, #000 25%, transparent) 0%, #000 65%);
          mask-image: linear-gradient(200deg, color-mix(in srgb, #000 25%, transparent) 0%, #000 65%);
  transition: opacity 220ms ease;
}
.svc-card:hover::before { opacity: 0.45; }
@media (prefers-reduced-motion: reduce) { .svc-card::before { transition: none; } }

/* Footer SNS 아이콘 */
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--color-divider);
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.footer-social a:hover {
  color: var(--color-bg);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.footer-social svg { width: 19px; height: 19px; display: block; }

/* 인라인 영상: 마우스를 올리면 음소거 미리보기, 클릭하면 정식 재생 */
.video-frame { position: relative; background: #000; }
.video-frame video { display: block; cursor: pointer; }
.video-frame.is-playing video { cursor: default; }
