/* 메인(kr) 첫 화면(① site/home/_hero_kr.html) — 메인과 모든 type 시안이 함께 쓴다.
   site.css에서 옮김(2026-11-16 0단계, 선택자 기준). 하위 페이지는 읽지 않는다 — 공유 규칙(.hx-more 기본형 · 남색 머리말 · 등장 효과 장치)은 site.css에 있다.
   조각 ↔ CSS는 1:1: site/home/_<이름>_kr.html 을 쓰는 페이지는 css/home/<이름>.css 를 읽는다(content.HOME_*) */
/* 첫 화면: 왼쪽 문구 · 버튼 + 오른쪽 공장 일러스트(hero-factory-*) 위 HTML 솔루션 표지 5개 · 'AI' 큐브(2026-11-06).
   예전 모니터 사진 위 카드 2장(생산 실적 · AI 브리핑)은 2026-11-16 삭제(복구: 커밋 3521a1e) */
.block.hx-hero { --hx-sea: #1B2A4A; position: relative; isolation: isolate; overflow: hidden; display: flex; min-height: clamp(500px, 36vw, 600px); /* 글자 기준: 1440 화면 높이에서 멈춘다 */
  padding-block: 48px 40px; background: var(--hx-sea); color: #fff; } /* 바탕 = 사이트 남색 #1B2A4A(공장 일러스트 바탕도 이 색으로 보정해 둠) — 그림 가장자리가 이음매 없이 이어진다 */
.hx-hero__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
.hx-hero__text { position: relative; z-index: 1; align-self: center; } /* 그림 층(z 0) 위 — 그림 왼쪽 빈 바탕이 문구 · 버튼을 가리지 않게. 그림을 z 0으로 올려야 표지 링크가 눌린다 */
.hx-hero h1 { margin-top: 14px; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.block .hx-hero__text > p:is(:not([class]), [class=""], [class="rv"], [class="is-in"], [class="rv is-in"]) { max-width: 36em; margin-top: 20px; font-size: 1.0625rem; color: #C9D2DE; }
.block p.hx-hero__btns { display: flex; flex-wrap: wrap; gap: 10px; max-width: none; margin-top: 32px; }
.hx-hero .btn--ghost { color: #fff; }
.hx-hero h1 em.hx-hero__ai { font-style: normal; color: var(--brand); }
.hx-stage.modmap { position: relative; display: flex; flex-direction: column; justify-content: flex-end; margin: 0; padding: 0; background: none; }
/* 공장 일러스트(hero-factory-*, 1672×941): 그림 내용은 가로 30~98%(왼쪽은 빈 바탕) — 오른쪽 칸 기준으로 놓되 빈 왼쪽 30%는 문구 뒤로 들어가게 넓힌다.
   내용 폭 ≈ 오른쪽 칸 폭(글자 묶음의 약 1.2배), 세로 가운데. 바탕색이 같아 가장자리는 그대로 이어진다 */
.hx-stage__photo { /* 그림 내용(가로 30~98%)이 문구 오른쪽 26px 뒤에서 시작해 화면 오른쪽 끝 가까이까지 차게 — 폭은 오른쪽 칸 + 본문 밖 여유(--hx-room)에서 계산, 최대 1200px.
     그림 위아래 빈 바탕(약 19% · 24%)은 첫 화면 밖으로 잘려 나가 위아래 여백이 줄어든다 */
  --hx-room: max(0px, (100vw - 1215px) / 2); --hx-w: min((100% + 26px + var(--hx-room)) / 0.68, 1200px);
  position: absolute; z-index: 0; top: 50%; left: calc(-26px - var(--hx-w) * .3); width: var(--hx-w); translate: 0 -50%; display: block; }
.hx-art { position: relative; container-type: inline-size; } /* 그림 + 표지 묶음 — 표지 크기는 그림 폭(cqw)에 비례 */
.hx-art picture, .hx-art img { display: block; width: 100%; height: auto; }
/* 솔루션 표지(HTML): 위치는 그림 좌표(1672×941) 기준 %, 크기는 그림 폭 기준 cqw — 그림이 커지고 작아져도 같은 자리에 같은 비율로 붙는다.
   표지 아래 점에서 대상(설비 · 라인 · 현황판 · 창고)까지 가는 연결선, AI는 큐브에서 옆으로 */
.block .modmap ul.hx-tags { margin: 0; padding: 0; list-style: none; }
.hx-tag { position: absolute; margin: 0; }
.hx-tag::before { content: none; } /* 사이트 기본 글머리 제거 */
.hx-tag a { position: relative; display: flex; align-items: center; gap: .8cqw; padding: .55cqw 1cqw .55cqw .8cqw; border: 1px solid rgba(160, 200, 255, .55); border-radius: .75cqw;
  background: rgba(13, 28, 64, .78); box-shadow: 0 0 1.2cqw rgba(79, 195, 247, .18); color: #fff; text-decoration: none; white-space: nowrap; transition: border-color .2s, box-shadow .2s, background .2s; }
.hx-tag a:hover, .hx-tag a:focus-visible { border-color: #8FD8FF; background: rgba(18, 40, 88, .92); box-shadow: 0 0 1.6cqw rgba(79, 195, 247, .45); }
.hx-tag__ico { flex: none; width: max(18px, 2.3cqw); height: max(18px, 2.3cqw); fill: none; stroke: #5CC8FF; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hx-tag__txt { display: flex; flex-direction: column; line-height: 1.25; }
.block .hx-tag__txt b { font-size: max(13px, 1.3cqw); font-weight: 700; letter-spacing: .01em; color: #fff; }
.hx-tag__txt span { font-size: max(10.5px, .85cqw); color: #C9D6E8; }
.hx-tag a::before, .hx-tag a::after { content: ""; position: absolute; pointer-events: none; }
.hx-tag a::before { left: var(--pin-x); top: 100%; width: 1.5px; height: var(--pin); margin-left: -.75px; background: linear-gradient(#8FD8FF, rgba(143, 216, 255, .25)); } /* 연결선 */
.hx-tag a::after { left: var(--pin-x); top: 100%; width: max(7px, .6cqw); height: max(7px, .6cqw); border-radius: 50%; translate: -50% -50%; background: #fff; box-shadow: 0 0 0 2px rgba(79, 195, 247, .45), 0 0 8px rgba(143, 216, 255, .9); } /* 표지 아래 점 */
.hx-tag--hmi { left: 31.8%; top: 39.4%; --pin-x: 5.3cqw; --pin: 3.1cqw; }
.hx-tag--mes { left: 47.7%; top: 26.7%; --pin-x: 6.9cqw; --pin: 5.9cqw; }
.hx-tag--himb { left: 66%; top: 23.5%; --pin-x: 6.8cqw; --pin: 5.3cqw; }
.hx-tag--wms { right: 1.5%; top: 33.5%; --pin: 2.4cqw; } /* 오른쪽 기준 — 글자가 커져도 화면 밖으로 나가지 않고 왼쪽으로 늘어난다 */
.hx-tag--wms a::before, .hx-tag--wms a::after { left: auto; right: 7cqw; }
 .hx-tag--wms a::before { margin: 0 -.75px 0 0; }
 .hx-tag--wms a::after { translate: 50% -50%; } /* 연결점은 랙 위 그대로 */
.hx-tag--ai { left: 69.1%; top: 58.2%; }
.hx-tag--ai a { border-color: rgba(255, 120, 100, .7); background: rgba(70, 18, 24, .72); box-shadow: 0 0 1.4cqw rgba(239, 67, 40, .35); }
.hx-tag--ai a:hover, .hx-tag--ai a:focus-visible { border-color: #FF8A73; background: rgba(90, 22, 28, .9); box-shadow: 0 0 1.8cqw rgba(239, 67, 40, .55); }
.hx-tag--ai .hx-tag__ico { stroke: #FF7A62; }
/* 큐브 앞(왼쪽)면 'AI' — 면의 기울기(약 10.7°)에 맞춰 비튼다. 위치 · 크기는 그림 좌표 기준 */
.hx-cube { position: absolute; left: 64%; top: 61.85%; translate: -50% -50%; transform: skewY(10.7deg); pointer-events: none;
  font-family: var(--font-display); font-size: 2cqw; font-weight: 700; line-height: 1; letter-spacing: .02em; color: #fff;
  text-shadow: 0 0 .3cqw rgba(255, 255, 255, .8), 0 0 .9cqw rgba(255, 90, 60, .9); }
.hx-tag--ai a::before { left: auto; right: 100%; top: 50%; width: 1.6cqw; height: 1.5px; margin: -.75px 0 0; background: linear-gradient(90deg, rgba(255, 138, 115, .3), #FF8A73); } /* 큐브 → 표지 */
.hx-tag--ai a::after { left: auto; right: 100%; top: 50%; translate: 50% -50%; background: #FFD9D0; box-shadow: 0 0 0 2px rgba(239, 67, 40, .45), 0 0 8px rgba(255, 138, 115, .9); }
.hx-stage__photo { -webkit-mask-image: linear-gradient(90deg, #000 98%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 90%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, #000 98%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 90%, transparent); mask-composite: intersect; } /* 오른쪽 · 위아래 끝(배경 빛번짐)을 바탕에 녹인다 */
@media (min-width: 1100px) and (max-width: 1279px) {
 .block .hx-hero__text > p:is(:not([class]), [class=""], [class="rv"], [class="is-in"], [class="rv is-in"]) { max-width: 24em; }
}
@media (max-width: 1099px) {
  .hx-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .block.hx-hero { display: block; min-height: 0; padding-block: 48px 40px; }
  .hx-stage.modmap { display: block; }
  .hx-stage.modmap { position: static; }
  .hx-stage__photo { -webkit-mask-image: none; mask-image: none; position: relative; z-index: 0; top: auto; left: auto; width: auto; translate: none; overflow: hidden; margin-inline: -20px; aspect-ratio: 16 / 9; }
  .hx-art { scale: 1.3; transform-origin: 100% 47%; } /* 그림 + 표지를 함께 확대 — 왼쪽 빈 바탕을 덜어 내고 공장을 크게(오른쪽 끝 기준, WMS 표지가 잘리지 않게) */
}
@media (max-width: 767px) {
  .hx-stage__photo { aspect-ratio: 4 / 3; }
  .hx-art { scale: 1; width: 133.4%; margin-left: -33.4%; } /* 4:3 칸에 16:9 그림을 오른쪽 맞춤 — 공장 부분만 */
  .hx-tag__txt span { display: none; } /* 좁은 화면은 표지 이름만 */
}
@media (max-width: 480px) {
 .hx-stage__photo { margin-inline: -16px; }
}
/* ① 첫 화면: 열 때 문구가 차례로 올라오고, 사진은 104% → 100%로 다가오며(투명도는 그대로 — 첫 화면 표시 속도), AI 카드가 마지막에 겹쳐 들어온다(스크립트 없이 CSS만) */
.hx-hero__text > * { animation: hx-rise .8s var(--rv-ease) both; }
.hx-art { animation: hx-zoom 1.8s var(--rv-ease) both; }
.hx-tag { animation: hx-rise .7s var(--rv-ease) both; }
 .hx-tag--hmi { animation-delay: .5s; }
 .hx-tag--mes { animation-delay: .62s; }
 .hx-tag--himb { animation-delay: .74s; }
 .hx-tag--wms { animation-delay: .86s; }
 .hx-tag--ai { animation-delay: 1.05s; }
.hx-cube { animation: hx-fade .6s ease 1s both; }
 @keyframes hx-fade { from { opacity: 0; } }
@keyframes hx-zoom { from { transform: scale(1.04); } }
.hx-hero__text > :nth-child(2) { animation-delay: .08s; }
.hx-hero__text > :nth-child(3) { animation-delay: .16s; }
.hx-hero__text > :nth-child(4) { animation-delay: .24s; }
@keyframes hx-rise { from { opacity: 0; transform: translateY(24px); } }
/* 깊이감: 첫 화면을 지나는 동안(--hx-p 0→1, site.js) 뒤 사진은 내려가고 앞 카드는 올라간다 */
@media (min-width: 1100px) {
  .hx-art { translate: 0 calc(var(--hx-p, 0) * 32px); }
}
