/* ============================================================
   LIMPID · Factory (공장 · 제조)
   factory.html 전용. 공용 프리미티브는 base.css,
   헤더·푸터는 chrome.js + home.css 를 그대로 빌려 쓴다.
   기존 limpid.co.kr/Manufacture 의 내용·에셋을 새 디자인으로 옮긴 페이지.
   ============================================================ */

/* ============ 히어로 ============
   뉴스룸과 같은 문법 : 왼쪽 큰 제목 + 오른쪽 아래 리드.
   등장은 1회 연출 : 글자 차오름 -> 리드 -> 선 긋기 -> 스텝.
   분위기용 모션이 아니라 페이지 구성(설계·생산·검증)을 남기는 장치다 */
.fx-hero {
  padding-block: clamp(150px, 20vh, 220px) clamp(28px, 3.6vh, 52px);
}
.fx-hero__grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.fx-hero__title {
  font-size: clamp(3.2rem, 8.6vw, 8.25rem);
  font-weight: 640;
  line-height: .96;
  letter-spacing: -.04em;
  color: var(--ink);
  /* 차오르는 글자를 자르는 마스크. 위·아래 여유는 어센더·디센더 몫 */
  overflow: hidden;
  padding-top: .06em;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
/* factory.js 가 글자를 <i> 로 분리하면 한 글자씩 차오른다 */
.fx-hero__title i {
  display: inline-block;
  font-style: normal;
  transform: translateY(125%);
  animation: fx-rise .8s var(--ease-out) forwards;
}
@keyframes fx-rise { to { transform: none; } }

/* 모션 최소화 설정에서는 연출 없이 바로 최종 상태를 보여준다 */
@media (prefers-reduced-motion: reduce) {
  .fx-hero__title i,
  .fx-hero__line,
  .fx-hero__rule,
  .fx-hero__step,
  .fx-hero__place { animation-delay: 0s !important; }
}

.fx-hero__lede {
  padding-bottom: .6em;
  font-size: var(--fs-lede);
  line-height: 1.7;
  color: var(--ink-2);
}
.fx-hero__line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: fx-fade .7s var(--ease-out) forwards;
}
.fx-hero__line:nth-child(1) { animation-delay: .38s; }
.fx-hero__line:nth-child(2) { animation-delay: .5s; }
@keyframes fx-fade { to { opacity: 1; transform: none; } }

/* 하단 : 선 긋기 + 페이지 구성 스텝(앵커) */
.fx-hero__foot { margin-top: clamp(28px, 4vh, 48px); }
.fx-hero__rule {
  height: 1px;
  border: 0;
  background: var(--line-strong);
  transform: scaleX(0);
  transform-origin: left;
  animation: fx-draw .9s var(--ease-out) .55s forwards;
}
@keyframes fx-draw { to { transform: none; } }

.fx-hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
}
.fx-hero__steps { display: flex; gap: clamp(18px, 3vw, 40px); }
.fx-hero__step {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(10px);
  animation: fx-fade .6s var(--ease-out) forwards;
}
.fx-hero__step:nth-child(1) { animation-delay: .75s; }
.fx-hero__step:nth-child(2) { animation-delay: .84s; }
.fx-hero__step:nth-child(3) { animation-delay: .93s; }
.fx-hero__step .idx { transition: color var(--dur-fast) var(--ease); }
/* 호버 : 브랜드색 + 밑줄이 왼쪽에서 자라난다 */
.fx-hero__step {
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat;
  transition: color var(--dur-fast) var(--ease),
              background-size var(--dur) var(--ease-out);
}
.fx-hero__step:hover { color: var(--brand); background-size: 100% 1px; }
.fx-hero__step:hover .idx { color: var(--brand); }
.fx-hero__place {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-4);
  opacity: 0;
  animation: fx-fade .6s var(--ease-out) 1s forwards;
}

/* ============ 공장 영상 ============
   히어로 바로 아래의 와이드 프레임. 포스터가 아래, 영상이 위.
   영상 원본이 16:9 라 프레임도 16:9 - 자르지 않고 그대로 보여준다 */
.fx-film { padding-bottom: clamp(24px, 3vw, 48px); }

.fx-film__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 16 / 9;
  background: var(--surface-dark);
}
.fx-film__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fx-film__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* 영상 비율이 프레임(16:9)과 달라도 여백 없이 꽉 채운다 */
  object-fit: cover;
  border: 0;
  pointer-events: none;
  /* 자체 mp4 로 바꾼 뒤로는 숨겼다 드러내는 처리를 하지 않는다.
     video 의 poster 가 첫 프레임 전까지 같은 사진을 그려주고,
     재생이 실패해도 poster 가 그대로 남아서 화면이 비지 않는다.
     예전 iframe 시절의 opacity 0 -> is-playing 방식은 Vimeo 가 응답을 안 하면
     영원히 0 으로 남아서 "영상이 안 나온다"의 원인이 됐다 */
}

