/* 첫 화면 (2026-12-02 재설계)
   개념: 선. 여섯 학문의 선이 글자를 만들고, 만나고, 교수진 소속 표시가 되고, 교과목 묶음으로 합쳐지고, 진출 분야로 갈라진다.
   선과 글자 등장 모션은 scripts/home-motion.js 가 그린다. 이 파일은 배치와 정지 상태만 맡는다.
   글자 크기 상한은 --t-max 이다(첫 화면 제목만 --t-hero). */

.h {
  --k: #0a0a0a;
  --w: #ffffff;
  --g: #8c8c8c;
  --g2: #5c5c5c;
  --hair: rgba(255, 255, 255, .2);
  --hair-d: rgba(10, 10, 10, .16);
  --blue: #3d6bff;
  --red: #ff4b33;
  --green: #17c27a;
  --yellow: #ffd60a;
  --violet: #a066ff;
  --orange: #ff9a1f;
  --x: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --t-hero: clamp(34px, 4.6vw, 64px);
  --t-max: clamp(26px, 3vw, 44px);
  --t-title: clamp(24px, 2.5vw, 36px);
  --t-sub: clamp(20px, 1.7vw, 24px);
  --pad-y: clamp(40px, 6vh, 72px);
  position: relative;
  overflow-x: clip;
  background: var(--k);
  color: var(--w);
  font-size: 18px;
  line-height: 1.6;
}
.h a { color: inherit; }
.h-wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--x); }
.h-light { background: var(--w); color: var(--k); }
.h-sw { display: inline-block; width: 14px; height: 14px; flex: none; }

/* 선 모션을 그리는 층. 문서와 함께 스크롤된다. */
.h-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; display: none; }
.h.is-fx .h-fx { display: block; }

/* 구역: 넓은 화면에서는 한 구역이 한 화면을 채운다 */
.h-snap { min-height: calc(100vh - var(--topbar-h)); min-height: calc(100svh - var(--topbar-h)); padding: var(--pad-y) 0; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; }
html:has(.h) { scroll-padding-top: var(--topbar-h); }
@media (pointer: coarse) { html:has(.h) { scroll-snap-type: y proximity; } }

/* 두 줄 제목: 첫 줄 진하게, 둘째 줄 회색 */
.h-title { margin: 0; font-weight: 800; font-size: var(--t-title); line-height: 1.2; letter-spacing: -0.04em; }
.h-title b, .h-title span { display: table; font-weight: inherit; }
.h-title span { color: var(--g); }
.h-light .h-title span { color: #9a9a9a; }
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 6vh, 64px); }
.h-more { font-weight: 700; font-size: 18px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.h-more:hover { opacity: .7; }

/* 스크립트가 그리는 표시는 정지 그림을 숨긴다 */
.h.is-fx [data-snake], .h.is-fx [data-stop], .h.is-fx [data-fork], .h.is-fx .h-cross > *, .h.is-fx .h-fork svg { visibility: hidden; }
/* 구역에 들어설 때 옆으로 열리는 요소 */
.h.is-fx .h-anim { clip-path: inset(0 100% 0 0); }
.h.is-fx .is-in .h-anim { clip-path: inset(0 0 0 0); transition: clip-path .7s cubic-bezier(.7, 0, .15, 1); transition-delay: calc(var(--i, 0) * 70ms + 150ms); }

/* ---------- 첫 화면 상단 ---------- */
.h-hero { justify-content: space-between; gap: 40px; padding-bottom: 88px; }
.h-hero__grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.h-hero h1 { margin: 0; font-weight: 800; font-size: var(--t-hero); line-height: 1.16; letter-spacing: -0.045em; }
.h-hero h1 .h-l { display: block; }
.h-hero h1 .h-l--2 { color: var(--g); }
.h-w { display: inline-block; white-space: nowrap; }
.h-ch { display: inline-block; }
.h-legend { list-style: none; margin: clamp(24px, 4vh, 40px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 18px; font-weight: 600; }
.h-legend li { display: flex; align-items: center; gap: 8px; }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4vh, 40px); }
.h-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; font-weight: 800; font-size: 18px; text-decoration: none; background: var(--w); color: var(--k) !important; }
.h-btn:hover { background: var(--yellow); }
.h-btn--line { background: transparent; color: var(--w) !important; box-shadow: inset 0 0 0 2px var(--w); }
.h-btn--line:hover { background: var(--w); color: var(--k) !important; }
.h-btn--dark { background: var(--k); color: var(--w) !important; }
.h-btn--dark:hover { background: var(--w); color: var(--k) !important; }

