/* ═══════════════════════════════════════════════════════════════════════════
   입체감 · 분위기 레이어 (2026-11-05 · 사용자 요청)
   "현재 홈페이지를 좀 더 입체감 주면 좋을 곳들을 골라서 입체감 주고 전체적인
    분위기 업그레이드"

   ★ 원칙
   · 색은 바꾸지 않습니다 — 크림 · 니어블랙 · 금색 그대로(남색 스킨·색 시안 A~E
     거절 이력). 바뀌는 것은 **그림자 · 겹침 · 둥근 정도 · 움직임**뿐입니다.
   · 전부 둥글게 하지 않습니다(사용자: "전부 둥글기만 한 건 X").
     큰 영문 제목 · 가는 선 · 연혁 줄은 그대로 각지게 두고,
     손에 잡히는 것(버튼 · 카드 · 사진)만 둥글게 합니다.
   · 아이덴티티 = **겹친 유리판**. 대표 사진 뒤에 금빛 유리판 한 장이 비켜
     겹쳐 있고(.about-figure-img · .feat-img · 사업소개 사진), 메인 섹션은
     위로 한 장씩 포개지는 판(둥근 윗모서리 + 위쪽 그림자)입니다.
   · 이 파일 하나와 `tk-depth.js` 를 빼면 전부 예전 모습으로 돌아갑니다.
     페이지 <style> 뒤에 걸어 같은 선택자를 이깁니다(</head> 바로 앞).
   · 팝업(.pop · B안)·SUIT 글꼴·사장님이 고른 사진은 건드리지 않습니다.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --dp-r-xl: 28px;      /* 대표 사진 */
  --dp-r-lg: 20px;      /* 카드 */
  --dp-r-md: 14px;      /* 카드 안 사진 */
  --dp-sheet: 44px;     /* 섹션 판의 윗모서리 */
  --dp-plate: 18px;     /* 겹친 유리판이 비켜 나는 거리 */
  --dp-ease: cubic-bezier(.2,.7,.2,1);
  /* 그림자는 순검정이 아니라 니어블랙(13,17,23) — 크림 바탕에서 탁해지지 않게 */
  --dp-sh-1: 0 1px 2px rgba(13,17,23,.05), 0 6px 16px -6px rgba(13,17,23,.10);
  --dp-sh-2: 0 2px 6px rgba(13,17,23,.06), 0 22px 44px -18px rgba(13,17,23,.26);
  --dp-sh-3: 0 10px 24px -10px rgba(13,17,23,.22), 0 40px 80px -28px rgba(13,17,23,.40);
  --dp-plate-c: rgba(196,162,107,.20);
  --dp-plate-line: rgba(159,126,70,.32);
}
@media (max-width: 768px) {
  :root { --dp-sheet: 28px; --dp-plate: 10px; --dp-r-xl: 20px; --dp-r-lg: 16px; }
}

/* ── 1. 버튼 — 알약 모양 + 떠오름 · 눌림 (팝업 B안과 같은 어법) ───────────── */
.btn-line {
  border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s,
              transform .25s var(--dp-ease), box-shadow .25s var(--dp-ease);
}
.btn-line:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(13,17,23,.45); }
.btn-line:active { transform: translateY(0) scale(.98); box-shadow: 0 4px 10px -6px rgba(13,17,23,.4); transition-duration: .08s; }
.btn-line.gold { box-shadow: 0 8px 22px -12px rgba(159,126,70,.75), inset 0 1px 0 rgba(255,255,255,.28); }
.btn-line.gold:hover { box-shadow: 0 16px 32px -14px rgba(159,126,70,.85), inset 0 1px 0 rgba(255,255,255,.28); }
.ptab { border-radius: 999px; }

/* ── 2. 등장 효과 — 아래에서 올라오며 살짝 커짐(깊이에서 앞으로 나오는 느낌) ── */
.reveal { transform: translateY(32px) scale(.985); transform-origin: 50% 0; }
.reveal.in { transform: none; }

/* ── 3. 메인 히어로 ──────────────────────────────────────────────────────── */
/* 배경은 tk-depth.js 가 스크롤보다 느리게 내립니다(--dp-y). 아래로 밀리는
   만큼 모자라지 않게 미리 6% 키워 둡니다. */
