/* odssi lab · hero 시안 v3: 거대 로고 + 흐르는 띠. 커서로 망가뜨리면 오디씨가 고치러 와요 */
:root {
  --cream: #FFFDF8;
  --cream-2: #F5F1E7;
  --ink: #323329;
  --lilac: #BFADFF;
  --muted: rgba(50, 51, 41, .62);
  --line: rgba(50, 51, 41, .14);
  --gut: 16px;
  --maxw: 1200px;
  /* Hero 높이와 로고 세로 위치(가운데 기준). 모바일은 아래 lab 제목이 첫 화면 끝에 살짝 보이게 */
  --hero-h: clamp(430px, 64vh, 620px);
  --logo-y: 40%;
}
@supports (height: 1svh) {
  :root { --hero-h: clamp(430px, 64svh, 620px); }
}
@media (min-width: 768px) {
  :root {
    --gut: 32px;
    --hero-h: clamp(500px, calc(100vh - 150px), 900px);
    --logo-y: 43%;
  }
  @supports (height: 1svh) {
    :root { --hero-h: clamp(500px, calc(100svh - 150px), 900px); }
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
/* 종이 그레인: 거의 안 보이게 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .16 0 0 0 1.1 -.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ── 헤더 ───────────────────────── */
.top {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--gut);
  max-width: calc(var(--maxw) + 2 * var(--gut));
  margin: 0 auto;
}
.top-logo { display: block; line-height: 0; }
.top-logo svg { height: 22px; width: auto; aspect-ratio: 820 / 296; }
.top-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 600; font-size: 15px; }
.top-nav span { color: var(--muted); }
.top-nav a, .top-ig { text-decoration: none; padding: 6px 2px; }
.top-nav a:hover, .top-ig:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.top-ig { font-size: 13px; color: var(--muted); font-weight: 500; }
@media (min-width: 768px) {
  .top { padding-top: 22px; padding-bottom: 22px; gap: 28px; }
  .top-logo svg { height: 28px; }
  .top-nav { margin-left: auto; margin-right: auto; font-size: 16px; gap: 10px; transform: translateX(-20px); }
  .top-ig { font-size: 14px; }
}

/* ── Hero ───────────────────────── */
.hero {
  position: relative;
  height: var(--hero-h);
  overflow: hidden;              /* 망가진 글자는 Hero 안에서만 굴러요 */
  touch-action: pan-y;           /* 세로 스크롤은 브라우저, 가로 쓸기는 로고 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
/* 로고 좌표계: 로고 잉크 영역(x 100~920, y 182~478, 820×296) */
.logo-big {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: var(--logo-y);
  width: min(calc(100% - 2 * var(--gut)), var(--maxw));
  aspect-ratio: 820 / 296;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.logo-big > svg { position: absolute; display: block; overflow: visible; }
.lg-whole, .lg-strip { inset: 0; width: 100%; height: 100%; }
.lg-diamond {
  left: calc((838 - 100) / 820 * 100%);
  top: calc((186 - 182) / 296 * 100%);
  width: calc(77 / 820 * 100%);
  height: calc(77 / 296 * 100%);
}
.lg-strip, .lg-piece { visibility: hidden; }
.logo-big.is-physics .lg-whole { visibility: hidden; }
.logo-big.is-physics .lg-strip { visibility: visible; }
.logo-big.is-physics.is-pieces .lg-strip { visibility: hidden; }
.logo-big.is-physics.is-pieces .lg-piece { visibility: visible; }
.logo-big.is-physics > svg { will-change: transform; }

/* 아주 작은 안내. 처음 망가뜨리면 사라져요 */
.touch-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 18px);
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0;
  transition: opacity .6s;
}
.touch-hint.is-ready { opacity: .8; }
.touch-hint.is-hidden { opacity: 0; }
@media (min-width: 768px) {
  .touch-hint { top: calc(100% + 26px); font-size: 14px; }
}

