/* =========================================================
   (주)이너콘 — 공통 스타일시트 v2
   ========================================================= */

/* ── 0. CSS 변수 ── */
:root {
  --color-primary:    #1A3A5C;
  --color-primary-dk: #0F2540;
  --color-accent:     #127bca;
  --color-accent-lt:  #3d9de0;
  --color-white:      #FFFFFF;
  --color-bg:         #F6F7F9;
  --color-text:       #222831;
  --color-text-md:    #555E6C;
  --color-text-lt:    #8A929E;
  --color-border:     #DDE1E8;
  --color-success:    #27AE60;

  /* 보조 팔레트 (UI 디테일 — 하드코딩 정리) */
  --color-bg-alt:        #f8f9fb;   /* 옅은 섹션 배경 */
  --color-bg-hover:      #f0f0f0;   /* 옅은 호버 배경 */
  --color-bg-hover-blue: #edf2fb;   /* 파란빛 호버 배경 */
  --color-border-lt:     #e0e0e0;   /* 옅은 구분선 */
  --color-border-xlt:    #eee;      /* 더 옅은 구분선 */
  --color-border-blue:   #e4e8ef;   /* 푸른빛 구분선 */
  --color-text-slate:    #334155;   /* 슬레이트 본문 */
  --color-text-gray:     #666;      /* 회색 보조 텍스트 */
  --color-text-gray-dk:  #555;      /* 진회색 텍스트 */
  --color-text-gray-dkr: #333;      /* 더 진한 회색 */
  --color-text-faint:    #999;      /* 약한 텍스트 */
  --color-text-faint-lt: #ccc;      /* 더 약한 텍스트 */
  --color-header-bg:     #FFFFFF;                /* 스크롤 헤더/드로어 배경 */
  --color-modal-dim:     rgba(0,0,0,.55);        /* 모달 딤 배경 */
  --overlay-dark-rgb:    10, 22, 40;             /* 히어로 어두운 오버레이 base */

  --font-base: 'Noto Sans KR', -apple-system, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.25rem;
  /* 제목 위계 토큰 (clamp 반응형 — 모든 제목은 이 4개만 사용) */
  --fs-display: clamp(2rem,    5.2vw, 3.6rem);   /* 홈 히어로 */
  --fs-h1:      clamp(1.7rem,  3.6vw, 2.5rem);   /* 페이지 히어로 제목 */
  --fs-h2:      clamp(1.45rem, 2.8vw, 2.1rem);   /* 섹션 제목 */
  --fs-h3:      clamp(1.1rem,  1.7vw, 1.35rem);  /* 카드·소제목 */

  --sp-xs:  0.5rem;
  --sp-sm:  0.75rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --section-py: clamp(64px, 8vw, 104px);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.13);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.17);

  /* 모션 토큰 (Apple-style) */
  --ease-standard:  cubic-bezier(0.4, 0, 0.2, 1);    /* 일반 상태 전환 */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);   /* UI 기본 감속 */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);   /* 스크롤 등장·큰 이동 */
  --ease-spring:    cubic-bezier(0.32, 0.72, 0, 1);  /* 시트·드로어 */
  --dur-xs: 120ms;
  --dur-sm: 200ms;
  --dur-md: 320ms;
  --dur-lg: 560ms;
  --dur-xl: 900ms;

  /* 레거시 토큰 재매핑 (기존 사용처 자동 업그레이드) */
  --trans-fast: var(--dur-xs) var(--ease-out-quart);
  --trans-base: var(--dur-md) var(--ease-out-quart);
  --trans-slow: var(--dur-lg) var(--ease-spring);

  --header-h:     84px;
  --header-h-mob: 60px;
  --max-w:        1240px;
  --side-pad:     clamp(24px, 5vw, 40px);
}