.hero-slides { top: -6%; transform: translate3d(0, var(--dp-y, 0px), 0); will-change: transform; }   /* 위로 6% 늘려 패럴랙스로 내려가도 윗선이 안 비게 — scale 로 키우면 가로로 넘쳐 clip-scan 에 잡힙니다 */
.hero-copy { transform: translate3d(0, var(--dp-cy, 0px), 0); opacity: var(--dp-co, 1); }
.hero h1 { text-shadow: 0 2px 0 rgba(0,0,0,.08), 0 18px 48px rgba(0,0,0,.35); }
/* 오른쪽 메뉴 판 — 떠 있는 유리판 */
@media (min-width: 1025px) {
  .hero-cards {
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.65), 0 0 0 1px rgba(246,243,236,.10), inset 0 1px 0 rgba(255,255,255,.14);
  }
  .hero-cards .h-card { transition: background .25s ease, transform .3s var(--dp-ease); }
  .hero-cards .h-card:hover { transform: translateX(-4px); }
}

/* ── 4. 겹친 유리판 — 대표 사진 뒤에 금빛 판 한 장 ─────────────────────────── */
.about-figure-img,
.feat-img {
  border-radius: var(--dp-r-xl);
  box-shadow:
    var(--dp-plate) var(--dp-plate) 0 0 var(--dp-plate-c),
    var(--dp-plate) var(--dp-plate) 0 1px var(--dp-plate-line),
    var(--dp-sh-3);
}
.about-figure-img { overflow: hidden; background-position: center var(--dp-py, 50%); }
.about-figure-img::after { border-radius: inherit; }
.feat-img { background-position: center var(--dp-py, 50%); }
.feat-img-foot .badge, .wcard-tag { border-radius: 999px; }
.feat-tags span { border-radius: 999px; padding: 6px 14px; }
@media (max-width: 768px) {
  .about-figure-img, .feat-img { margin-right: var(--dp-plate); }
}

/* ── 5. 메인 섹션을 한 장씩 포개기 ─────────────────────────────────────────
   윗모서리를 둥글게 하고 앞 섹션 위로 그만큼 올려, 판이 겹쳐 쌓인 것처럼.
   위쪽 그림자가 앞 섹션 위에 드리워 깊이가 생깁니다. */
.products-sec, .featured, .heritage-sec, .work-sec, .cta-sec {
  position: relative;
  border-radius: var(--dp-sheet) var(--dp-sheet) 0 0;
  margin-top: calc(var(--dp-sheet) * -1);
  box-shadow: 0 -18px 40px -22px rgba(13,17,23,.30);
}
.products-sec { z-index: 2; }
.featured     { z-index: 3; }
.heritage-sec { z-index: 4; }
.work-sec     { z-index: 5; }
.cta-sec      { z-index: 7; }
/* 영상 칸(클래스가 없는 section)도 같은 판으로 — 작업 칸 바로 다음 형제 */
.work-sec + section {
  position: relative; z-index: 6;
  border-radius: var(--dp-sheet) var(--dp-sheet) 0 0;
  margin-top: calc(var(--dp-sheet) * -1);
  overflow: hidden;
  box-shadow: 0 -18px 40px -22px rgba(13,17,23,.45);
}
.tk-footer { position: relative; z-index: 8; }

/* ── 6. 제품 카드 — 떠 있는 타일 + 마우스 따라 기울기(tk-depth.js) ─────────── */
.pgrid { gap: 18px; border-top: 0; }
.pcard {
  border: 1px solid rgba(246,243,236,.09) !important;
  border-radius: var(--dp-r-lg);
  background: linear-gradient(160deg, rgba(246,243,236,.065), rgba(246,243,236,.015) 60%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 24px 44px -28px rgba(0,0,0,.75);
  transform: perspective(900px) rotateX(var(--dp-rx, 0deg)) rotateY(var(--dp-ry, 0deg)) translateY(var(--dp-ty, 0px));
  transition: transform .5s var(--dp-ease), box-shadow .4s var(--dp-ease), background .3s, border-color .3s;
  overflow: hidden;
}
.pcard:hover {
  --dp-ty: -6px;
  background: linear-gradient(160deg, rgba(246,243,236,.10), rgba(196,162,107,.05) 60%);
  border-color: rgba(196,162,107,.35) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 40px 70px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(196,162,107,.15);
}
.pcard.dp-tilting { transition: transform .12s linear, box-shadow .4s var(--dp-ease), background .3s, border-color .3s; }
/* 유리 위 빛 반사 — 마우스 자리(--dp-gx/gy)에 은은하게 */
.pcard::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--dp-gx, 50%) var(--dp-gy, 0%), rgba(255,255,255,.10), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.pcard:hover::after { opacity: 1; }
.pcard-img { border-radius: var(--dp-r-md); box-shadow: 0 14px 28px -18px rgba(0,0,0,.8); }
@media (max-width: 768px) {
  .pgrid { padding: 0 16px !important; gap: 12px; }
}

