/* ============================================================
   무한공간연구소 · Infinity Space Lab
   Shared design system
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ---- Tokens ---- */
:root {
  --brand:        #0e4f9e;
  --brand-dark:   #0a3d7a;
  --brand-700:    #0c4585;
  --accent:       #7477ff;
  --accent-tint:  #eef0ff;
  --accent-tint2: #dedfff;

  --ink:    #121212;
  --ink-2:  #5c5c5c;
  --ink-3:  #969696;
  --line:   #eaeaea;
  --line-2: #d9d9d9;
  --line-strong: #cacaca;
  --surface: #f6f7f9;
  --surface-2: #f0f1f4;
  --bg: #ffffff;

  --header-h: 84px;
  --container: 1280px;
  --pad: 40px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(18,18,18,.04), 0 2px 8px rgba(18,18,18,.04);
  --shadow-md: 0 4px 14px rgba(16,40,80,.08), 0 12px 40px rgba(16,40,80,.06);
  --shadow-lg: 0 10px 30px rgba(16,40,80,.12), 0 30px 70px rgba(16,40,80,.10);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: 120px; }
.section--tight { padding-block: 84px; }

/* ---- Typography ---- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.display {
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.h1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.25; }
.h2 { font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; }
.h3 { font-size: clamp(19px, 1.5vw, 24px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.35; }
.lead { font-size: clamp(16px, 1.25vw, 19px); color: var(--ink-2); line-height: 1.75; }
.muted { color: var(--ink-2); }
.muted-2 { color: var(--ink-3); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.section-head .h2 { margin-bottom: 18px; }

/* ---- Section heading (left aligned label + sub) ---- */
.label-row { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.label-row .label {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}
.label-row .sub { color: var(--ink-3); font-size: 15px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding-inline: 28px;
  border-radius: 100px;
  font-size: 15px; font-weight: 600;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(14,79,158,.28); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.textlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.textlink:hover { color: var(--brand); gap: 11px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 1px 0 rgba(18,18,18,.02); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-menu a {
  position: relative;
  padding: 10px 18px;
  font-size: 16px; font-weight: 500; color: var(--ink);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav-menu a::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-menu a:hover { color: var(--brand); }
.nav-menu a:hover::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }
.nav-menu a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.lang { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--ink); display: inline-flex; gap: 5px; align-items: center; }
.lang .sep { color: var(--line-strong); }
.lang button { font: inherit; color: var(--ink-3); transition: color .2s; }
.lang button.on, .lang button:hover { color: var(--ink); }

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 40px; flex-wrap: wrap;
}
.footer-top .brand img { height: 38px; }
.family-site {
  position: relative; min-width: 240px;
}
.family-site > button {
  width: 100%; height: 56px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--line-strong); border-radius: 4px;
  font-size: 16px; font-weight: 500; color: var(--ink); background: #fff;
  transition: border-color .2s;
}
.family-site > button:hover { border-color: var(--ink-3); }
.family-site .chev { transition: transform .25s var(--ease); font-size: 13px; }
.family-site.open .chev { transform: rotate(180deg); }
.family-site ul {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--shadow-md); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.family-site.open ul { opacity: 1; visibility: visible; transform: translateY(0); }
.family-site li a { display: block; padding: 13px 22px; font-size: 15px; color: var(--ink-2); transition: background .15s, color .15s; }
.family-site li a:hover { background: var(--surface); color: var(--brand); }

.footer-meta { border-top: 1px solid var(--line); padding-block: 26px 40px; }
.footer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--ink-2); font-size: 14px; }
/* 회사정보 구분자: 리터럴 '|' 대신 SI 풋터와 동일한 얇은 세로선 */
.footer-info .div { width: 1px; height: 12px; padding: 0; background: var(--line-strong); color: transparent; font-size: 0; flex: 0 0 auto; align-self: center; }
/* 푸터 회사정보 목록(ul.biz): 기본 <ul> 불릿·들여쓰기 제거 + SI 풋터식 세로 구분선 */
.footer-info .biz { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; list-style: none; margin: 0; padding: 0; }
.footer-info .biz li { position: relative; padding: 0 16px; white-space: nowrap; }
.footer-info .biz li:first-child { padding-left: 0; }
.footer-info .biz li::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 12px; background: var(--line-strong); }
.footer-info .biz li:last-child::after { display: none; }
.footer-copy { margin-top: 16px; color: var(--ink-3); font-size: 13px; letter-spacing: .01em; }

/* ---- Inner page banner image ---- */
.page-img-banner { display: block; width: 100%; height: 450px; overflow: hidden; flex-shrink: 0; }
.page-img-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* ---- Page title block (below banner) ---- */
.pg-title-blk { text-align: center; padding: 120px 0 80px; }
.pg-title-blk h1 { font-size: clamp(30px, 2.5vw, 48px); font-weight: 600; letter-spacing: -0.05em; color: rgb(18,18,18); }
.pg-title-blk p { font-size: clamp(16px, 1.7vw, 32px); font-weight: 400; color: rgb(107,107,107); margin-top: 24px; letter-spacing: -0.03em; }