/* ── 1. 리셋 & 기반 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; font-size: 16px; -webkit-text-size-adjust: 100%; } /* scroll-padding: 고정 헤더 72px + 여백 16px, 네이티브 앵커 점프 가림 방지 */
body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  color: var(--color-text);
  line-height: 1.75;
  background: var(--color-white);
  overflow-x: hidden;
  word-break: keep-all;        /* 한글: 어절(단어) 단위로만 줄바꿈 */
  overflow-wrap: break-word;   /* 안전장치: 긴 영문·URL·숫자는 넘칠 때만 분리 */
}
img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ── 2. 공통 유틸 ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}
.section   { padding: var(--section-py) 0; }
.bg-gray   { background: var(--color-bg); }
.pc-only   { display: none; }
@media (min-width: 769px) { .pc-only { display: inline; } }

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}
.section-header { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-dk);
  margin-bottom: var(--sp-md);
}
.section-subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-md);
  max-width: 540px;
  margin: 0 auto;
}
/* ── 3. 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: 500;
  letter-spacing: .02em;
  transition: background var(--trans-base), border-color var(--trans-base), color var(--trans-base),
              transform var(--dur-sm) var(--ease-out-quart), box-shadow var(--dur-md) var(--ease-out-quart);
  min-height: 52px;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); transition-duration: 90ms; }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,.12);
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,.5);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
/* ── 4. 헤더 ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out-quart), box-shadow .4s var(--ease-out-quart), border-color .4s var(--ease-out-quart);
}
.header.scrolled {
  background: var(--color-header-bg);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: none;   /* Apple식: 그림자 대신 헤어라인 보더 */
}
/* 히어로 없는 서브페이지: 항상 흰 배경 */
.page-hero ~ * .header,
body.has-no-hero .header {
  background: var(--color-header-bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-xl);
}

/* 로고 */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img {
  height: 50px;
  width: auto;
  display: block;
  transition: opacity var(--trans-base);
}
.logo-img:hover { opacity: .85; }

/* 푸터용 */
.logo-img-light {
  height: 38px;
}

/* GNB */
.gnb { flex: 1; display: flex; justify-content: center; }
.gnb-list {
  display: flex;
  height: var(--header-h);
}
.gnb-item { display: flex; align-items: center; }
.gnb-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 22px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  transition: color var(--trans-fast);
  white-space: nowrap;
}
.gnb-link:hover { color: var(--color-primary); }
.gnb-link.active { color: var(--color-primary); font-weight: 700; }

/* GNB 드롭다운 */
.gnb-item { position: relative; }
.gnb-drop {
  position: absolute;
  top: var(--header-h);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-4px) scale(.98);
  transform-origin: top center;
  transition: opacity var(--dur-sm) var(--ease-standard) 70ms,
              transform var(--dur-sm) var(--ease-standard) 70ms,
              visibility 0s linear 270ms;
  z-index: 200;
  list-style: none;
}
.gnb-item.has-drop:hover .gnb-drop,
.gnb-item.has-drop:focus-within .gnb-drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition: opacity var(--dur-md) var(--ease-out-expo),
              transform var(--dur-md) var(--ease-out-expo),
              visibility 0s;
}
.gnb-drop li a {
  display: block;
  padding: 10px 20px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: background var(--trans-fast), color var(--trans-fast);
}
.gnb-drop li a:hover {
  background: var(--color-bg);
  color: var(--color-accent);
}


/* 햄버거 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 6px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-primary-dk);
  border-radius: 2px;
  transition: transform .35s var(--ease-spring), opacity .2s ease, background var(--trans-base);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 메뉴 */