/* ── 7. 연혁 줄 — 마우스를 올리면 그 해가 카드처럼 떠오름 ────────────────── */
.timeline li { border-radius: 14px; transition: background .2s, padding .25s var(--dp-ease), box-shadow .25s, border-color .2s; }
.timeline li:hover {
  background: var(--paper); padding-left: 18px; padding-right: 14px;
  box-shadow: var(--dp-sh-2); border-bottom-color: transparent;
}
.timeline .tag { border-radius: 999px; padding: 4px 10px; }

/* ── 8. 시공 사례 카드 ─────────────────────────────────────────────────── */
.wcard { overflow: visible; }
.wcard-img { border-radius: var(--dp-r-lg); box-shadow: var(--dp-sh-1); transition: transform .5s var(--dp-ease), box-shadow .5s var(--dp-ease); }
.wcard-tag { z-index: 1; transition: transform .5s var(--dp-ease); }
.wcard:hover .wcard-img { transform: translateY(-8px); box-shadow: var(--dp-sh-3); }
.wcard:hover .wcard-tag { transform: translateY(-8px); }

/* ── 9. 견적 문의 칸 — 마우스를 따라 움직이는 금빛 조명 ───────────────────── */
.cta-sec::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(520px circle at var(--dp-mx, 50%) var(--dp-my, 60%), rgba(196,162,107,.16), transparent 65%);
  transition: background-position .2s;
}
.cta-sec h2 { text-shadow: 0 24px 60px rgba(0,0,0,.45); }

/* ── 10. 하위 페이지 머리 — 배경이 천천히 ──────────────────────────────── */
.subpage-hero .bg { top: -8%; transform: translate3d(0, var(--dp-y, 0px), 0); will-change: transform; }

/* ── 11. 하위 페이지 카드 — 둥근 모서리 + 그림자 + 떠오름 ─────────────────── */
.compare-card, .uc-card, .wcard2, .loc-card {
  border-radius: var(--dp-r-lg); overflow: hidden;
  box-shadow: var(--dp-sh-1);
  transition: transform .4s var(--dp-ease), box-shadow .4s var(--dp-ease);
}
.compare-card:hover, .uc-card:hover, .wcard2:hover { transform: translateY(-6px); box-shadow: var(--dp-sh-2); }
.loc-card { box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.compare-card .imgbox { border-radius: var(--dp-r-md); }
.use-card { border-radius: var(--dp-r-lg); box-shadow: var(--dp-sh-1); transition: box-shadow .4s var(--dp-ease); }
.use-card:hover { box-shadow: var(--dp-sh-2); }

/* 기술현황 성적서 — 액자가 종이처럼 떠 있게 */
.cert-card .frame { border-radius: 12px; box-shadow: var(--dp-sh-1); transition: box-shadow .3s var(--dp-ease); }
.cert-card:hover .frame { box-shadow: var(--dp-sh-3); }
.cert-card .stamp { border-radius: 999px; }

/* 사업소개 제품 사진 — 큰 사진 + 비켜 겹친 작은 사진이 실제로 층을 이루게 */
.prod-img-main { border-radius: var(--dp-r-xl); box-shadow: var(--dp-sh-2); }
.prod-img-main::after { border-radius: inherit; }
.prod-img-sub { border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 6px var(--paper), var(--dp-sh-3); }

/* ── 12. 움직임을 줄이도록 설정한 분 ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-slides, .subpage-hero .bg { transform: none; top: 0; }
  .hero-copy { transform: none; opacity: 1; }
  .pcard { transform: none !important; }
  .reveal { transform: none; }
  .btn-line:hover, .compare-card:hover, .uc-card:hover, .wcard2:hover,
  .wcard:hover .wcard-img, .wcard:hover .wcard-tag { transform: none; }
}

@media print {
  .products-sec, .featured, .heritage-sec, .work-sec, .cta-sec, .work-sec + section {
    margin-top: 0; border-radius: 0; box-shadow: none;
  }
  .about-figure-img, .feat-img, .pcard, .wcard-img, .prod-img-main, .prod-img-sub { box-shadow: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2차 — 움직임 (2026-11-06 · 사용자 요청)
   "스마트 팩토리 투어 아래처럼 사진이 움직이고, 글자가 생겨나고, 스크롤하면
    빛이 켜지는 것들을 메인뿐 아니라 다른 곳에도"
   전부 tk-depth.js 가 붙이는 클래스(.dp-*)로만 켜집니다 — JS 가 없으면 아무것도
   숨겨지지 않습니다(글자·사진이 처음부터 그대로 보임).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── A. 글자가 생겨남 — 제목을 낱말 단위로 아래에서 올라오게 ──────────────── */
.dp-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.dp-wi { display: inline-block; transform: translateY(112%); transition: transform .9s var(--dp-ease); transition-delay: calc(var(--i, 0) * 55ms); will-change: transform; }
.dp-split.dp-in .dp-wi { transform: none; }
/* 제목 이탤릭 강조(금색)는 올라온 뒤 한 번 빛남 */
/* 금빛 강조어 빛 — text-shadow 를 움직이면 제목 전체를 매 프레임 다시 그려 첫 Tab 까지 늦어집니다(실측). 뒤에 깐 빛 판의 투명도만 움직입니다 */
.dp-split em { position: relative; z-index: 0; }
.dp-split em::before { content: ''; position: absolute; inset: -.25em -.35em; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(196,162,107,.34), rgba(196,162,107,0) 70%); opacity: 0; pointer-events: none; will-change: opacity; }
.dp-split.dp-in em::before { animation: dpEmGlow 2.2s ease-out .8s 1; }
@keyframes dpEmGlow { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }

/* ── B. 차례로 나타남 — 카드·목록·사양줄이 한 칸씩 ──────────────────────── */
.dp-st > .dp-s { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--dp-ease), transform .8s var(--dp-ease); transition-delay: calc(var(--i, 0) * 70ms); }
.dp-st.dp-in > .dp-s { opacity: 1; transform: none; }
/* 제품 카드는 기울기 transform 을 쓰므로 opacity 만 */
.pgrid.dp-st > .pcard { transform: perspective(900px) rotateX(var(--dp-rx, 0deg)) rotateY(var(--dp-ry, 0deg)) translateY(var(--dp-ty, 0px)); }
.pgrid.dp-st:not(.dp-in) > .pcard { --dp-ty: 28px; }

/* ── C. 눈썹 줄(01 — ABOUT …)의 금색 선이 그어짐 ─────────────────────────── */
.sec-eyebrow.dp-eb::before { transform: scaleX(0); transform-origin: left; transition: transform .9s var(--dp-ease) .1s; }
.sec-eyebrow.dp-eb.dp-in::before { transform: scaleX(1); }

/* ── D. 사진이 켜짐 — 어둡게 있다가 밝아지며 천천히 움직임(켄 번즈) ──────── */
.dp-img { filter: brightness(.55) saturate(.6); transition: filter 1.4s ease; }
.dp-img.dp-lit { filter: brightness(1) saturate(1); }
.pcard:hover .pcard-img.dp-img { filter: grayscale(0) brightness(1.05); }
/* 카드 사진은 켜진 뒤 아주 천천히 커졌다 작아집니다(켄 번즈). `scale` 속성이라 hover 의
   transform 과 부딪히지 않습니다. 대표 사진(about·feat·사업소개)은 스크롤 패럴랙스가 이미 움직입니다. */
.pcard-img.dp-lit, .uc-img.dp-lit, .use-card .img.dp-lit, .compare-card .imgbox img.dp-lit, .wc-img img.dp-lit, .cert-card .frame img.dp-lit { animation: dpKen 20s ease-in-out 1s infinite alternate; }
@keyframes dpKen { from { scale: 1; } to { scale: 1.07; } }
.cert-card .frame { overflow: hidden; }
/* 불꽃 구(球) 사진 — 켜질 때 금빛이 번집니다 */
.feat-img.dp-lit {
  box-shadow:
    var(--dp-plate) var(--dp-plate) 0 0 var(--dp-plate-c),
    var(--dp-plate) var(--dp-plate) 0 1px var(--dp-plate-line),
    var(--dp-sh-3), 0 0 140px -10px rgba(214,140,70,.45);
  transition: box-shadow 2s ease;
}
/* 성적서 액자 도장이 켜짐 */
.cert-card .stamp { transition: box-shadow 1s ease, background .3s; }
.cert-card.dp-lit .stamp { box-shadow: 0 0 0 1px rgba(196,162,107,.6), 0 0 22px rgba(196,162,107,.55); }