/* ---- Business page: frosted sub-nav inside banner ---- */
.biz-hero-banner { position: relative; height: 450px; overflow: hidden; }
.biz-hero-banner > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-subnav { position: absolute; bottom: 0; left: 0; right: 0; height: 140px; background: rgba(200,200,200,0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; }
.biz-subnav-inner { display: flex; gap: clamp(24px, 18vw, 350px); }
.biz-snav-btn { font-size: clamp(16px, 1.7vw, 32px); font-weight: 400; color: rgb(18,18,18); position: relative; padding-bottom: 10px; background: none; border: none; cursor: pointer; transition: font-weight .2s; font-family: inherit; letter-spacing: -0.04em; white-space: nowrap; }
.biz-snav-btn::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2.5px; background: #fff; transform: scaleX(0); transition: transform .25s var(--ease); border-radius: 2px; }
.biz-snav-btn.on { font-weight: 600; }
.biz-snav-btn.on::after { transform: scaleX(1); }
.biz-divider { width: 200px; height: 0; border-top: 2.5px solid #fff; border-radius: 2px; display: none; }
.biz-snav-btn.on + .biz-divider { display: block; }
/* 모바일: 사업소개 탭 5개가 한 줄에 안 맞아 양끝이 잘리므로 3+2로 줄바꿈 */
@media (max-width: 700px) {
  .biz-subnav { height: auto; padding-block: 16px; }
  .biz-subnav-inner { flex-wrap: wrap; justify-content: center; gap: 14px 8px; width: 100%; max-width: 440px; margin-inline: auto; }
  .biz-snav-btn { flex: 0 0 30%; font-size: 17px; padding-bottom: 6px; }
}

/* ---- About: sticky sub-tabs ---- */
.about-subtabs-wrap { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.about-subtabs { display: flex; gap: 0; max-width: var(--container); margin: 0 auto; padding-inline: var(--pad); }
.asubtab { padding: 20px 32px 20px 0; font-size: clamp(16px, 1.4vw, 22px); font-weight: 400; color: var(--ink-3); position: relative; background: none; border: none; cursor: pointer; transition: color .2s; font-family: inherit; letter-spacing: -0.03em; white-space: nowrap; }
.asubtab:hover { color: var(--ink); }
.asubtab.on { color: var(--ink); font-weight: 600; }
.asubtab.on::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 32px; height: 2px; background: var(--ink); }

/* ---- About: half-width intro image ---- */
.about-half-img { display: block; width: 52%; height: 300px; object-fit: cover; object-position: center 20%; margin-bottom: 60px; flex-shrink: 0; }

/* ---- Works page: section grid ---- */
.works-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 60px; flex-wrap: wrap; }
.works-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.wf { padding: 10px 24px; border-radius: 100px; border: 1px solid var(--line-2); background: #fff; font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.02em; white-space: nowrap; cursor: pointer; transition: all .22s var(--ease); font-family: inherit; }
.wf:hover { border-color: var(--ink-3); color: var(--ink); }
.wf.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.works-section { margin-bottom: 80px; }
.works-section.is-hidden { display: none; }
.ws-head { font-size: clamp(18px, 1.6vw, 28px); font-weight: 500; letter-spacing: -0.03em; margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.works-pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; margin-bottom: 30px; }
.wcard { display: block; text-decoration: none; }
.wcard-img { width: 100%; aspect-ratio: 4/3; background: #f3f4f6; display: block; overflow: hidden; }
.wcard-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #f3f4f6; }
.wcard-cat { font-size: 14px; color: var(--ink-3); margin-top: 14px; }
.wcard-title { font-size: clamp(15px, 1.1vw, 18px); font-weight: 500; color: var(--ink); margin-top: 6px; letter-spacing: -0.02em; }
@media (max-width: 760px) { .works-pg-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .works-pg-grid { grid-template-columns: 1fr; } }

/* ---- Home hero: staggered images ---- */
.hero-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.hero-text { max-width: 580px; flex-shrink: 0; }
.hero-imgs { position: relative; flex: 1; min-height: 500px; display: flex; align-items: flex-start; gap: 0; flex-shrink: 0; }
.hero-img-wrap { width: clamp(140px, 14vw, 220px); overflow: hidden; border-radius: 4px; }
.hero-img-wrap.img1 { margin-top: 0; }
.hero-img-wrap.img2 { margin-top: 60px; margin-left: 16px; }
.hero-img-wrap img { width: 100%; height: clamp(200px, 20vw, 320px); object-fit: cover; display: block; border-radius: 4px; }
@media (max-width: 920px) { .hero-inner { flex-direction: column; } .hero-imgs { display: none; } }

/* ---- Cards / shared bits ---- */
.placeholder {
  background:
    repeating-linear-gradient(135deg, #e9ebee 0 12px, #eef0f3 12px 24px);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-family: "Inter", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  position: relative;
}
.placeholder::after {
  content: attr(data-label);
  background: rgba(255,255,255,.78); padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--ink-3);
}

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
[data-reveal-stagger] > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
[data-reveal-stagger].in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* ---- Page hero (inner pages) ---- */
.page-hero { text-align: center; padding-block: 96px 24px; }
.page-hero .h1 { margin-bottom: 18px; }
.page-hero .lead { max-width: 760px; margin-inline: auto; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  :root { --pad: 28px; --header-h: 72px; }
  .section { padding-block: 88px; }
  .nav-menu { gap: 2px; }
  .nav-menu a { padding: 10px 12px; font-size: 15px; }
}
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 24px;
    transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
    box-shadow: var(--shadow-md);
  }
  .site-header.menu-open .nav-menu { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-menu a { padding: 16px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-menu a::after { display: none; }
  .nav-right .lang { display: none; }
  .section { padding-block: 72px; }
}
@media (max-width: 560px) {
  :root { --pad: 20px; }
  .section { padding-block: 56px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .family-site { width: 100%; }
}