.mobile-menu {
  position: fixed;
  top: var(--header-h-mob);
  right: 0;
  width: min(320px, 100vw);
  height: calc(100dvh - var(--header-h-mob));
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform var(--trans-slow);
  z-index: 999;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-inner { flex: 1; display: flex; flex-direction: column; }

.mobile-nav { flex: 1; padding: var(--sp-md) 0; }
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 16px var(--side-pad);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  opacity: 0;
  transform: translateX(14px);
  transition: opacity .45s var(--ease-out-quart), transform .45s var(--ease-out-quart),
              color var(--trans-fast), background var(--trans-fast);
  gap: 10px;
}
/* 드로어 열릴 때 링크 순차 등장 (지연은 open 상태에만 → 닫힐 땐 즉시) */
.mobile-menu.open .mobile-nav a { opacity: 1; transform: none; }
.mobile-menu.open .mobile-nav a:nth-child(1) { transition-delay: 90ms; }
.mobile-menu.open .mobile-nav a:nth-child(2) { transition-delay: 140ms; }
.mobile-menu.open .mobile-nav a:nth-child(3) { transition-delay: 190ms; }
.mobile-menu.open .mobile-nav a:nth-child(4) { transition-delay: 240ms; }
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--color-primary);
  background: var(--color-bg);
}
.mobile-nav a.active::before {
  content: '';
  width: 3px; height: 20px;
  background: var(--color-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.menu-overlay {
  position: fixed;
  top: var(--header-h-mob);
  left: 0;
  right: 0;
  bottom: 0;
  /* blur 없음 — backdrop-filter는 모바일 GPU에서 드로어 개폐·페이지 전환 버벅임 유발 */
  background: rgba(0, 0, 0, .45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease-out-quart);
}
.menu-overlay.show { opacity: 1; pointer-events: auto; }

/* ── 5. 페이지 히어로 (서브페이지 공통) ── */
.page-hero {
  position: relative;
  height: clamp(192px, 24vw, 304px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: var(--header-h);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/header.webp');
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 6s ease;
}
@media (max-width: 768px) {
  .page-hero-bg { background-image: url('images/header-mob.webp'); }
}
.page-hero:hover .page-hero-bg { transform: scale(1); }
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(var(--overlay-dark-rgb), .82) 0%,
    rgba(var(--overlay-dark-rgb), .55) 60%,
    rgba(var(--overlay-dark-rgb), .3) 100%
  );
}
.page-hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(28px, 4vw, 48px);
}
.page-hero-title {
  font-size: var(--fs-h1);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.2;
}
.page-hero-title em {
  display: block;
  font-style: normal;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── 6. 히어로 (홈) ── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  max-height: 1000px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: url('images/hero-bridge-fhd.webp');
  opacity: 1;
  will-change: transform;
  transform-origin: center center;
  animation: kenBurns 25s linear infinite alternate;
}
@keyframes kenBurns {
  0%   { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.07) translate(-1%, 0.5%); }
}
/* 모바일: 전용 경량 이미지 + 켄번즈/합성레이어 해제
   (Chromium은 will-change로 전체화면 합성 레이어를 상시 유지 → 페이지 이동 시 부담) */
@media (max-width: 768px) {
  .hero-slide {
    background-image: url('images/hero-bridge-mob.webp');
    animation: none;
    will-change: auto;
    transform: none;
  }
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    rgba(var(--overlay-dark-rgb), .82) 0%,
    rgba(var(--overlay-dark-rgb), .5) 55%,
    rgba(var(--overlay-dark-rgb), .15) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
/* 히어로 텍스트 순차 등장 (transform/opacity만 — CLS 없음) */
.hero-title  { animation: rise-in 1s var(--ease-out-expo) both; }
.hero-desc   { animation: rise-in 1s .15s var(--ease-out-expo) both; }
.hero-scroll { animation: fade-in 1s .6s var(--ease-out-quart) both; }
.page-hero-content { animation: rise-in .8s .1s var(--ease-out-expo) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } }
@keyframes fade-in { from { opacity: 0; } }
.hero-title {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: var(--sp-xl);
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero-title strong { color: var(--color-accent-lt); }
.hero-desc {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.82);
  line-height: 1.9;
  margin-bottom: var(--sp-2xl);
}
.br-mob { display: none; }   /* 모바일 전용 줄바꿈 (기본 숨김) */

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 36px);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;               /* 데스크톱·모바일 공통 표시 */
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--color-white);
}
.hero-scroll svg { animation: heroBounce 2.4s ease-in-out infinite; }
@keyframes heroBounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(6px); opacity: 1; }
}


/* ── 9. 사업분야 카드 ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}
.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-lg) var(--ease-out-quart), box-shadow var(--dur-lg) var(--ease-out-quart);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.service-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out-expo);
}
.service-card:hover .service-img img { transform: scale(1.04); }
.service-overlay {
  position: absolute; inset: 0;
  background: rgba(var(--overlay-dark-rgb), .7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--trans-base);
}
.service-card:hover .service-overlay { opacity: 1; }
.service-more {
  color: var(--color-white);
  border: 2px solid var(--color-white);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background var(--trans-fast), color var(--trans-fast), transform var(--dur-sm) var(--ease-out-quart);
}
.service-more:hover { background: var(--color-white); color: var(--color-primary); }
.service-more:active { transform: scale(.97); }
.service-body {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-num {
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--color-primary);
  opacity: .25;
  display: block;
  margin-bottom: 8px;
}
.service-body h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--color-primary-dk);
  margin-bottom: 14px;
}
.service-body p {
  font-size: var(--fs-sm);
  color: var(--color-text-md);
  line-height: 1.85;
  margin-bottom: 24px;
  flex: 1;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags li {
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
}

/* ── 10. 사업분야 상세 (services.html) ── */
.service-detail-section { padding: var(--section-py) 0; }
.service-detail-section:nth-child(even) { background: var(--color-bg); }