/* ============ 소개 : 텍스트(좌) + 설비 사진(우) ============ */
.fx-intro { padding-block: clamp(40px, 5vw, 88px) var(--sec-y); }

.fx-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
/* 아이브로우 아래 제목 간격 (소개·임상검증 공통) */
.fx-intro .h2,
.fx-cro .h2 { margin-top: 14px; }

.fx-intro__lede { margin-top: 22px; max-width: 56ch; }

/* 핵심 사실 목록 : 라벨 + 값, 행 사이 얇은 선 */
.fx-facts { margin-top: clamp(28px, 3vw, 44px); }
.fx-facts > div {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.fx-facts > div:last-child { border-bottom: 1px solid var(--line); }
.fx-facts dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: .2em;
}
.fx-facts dd {
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--ink);
}

.fx-intro__media img {
  width: 100%;
  height: auto;
}

/* ============ 포뮬라랩 : AS-IS / TO-BE ============ */
.fx-lab .sec-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.fx-lab__lede { margin-top: 18px; max-width: 62ch; }

.fx-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}
.fx-panel {
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 44px);
}
.fx-panel--asis {
  background: var(--paper);
  border: 1px solid var(--line);
}
.fx-panel--tobe {
  background: var(--surface-dark);
  color: var(--on-ink-2);
  --ink: var(--on-ink);
  --ink-2: var(--on-ink-2);
  --ink-3: var(--on-ink-3);
  --ink-4: var(--on-ink-3);
  --line: var(--on-ink-line);
}
.fx-panel__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.fx-panel--tobe .fx-panel__tag { color: var(--brand-on-dark, #7ea8ee); }
.fx-panel__title {
  margin-top: 10px;
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--ink);
}
.fx-panel__list { margin-top: clamp(20px, 2.4vw, 32px); display: grid; }
.fx-panel__list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  line-height: 1.68;
}
.fx-panel__list b {
  font-weight: 650;
  color: var(--ink);
}

/* ============ 생산 라인업 : 카드 이미지 그리드 ============
   카드 이미지는 구 사이트 에셋(라벨이 이미지에 포함). 810x1080 동일 비율 */
.fx-line .sec-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.fx-line__lede { margin-top: 18px; max-width: 60ch; }

.fx-line__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}
.fx-line__grid img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}

/* ============ OEM / ODM ============ */
.fx-oem .sec-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.fx-oem__lede { margin-top: 18px; max-width: 62ch; }

/* 정의 카드 2장 */
.fx-defs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.fx-def {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 40px);
}
.fx-def__en {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--brand);
}
.fx-def__title {
  margin-top: 8px;
  font-size: var(--fs-h3);
  font-weight: 650;
  color: var(--ink);
}
.fx-def__desc { margin-top: 14px; font-size: var(--fs-sm); line-height: 1.75; }