.h-cross { width: 100%; max-width: min(440px, 52vh); aspect-ratio: 1; justify-self: end; display: block; }
.h-cross path { fill: none; stroke-width: 16; stroke-linecap: square; stroke-linejoin: miter; }
.h-cross .plate { fill: var(--w); }

/* ---------- 숫자 ---------- */
.h-rule { height: 1px; background: var(--hair); transform-origin: 0 50%; }
.h.is-fx .h-rule { transform: scaleX(0); }
.h.is-fx .h-rule.rv-on { transform: scaleX(1); transition: transform .7s cubic-bezier(.7, 0, .15, 1); }
.h-stats { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: clamp(20px, 3vh, 32px); }
.h-stats div { min-width: 0; }
.h-stats dt { font-size: 17px; font-weight: 600; color: var(--g); }
.h-stats dd { margin: 2px 0 0; display: table; white-space: nowrap; font-weight: 800; font-size: var(--t-max); line-height: 1.1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* ---------- 교수진: 왼쪽 글, 오른쪽 사진 ---------- */
.h-fac { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.h-fac__depts { list-style: none; margin: clamp(24px, 5vh, 48px) 0 0; padding: 0; display: grid; gap: 14px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.h-fac__depts li { display: flex; align-items: center; gap: 12px; }
.h-fac__depts em { font-style: normal; color: #9a9a9a; font-variant-numeric: tabular-nums; }
.h-fac__depts a { text-decoration: none; border-bottom: 2px solid currentColor; }
.h-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3.4vh, 36px) clamp(16px, 2vw, 28px); }
.h-person .ph { display: block; aspect-ratio: 5 / 6; max-height: 27vh; width: 100%; overflow: hidden; background: #ececec; }
.h-person img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.h-person b { display: table; margin-top: 12px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; border-bottom: 2px solid currentColor; }
.h-person small { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 16px; font-weight: 600; color: var(--g2); line-height: 1.35; }
.h-person small .h-sw { width: 10px; height: 10px; }

/* ---------- 교육과정 노선 ---------- */
.h-line { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.h-line::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 4px; background: var(--w); transform-origin: 0 50%; }
.h.is-fx .h-line::before { transform: scaleX(0); }
.h.is-fx .is-in .h-line::before { transform: scaleX(1); transition: transform 1s cubic-bezier(.7, 0, .15, 1) .5s; }
.h-stop a { position: relative; display: block; text-decoration: none; }
.h-stop i { display: block; width: 30px; height: 30px; background: var(--c); }
.h-stop .no { display: block; margin-top: 24px; font-weight: 700; font-size: 17px; color: var(--g); }
.h-stop h3 { margin: 2px 0 0; font-weight: 800; font-size: var(--t-sub); line-height: 1.25; letter-spacing: -0.035em; }
.h-stop .cnt { display: block; margin-top: 6px; font-weight: 800; font-size: 18px; color: var(--c); }
.h-stop ul { list-style: none; margin: 16px 0 0; padding: 0; color: #c8c8c8; font-size: 17px; line-height: 1.5; }
.h-stop li + li { margin-top: 5px; }

/* ---------- 진출 분야 ---------- */
.h-fork { display: grid; grid-template-columns: clamp(80px, 12vw, 180px) minmax(0, 1fr); }
.h-fork svg { width: 100%; height: 100%; display: block; }
.h-fork svg path { fill: none; stroke-width: 10; stroke-linecap: square; }
.h-paths { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; }
.h-path { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px 48px; align-items: center; min-height: clamp(84px, 13vh, 130px); padding: 12px 0 12px 28px; border-top: 1px solid var(--hair-d); }
.h-path:last-child { border-bottom: 1px solid var(--hair-d); }
.h-path h3 { margin: 0; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: var(--t-title); line-height: 1.2; letter-spacing: -0.04em; }
.h-path h3 .h-sw { display: none; }
.h-path p { margin: 0; font-size: 18px; line-height: 1.6; color: #333; }

/* ---------- 협력: 문장 블록과 색 타일 ---------- */
.h-net { padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.h-net__lead { background: var(--blue); padding: clamp(32px, 6vw, 80px) var(--x); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.h-net__lead p { margin: 0; font-weight: 800; font-size: var(--t-max); line-height: 1.25; letter-spacing: -0.04em; }
.h-net__lead .h-more { align-self: flex-start; }
.h-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.h-tile { background: var(--c); color: var(--k); padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.h-tile--wide { grid-column: span 2; }
.h-tile b { font-weight: 800; font-size: var(--t-sub); line-height: 1.25; letter-spacing: -0.035em; }
.h-tile span { font-weight: 700; font-size: 17px; }

/* ---------- 소식 ---------- */
.h-news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 80px); }
.h-news a { text-decoration: none; display: block; }
.h-news a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.h-news time { display: block; font-weight: 700; font-size: 17px; color: var(--blue); font-variant-numeric: tabular-nums; }
.h-news__lead b { display: block; margin-top: 10px; font-weight: 800; font-size: var(--t-max); line-height: 1.25; letter-spacing: -0.04em; }
.h-news__list { list-style: none; margin: 0; padding: 0; }
.h-news__list li { padding: 20px 0; border-top: 1px solid var(--hair-d); }
.h-news__list li:first-child { border-top: 0; padding-top: 0; }
.h-news__list b { display: block; margin-top: 4px; font-weight: 800; font-size: var(--t-sub); line-height: 1.35; letter-spacing: -0.03em; }

/* ---------- 지원 ---------- */
.h-apply { background: var(--yellow); color: var(--k); min-height: 56vh; }
.h-apply__grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.h-apply h2 { margin: 0; font-weight: 800; font-size: var(--t-max); line-height: 1.2; letter-spacing: -0.04em; }
.h-apply h2 b, .h-apply h2 span { display: table; font-weight: inherit; }
.h-apply h2 span { color: rgba(10, 10, 10, .5); }
.h-apply .h-actions { margin-top: 0; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1023px) {
  .h-snap { min-height: 0; }
  .h-hero { min-height: calc(100svh - var(--topbar-h)); }
  .h-hero__grid { grid-template-columns: 1fr; }
  .h-cross { justify-self: start; max-width: min(320px, 40vh); }
  .h-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
  .h-fac { grid-template-columns: 1fr; }
  .h-person .ph { max-height: none; }
  .h-line { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .h-line::before { display: none; }
  .h-net { grid-template-columns: 1fr; }
  .h-news { grid-template-columns: 1fr; row-gap: 32px; }
}
@media (max-width: 720px) {
  .h { font-size: 17px; --t-hero: clamp(30px, 10.4vw, 64px); --pad-y: 56px; }
  .h-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 36px; }

  /* 첫 화면: 제목을 폭에 맞춰 키우고, 범례는 3칸, 버튼은 반씩, 그림은 가운데 */
  .h-hero { gap: 32px; padding-bottom: 56px; }
  .h-hero__grid { gap: 28px; }
  .h-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .h-actions { gap: 10px; }
  .h-hero .h-btn { flex: 1 1 0; justify-content: center; padding: 0 12px; white-space: nowrap; }
  .h-cross { justify-self: center; max-width: min(300px, 74vw, 40vh); }
  .h-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }

  .h-fac__depts { margin-top: 24px; gap: 10px; font-size: 18px; }
  .h-people { grid-template-columns: 1fr 1fr; gap: 24px 14px; }

  /* 교육과정: 왼쪽에 세로 노선, 오른쪽에 묶음 내용 */
  .h-line { grid-template-columns: 1fr; row-gap: 32px; }
  .h-stop { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 18px; }
  .h-stop:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 14px; bottom: -46px; width: 4px; background: var(--w); transform-origin: 50% 0; }
  .h.is-fx .h-stop::after { transform: scaleY(0); }
  .h.is-fx .is-in .h-stop::after { transform: scaleY(1); transition: transform .7s cubic-bezier(.7, 0, .15, 1) .5s; }
  .h-stop a { display: contents; }
  .h-stop i { width: 22px; height: 22px; grid-column: 1; grid-row: 1; margin-top: 3px; position: relative; }
  .h-stop a > div, .h-stop > ul { grid-column: 2; }
  .h-stop .no { display: inline; margin: 0 8px 0 0; }
  .h-stop h3 { display: inline; }
  .h-stop .cnt { margin-top: 4px; }
  .h-stop ul { margin-top: 10px; }

  .h-fork { grid-template-columns: 1fr; }
  .h-fork svg { display: none; }
  .h-path { grid-template-columns: 1fr; padding-left: 0; min-height: 0; padding: 22px 0; }
  .h-path h3 .h-sw { display: inline-block; }
  .h-net__lead { padding: 48px var(--x); gap: 32px; }
  .h-tiles { grid-template-columns: 1fr 1fr; }
  .h-tile { min-height: 132px; padding: 18px 16px; }
  .h-tile span { font-size: 16px; }
  .h-apply { min-height: 0; }
  .h-apply .h-btn { flex: 1 1 0; justify-content: center; padding: 0 12px; white-space: nowrap; }
  .h-apply__grid { align-items: stretch; flex-direction: column; }
}