.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.service-detail-grid.reverse { direction: rtl; }
.service-detail-grid.reverse > * { direction: ltr; }

.service-detail-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-xl);
}
.service-detail-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo);
}
.service-detail-img:hover img { transform: scale(1.04); }

.service-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: var(--sp-md);
}
.service-detail-text h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--color-primary-dk);
  line-height: 1.3;
  margin-bottom: var(--sp-lg);
}
.service-detail-text p {
  font-size: var(--fs-base);
  color: var(--color-text-md);
  line-height: 1.9;
  margin-bottom: var(--sp-lg);
}
.service-scope {
  border-top: 2px solid var(--color-primary);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-xl);
}
.service-scope h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-lt);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-md);
}
.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scope-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--color-text);
}
.scope-item::before {
  content: '▸';
  color: var(--color-accent);
  font-size: 10px;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ── 11. 시공실적 ── */
.portfolio-more { text-align: center; margin-top: 48px; }

/* ── 14. 회사연혁 타임라인 ── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--color-border);
}
.timeline-item {
  position: relative;
  padding-bottom: 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid var(--color-white);
  outline: 2px solid var(--color-border);
}
.timeline-item.highlight::before {
  background: var(--color-accent);
  outline-color: var(--color-accent);
  width: 14px; height: 14px;
  left: -38px; top: 6px;
}
.timeline-year {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.timeline-item.highlight .timeline-year { color: var(--color-accent); }
.timeline-events { display: flex; flex-direction: column; gap: 6px; }
.timeline-events li {
  font-size: var(--fs-sm);
  color: var(--color-text-md);
  padding-left: 16px;
  position: relative;
}
.timeline-events li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-text-lt);
  font-size: 10px;
  top: 3px;
}

/* ── 15. CEO 인사말 ── */
.greeting-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}
.greeting-text blockquote {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--color-primary-dk);
  line-height: 1.6;
  border-left: 4px solid var(--color-accent);
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
  font-style: normal;
  width: 100%;
}
.greeting-text p {
  font-size: var(--fs-base);
  color: var(--color-text-md);
  line-height: 2;
  margin-bottom: var(--sp-lg);
}
.greeting-sig {
  margin-top: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.section-divider { border: 0; border-top: 1px solid var(--color-border); margin: 0; }
.greeting-sig-text strong { display: block; font-size: var(--fs-lg); font-weight: 700; color: var(--color-primary-dk); }
.greeting-sig-text span   { font-size: var(--fs-sm); color: var(--color-text-lt); }

/* ── 연도별 시공실적 ── */
.pl2-section { background: var(--color-bg-alt); }
.pl2-wrap { display: flex; flex-direction: column; gap: 0; }
.pl2-year-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid var(--color-border-blue);
}
.pl2-year-group:first-child { border-top: 2px solid var(--color-primary); }
.pl2-year-head {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 28px 24px 28px 0;
  border-right: 2px solid var(--color-accent);
  position: sticky;
  top: 80px;
  align-self: start;
}
.pl2-year-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary-dk);
  line-height: 1;
  letter-spacing: -1px;
}
.pl2-list {
  list-style: none;
  padding: 12px 0 12px 32px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.pl2-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background .15s;
}
.pl2-list li:hover { background: var(--color-bg-hover-blue); }
.pl2-name { font-size: .875rem; color: var(--color-text-slate); line-height: 1.5; }

/* 하단 "..." 더보기 히스토리 */
.pl2-more-history {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 12px;
  gap: 14px;
  opacity: .5;
}
.pl2-more-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pl2-more-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 1;
}
.pl2-more-dots span:nth-child(2) { opacity: .5; }
.pl2-more-dots span:nth-child(3) { opacity: .2; }

@media (max-width: 768px) {
  .pl2-year-group { grid-template-columns: 1fr; }
  .pl2-year-head {
    flex-direction: row; align-items: center; gap: 10px;
    padding: 16px 0 12px;
    border-right: none; border-bottom: 2px solid var(--color-accent);
    position: static;
  }
  .pl2-year-num { font-size: 1.3rem; }
  .pl2-list { padding: 8px 0; }
  .pl2-list li { padding: 8px 4px; }
  .pl2-name { font-size: .82rem; }
}