/* 고치러 오는 오디씨: Hero 바닥(띠 윗선)에서 잘려요. 위치와 크기는 hero.js FIX_VIDEO.place */
.fix-stage {
  position: absolute;
  z-index: 3;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.fix-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
/* 영상이 오기 전 자리 표시: 원본 그림을 그대로 아래에서 올렸다 내려요(허리 아래는 바닥에 가려져요) */
.fix-placeholder {
  position: absolute;
  left: 50%;
  bottom: -32%;
  width: 82%;
  height: auto;
  margin-left: -41%;
  transform: translateY(105%);
  transform-origin: 50% 100%;
}
.sparkles { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.spark { position: absolute; display: block; overflow: visible; }

/* ── 흐르는 문구 띠 ───────────────── */
.marquee {
  position: relative;
  z-index: 5;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 12px 0 13px;
}
.marquee-track { display: flex; width: max-content; animation: mq 32s linear infinite; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-group span { white-space: nowrap; font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1.2; padding: 0 .55em; }
.mq-dia { width: .8em; height: .8em; font-size: 18px; flex-shrink: 0; overflow: visible; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (min-width: 768px) {
  .marquee { padding: 16px 0 17px; }
  .marquee-group span, .mq-dia { font-size: 26px; }
  .marquee-track { animation-duration: 40s; }
}

/* ── 미리보기 ───────────────────── */
.preview {
  max-width: calc(var(--maxw) + 2 * var(--gut));
  margin: 0 auto;
  padding: 36px var(--gut) 24px;
  display: grid;
  gap: 40px;
}
.row-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.row-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.row-head p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }

.card { background: #FFFEFA; border: 1px solid var(--line); border-radius: 16px; }
.card-title { display: block; font-weight: 700; font-size: 17px; line-height: 1.4; letter-spacing: -.01em; }
.card-desc { display: block; color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 4px; }

.lab-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 18px 16px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.lab-card:hover { border-color: var(--ink); }
.lab-card + .lab-card { margin-top: 12px; }
.exp {
  justify-self: start;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  line-height: 1.3;
}
.go { font-size: 14px; font-weight: 600; }
@media (min-width: 768px) {
  .lab-card { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 22px 26px; }
  .card-title { font-size: 19px; }
}

.work-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.work-card { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; padding: 10px; }
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--cream-2);
  border: 1px dashed rgba(50, 51, 41, .22);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 6px;
}
.soon { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--cream); border-radius: 999px; padding: 1px 7px 2px; line-height: 1.5; }
.work-text .card-desc { margin-top: 2px; }
@media (min-width: 768px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .work-card { grid-template-columns: 1fr; padding: 12px 12px 16px; gap: 12px; }
  .thumb { aspect-ratio: 4 / 3; padding: 10px; }
  .work-text { padding: 0 4px; }
}

.foot {
  max-width: calc(var(--maxw) + 2 * var(--gut));
  margin: 0 auto;
  padding: 28px var(--gut) 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.foot p { margin: 0 0 4px; }
.foot strong { color: var(--ink); margin-right: 6px; }
.foot-small { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .touch-hint { display: none; }
}

/* work: 영상 카드 */
.work-card--video { grid-template-columns: 1fr; gap: 12px; padding: 12px 12px 16px; max-width: 340px; }
.work-video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--cream-2); object-fit: cover; }
.work-card--video .work-text { padding: 0 4px; }

/* lab: 썸네일 */
.lab-card { grid-template-columns: 76px 1fr; column-gap: 14px; row-gap: 6px; align-items: center; }
.lab-thumb { grid-row: 1 / span 3; width: 76px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--cream-2); }
@media (min-width: 768px) {
  .lab-card { grid-template-columns: 96px auto 1fr auto; gap: 24px; padding: 16px 26px 16px 16px; }
  .lab-thumb { grid-row: auto; width: 96px; }
}

/* 전체보기 링크 + 목록 페이지 */
.row-head .more { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.row-head .more:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-logo img { display: block; height: 22px; width: auto; }
.list-page { padding-top: 24px; min-height: 60vh; align-content: start; }
.list-page .row-head h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.foot a { color: inherit; }
/* 모바일: work는 2열로 촘촘하게 (세로 영상이 너무 길어지지 않게) */
@media (max-width: 767px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card--video { max-width: none; padding: 8px 8px 12px; gap: 8px; }
  .work-card--video .card-title { font-size: 15px; }
  .work-card--video .card-desc { font-size: 12px; }
}
.top-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.empty-card { padding: 28px 24px; }
.empty-card p { margin: 0; }
.empty-card .card-desc a { color: inherit; }
