/* rmkm studios — home v4 (2026-11-17, redesign-v4-brief.md §2.4). Home-only layer on top of styles.css.
   Landing = header/tab row → hero (original lockup + h1 + 1–2 sentence lead) → product reel, 1 row (owner decision 3)
   → 5 tab entries (real product image + tab name + derived number) → 1 CTA → slim footer. ≤ 2 screens at 390×844 and 1280×800.
   Rules: no GSAP/Lenis, no intro animation on the lockup (LCP), transform/opacity only, reduced-motion = still page,
   hover motion gated by (hover:hover) and (pointer:fine). No film grain, no pinned sections, no line numbers. */

:root{
  --rh:clamp(150px,22vh,280px);   /* reel tile height — small enough that a reel tile is never the LCP element */
  --reel-dur:160s;                /* one full loop (desktop CSS marquee) */
}

/* ── 1. Hero — the lockup is the headline (no clip intro: it is the LCP element) ─────────────────── */
.hero{padding-top:clamp(14px,3vh,36px);padding-bottom:clamp(8px,2vh,20px)}
.hero-mark{position:relative;width:100%;line-height:0}
.hero-mark img{display:block;width:100%;height:auto}
.hero-h1{margin-top:clamp(14px,3vh,32px);font-size:clamp(24px,3.1vw,42px);font-weight:500;letter-spacing:-0.03em;line-height:1.14;max-width:26ch;word-break:keep-all;text-wrap:balance}
html[lang="ko"] .hero-h1{letter-spacing:-0.02em;max-width:22ch}
.hero-lead{margin-top:clamp(8px,2vh,16px);font-size:clamp(15px,1.3vw,17px);line-height:1.55;color:var(--muted);max-width:60ch;word-break:keep-all}
.hero-lead b{font-weight:500;color:var(--ink)}

/* ── 2. Reel — one row of real products (apps · web · goods · gallery). Desktop: CSS marquee over a duplicated set,
   pauses on hover/focus. Touch / narrow / reduced-motion: native horizontal scroller, duplicate set hidden. ── */
.reel{position:relative;width:100%;overflow:hidden;--h:var(--rh);touch-action:pan-y;margin-top:clamp(8px,2vh,16px)}
.reel-track{display:flex;gap:12px;width:max-content;padding-right:12px} /* padding-right = gap → translateX(-50%) lands exactly on the seam */
.reel .rtile{position:relative;flex:none;display:block;height:var(--h);border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--surface-2);
  transition:border-color 200ms var(--ease-std)}
.reel .rtile img{display:block;height:100%;width:auto;object-fit:cover;object-position:top;user-select:none;-webkit-user-drag:none;pointer-events:none}
.reel .tile-web img{height:100%;width:calc(var(--h) * 1.6)}
.reel .tile-sq img{width:var(--h)}
/* 세로형 앱 타일(9:19.5)은 자연 폭이 70~80px라 캡션 이름이 어절 중간에서 끊겼다(critic B2: "리미키/미", "Josep/hine").
   → 최소 폭 110px로 넓히고(cover 크롭, 상단 정렬) 이름은 keep-all·줄바꿈 허용(말줄임 금지), 부제는 좁은 타일에서 숨긴다. */