/* ── 19. 푸터 ── */

/* ── 미니멀 단일 푸터 ── */
.footer-single {
  border-top: 1px solid var(--color-border-lt);
  background: var(--color-white);
  padding: 28px 0;
}
.footer-single-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.footer-single-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-single-info p {
  font-size: 12px;
  color: var(--color-text-gray);
  line-height: 1.6;
}
.footer-single-info p:last-child {
  margin-top: 8px;
}
.footer-single-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 0;
  flex-shrink: 0;
  border-left: 1px solid var(--color-border-lt);
  padding-left: 32px;
}
.footer-single-links li + li::before {
  content: '|';
  color: var(--color-text-faint-lt);
  margin: 0 12px;
  font-size: 12px;
}
.footer-single-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-gray-dk);
  white-space: nowrap;
  transition: color var(--trans-fast);
}
.footer-single-links li { display: flex; align-items: center; }
.footer-single-links a:hover { color: var(--color-primary); text-decoration: underline; }

@media (max-width: 768px) {
  .footer-single { border-top: none; }
  .footer-single-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-single-links { border-left: none; padding-left: 0; border-top: none; padding-top: 0; }
}

/* ── 20. 퀵 메뉴 ── */
.quick-menu {
  position: fixed;
  bottom: 28px; right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}
.quick-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-md) var(--ease-spring), box-shadow var(--dur-md) var(--ease-out-quart),
              opacity var(--dur-md) var(--ease-out-quart), background var(--trans-base), color var(--trans-base);
}
.quick-btn svg { width: 22px; height: 22px; }
.quick-btn.tel  { background: var(--color-primary); color: var(--color-white); }
.quick-btn.top  {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.9);
}
.quick-btn.top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.quick-btn:hover { transform: scale(1.06); box-shadow: var(--shadow-xl); }
.quick-btn:active { transform: scale(.94); }
.quick-btn.top:hover { background: var(--color-primary); color: var(--color-white); }
.quick-btn.top.visible:hover { transform: translateY(0) scale(1.06); }
.quick-btn.top.visible:active { transform: translateY(0) scale(.94); }

/* ── 21. 스크롤 애니메이션 ── */
[data-aos] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-xl) var(--ease-out-expo),
              transform var(--dur-xl) var(--ease-out-expo);
}
[data-aos].aos-animate { opacity: 1; transform: none; }
[data-aos].aos-instant { transition: none; }   /* 첫 화면 요소: 플래시 방지 */
[data-delay="100"] { transition-delay: 90ms; }
[data-delay="200"] { transition-delay: 180ms; }
[data-delay="300"] { transition-delay: 270ms; }

/* 그리드 자동 스태거: 컨테이너는 즉시, 자식이 순차 등장
   (transition 대신 animation — 카드 자체 hover transition과 충돌 방지) */
[data-aos].aos-stagger { opacity: 1; transform: none; transition: none; }
.aos-stagger > * { opacity: 0; }
.aos-stagger.aos-animate > * {
  opacity: 1;
  animation: rise-in var(--dur-xl) var(--ease-out-expo) backwards;
  animation-delay: calc(var(--stagger-i, 0) * 70ms);
}
.aos-stagger.aos-instant > * { animation: none; }

/* ── 22. 페이지 전환 (View Transitions — 점진적 향상) ──
   모바일·태블릿(≤1024px)은 전체 페이지 스냅샷 비용으로 전환이 버벅여 VT 비활성.
   ※ 실측: @media 안에 중첩된 @view-transition은 Chrome에서 발동하지 않는다
     (pageswap 이벤트의 event.viewTransition이 데스크톱 폭에서도 null).
     즉 현재 VT는 사실상 어디서도 켜지지 않는다 — 켜려면 이 규칙을 최상위로 빼야 함. */
@media (min-width: 1025px) {
  @view-transition { navigation: auto; }
}

::view-transition-old(root) { animation: vt-out 200ms var(--ease-standard) both; }
::view-transition-new(root) { animation: vt-in 340ms var(--ease-out-quart) both; }
@keyframes vt-out { to   { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; } }

