/* CONNECXELLENCE — 기술과 감성, 연결. 어두운 격자 위 점과 선. */

:root {
  --bg: #121214;
  --bg-2: #1A1A1E;
  --fg: #F1F1F6;
  --fg-2: rgba(241, 241, 246, .64);
  --fg-3: rgba(241, 241, 246, .38);
  --line: rgba(241, 241, 246, .12);
  --light-bg: #EFEFF4;
  --light-fg: #151517;
  --light-fg-2: rgba(21, 21, 23, .64);
  --light-fg-3: rgba(21, 21, 23, .4);
  --light-line: rgba(21, 21, 23, .12);
  --accent: #FF3D5A;
  --accent-ink: #14060A;
  --cool: #F1F1F6;
  --warm: #FF3D5A;

  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Pretendard Variable", monospace;
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --display: "JetBrains Mono", "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.75;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
  overflow-x: hidden; word-break: keep-all; overflow-wrap: anywhere;
  background-image: radial-gradient(rgba(241,241,246,.075) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html { scrollbar-color: rgba(241,241,246,.25) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(241,241,246,.22); border: 3px solid var(--bg); border-radius: 8px; }

.skip { position: absolute; left: var(--gutter); top: -48px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 999px; z-index: 100; font-family: var(--mono); font-size: 12px; }
.skip:focus { top: 8px; }

.accent { color: var(--accent); }
.muted { opacity: .55; }
b { font-weight: inherit; color: var(--accent); }

/* 파티클 필드: 고정, 첫 화면 뒤 */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 1; transition: opacity 400ms var(--ease); }
main, footer, .nav, .progress, .mmenu { position: relative; z-index: 1; }

/* ---------- 알약 내비 ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 28px), 1240px); height: var(--nav-h); z-index: 50;
  display: flex; align-items: center; gap: 24px; padding: 0 12px 0 22px;
  background: rgba(26,26,30,.72); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav__brand { display: grid; gap: 4px; margin-right: auto; }
.nav__logo, .foot__logo { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.nav__logo i, .foot__logo i { font-style: normal; color: var(--accent); }
.nav__dots { display: flex; gap: 8px; }
.nav__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--fg-3); transition: background-color 200ms var(--ease); }
.nav__dots i.on { background: var(--fg); }
.nav__dots i.now { background: var(--accent); }
.nav__links { display: flex; gap: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--fg-2); }
.nav__links a { padding: 6px 0; transition: color 160ms var(--ease); }
.nav__links a:hover, .nav__links a.on { color: var(--fg); }
.nav__toggle { display: none; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; padding: 10px 12px; }
.mmenu { position: fixed; top: calc(var(--nav-h) + 22px); left: 14px; right: 14px; z-index: 49; display: grid; padding: 8px; background: rgba(26,26,30,.92); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.mmenu a { padding: 14px 16px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; border-radius: 12px; }
.mmenu a:hover { background: rgba(241,241,246,.06); }
.mmenu[hidden] { display: none; }

/* ---------- 알약 버튼 ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1;
  padding: 12px 18px; border-radius: 999px; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.pill:active { transform: scale(.97); }
.pill--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 28px -10px rgba(255,61,90,.7); }
.pill--accent:hover { background: #FF5A73; }
.pill--ghost { border: 1px solid var(--line); color: var(--fg); }
.pill--ghost:hover { border-color: rgba(241,241,246,.4); }
.pill--lg { font-size: 13px; padding: 16px 24px; }
.sec--light .pill--ghost { border-color: var(--light-line); color: var(--light-fg); }

/* ---------- 오른쪽 진행률 ---------- */
.progress { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--fg-3); pointer-events: none; }
.progress__bar { position: relative; width: 1px; height: 64px; background: var(--line); overflow: hidden; }
.progress__bar::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--fg); transform: translateY(calc(-100% + var(--p, 0) * 100%)); }
.progress.on-light { color: var(--light-fg-3); }
.progress.on-light .progress__bar { background: var(--light-line); }
.progress.on-light .progress__bar::after { background: var(--light-fg); }