.reel .rtile.tile-app{min-width:110px}
.reel .rtile.tile-app img{width:100%}
.reel .tile-cap{position:absolute;left:0;right:0;bottom:0;padding:36px 10px 10px;display:flex;flex-direction:column;gap:2px;color:#fff;pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.62),rgba(0,0,0,0));opacity:0;transform:translateY(6px);transition:opacity 220ms var(--ease-out),transform 260ms var(--ease-out)}
.reel .tile-cap b{font-size:13px;font-weight:600;letter-spacing:-0.012em;line-height:1.2;white-space:normal;word-break:keep-all;overflow-wrap:normal}
.reel .tile-cap span{font-size:12px;color:rgba(255,255,255,.8);white-space:normal;word-break:keep-all;overflow-wrap:normal;line-height:1.25}
.reel .tile-app .tile-cap span{display:none}
.reel .rtile:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
/* 릴은 모든 폭에서 네이티브 가로 스크롤 컨테이너(스크롤바 숨김). 데스크톱 자동 흐름은 hub.js가 scrollLeft를 rAF로 움직인다(transform 아님) —
   Tab으로 타일에 포커스하면 브라우저가 알아서 보이게 스크롤하고(포커스 링 보임), 휠·드래그로 끊을 수 있고, hover/포커스/탭 숨김이면 멈춘다.
   복제 세트(.dup)는 데스크톱 fine pointer + motion 허용일 때만(이음매 없는 루프), 그 외엔 숨김. */
.reel{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;overscroll-behavior-x:contain;scroll-padding-left:var(--inset)}
.reel::-webkit-scrollbar{display:none}
.reel-track{padding:0 var(--inset)}
.reel .rtile.dup{display:none}
@media(min-width:1024px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .reel-track{padding-left:0}
  .reel .rtile.dup{display:block}
  .reel .rtile:hover{border-color:var(--line-strong)}
  .reel .rtile:hover .tile-cap,.reel .rtile:focus-visible .tile-cap{opacity:1;transform:translateY(0)}
}
@media(max-width:1023px),(hover:none),(prefers-reduced-motion:reduce){
  .reel{scroll-snap-type:x proximity}
  .reel .rtile{scroll-snap-align:start}
  .reel .tile-cap{opacity:1;transform:none;transition:none}
}

/* ── 3. Tab entries — 5 cards, the whole card is the tab link: image · tab name (h2) · derived number ─────── */
.entries{margin-top:clamp(16px,3vh,40px)}
.entries-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.entry{position:relative;display:flex;flex-direction:column;gap:10px;min-width:0;border-radius:14px}
.entry-img{display:block;aspect-ratio:4/3;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--surface-2);transition:border-color 200ms var(--ease-std)}
.entry-img img{display:block;width:100%;height:100%;object-fit:cover;object-position:top;transition:transform .6s var(--ease-out)}
.entry[data-entry="tools"] .entry-img img{object-position:left top} /* 1.6:1 스크린샷을 4:3에 넣을 때 헤드라인 첫 글자가 잘렸다(critic R1) */
/* h2 + 숫자 줄은 세로 스택(한 줄에 두면 224px 타일에서도 "82 products on Naver Smar…"로 잘린다 — 1280 캡처 실측) */
.entry-id{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:0 2px}
.entry h2{font-size:17px;font-weight:600;letter-spacing:-0.015em;line-height:1.2;word-break:keep-all;white-space:nowrap}
.entry .entry-n{font-size:12.5px;line-height:1.35;color:var(--faint);font-variant-numeric:tabular-nums;word-break:keep-all}
.entry:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
@media(hover:hover) and (pointer:fine){ .entry:hover .entry-img{border-color:var(--line-strong)} .entry:hover .entry-img img{transform:scale(1.03)} }
@media(max-width:899px){
  .entries-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .entry{gap:6px}
  .entry-img{aspect-ratio:3/2}
  /* 좁은 타일(≈171px)에선 h2와 숫자 줄을 세로로 — 한 줄에 두면 숫자 줄이 "3 services in your br…"로 잘린다(390 캡처 실측) */
  .entry-id{flex-direction:column;align-items:flex-start;gap:2px}
  .entry .entry-n{white-space:normal;line-height:1.35}
  .entry:last-child{grid-column:1/-1}
  .entry:last-child .entry-img{aspect-ratio:16/7}
  .entry:last-child .entry-id{flex-direction:row;align-items:baseline;justify-content:space-between}
}
@media(max-width:599px){ :root{--rh:150px} } /* 모바일 릴 높이 고정 — 릴 타일이 h1보다 작아 LCP 후보가 되지 않게(Lighthouse로 확인) */

/* ── 4. One CTA ────────────────────────────────────────────────────────────── */
.home-cta{display:flex;align-items:center;gap:var(--s4);flex-wrap:wrap;margin-top:clamp(16px,3vh,40px)}
.home-cta .btn{height:46px;padding:0 20px;font-size:14.5px}
.home-cta .home-mail{font-size:14px;color:var(--muted)}
@media(hover:hover){ .home-cta .home-mail:hover{color:var(--ink)} }

/* 랜딩은 제품 이미지가 많아 푸터 간격만 살짝 줄인다 */
body.home footer.site{margin-top:clamp(28px,5vh,56px)}