/* 고정 헤더는 독립 스냅샷 → 전환 중 헤더가 페이지와 함께 사라지지 않음
   VT가 켜지는 폭에서만 선언 (모바일에서 불필요한 요소 격리 비용 방지) */
@media (min-width: 1025px) {
  .header { view-transition-name: site-header; }
}

@keyframes page-in { from { opacity: 0; } }

/* VT 미지원 브라우저(구형 Firefox 등) 폴백: 가벼운 페이드-인 */
@supports not (view-transition-name: none) {
  body { animation: page-in .5s var(--ease-out-quart) both; }
}

/* 모바일·태블릿에는 페이지 진입 페이드를 넣지 않는다.
   `from { opacity: 0 }`이면 새 문서의 첫 프레임이 통째로 투명해지고,
   Chrome 계열(Blink)은 "의미 있는 첫 페인트"가 나올 때까지 이전 페이지를 붙잡아 둔다(paint holding).
   → 파이어폭스는 멀쩡한데 크롬·삼성인터넷에서만 "멈췄다 넘어가는" 체감이 생겼던 원인. */

/* 드로어 링크로 페이지 이동 직전: 닫힘 애니메이션 생략 (내비게이션과 겹치면 버벅임) */
.menu-instant .mobile-menu,
.menu-instant .menu-overlay,
.menu-instant .mobile-nav a,
.menu-instant .hamburger span { transition: none !important; }

/* =========================================================
   RESPONSIVE ≤ 1024px (태블릿)
   ========================================================= */
@media (max-width: 1024px) {
  .gnb { display: none; }
  .hamburger { display: flex; }

  .services-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }

  .greeting-grid { grid-template-columns: 240px 1fr; }
  .service-detail-grid { grid-template-columns: 1fr; }
  .service-detail-grid.reverse { direction: ltr; }
}

/* =========================================================
   RESPONSIVE ≤ 768px (모바일)
   ========================================================= */
@media (max-width: 768px) {
  :root { --header-h: var(--header-h-mob); }

  /* 히어로 */
  .hero { min-height: 100svh; }
  .hero-content { margin-bottom: 16vh; }   /* 모바일: 문구를 배경 지평선 위로 끌어올림 */
  .hero-slide { background-position: 35% center; }   /* 모바일: 왼쪽 교량이 더 보이게 (scale 동일) */
  .hero-desc { font-size: var(--fs-md); margin-bottom: 0; }
  .br-mob { display: inline; }   /* 모바일: 줄바꿈 노출 */

  /* 서비스 */
  .services-grid { grid-template-columns: 1fr; gap: 20px; }

  /* 서브페이지 히어로 */
  .page-hero { height: clamp(200px, 45vw, 280px); }

  /* 인사말 */
  .greeting-grid { grid-template-columns: 1fr; }

  /* 회사연혁 — padding-left 24px에 맞춰 마커 오프셋 보정 (세로줄 중앙 정렬) */
  .timeline { padding-left: 24px; }
  .timeline-item::before { left: -28px; }
  .timeline-item.highlight::before { left: -30px; }

  /* 사업분야 */
  .service-detail-grid { gap: 28px; }
  .scope-grid { grid-template-columns: 1fr; }

  /* 퀵 */
  .quick-btn { width: 46px; height: 46px; }
}

/* =========================================================
   RESPONSIVE ≤ 480px (소형 모바일)
   ========================================================= */
@media (max-width: 480px) {
  .container { padding-left: 24px !important; padding-right: 24px !important; }

  .logo-img { height: 38px; }
  .logo-img-sub { height: 30px !important; margin-left: 5px !important; }
  .logo-img-light { height: 28px; }
}

/* ── 면허증 카드 ── */
.license-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}
.license-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform var(--trans-base), box-shadow var(--trans-base);
}
.license-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.11);
}
.license-img {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-bg-hover);
}
.license-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.license-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--color-border-xlt);
  text-align: center;
}
.license-info strong {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-primary-dk);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.license-info span {
  font-size: var(--fs-xs);
  color: var(--color-text-lt);
}

@media (max-width: 768px) {
  .license-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; max-width: 100%; }
  .license-img { aspect-ratio: 2/3; }
  .license-info { padding: 10px 10px; }
  .license-info strong { font-size: 11px; -webkit-line-clamp: 2; }
  .license-info span { font-size: 10px; }
}

