/* =========================================================
   법무법인 한결 — 보조 CSS (full-bleed / overflow / slider 보정 / dark)
   본문은 Tailwind utility 중심. 여기엔 CDN 한계 보정만 둔다.
   ========================================================= */

:root { --hk-ink:#1e293b; --hk-gold:#b89a5e; }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* 세리프 한글 제목 */
.font-serif-ko { font-family: "Noto Serif KR", "Pretendard", serif; }

/* 전 뷰포트 가로 overflow 방지 (280/320 합격선) */
img, video { max-width: 100%; height: auto; }
*, *::before, *::after { min-width: 0; }

/* Tailwind4 CDN grid 함정 우회: 명시 minmax(0,1fr) */
.hk-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.hk-grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.hk-grid-4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1023px){ .hk-grid-4{grid-template-columns:repeat(2,minmax(0,1fr));} .hk-grid-3{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:767px){ .hk-grid-2,.hk-grid-3,.hk-grid-4{grid-template-columns:minmax(0,1fr);} }

/* 제목 장식선 */
.hk-rule::after{ content:""; display:block; width:54px; height:1px; margin:18px auto 0;
  background:linear-gradient(90deg,transparent,var(--hk-gold),transparent); }

/* Swiper 슬라이드 display 강제 보정 */
.hk-popup-swiper .swiper-slide{ display:flex !important; }

/* 헤더 전환 */
.hk-header{ transition:background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
.hk-header.is-solid{ background:rgba(255,255,255,.96); box-shadow:0 1px 0 rgba(0,0,0,.06); }
.hk-header.is-solid .hk-navlink,.hk-header.is-solid .hk-logo-t{ color:#1e293b; }
.hk-header.is-solid .hk-logo-s{ color:#64748b; }
.hk-header.is-solid .hk-cta{ color:#1e293b; border-color:rgba(30,41,59,.35); }
.hk-header.is-solid .hk-icon{ color:#1e293b; }

/* 모바일 드로어 */
.hk-drawer{ transition:transform .35s cubic-bezier(.4,0,.2,1); }
.hk-drawer.is-open{ transform:translateX(0); }
body.hk-lock{ overflow:hidden; }

/* TOP 버튼 */
.hk-top{ transition:opacity .3s ease, transform .3s ease; }

/* AOS 미발동 대비 IntersectionObserver fallback */
[data-aos].hk-in{ opacity:1 !important; transform:none !important; }

/* ---------- 다크 모드 ---------- */
html.dark body{ background:#0f1623; color:#cbd5e1; }
html.dark .hk-sec-light{ background:#0f1623 !important; }
html.dark .hk-sec-cream{ background:#131c2b !important; }
html.dark .hk-card{ background:#1a2536 !important; border-color:rgba(255,255,255,.08) !important; }
html.dark .hk-card .hk-card-t{ color:#f1f5f9 !important; }
html.dark .hk-card .hk-card-d{ color:#94a3b8 !important; }
html.dark .hk-title{ color:#f1f5f9 !important; }
html.dark .hk-sub{ color:#94a3b8 !important; }
html.dark .hk-header.is-solid{ background:rgba(15,22,35,.96); box-shadow:0 1px 0 rgba(255,255,255,.06); }
html.dark .hk-header.is-solid .hk-navlink,
html.dark .hk-header.is-solid .hk-logo-t,
html.dark .hk-header.is-solid .hk-icon,
html.dark .hk-header.is-solid .hk-cta{ color:#e2e8f0; }
html.dark .hk-chip{ background:rgba(184,154,94,.16) !important; }

/* 포커스 접근성 */
a:focus-visible,button:focus-visible{ outline:2px solid var(--hk-gold); outline-offset:2px; }
