/* 서비스 구간 H5 — 「한눈에 네 분야」 안들. 색·바탕은 svc-h2.css 의 tone 변수를 쓴다.
   공통: 분야 이름 4개가 늘 크게 보이고(주인공), 설명·서비스 이름이 바로 아래, 작업 화면은 거드는 자리. 멈춤은 짧게. */
.h5-wrap { position: relative; z-index: 2; }
.h5-wrap .h3-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 76px; }
.h5-in { width: 100%; }
.h5-head .h2-label { display: block; padding-bottom: 12px; font-family: var(--e-font); font-size: 14px; font-weight: 600; letter-spacing: .18em; color: var(--a2); }
.h5-head h2 { font-size: clamp(30px, 2.8vw, 46px); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.h5-head h2 em { font-style: normal; background: linear-gradient(90deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h5-head.center { text-align: center; padding-bottom: 5vh; }
.h5-head.center h2 { font-size: clamp(26px, 2.3vw, 38px); }
.h5-no { font-family: var(--e-font); font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--a1); }
.h5-wrap .h2-tags { gap: 8px; padding-top: 14px; }
.h5-wrap .h2-tags a { padding: 6px 13px 6px 15px; border: 1px solid var(--a1); background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
.h5-wrap .h2-tags a::after { content: "→"; margin-left: 6px; opacity: .7; }

/* N1 큰 목록: 왼쪽 큰 글씨 4줄(늘 다 보임) + 오른쪽에 지금 줄의 작업 화면 */
.h5-index .h5-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.h5-index .h5-head { padding-bottom: 4vh; }
.h5-rows { border-bottom: 1px solid var(--line); }
.h5-row { display: grid; grid-template-columns: 54px 1fr 40px; align-items: start; padding: 2.2vh 0; border-top: 1px solid var(--line); cursor: pointer; }
.h5-row .h5-no { padding-top: 1.2vh; color: var(--dim); transition: color .3s; }
.h5-row h3 { font-size: clamp(26px, 2.5vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--sub); transition: color .3s; }
.h5-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1); }
.h5-more > * { min-height: 0; overflow: hidden; }
.h5-more p { padding-top: 10px; font-size: 15.5px; line-height: 1.65; color: var(--sub); }
.h5-row.on .h5-more { grid-template-rows: 1fr; }
.h5-more { grid-template-rows: 0fr; }
.h5-more > div, .h5-more > p { overflow: hidden; }
.h5-row.on h3, .h5-row:hover h3 { color: var(--ink); }
.h5-row.on .h5-no { color: var(--a1); }
.h5-arrow { padding-top: 1vh; font-size: 22px; color: var(--dim); transition: transform .3s, color .3s; }
.h5-row.on .h5-arrow { color: var(--a1); transform: translateX(4px); }
.h5-prev { position: relative; height: min(440px, 50vh); }
.h5-pv { position: absolute; inset: 0; visibility: hidden; }

/* N2 항로 정거장: 가로 빛줄기 + 정거장 4개, 아래에 분야 4칸(늘 다 보임) */
.h5-line { position: relative; height: 64px; margin: 0 0 3vh; }
.h5-line .h5-svg { position: absolute; left: 12.5%; right: 12.5%; top: 12px; width: 75%; height: 40px; overflow: visible; }
.h5-svg path { fill: none; stroke-linecap: round; }
.h5-svg .base { stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 9; vector-effect: non-scaling-stroke; }
.h5-svg .draw { stroke: url(#saGrad5); stroke: var(--a1); stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(31,163,235,.6)); }
.h5-st { position: absolute; top: 0; width: 64px; height: 64px; margin-left: -32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: #070c16; color: var(--dim); transition: all .45s; }
html.theme-light .h5-st { background: #f4f6f9; }
.h5-st svg, .h5-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.h5-st.on { border-color: transparent; color: #04211a; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 0 0 8px rgba(31,235,209,.12), 0 0 30px rgba(31,235,209,.45); }
.h5-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.h5-col { padding: 0 10px; text-align: center; opacity: .3; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.h5-col.on { opacity: 1; transform: none; }
.h5-col h3 { padding: 8px 0 10px; font-size: clamp(22px, 1.9vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.h5-col p { font-size: 14.5px; line-height: 1.65; color: var(--sub); }
.h5-col .h2-tags { justify-content: center; }

/* N3 연결 허브: 가운데 RICHON LABS 에서 네 분야로 선이 뻗는다(지구본 이동선과 같은 느낌) */
.h5-board { position: relative; height: min(560px, 62vh); }
.h5-board .h5-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.h5-core { position: absolute; left: 50%; top: 50%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-50%, -50%) scale(.85); opacity: .4; transition: all .6s; }
.h5-core i { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 0 0 10px rgba(31,235,209,.1), 0 0 40px rgba(31,235,209,.5); }
.h5-core b { font-family: var(--e-font); font-size: 15px; letter-spacing: .08em; }
.h5-core span { font-size: 12px; color: var(--sub); }
.h5-core.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.h5-node { position: absolute; z-index: 2; display: flex; gap: 16px; width: 34%; opacity: .25; transition: opacity .6s, transform .6s; }
.h5-node.tl { left: 0; top: 2%; } .h5-node.tr { right: 0; top: 2%; flex-direction: row-reverse; text-align: right; }
.h5-node.bl { left: 0; bottom: 2%; } .h5-node.br { right: 0; bottom: 2%; flex-direction: row-reverse; text-align: right; }
.h5-node.tr .h2-tags, .h5-node.br .h2-tags { justify-content: flex-end; }
.h5-node.on { opacity: 1; }
.h5-ic { flex: 0 0 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--a1); }
.h5-node h3 { padding: 4px 0 8px; font-size: clamp(22px, 1.9vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.h5-node p { font-size: 14.5px; line-height: 1.6; color: var(--sub); }

/* N4 4칸 펼침 패널: 세로 4칸, 지금 칸만 넓어져 설명·화면이 보이고 나머지 칸도 이름은 계속 보인다 */
.h5-panels .h5-head { padding-bottom: 3.4vh; }
.h5-pans { display: flex; gap: 12px; height: min(560px, 62vh); }
.h5-pan { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; transition: flex-grow .66s cubic-bezier(.22,.68,.25,1), border-color .4s, background-color .4s;   /* 11/11 속도 조정: 원래 .7s → .58s(급함) → .66s */ }
html.theme-light .h5-pan { background: rgba(255,255,255,.7); }
.h5-pan.on { flex-grow: 4.2; border-color: var(--a1); cursor: default; }
.h5-pan .h5-tab { position: absolute; left: 18px; bottom: 26px; right: 18px; transition: opacity .3s; }
/* 접힌 칸 제목: 정해 둔 두 줄(예: 스마트 모빌리티 / 안전 솔루션)이 더 쪼개지지 않게 줄마다 한 줄로, 글씨는 칸 폭에 맞춤 */
.h5-pan .h5-tab h3 { padding-top: 8px; font-size: clamp(15px, 1.3vw, 23px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; white-space: nowrap; }
.h5-pan.on .h5-tab { opacity: 0; }
/* 펼친 칸의 내용은 「펼쳤을 때 폭」으로 고정(--pw, svc-h5.js 가 잼): 칸이 좁아지면 접히듯 찌그러지지 않고 사진처럼 가려지기만 한다(11/11 대표) */
.h5-pan .h5-body { right: auto !important; width: var(--pw, 100%); }
.h5-pan .h5-body { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; padding: 28px 30px 24px; opacity: 0; transition: opacity .48s ease-out; pointer-events: none; }
.h5-pan.on .h5-body { opacity: 1; transition-delay: .22s; pointer-events: auto; }   /* 기다림만 줄이고(.3s → .22s) 나타나는 시간은 넉넉하게(.48s) — 덜 기다리되 여유 있게 */
.h5-body h3 { padding: 8px 0 8px; font-size: clamp(28px, 2.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.h5-body p { max-width: 560px; font-size: 15.5px; line-height: 1.65; color: var(--sub); }
.h5-sc { position: relative; min-height: 0; margin-top: 16px; }

/* 확정안: 첫 화면 제목 + 4칸 펼침 패널 — 들어서면 제목만 크게, 한 번 더 내리면 제목이 위로 사라지고 패널이 들어선다 */
.has-intro .h5-head { position: absolute; left: 0; right: 0; top: 76px; bottom: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; transition: opacity .6s, transform .6s; }
.has-intro .h5-head .h2-label { padding-bottom: 18px; font-size: 15px; }
.has-intro .h5-head h2 { font-size: clamp(36px, 3.6vw, 60px); text-align: center; }
.has-intro:not(.intro-on) .h5-head { opacity: 0; transform: translateY(-40px) scale(.96); pointer-events: none; }
.has-intro .h5-pans { height: min(600px, 66vh);   /* 72vh → 66vh: 아래로 덜 내려오게 */ transition: opacity .55s, transform .55s; }
.has-intro.intro-on .h5-pans { opacity: 0; transform: translateY(30px); pointer-events: none; }

@media (max-width: 900px) {
  .has-intro .h5-head { position: relative; inset: auto; padding-bottom: 40px; }
  .has-intro:not(.intro-on) .h5-head, .has-intro.intro-on .h5-pans { opacity: 1; transform: none; pointer-events: auto; }
  .h5-wrap .h3-pin { position: relative; height: auto; padding: 90px 0 60px; }
  .h5-index .h5-in { grid-template-columns: 1fr; }
  .h5-prev, .h5-line, .h5-svg, .h5-core { display: none; }
  .h5-more { grid-template-rows: 1fr; }
  .h5-cols { grid-template-columns: 1fr; gap: 34px; }
  .h5-col { opacity: 1; transform: none; }
  .h5-board { height: auto; display: grid; gap: 30px; }
  .h5-node { position: relative; inset: auto !important; width: 100%; opacity: 1; flex-direction: row !important; text-align: left !important; }
  .h5-pans { flex-direction: column; height: auto; }
  .h5-pan { flex: none; min-height: 120px; } .h5-pan.on { min-height: 420px; }
}
