/* ============================================================
   INNOFIT 공식 홈페이지 — 공통 디자인 시스템
   듀얼 무드 하이브리드: Hub(다크) / Fit-Baro(라이트) / Fit-Edge(딥다크)
   ============================================================ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  /* Innofit Hub (다크) */
  --hub-bg: #0A0E1A;
  --hub-bg-2: #101625;
  --hub-ink: #F2F5FA;
  --hub-sub: #8B94A7;
  --hub-line: #1E2638;

  /* Fit-Baro (라이트 · 오렌지/코랄) */
  --baro: #FF6B4A;
  --baro-2: #FF8E3C;
  --baro-soft: #FFF3EF;
  --baro-grad: linear-gradient(135deg, #FF6B4A 0%, #FF8E3C 100%);

  /* Fit-Edge (딥다크 · 일렉트릭 시안) */
  --edge: #00E5CC;
  --edge-2: #4A92CE;
  --edge-bg: #05070D;
  --edge-grad: linear-gradient(135deg, #00E5CC 0%, #4A92CE 100%);

  /* 공통 */
  --radius: 16px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;        /* 한국어 단어 중간 줄바꿈 방지 */
  overflow-wrap: break-word;   /* 컨테이너 넘침 방지 */
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* 본문 문단 최대 폭 제한 — 가독성 (약 60자) */
.lead, p.sub { max-width: 62ch; }
.measure-c { max-width: 62ch; margin-left: auto; margin-right: auto; }

/* ---------- 타이포 스케일 ---------- */
.display { font-size: clamp(40px, 7vw, 88px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.18; letter-spacing: -0.02em; }
h3 { font-size: 21px; font-weight: 700; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px;
}
.lead { font-size: clamp(16px, 1.6vw, 19px); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 30px; border-radius: 12px;
  font-weight: 700; font-size: 16px; border: none;
  position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
/* 은은한 광택 스윕 */
.btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255,255,255,0.28) 50%, transparent 58%);
  transform: translateX(-130%);
}
.btn:hover::after { animation: btnSheen 0.9s var(--ease-out); }
@keyframes btnSheen { to { transform: translateX(130%); } }

/* ---------- GNB ---------- */
.gnb {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.gnb-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
}
.gnb .logo img { height: 26px; }
.gnb nav { display: flex; gap: 32px; align-items: center; }
.gnb nav a { font-size: 15px; font-weight: 600; opacity: 0.8; transition: opacity 0.2s; }
.gnb nav a:hover { opacity: 1; }
.gnb.scrolled { backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

/* 모바일 햄버거 */
.gnb .menu-btn { display: none; background: none; border: none; width: 40px; height: 40px; position: relative; }
.gnb .menu-btn span {
  position: absolute; left: 9px; right: 9px; height: 2px;
  background: currentColor; transition: all 0.3s var(--ease-out);
}
.gnb .menu-btn span:nth-child(1) { top: 14px; }
.gnb .menu-btn span:nth-child(2) { top: 20px; }
.gnb .menu-btn span:nth-child(3) { top: 26px; }
.gnb.menu-open .menu-btn span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.gnb.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.gnb.menu-open .menu-btn span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------- 스크롤 리빌 ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ---------- 스크롤 프로그레스 바 (상단 듀얼 그라데이션) ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  z-index: 200; pointer-events: none;
  background: linear-gradient(90deg, var(--baro), var(--baro-2), var(--edge-2), var(--edge));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- IP 등록증 (특허·상표) 컴포넌트 ---------- */
.ip-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 32px); margin-top: 56px;
  max-width: 880px; margin-left: auto; margin-right: auto;
}
.ip-card {
  position: relative; border-radius: var(--radius-lg);
  padding: 28px; text-align: left; cursor: zoom-in;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.5s;
}
.ip-card .ip-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.ip-card .ip-doc {
  position: relative; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 44px -18px rgba(0,0,0,0.45);
}
.ip-card .ip-doc img { width: 100%; transition: transform 0.7s var(--ease-out); }
.ip-card:hover { transform: translateY(-8px); }
.ip-card:hover .ip-doc img { transform: scale(1.03); }
/* 스캔 하이라이트 스윕 (고급스러운 광택 이동) */
.ip-card .ip-doc::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-130%);
}
.ip-card:hover .ip-doc::after { animation: ipSweep 1.1s var(--ease-out); }
@keyframes ipSweep { to { transform: translateX(130%); } }
.ip-card h3 { margin-top: 20px; font-size: 18px; line-height: 1.45; }
.ip-card .ip-no { font-size: 13.5px; margin-top: 6px; opacity: 0.65; }
.ip-card .ip-zoom {
  position: absolute; top: 40px; right: 40px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; opacity: 0; transition: opacity 0.3s;
  background: rgba(255,255,255,0.92); color: #111;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.ip-card:hover .ip-zoom { opacity: 1; }

/* ---------- 라이트박스 (등록증 확대 보기) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 12, 0.88); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease-out);
  padding: 4vh 16px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-height: 92vh; max-width: min(720px, 94vw); width: auto;
  border-radius: 10px; box-shadow: 0 40px 120px -20px rgba(0,0,0,0.8);
  transform: scale(0.94); transition: transform 0.35s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox .lb-close {
  position: absolute; top: 22px; right: 26px;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: #fff; font-size: 20px;
  transition: background 0.25s;
}
.lightbox .lb-close:hover { background: rgba(255,255,255,0.24); }

/* ---------- 신뢰 배지 마퀴 (무한 흐름) ---------- */
.trust-marquee { overflow: hidden; position: relative; padding: 18px 0; }
.trust-marquee .tm-track {
  display: flex; gap: 14px; width: max-content;
  animation: tmFlow 36s linear infinite;
}
.trust-marquee:hover .tm-track { animation-play-state: paused; }
@keyframes tmFlow { to { transform: translateX(-50%); } }
.tm-item {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  padding: 11px 22px; border-radius: 999px;
}
.tm-item .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* ---------- 도입 문의 폼 (lead-form) ---------- */
.lead-form {
  max-width: 560px; margin: 40px auto 0; text-align: left;
  display: grid; gap: 16px;
}
.lead-form .ff label {
  display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px;
}
.lead-form .ff input, .lead-form .ff textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 15px;
  border-radius: 12px; border: 1.5px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.lead-form .ff textarea { min-height: 120px; resize: vertical; }
.lead-form .ff input.invalid, .lead-form .ff textarea.invalid { border-color: #E5484D !important; }
.lead-form .ff-err { display: block; color: #E5484D; font-size: 12.5px; margin-top: 5px; min-height: 1em; }
.lead-form .hp { position: absolute; left: -9999px; opacity: 0; }

.form-status { font-size: 14.5px; font-weight: 600; min-height: 1.4em; text-align: center; }
.form-status.success { color: #2FBF71; animation: statusPop 0.45s var(--ease-out); }
.form-status.error { color: #E5484D; animation: statusShake 0.4s; }
@keyframes statusPop { from { opacity: 0; transform: translateY(8px); } }
@keyframes statusShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.spinner {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 페이지 전환: 원형 마스크 "무드 브릿지" ---------- */
.mood-bridge {
  position: fixed; z-index: 999; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  width: 10px; height: 10px;
}
.mood-bridge.expand { animation: bridgeExpand 0.55s var(--ease-out) forwards; }
@keyframes bridgeExpand { to { transform: translate(-50%, -50%) scale(1); } }

/* 서브 페이지 진입 페이드 */
body.page-enter { animation: pageIn 0.5s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Footer ---------- */
.site-footer {
  background: #0A0E1A; color: #64748B;
  padding: 56px 0 40px; font-size: 14px;
}
.site-footer .foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid #1E2638; margin-bottom: 28px;
}
.site-footer .foot-logo { height: 28px; opacity: 0.9; margin-bottom: 16px; }
.site-footer h4 { color: #B7C0D0; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: #E2E8F0; }

/* ---------- 히어로 배경 영상 (스톡 영상 드롭인) ---------- */
/* 파일이 없으면 .is-ready 가 붙지 않아 항상 숨김 → 기존 디자인 그대로 유지 */
.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
  background-size: cover; background-position: center;   /* reduced-motion 포스터용 */
  opacity: 0; transition: opacity 0.9s var(--ease-out);
}
.hero-video-wrap.is-ready { opacity: 1; }
.hero-video-wrap video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero-video-overlay { position: absolute; inset: 0; }   /* 가독성용 톤 오버레이 (페이지별 정의) */

/* ---------- 접근성: 모션 최소화 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .trust-marquee .tm-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .gnb nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column;
    padding: 24px; gap: 20px;
    transform: translateY(-120%); transition: transform 0.4s var(--ease-out);
  }
  .gnb.menu-open nav { transform: none; }
  .gnb .menu-btn { display: block; }
  .site-footer .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .ip-grid { grid-template-columns: 1fr; max-width: 440px; }
  .ip-card .ip-zoom { opacity: 1; }
}
