/* ───────────────────────────────────────────────
   크리젠랩 개편 — 두 사이트 공통 기초
   간격 단위 8px · 본문 폭 1200px · 서체는 Pretendard 하나(포트폴리오 영문만 Jost) — 굵기로 위계를 만든다
   브랜드 초록 #00DB63 은 '가장 중요한 것 하나'에만 쓴다.
   ─────────────────────────────────────────────── */
:root {
  --green: #00DB63;        /* 브랜드 초록(운영 사이트 로고 색) */
  --green-ink: #06210F;    /* 초록 바탕 위 글자 */
  --display: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --w: 1200px;             /* 본문 폭 */
  --pad: 24px;             /* 화면 좌우 여백 */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, video, svg, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--w) + var(--pad) * 2); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* 로고: 높이만 정하면 비율은 원본 그대로 */
.cl-logo { height: 24px; width: auto; aspect-ratio: 160 / 32; }
.cm-logo { aspect-ratio: 190 / 32; }   /* CREAGEN MADE */

/* 키보드로 이동할 때만 보이는 초점 테두리 */
:focus { outline: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* 줄 맞춤 갤러리(가로·세로 영상이 섞여도 양 끝이 맞는 줄) */
.jrow { display: flex; }
.jrow + .jrow { margin-top: var(--jgap, 16px); }
.jrow > * { flex: none; }
.jrow > * + * { margin-left: var(--jgap, 16px); }

/* 브랜드 로고 흐름 */
.logos { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos__track { display: flex; align-items: center; width: max-content; animation: logos 60s linear infinite; }
.logos:hover .logos__track { animation-play-state: paused; }
.logos__track img { height: calc(28px * var(--k, 1)); width: auto; margin-right: 64px; opacity: .72; }   /* --k = 로고마다 눈대중 크기를 맞추는 배수(lib.js) */
@keyframes logos { to { transform: translateX(-50%); } }

/* 마우스를 올리면 움직이는 영상 칸(CL.hoverPlay) */
.hv { position: relative; overflow: hidden; }
.hv__f { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: none; border: 0; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease); z-index: 1; }
.hv__f.is-on { opacity: 1; }
.hv--still img { transition: transform 5s ease-out; }
.hv--still:hover img, a:hover > .hv--still img, button:hover > .hv--still img, .is-hot .hv--still img { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .logos__track { animation: none; }
}
@media (max-width: 720px) {
  :root { --pad: 20px; }
  .logos__track img { height: calc(22px * var(--k, 1)); margin-right: 44px; }
}

/* 밝게/어둡게 스위치(두 사이트 공통) — 60×32 알약. 어두운 화면: 검은 길 + 흰 손잡이(왼쪽) + 달 / 밝은 화면: 밝은 길 + 검은 손잡이(오른쪽) + 해.
   누르는 동안 손잡이가 옆으로 살짝 늘어나고, 놓으면 탄력 있게 건너간다. */
.tsw { position: relative; flex: none; width: 60px; height: 32px; border-radius: 16px; background: #E7E7E3; color: #1A1A1A; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: background-color .28s var(--ease), color .28s var(--ease); }
.tsw::before { content: ''; position: absolute; inset: -6px; }   /* 누르는 자리를 넉넉하게 */
.tsw__knob { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 12px; background: #1A1A1A; transition: transform .34s cubic-bezier(.34, 1.36, .5, 1), width .18s var(--ease), background-color .28s var(--ease); }
.tsw__ic { position: absolute; top: 6px; width: 20px; height: 20px; transition: opacity .2s var(--ease), transform .34s var(--ease); }
.tsw__ic--sun { left: 7px; }
.tsw__ic--moon { right: 7px; opacity: 0; transform: rotate(-50deg) scale(.5); }
.tsw:active .tsw__knob { width: 30px; }
.tsw:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[data-theme="dark"] .tsw { background: #2B2B2E; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
[data-theme="dark"] .tsw__knob { background: #fff; transform: translateX(-28px); }
[data-theme="dark"] .tsw:active .tsw__knob { transform: translateX(-22px); }
[data-theme="dark"] .tsw__ic--sun { opacity: 0; transform: rotate(50deg) scale(.5); }
[data-theme="dark"] .tsw__ic--moon { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .tsw, .tsw__knob, .tsw__ic { transition: none; } }
