/* hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #050b1c; color: #fff; }
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { opacity: 0; visibility: hidden; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__dim { position: absolute; inset: 0; }
.hero__dim--20 { background: rgba(0, 0, 0, .2); }
.hero__dim--30 { background: rgba(0, 0, 0, .3); }
.hero__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  width: min(var(--container), 100% - var(--gutter) * 2); margin: 0 auto;
}
.hero__copy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.hero__logo { width: clamp(150px, 10.9375vw, 210px); height: auto; }
.hero__titles { display: grid; }
.hero__title {
  grid-area: 1 / 1;
  font-weight: 700; font-size: var(--fs-hero); line-height: 1.4; white-space: nowrap;
  visibility: hidden;
}
.hero__title.is-active { visibility: visible; }
.hero__line { display: block; }
.hero__scroll { align-self: flex-end; display: flex; flex-direction: column; align-items: center; gap: 30px; color: #fff; }
.hero__scroll-text { font-weight: 700; font-size: 14px; line-height: 1; }
.hero__scroll-bar { position: relative; display: block; width: 2px; height: 70px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.hero__scroll-bar span { position: absolute; left: 0; top: 0; width: 2px; height: 35px; background: #fff; }
.hero__scroll:hover .hero__scroll-text, .hero__scroll:focus-visible .hero__scroll-text { opacity: .7; }

/* about — 기본 상태는 시안 2번째 화면(최종) · 스크롤 장면은 motion 이 초기 상태를 입힌다 */
.about { position: relative; background: #fff; }
.about__wrap { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; }
.about__bubbles { position: absolute; inset: 0; pointer-events: none; }
.about__bubble { position: absolute; opacity: .4; height: auto; }
.about__bubble--a { left: 3.18%; top: -4.44%; width: 19.84vw; }
.about__bubble--b { left: 71.35%; top: 52.5%; width: 35.94vw; }
.about__media { position: absolute; inset: 0; overflow: hidden; }
.about__img { width: 100%; height: 100%; object-fit: cover; }
.about__dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.about__inner {
  position: relative; z-index: 1;
  width: min(var(--container), 100% - var(--gutter) * 2); margin: 0 auto;
  padding: calc(var(--header-h) + 20px) 0 clamp(60px, 5.2083vw, 100px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(50px, 5.2083vw, 100px);
  color: #fff;
}
.about__head { display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; }
.about__title { font-weight: 700; font-size: var(--fs-h2); line-height: 1.4; }
.about__desc { font-size: var(--fs-body); line-height: 1.6; }
.history { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.5625vw, 30px); width: 100%; }
.history__item {
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  padding: clamp(40px, 5.2083vw, 100px) 8px;
  background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  text-align: center;
}
.history__year { font-weight: 700; font-size: clamp(18px, 1.25vw, 24px); line-height: 1; }
.history__text { font-size: clamp(15px, 1.25vw, 24px); line-height: 1.4; }
.history__sup { font-size: .667em; vertical-align: .55em; line-height: 0; }

/* 공통 섹션 머리 */
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; color: var(--c-ink); }
.sec-head__title { font-weight: 700; font-size: var(--fs-h2); line-height: 1.4; }
.sec-head__desc { font-size: var(--fs-body); line-height: 1.8; color: rgba(255, 255, 255, .8); }
.sec-head--light { color: #fff; }

/* portfolio */
.portfolio { padding: clamp(70px, 5.2083vw, 100px) 0; overflow: hidden; }
.portfolio__inner { width: min(var(--container), 100% - var(--gutter) * 2); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: clamp(50px, 5.2083vw, 100px); }
.portfolio__tabs { position: relative; display: flex; width: 100%; }
.portfolio__tab {
  flex: 1 0 0; min-width: 0;
  padding: 0 clamp(8px, 1.5625vw, 30px) 20px;
  border-bottom: 3px solid var(--c-line);
  font-weight: 500; font-size: clamp(16px, 1.25vw, 24px); line-height: 1; color: var(--c-muted); white-space: nowrap;
  transition: color .3s, border-color .3s;
}
.portfolio__tab:hover, .portfolio__tab:focus-visible { color: #6f86b8; border-bottom-color: #c9d4ea; }
.portfolio__tab.is-active { color: var(--c-blue); }
.portfolio__tab.is-active:hover, .portfolio__tab.is-active:focus-visible { color: #002a75; }
.portfolio__bar { position: absolute; left: 0; bottom: 0; width: 20%; height: 3px; background: var(--c-blue); transition: transform .5s var(--ease-out); }
.portfolio__viewport { --card-w: min(800px, 41.67vw); position: relative; margin-top: 50px; height: calc(var(--card-w) * .625 + 185px); }
.portfolio__track { position: absolute; left: 50%; top: 0; width: 0; height: 100%; }
.product {
  position: absolute; left: calc(var(--card-w) / -2); top: 0; width: var(--card-w);
  display: flex; flex-direction: column; gap: 30px;
  transform-origin: 50% 50%;
}
/* JS 없이도 시안 첫 화면(가운데 1번 · 오른쪽 2번 · 왼쪽 5번) — 스크립트가 같은 값으로 이어받는다 */
.product { transform-origin: 50% calc(var(--card-w) * .3125); }
.product:nth-child(1) { z-index: 10; }
.product:nth-child(2) { z-index: 9; transform: translate3d(calc(var(--card-w) * 1.19375), calc(var(--card-w) * .1156), 0) scale(.6875); }
.product:nth-child(5) { z-index: 9; transform: translate3d(calc(var(--card-w) * -1.19375), calc(var(--card-w) * .1156), 0) scale(.6875); }
.product:nth-child(3), .product:nth-child(4) { z-index: 8; opacity: 0; }
.product:not(.is-active) .product__text { opacity: 0; visibility: hidden; }
.product__img { position: relative; aspect-ratio: 800 / 500; overflow: hidden; background: #eef3fb; }
.product__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product__text { display: flex; flex-direction: column; gap: 30px; }
.product__head { display: flex; align-items: center; gap: 50px; }
.product__name { font-weight: 700; font-size: clamp(22px, 1.5625vw, 30px); line-height: 1; color: var(--c-ink); white-space: nowrap; }
.product__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.product__tags li {
  padding: 10px 20px; border: 1px solid var(--c-tag-line); border-radius: 100px; background: var(--c-tag-bg);
  font-size: 16px; line-height: 1; color: var(--c-blue); white-space: nowrap;
}
.product__sup { font-size: 12px; vertical-align: top; }
.product__desc { font-size: var(--fs-body); line-height: 1.6; color: var(--c-ink-2); }
.portfolio__arrow {
  position: absolute; top: calc(var(--card-w) * .3125 - 40px); z-index: 20;
  display: flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 100px;
  transition: background-color .3s;
}
.portfolio__arrow img { width: 34px; height: 34px; }
.portfolio__arrow--prev { left: calc(50% - var(--card-w) / 2 - var(--card-w) * .175 - 40px); }
.portfolio__arrow--prev img { transform: scaleX(-1); }
.portfolio__arrow--next { left: calc(50% + var(--card-w) / 2 + var(--card-w) * .175 - 40px); }
/* 시안의 파란 채움 화살표(15:151)는 **호버 상태**다(발주처 확인 2026-09-29) — 정지 상태는 두 화살표가 같다(A27).
   아이콘은 검정 SVG 하나를 쓰고 호버에서 반전해 흰색이 된다 */
.portfolio__arrow { background: #f4f4f4; }
.portfolio__arrow img { transition: transform .35s var(--ease-out), filter .3s; }
.portfolio__arrow:hover, .portfolio__arrow:focus-visible { background: var(--c-blue); }
.portfolio__arrow:hover img, .portfolio__arrow:focus-visible img { filter: invert(1); }
.portfolio__arrow--prev:hover img, .portfolio__arrow--prev:focus-visible img { transform: scaleX(-1) translateX(4px); }
.portfolio__arrow--next:hover img, .portfolio__arrow--next:focus-visible img { transform: translateX(4px); }

/* facility */
.facility { position: relative; overflow: hidden; background: var(--c-navy); padding: clamp(70px, 5.2083vw, 100px) 0; }
.facility__texture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .1; pointer-events: none; }
.facility__inner { position: relative; width: min(var(--container), 100% - var(--gutter) * 2); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: clamp(50px, 4.1667vw, 80px); }
.facility__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; width: 100%; }
.facility__card { position: relative; aspect-ratio: 785 / 520; overflow: hidden; background: #1a3a74; }
.facility__card img { width: 100%; height: 100%; object-fit: cover; }
.facility__pin { position: absolute; left: 34.01%; top: 23.65%; width: 15.29%; aspect-ratio: 1; }
.facility__pulse { position: absolute; inset: 0; border-radius: 50%; background: rgba(2, 73, 199, .2); animation: pin-pulse 2.4s ease-out infinite; }
@keyframes pin-pulse { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .facility__pulse { animation: none; } }
.facility__dot { position: absolute; left: 37.5%; top: 37.5%; width: 25%; height: 25%; border-radius: 50%; background: var(--c-blue-2); }
.facility__badge { position: absolute; right: 0; bottom: 0; padding: 12px 16px; background: rgba(0, 0, 0, .8); color: #fff; font-weight: 500; font-size: clamp(14px, .8333vw, 16px); line-height: 1; }

/* contact */
.contact__inner { display: flex; align-items: center; gap: clamp(40px, 5.2083vw, 100px); width: min(var(--container), 100% - var(--gutter) * 2); margin: 0 auto; padding: clamp(70px, 5.2083vw, 100px) 0; }
.contact__left { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 50px; }
.contact__head { display: flex; flex-direction: column; gap: 30px; }
.contact__title { font-weight: 700; font-size: var(--fs-h2); line-height: 1.4; }
.contact__info { display: flex; flex-direction: column; gap: 20px; }
.contact__row { display: flex; align-items: center; gap: 30px; font-weight: 500; line-height: 1; }
.contact__row dt { flex: 0 0 100px; font-size: clamp(16px, 1.0417vw, 20px); color: var(--c-ink-3); }
.contact__row dd { font-size: clamp(17px, 1.1458vw, 22px); color: var(--c-ink); }
.contact__row a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s var(--ease-out); }
.contact__row a:hover, .contact__row a:focus-visible { background-size: 100% 1px; }
.contact__btns { display: flex; flex-wrap: wrap; gap: 20px; }
.map-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 220px; padding: 18px 30px; border: 1px solid #ddd; border-radius: 100px;
  font-weight: 600; font-size: 18px; line-height: 1.6; color: var(--c-ink);
  transition: border-color .3s, background-color .3s;
}
.map-btn:hover, .map-btn:focus-visible { border-color: var(--c-blue); background: #f5f8fe; }
.map-btn__icon--naver { width: 23px; height: 32px; object-fit: contain; }
.map-btn__icon--kakao { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; background: #ffea00; }
.map-btn__icon--kakao img { width: 15px; height: 20px; object-fit: cover; }
.contact__map { flex: 0 0 auto; width: min(1000px, 52.08vw); aspect-ratio: 1000 / 700; overflow: hidden; background: #f1efe9; }
.contact__map-frame { display: block; width: 100%; height: 100%; border: 0; }

/* ── 태블릿 ── */
@media (max-width: 1024px) {
  .history__item { gap: 16px; padding: 36px 6px; }
  .history__text { font-size: 15px; }
  .contact__inner { flex-direction: column; align-items: stretch; }
  .contact__map { width: 100%; }
  .portfolio__viewport { --card-w: min(640px, 62vw); }
}

/* ── 모바일 ── */
@media (max-width: 767px) {
  .hero__title { white-space: normal; }
  .hero__line { display: inline; }
  .hero__scroll { gap: 16px; margin-bottom: 24px; }
  .hero__scroll-bar { height: 48px; }
  .about__bubble--a { width: 42vw; }
  .about__bubble--b { width: 70vw; left: 52%; top: 62%; }
  .about__inner { gap: 32px; }
  .about__desc br { display: none; }
  .history { grid-template-columns: 1fr; gap: 8px; }
  .history__item { flex-direction: row; justify-content: flex-start; gap: 20px; padding: 14px 20px; text-align: left; }
  .history__year { flex: 0 0 44px; font-size: 16px; }
  .history__text { font-size: 15px; }
  .history__text br { display: none; }
  .sec-head { gap: 20px; }
  .sec-head__desc br { display: none; }
  /* 5개 탭이 한 줄에 들어가지 않는 폭 — 가로 넘침 대신 두 줄로 접는다(좌우 여백 유지) */
  .portfolio__tabs { flex-wrap: wrap; row-gap: 12px; }
  .portfolio__tab { flex: 0 0 33.3333%; padding: 0 6px 12px; font-size: 16px; }
  .portfolio__tab:nth-of-type(-n+2) { flex-basis: 50%; }
  .portfolio__bar { display: none; }
  .portfolio__tab.is-active { border-bottom-color: var(--c-blue); }
  .portfolio__viewport { --card-w: calc(100vw - 64px); margin-top: 32px; height: auto; }
  .portfolio__track { position: relative; left: 0; width: auto; height: auto; display: grid; }
  .product { position: relative; left: 0; grid-area: 1 / 1; width: var(--card-w); margin: 0 auto; }
  .product:nth-child(2) { transform: translate3d(calc(var(--card-w) + 16px), 0, 0); opacity: .45; }
  .product:nth-child(5) { transform: translate3d(calc(-1 * (var(--card-w) + 16px)), 0, 0); opacity: .45; }
  .product__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .product__tags li { font-size: 14px; padding: 8px 14px; }
  .product__text { gap: 20px; }
  .portfolio__arrow { width: 44px; height: 44px; top: calc(var(--card-w) * .3125 - 22px); }
  .portfolio__arrow img { width: 22px; height: 22px; }
  .portfolio__arrow--prev { left: 12px; }
  .portfolio__arrow--next { left: auto; right: 12px; }
  .facility__cards { grid-template-columns: 1fr; gap: 16px; }
  .facility__badge { padding: 10px 12px; }
  .contact__left { gap: 32px; }
  .contact__head { gap: 20px; }
  .contact__row { gap: 16px; align-items: flex-start; line-height: 1.4; }
  .contact__row dt { flex-basis: 64px; }
  .contact__btns { gap: 10px; }
  .map-btn { width: calc(50% - 5px); padding: 14px 10px; font-size: 16px; }
}
