/* sub-hero — 큰사람커넥트 홈페이지 (2026-11-15 PHP 퍼블리싱 전환) */

.vsh.c-sub-hero {
  view-timeline-name: --vsh;
  height: 155svh;   /* 고정 구간 55svh = 카드 펼침 연출 길이와 같게 — 연출이 끝난 뒤 멈춰 있는 구간 없음 (2026-11-15) */
  position: relative;
}

.vsh-sticky.c-sub-hero {
  height: 100svh;
  position: sticky;
  top: 0;
  overflow: hidden;
  contain: layout paint;   /* 배너 안 다시 그리기가 바깥으로 번지지 않게 (2026-11-15) */
}

.vsh-media.c-sub-hero {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.vsh-media.c-sub-hero .vsh-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.vsh-shade.c-sub-hero {
  background: linear-gradient(90deg,#0a1e36c7 0%,#0a1e3673 55%,#0a1e3626 100%);
  position: absolute;
  inset: 0;
}

@media (width>=600px) {
  .vsh-shade--light.c-sub-hero {
    background: linear-gradient(90deg,#0a1e36c7 0%,#0a1e3666 38%,#0a1e3600 60%);
  }
}

.vsh-text.c-sub-hero {
  top: max(calc(var(--header-h) + 8vh), 22%);
  left: var(--v2-gutter);
  right: var(--v2-gutter);
  position: absolute;
}

.vsh-label.c-sub-hero {
  margin-bottom: clamp(10px, .25rem + 1.6vw, 32px);   /* 2026-11-15: 해상도에 맞게 — 모바일 약 10px · 태블릿 약 16px · PC 27~32px (예전: 모든 해상도 32px) */
  color: var(--color-on-navy);
  font-size: clamp(1.125rem,1rem + .5vw,1.5rem);
  font-weight: 700;
}

.vsh-title.c-sub-hero {
  color: var(--color-on-navy);
  letter-spacing: -.03em;
  gap: .15em;
  font-size: clamp(2.5rem,1.4rem + 3.6vw,4.5rem);
  font-weight: 800;
  line-height: 1.2;
  display: grid;
}

.vsh-desc.c-sub-hero {
  max-width: 46rem;
  margin-top: var(--space-4);
  color: var(--color-on-navy);
  font-size: clamp(1.0625rem,.95rem + .5vw,1.375rem);
  font-weight: 600;
  line-height: 1.6;
}

.vsh-actions.c-sub-hero {
  justify-items: start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--color-on-navy);
  display: grid;
}

.vsh-actions.c-sub-hero .btn-row {
  gap: var(--space-2);
  flex-wrap: wrap;
  display: flex;
}

.vsh-actions.c-sub-hero .btn--ghost,
.vsh-actions.c-sub-hero .pbtn--line {
  color: inherit;
  background: 0 0;
  border-color: currentColor;
}

.vsh-actions.c-sub-hero .btn--ghost:hover,
.vsh-actions.c-sub-hero .pbtn--line:hover {
  color: inherit;
  opacity: .85;
}

.vsh-actions.c-sub-hero p,
.vsh-actions.c-sub-hero .meta-note,
.vsh-actions.c-sub-hero a:not(.btn,.pbtn) {
  color: inherit;
}

.vsh-path.c-sub-hero {
  bottom: clamp(2rem,1rem + 4vh,6rem);
  left: var(--v2-gutter);
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  display: flex;
  position: absolute;
}

.p-home.c-sub-hero,
.p-drop.c-sub-hero summary.c-sub-hero,
.p-cur.c-sub-hero {
  border-radius: var(--radius-pill);
  height: 48px;
  color: var(--color-on-navy);
  background: #ffffff38;   /* 흐림(backdrop-filter) 삭제 — 뒤 사진이 움직일 때마다 다시 계산돼 끊김 (2026-11-15) */
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
}

.p-home.c-sub-hero {
  justify-content: center;
  width: 48px;
  padding: 0;
}

.p-drop.c-sub-hero {
  position: relative;
}

.p-drop.c-sub-hero summary.c-sub-hero {
  cursor: pointer;
  list-style: none;
}

.p-drop.c-sub-hero summary.c-sub-hero::-webkit-details-marker {
  display: none;
}

.p-drop.c-sub-hero ul.c-sub-hero {
  min-width: 200px;
  padding: var(--space-1);
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
  border-radius: 12px;
  margin: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
}

.p-drop.c-sub-hero a.c-sub-hero {
  padding: 9px var(--space-2);
  color: var(--color-text);
  white-space: nowrap;
  border-radius: 8px;
  text-decoration: none;
  display: block;
}

.p-drop.c-sub-hero a.c-sub-hero:hover {
  background: var(--color-bg-soft);
  color: var(--color-primary);
}

@supports (animation-timeline:view()) {
  html.motion .vsh-media.c-sub-hero .vsh-img {
    animation: linear both vsh-img;
    will-change: transform;
  }

  html.motion .vsh-shade.c-sub-hero,
  html.motion .vsh-path.c-sub-hero {
    animation: linear both vsh-fade;
  }

  html.motion .vsh-label.c-sub-hero {
    animation: linear both vsh-label;
  }

  html.motion .vsh-title.c-sub-hero {
    animation: linear both vsh-title;
  }

  html.motion .vsh-desc.c-sub-hero {
    animation: linear both vsh-desc, linear both vsh-desc-color;
  }

  html.motion .vsh-actions.c-sub-hero {
    animation: linear both vsh-actions;
  }

  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-desc.c-sub-hero,
  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-actions.c-sub-hero,
  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-media.c-sub-hero .vsh-img {
    animation-timeline: --vsh;
    animation-range: contain;
  }

  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-shade.c-sub-hero,
  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-path.c-sub-hero {
    animation-timeline: --vsh;
    animation-range: contain 45% contain;
  }

  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-label.c-sub-hero,
  html.motion .vsh.c-sub-hero .vsh-sticky.c-sub-hero .vsh-title.c-sub-hero {
    animation-timeline: --vsh;
    animation-range: contain 36% contain 82%;
  }

  @keyframes vsh-img {
    0% {
      transform: translateY(calc(var(--vsh-top, 74svh) / 2));
    }
    to {
      transform: none;
    }
  }

  @keyframes vsh-fade {
    0% {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes vsh-label {
    0% {
      color: var(--color-primary);
    }
    to {
      color: var(--color-on-navy);
    }
  }

  @keyframes vsh-desc {
    0% {
      opacity: 0;
      transform: translateY(5rem);
    }
    25% {
      opacity: 0;
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes vsh-desc-color {
    0%, 40% {
      color: var(--color-text-sub);
    }
    85%, to {
      color: var(--color-on-navy);
    }
  }

  @keyframes vsh-actions {
    0% {
      opacity: 0;
      transform: translateY(6rem);
    }
    45% {
      opacity: 0;
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes vsh-title {
    0% {
      color: var(--color-text);
    }
    to {
      color: var(--color-on-navy);
    }
  }
}

html.motion .vsh-title.c-sub-hero span.c-sub-hero {
  animation: .7s cubic-bezier(.215,.61,.355,1) both vsh-in;
}

html.motion .vsh-title.c-sub-hero span.c-sub-hero:nth-child(2) {
  animation-delay: .15s;
}

@keyframes vsh-in {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(30%);
  }
}

.vsh-title.c-sub-hero span.c-sub-hero {
  display: block;
}

/* ───── 배너 펼침: 덮개 방식 (2026-11-15 끊김 개선 2차) ─────
   사진은 화면 전체에 고정하고, 사진 위 배경색 덮개(위 · 왼쪽 · 오른쪽 + 둥근 모서리 2개)를 스크롤에 맞춰 밖으로 밀어 카드가 펼쳐지는 모양을 만든다.
   스크롤 연동 애니메이션을 transform 만으로 → 크롬이 그래픽카드에서 스크롤과 같은 박자로 처리(메인 스레드 대기 없음). 덮개 마크업: 각 페이지 .vsh-frame */
.vsh-frame.c-sub-hero {
  display: none;
}

@supports (animation-timeline:view()) {
  html.motion .vsh-frame.c-sub-hero {
    --vf-side: clamp(1rem,.2rem + 5vw,8rem);
    --vf-top: var(--vsh-top, 74svh);   /* 카드 시작 높이 — 1024px 미만은 v2-sub-hero.js 가 제목 아래로 계산 (2026-11-15) */
    --vf-r: 40px;
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  html.motion .vsh-frame.c-sub-hero i {
    position: absolute;
    background: var(--color-bg);
    will-change: transform;
    animation-duration: auto;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: --vsh;
    animation-range: contain;
  }

  html.motion .vf-t.c-sub-hero {
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--vf-top) + 1px);
    animation-name: vf-up;
  }

  html.motion .vf-l.c-sub-hero {
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(var(--vf-side) + 1px);
    animation-name: vf-left;
  }

  html.motion .vf-r.c-sub-hero {
    top: 0;
    bottom: 0;
    right: 0;
    width: calc(var(--vf-side) + 1px);
    animation-name: vf-right;
  }

  html.motion .vf-cl.c-sub-hero,
  html.motion .vf-cr.c-sub-hero {
    top: var(--vf-top);
    width: var(--vf-r);
    height: var(--vf-r);
  }

  html.motion .vsh-frame.c-sub-hero .vf-cl.c-sub-hero {
    left: var(--vf-side);
    transform-origin: 0 0;
    background: radial-gradient(circle at 100% 100%, #0000 calc(var(--vf-r) - .5px), var(--color-bg) var(--vf-r));
    animation-name: vf-corner-l;
  }

  html.motion .vsh-frame.c-sub-hero .vf-cr.c-sub-hero {
    right: var(--vf-side);
    transform-origin: 100% 0;
    background: radial-gradient(circle at 0 100%, #0000 calc(var(--vf-r) - .5px), var(--color-bg) var(--vf-r));
    animation-name: vf-corner-r;
  }

  @keyframes vf-up {
    to {
      transform: translateY(-100%);
    }
  }

  @keyframes vf-left {
    to {
      transform: translateX(-100%);
    }
  }

  @keyframes vf-right {
    to {
      transform: translateX(100%);
    }
  }

  /* 모서리는 카드 귀퉁이에 붙은 채로 덮개와 같이 움직이며 크기(=둥근 정도 40px → 0)만 줄어듦 */
  @keyframes vf-corner-l {
    to {
      transform: translate(calc(-1 * var(--vf-side)), calc(-1 * var(--vf-top))) scale(0);
    }
  }

  @keyframes vf-corner-r {
    to {
      transform: translate(var(--vf-side), calc(-1 * var(--vf-top))) scale(0);
    }
  }
}

/* 모바일 · 태블릿: 배너 글자 시작 위치 — 화면 높이(22%) 대신 화면 폭에 맞춘 여백 (세로로 긴 휴대폰에서 머리글 아래가 지나치게 비던 문제, 2026-11-15) */
@media (width < 1024px) {
  .vsh-text.c-sub-hero {
    top: calc(var(--header-h) + clamp(28px, 1.5rem + 3vw, 64px));
  }
}