/* ---------- 라벨·타이포 ---------- */
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--fg-3); margin-bottom: 22px; }
.sec--light .tag { color: var(--light-fg-3); }
.h2 { font-family: var(--sans); font-size: clamp(2.2rem, 4.6vw, 4.25rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; }
.h2--xl { font-family: var(--display); font-size: clamp(3rem, 8.5vw, 8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.lead { margin-top: 24px; max-width: 58ch; font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.8; color: var(--fg-2); }
.wrap--center .lead { margin-left: auto; margin-right: auto; }
.mono-line { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--fg-2); }
.mono-line i, .hero__strip i, .foot__strip span, .foot__copy span { font-style: normal; color: var(--fg-3); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--center { text-align: center; }
.wrap--center .mono-line { justify-content: center; }
.sec { padding: clamp(96px, 12vw, 176px) 0; }
.sec, .chapters, .chapter { scroll-margin-top: calc(var(--nav-h) + 28px); }
.sec--light { background: var(--light-bg); color: var(--light-fg); }
.sec--light .lead { color: var(--light-fg-2); }

/* ---------- 첫 화면 ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--nav-h) + 40px) var(--gutter) 60px; text-align: center; }
.hero__in { max-width: 1100px; }
.hero__title { display: grid; gap: 18px; }
.hero__ko { font-family: var(--sans); font-size: clamp(3rem, 9.5vw, 8.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.hero__en { font-family: var(--mono); font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -0.01em; color: var(--fg-2); }
.hero__lead { margin: 30px auto 0; max-width: 54ch; font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.8; color: var(--fg-2); }
.hero__strip { margin-top: 34px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--fg-2); }
.hero__legend { position: absolute; left: var(--gutter); bottom: 28px; display: grid; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--fg-3); }
.hero__legend span { display: flex; align-items: center; gap: 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot--cool { background: var(--cool); }
.dot--warm { background: var(--warm); box-shadow: 0 0 10px rgba(255,61,90,.7); }

/* ---------- 가로로 밀리는 챕터 ---------- */
.chapters { position: relative; height: 320vh; }
.chapters__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.chapters__track { display: flex; gap: 0; will-change: transform; }
.chapter { position: relative; flex: 0 0 100vw; min-height: 70vh; display: flex; align-items: center; padding: 0 var(--gutter); }
.chapter__num { position: absolute; left: clamp(0px, 4vw, 60px); top: 50%; transform: translateY(-52%); font-family: var(--mono); font-weight: 800; font-size: clamp(14rem, 46vw, 40rem); line-height: 1; letter-spacing: -0.06em; color: rgba(21,21,23,.05); user-select: none; }
.chapter__in { position: relative; max-width: 720px; margin-left: clamp(0px, 10vw, 180px); }
.chapter__title { font-family: var(--display); font-size: clamp(3rem, 8vw, 7.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.chapter__ko { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--light-line); font-size: clamp(1.15rem, 1.7vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; }
.chapter__body { margin-top: 12px; max-width: 52ch; font-size: 1.05rem; color: var(--light-fg-2); }
.chapter__list { margin-top: 26px; display: grid; gap: 10px; }
.chapter__list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; padding-left: 26px; position: relative; }
.chapter__list li::before { content: ""; position: absolute; left: 0; top: .75em; width: 14px; height: 1px; background: var(--light-fg-3); }
.chapter__list li span { font-family: var(--sans); font-size: 14px; letter-spacing: 0; color: var(--light-fg-2); }
.chapter--accent .chapter__num { color: rgba(255,61,90,.12); }
.chapter--accent .chapter__title { color: var(--accent); }
.chapters__hint { position: absolute; right: var(--gutter); bottom: 28px; display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--light-fg-3); }
.chapters__hint span.on { color: var(--light-fg); }

/* ---------- 프로젝트 ---------- */
.works { margin-top: 56px; display: grid; grid-template-columns: 7fr 5fr; grid-template-rows: auto auto; gap: clamp(20px, 3vw, 40px); }
.work--twin { grid-column: 1; grid-row: 1; }
.work--softhing { grid-column: 2; grid-row: 1 / span 2; }
.work--sofinity { grid-column: 1; grid-row: 2; }
.work__media { display: block; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .work__media:hover img { transform: scale(1.03); } }
.work--twin .work__media img { aspect-ratio: 1332 / 926; }
.work--softhing .work__media { height: 100%; }
.work--softhing .work__media img { aspect-ratio: 1080 / 1350; }
.work__media--text { display: grid; place-items: center; min-height: 220px; padding: 32px; text-align: center; font-family: var(--sans); font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; background: linear-gradient(135deg, rgba(255,61,90,.16), rgba(241,241,246,.04)); }
.work__meta { padding: 18px 4px 0; }
.work__labels { display: flex; flex-wrap: wrap; gap: 6px; }
.work__labels span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); }
.work__title { margin-top: 14px; font-family: var(--mono); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.work__line { margin-top: 8px; max-width: 52ch; color: var(--fg-2); }
.work__note { margin-top: 8px; font-size: 13px; color: var(--fg-3); }
.arrow { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color 160ms var(--ease); }
.arrow::after { content: " →"; }
.arrow:hover { color: var(--accent); }

/* ---------- 일하는 방식 ---------- */
.ways { display: grid; }
.ways li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 20px; padding: clamp(22px, 3vw, 36px) 0; border-top: 1px solid var(--light-line); }
.ways li:last-child { border-bottom: 1px solid var(--light-line); }
.ways__en { font-family: var(--display); font-size: clamp(2.2rem, 6vw, 5.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.ways__ko { font-size: clamp(1rem, 1.3vw, 1.2rem); color: var(--light-fg-2); text-align: right; }

/* ---------- People ---------- */
.h2--reveal .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(6px); transition: opacity 600ms var(--ease-out), filter 600ms var(--ease-out), transform 600ms var(--ease-out); }
.h2--reveal.in .w { opacity: 1; filter: blur(0); transform: none; }
.sec--dark .pill--lg { margin-top: 36px; }

/* ---------- 문의 ---------- */
.sec--contact { padding-bottom: clamp(120px, 14vw, 200px); }
.cform { margin-top: 40px; display: grid; justify-items: center; gap: 22px; }
.intent { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.intent__opt { position: relative; }
.intent__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.intent__opt span { display: block; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--fg-2); transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
.intent__opt input:hover + span { border-color: rgba(241,241,246,.4); color: var(--fg); }
.intent__opt input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.intent__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.cform__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.copy { gap: 10px; }
.copy__done { color: var(--accent); }
.copy__done:empty { display: none; }
.cform__note { font-size: 13px; color: var(--fg-3); }

/* ---------- 푸터 ---------- */
.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg); }
.foot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot__head { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--fg-3); margin-bottom: 14px; }
.foot__grid a { display: block; padding: 6px 0; color: var(--fg-2); font-size: 14px; transition: color 160ms var(--ease); }
.foot__grid a:hover { color: var(--fg); }
.foot__bottom { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--fg-3); }
.foot__strip { display: flex; align-items: center; gap: 10px; }
.foot__logo { font-size: 13px; color: var(--fg); }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-block; }
  .nav { padding-right: 8px; gap: 12px; }
  .nav__cta { display: none; }
}
@media (max-width: 860px) {
  .works { grid-template-columns: 1fr; grid-template-rows: none; }
  .work--twin, .work--softhing, .work--sofinity { grid-column: auto; grid-row: auto; }
  .work--softhing .work__media { height: auto; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .chapters { height: auto; }
  .chapters__pin { position: static; height: auto; overflow: visible; display: block; }
  .chapters__track { display: block; transform: none !important; }
  .chapter { flex: none; min-height: 0; padding: 72px var(--gutter); border-top: 1px solid var(--light-line); }
  .chapter:first-child { border-top: 0; }
  .chapter__num { position: absolute; right: var(--gutter); left: auto; top: 40px; transform: none; font-size: 7rem; }
  .chapter__in { margin-left: 0; }
  .chapters__hint { display: none; }
  .ways li { grid-template-columns: 1fr; gap: 8px; }
  .ways__ko { text-align: left; }
  .hero__legend { position: static; margin-top: 150px; justify-self: start; }
  .progress { display: none; }
}
@media (max-width: 560px) {
  .foot__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapters { height: auto; }
  .chapters__pin { position: static; height: auto; overflow: visible; display: block; }
  .chapters__track { display: block; transform: none !important; }
  .chapter { flex: none; min-height: 0; padding: 72px var(--gutter); }
  .h2--reveal .w { opacity: 1; filter: none; transform: none; transition: none; }
  .work__media img, .pill, .arrow { transition: none; }
}