/* ── 개인정보처리방침 모달 ── */
.privacy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-modal-dim);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.privacy-overlay.show { display: flex; }
.privacy-modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.privacy-modal-header h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-primary-dk);
}
.privacy-close {
  font-size: 1.1rem;
  color: var(--color-text-faint);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s;
}
.privacy-close:hover { background: var(--color-bg-hover); color: var(--color-text-gray-dkr); }
.privacy-modal-body {
  overflow-y: auto;
  padding: 24px 28px;
  font-size: var(--fs-sm);
  color: var(--color-text-md);
  line-height: 1.85;
}
.privacy-modal-body h4 {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-primary-dk);
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border-xlt);
}
.privacy-modal-body h4:first-of-type { margin-top: 12px; }
.privacy-modal-body p { margin-bottom: 10px; }
.privacy-modal-body ul { padding-left: 20px; margin-bottom: 10px; }
.privacy-modal-body ul li { list-style: disc; margin-bottom: 4px; }

@media (max-width: 480px) {
  .privacy-modal-body { padding: 16px 18px; }
  .privacy-modal-header { padding: 16px 18px; }
}

/* 헤더 서브 로고 */
.logo-img-sub {
  height: 44px;
  width: auto;
  display: block;
  margin-left: 10px;
  opacity: .9;
  transition: opacity var(--trans-fast);
}
.logo-img-sub:hover { opacity: 1; }

/* ── 투명 헤더 위 텍스트/아이콘 흰색 ── */
.header:not(.scrolled) .gnb-link { color: rgba(255,255,255,.9); }
.header:not(.scrolled) .gnb-link:hover { color: var(--color-white); }
.header:not(.scrolled) .gnb-link.active { color: var(--color-white); font-weight: 700; }
.header:not(.scrolled) .hamburger span { background: var(--color-white); }
.header:not(.scrolled) .gnb-drop { background: var(--color-white); }
.header:not(.scrolled) .gnb-drop li a { color: var(--color-text); }

/* ── 로고 컬러/흰색 전환 ── */
.logo-white { display: none; }
.logo-color { display: block; }

/* 투명 헤더일 때: 흰색 로고 표시, 컬러 로고 숨김 */
.header:not(.scrolled) .logo-white { display: block; }
.header:not(.scrolled) .logo-color { display: none; }


/* 메뉴 호버 시 헤더 흰 배경 */
.header:not(.scrolled):has(.gnb-item:hover) {
  background: var(--color-header-bg);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: none;
}
.header:not(.scrolled):has(.gnb-item:hover) .gnb-link { color: var(--color-text); }
.header:not(.scrolled):has(.gnb-item:hover) .gnb-link:hover { color: var(--color-primary); }
.header:not(.scrolled):has(.gnb-item:hover) .gnb-link.active { color: var(--color-primary); font-weight: 700; }
.header:not(.scrolled):has(.gnb-item:hover) .hamburger span { background: var(--color-text); }
.header:not(.scrolled):has(.gnb-item:hover) .logo-color { display: block; }
.header:not(.scrolled):has(.gnb-item:hover) .logo-white { display: none; }

/* 모바일 메뉴 열렸을 때 헤더 흰색 */
.header.menu-open {
  background: var(--color-header-bg) !important;
  border-color: var(--color-border);
}
.header.menu-open .logo-color { display: block !important; }
.header.menu-open .logo-white { display: none !important; }
.header.menu-open .hamburger span { background: var(--color-text) !important; }

/* ── 메인 회사소개 피처 섹션 ── */
.about-feature {
  padding: clamp(64px, 8vw, 100px) 0;
  background: var(--color-primary-dk);
}
.about-feature-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
.about-feature-text { max-width: 560px; }
.about-feature-text .section-label { color: var(--color-accent-lt); }
.about-feature-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  margin: 12px 0 20px;
}
.about-feature-desc {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.65);
  line-height: 1.8;
  max-width: 600px;
}

@media (max-width: 768px) {
  .about-feature-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* 모바일 세로 여백 축소 */
@media (max-width: 768px) {
  :root { --section-py: clamp(36px, 6vw, 64px); }
  .about-feature { padding: 40px 0; }
}

/* ── 23. 모션 최소화 설정 존중 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  [data-aos], .aos-stagger > *, .mobile-nav a { opacity: 1 !important; transform: none !important; }
  .hero-scroll svg { opacity: .85; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