/* ── E. 스크롤하면 빛이 켜짐 — 연혁 줄 ───────────────────────────────────── */
.timeline, .tl-body { position: relative; }
.timeline::before, .tl-body::before {
  content: ''; position: absolute; left: -18px; top: 0; width: 2px; height: var(--dp-tl, 0px);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-soft) 80%, transparent 100%);
  box-shadow: 0 0 14px rgba(196,162,107,.7); pointer-events: none;
}
.timeline li .year, .tl-year-group .yr { transition: color .5s, text-shadow .8s; }
.timeline li.dp-lit .year, .tl-year-group.dp-lit .yr { color: var(--gold-deep); text-shadow: 0 0 18px rgba(196,162,107,.45); }
.timeline li .tag { transition: background .5s, color .5s, border-color .5s; }
.timeline li.dp-lit .tag { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tl-year-group { position: relative; }
.timeline li::before, .tl-year-group::before {
  content: ''; position: absolute; left: -22px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line); transition: all .5s; box-sizing: border-box;
}
.timeline li { position: relative; }
.timeline li.dp-lit::before, .tl-year-group.dp-lit::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px rgba(196,162,107,.22), 0 0 16px rgba(196,162,107,.8); }
@media (max-width: 768px) { .timeline::before, .tl-body::before, .timeline li::before, .tl-year-group::before { display: none; } }

/* 어두운 제품 칸 — 들어오면 금빛 조명이 켜짐 */
.products-sec::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 2.4s ease;
  background: radial-gradient(ellipse 55% 60% at 12% 18%, rgba(196,162,107,.20), transparent 65%), radial-gradient(ellipse 40% 50% at 92% 90%, rgba(196,162,107,.10), transparent 65%);
}
.products-sec.dp-lit::before { opacity: 1; }
.products-sec > * { position: relative; z-index: 1; }
.subpage-hero.dp-lit::after { animation: dpHeroLight 1.8s ease-out 1; }
@keyframes dpHeroLight { from { opacity: 1; filter: brightness(.35); } to { opacity: 1; filter: brightness(1); } }

/* ── F. 숫자가 올라감(count-up) — 글자 흔들림 없게 숫자 폭 고정 ─────────── */
.dp-count { font-variant-numeric: tabular-nums; }

/* ── G. 맨 위 가는 금색 진행 줄 ─────────────────────────────────────────── */
.dp-prog { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 95; pointer-events: none; transform: scaleX(var(--dp-p, 0)); transform-origin: left;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); box-shadow: 0 0 10px rgba(196,162,107,.6); }

/* ── H. 누르면 물결 ─────────────────────────────────────────────────────── */
.btn-line, .ptab, .h-card, .pop-cta a, .pw-btns a, .pop-go2 a { position: relative; overflow: hidden; }
.dp-rip { position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); transform: scale(0); animation: dpRip .6s ease-out forwards; pointer-events: none; }
.btn-line .dp-rip, .ptab .dp-rip { background: rgba(196,162,107,.45); }
@keyframes dpRip { to { transform: scale(4); opacity: 0; } }

/* ── I. 메뉴를 열면 항목이 차례로 ───────────────────────────────────────── */
.drawer.open .drawer-nav > li { animation: dpRise .6s var(--dp-ease) both; animation-delay: calc(var(--i, 0) * 50ms + .08s); }
.drawer.open .drawer-aside, .drawer.open .drawer-contact { animation: dpRise .7s var(--dp-ease) both .25s; }
@keyframes dpRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── J. 첫 화면 — 바로가기 판·문구가 차례로 ────────────────────────────── */
.hero-cards.dp-st > .h-card, .hero-cards.dp-st > .h-card-row { transform: translateX(18px); }
.hero-eyebrow.dp-fade, .hero-tagline.dp-fade, .scroll-tag.dp-fade { opacity: 0; transition: opacity 1.2s ease .9s; }
.hero-eyebrow.dp-fade.dp-in, .hero-tagline.dp-fade.dp-in, .scroll-tag.dp-fade.dp-in { opacity: var(--dp-co, 1); }

@media (prefers-reduced-motion: reduce) {
  .dp-wi, .dp-st > .dp-s, .pgrid.dp-st > .pcard { transform: none !important; opacity: 1 !important; transition: none !important; }
  .dp-img { filter: none !important; animation: none !important; }
  .sec-eyebrow.dp-eb::before { transform: none; }
  .drawer.open .drawer-nav > li, .drawer.open .drawer-aside, .drawer.open .drawer-contact { animation: none; }
  .hero-eyebrow.dp-fade, .hero-tagline.dp-fade, .scroll-tag.dp-fade { opacity: 1; transition: none; }
  .dp-prog { display: none; }
}
@media print {
  .dp-wi, .dp-st > .dp-s { transform: none !important; opacity: 1 !important; }
  .dp-img { filter: none !important; animation: none !important; }
  .dp-prog, .timeline::before, .tl-body::before { display: none; }
}