/* 공정 탭 */
.fx-tabs {
  margin-top: clamp(40px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fx-tab {
  height: 40px;
  padding-inline: 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.fx-tab:hover { border-color: var(--ink); color: var(--ink); }
.fx-tab.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.fx-tabs__hint {
  margin-left: 8px;
  font-size: var(--fs-xs);
  color: var(--ink-4);
}

/* 공정 스텝 카드 */
.fx-steps {
  margin-top: clamp(20px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.fx-steps[hidden] { display: none; }
.fx-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
}
.fx-step__no {
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: .08em;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.fx-step__title {
  font-size: var(--fs-body);
  font-weight: 650;
  line-height: 1.45;
  color: var(--ink);
}
.fx-step__note {
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--ink-3);
}
.fx-step__who {
  margin-top: auto;
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
  background: var(--paper-soft);
  border-radius: var(--r-xs);
  padding: 3px 9px;
}

/* ============ 임상 검증 (CRO) ============ */
.fx-cro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.fx-cro__lede { margin-top: 22px; max-width: 56ch; }
.fx-cro__card {
  background: var(--paper-tint);
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  padding: clamp(36px, 4.5vw, 64px);
}
.fx-cro__card figcaption {
  margin-top: 22px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink-3);
  text-align: center;
}

/* 합작 계보 : 림피드 x 경북대 -> 엘브이수의학임상센터
   전체가 카드 폭 안에서 가운데 정렬되도록 폭 100% 기준으로 잡는다 */
.fx-jv { display: grid; justify-items: center; gap: 10px; width: 100%; }

/* [카드][x][카드] - 양쪽 칸이 1fr 로 같아서 x 가 항상 정중앙 */
.fx-jv__parents {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
}
/* 두 카드는 크기 동일, 두 로고는 높이 동일 */
.fx-jv__chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 230px;
  height: clamp(66px, 7vw, 92px);
  display: grid;
  place-items: center;
}
.fx-jv__chip--limpid { justify-self: end; }
.fx-jv__chip--knu { justify-self: start; }
.fx-jv__chip img {
  height: clamp(26px, 2.8vw, 38px);
  width: auto;
  max-width: 82%;
  object-fit: contain;
}
.fx-jv__x {
  align-self: center;
  font-size: clamp(1.05rem, 1.4vw, 1.375rem);
  font-weight: 600;
  color: var(--brand);
}
/* 두 로고에서 합작사로 내려오는 연결선 */
.fx-jv__line {
  width: 1px;
  height: clamp(22px, 2.6vw, 34px);
  background: var(--line-strong);
}
.fx-jv__result img { width: min(300px, 72vw); height: auto; }

/* ============ 파트너 로고 ============
   흰 바탕용 로고는 밝은 카드, 어두운 바탕용(흰색) 로고는 딥 카드.
   뉴스룸 카드 색 순환과 같은 문법 */
.fx-partners .sec-head { margin-bottom: clamp(36px, 4.5vw, 64px); }

.fx-partners__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.fx-logo {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  padding: 12%;
}
.fx-logo img { max-width: 100%; max-height: 58px; width: auto; height: auto; object-fit: contain; }
.fx-logo--deep {
  background: var(--brand-deep);
  border-color: transparent;
}

/* ============ 특허 · 인증 ============
   가로 스크롤 스트립. 스크롤은 이 컨테이너 안에서만 */
.fx-certs .sec-head { margin-bottom: clamp(36px, 4.5vw, 64px); }

.fx-certs__strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 22vw, 264px);
  gap: clamp(14px, 1.6vw, 22px);
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.fx-cert { scroll-snap-align: start; }
.fx-cert img {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #fff;
}
.fx-cert figcaption {
  margin-top: 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
}

/* ============ 마무리 CTA ============
   다크 패널. TO-BE 패널과 같은 색 반전 문법에
   림피드 잎 심볼을 워터마크로 깔았다 */
.fx-cta {
  position: relative;
  overflow: hidden;
  background: var(--surface-dark);
  color: var(--on-ink-2);
  --ink: var(--on-ink);
  --ink-2: var(--on-ink-2);
  --ink-3: var(--on-ink-3);
  --line: var(--on-ink-line);
  border-radius: var(--r-lg);
  padding: clamp(36px, 5vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: end;
}
/* 잎 심볼 워터마크. 은은하게, 우상단에 크게 */
.fx-cta__body { position: relative; z-index: 1; }
.fx-cta .eyebrow { color: var(--brand-on-dark, #7ea8ee); }
.fx-cta__title {
  margin-top: 16px;
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: var(--ls-tight);
  color: var(--on-ink);
  text-wrap: balance;
}
.fx-cta__sub {
  margin-top: 18px;
  max-width: 46ch;
  font-size: var(--fs-lede);
  line-height: 1.78;
  color: var(--on-ink-2);
}
.fx-cta__btn { margin-top: clamp(24px, 3vw, 40px); }

.fx-cta__info { position: relative; z-index: 1; }
.fx-cta__info > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding-block: 13px;
  border-top: 1px solid var(--on-ink-line);
}
.fx-cta__info > div:last-child { border-bottom: 1px solid var(--on-ink-line); }
.fx-cta__info dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-ink-3);
  padding-top: .2em;
}
.fx-cta__info dd {
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--on-ink);
}
.fx-cta__info a:hover { color: var(--brand-on-dark, #7ea8ee); }

/* ============ 반응형 ============ */
@media (max-width: 1080px) {
  .fx-line__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .fx-hero__grid { flex-direction: column; align-items: flex-start; gap: 20px; }
  .fx-hero__lede { padding-bottom: 0; }
  .fx-hero__nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .fx-film__frame { border-radius: var(--r-md); }
  .fx-intro__grid,
  .fx-compare,
  .fx-defs,
  .fx-cro__grid,
  .fx-cta { grid-template-columns: 1fr; }
  .fx-cta { align-items: start; }
  .fx-partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .fx-line__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-facts > div { grid-template-columns: 116px 1fr; }
  .fx-tabs { flex-wrap: wrap; }
}
