@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&display=swap&font-display=swap');

:root {
  --black: #0A0A0A;
  --dark: #1A1A1A;
  --mid: #555555;
  --light: #999999;
  --border: #E0E0E0;
  --bg: #FFFFFF;
  --bg-gray: #F5F5F5;
  --accent: #FF6B2B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-logo .brand {
  font-size: 22px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: 1px;
}

.nav-logo .sub {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--black); }
.nav-links a.active { color: var(--black); font-weight: 700; }

/* ── NAV DROPDOWN ── */
.nav-has-drop { position: relative; }
/* hover 브릿지: nav 항목과 드롭다운 사이 공백을 투명하게 덮어 hover 끊김 방지 */
.nav-has-drop::after {
  content: '';
  position: absolute;
  top: 100%; left: -10px; right: -10px;
  height: 16px;
}
.nav-drop {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 120px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
  list-style: none;
  display: none;
  z-index: 1001;
}
.nav-drop::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px;
  background: #fff;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.nav-has-drop:hover .nav-drop { display: block; }
.nav-drop li { list-style: none; }
.nav-drop li a {
  display: block !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--mid) !important;
  background: none !important;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border-radius: 8px;
}
.nav-drop li a:hover { color: var(--black) !important; background: var(--bg-gray) !important; }
.nav-drop li a.active { color: var(--black) !important; font-weight: 700 !important; }
.nav-arrow { font-size: 9px; color: var(--light); margin-left: 2px; }

.nav-links .contact-btn {
  font-size: 13px;
  font-weight: 700;
  color: #fff !important;
  background: var(--black);
  padding: 8px 20px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-links .contact-btn:hover { background: var(--accent); }
.nav-links .contact-btn.active { background: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: all 0.3s;
}

/* ── PAGE HEADER (서브페이지 공통) ── */
.page-header {
  padding: 140px 5% 80px;
  background: var(--black);
}

.page-header .ph-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.2;
}

.page-header h1 em {
  font-style: normal;
  color: var(--accent);
}

.page-header p {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  margin-top: 16px;
  line-height: 1.8;
  font-weight: 300;
}

/* ── SECTION ── */
.section-wrap {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--black);
  line-height: 1.25;
  letter-spacing: -1px;
}

.divider { border: none; border-top: 1px solid var(--border); margin: 0 5%; }

/* ── FOOTER ── */
footer {
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-sitemap {
  padding: 64px 5% 48px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.fs-brand .fsb-logo { font-size: 20px; font-weight: 900; color: rgba(255,255,255,0.7); letter-spacing: 1px; margin-bottom: 6px; }
.fs-brand .fsb-sub { font-size: 11px; color: rgba(255,255,255,0.25); margin-bottom: 20px; }
.fs-brand .fsb-desc { font-size: 12px; color: rgba(255,255,255,0.2); line-height: 1.8; margin-bottom: 20px; }
.fs-brand .fsb-contact { font-size: 12px; color: rgba(255,255,255,0.3); line-height: 1.9; }
.fs-brand .fsb-contact a { color: rgba(255,255,255,0.3); text-decoration: none; }
.fs-brand .fsb-contact a:hover { color: rgba(255,255,255,0.6); }

.fs-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-bottom: 18px; }
.fs-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fs-col ul a { font-size: 13px; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.fs-col ul a:hover { color: rgba(255,255,255,0.75); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 24px 5%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .fb-info { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-bottom .fb-info span { font-size: 11px; color: rgba(255,255,255,0.18); }
.footer-bottom .fb-copy { font-size: 11px; color: rgba(255,255,255,0.15); }

@media (max-width: 1000px) { .footer-sitemap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-sitemap { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ── BOTTOM BAR ── */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 50px;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 990;
}

.bb-text {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bb-text .bb-tag {
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.bb-sep { color: rgba(255,255,255,0.25); }

.bb-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 18px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}

.bb-portfolio:hover { border-color: var(--accent); background: var(--accent); }

body { padding-bottom: 50px; }

/* ── PHOTO SLIDER ── */
.photo-slider {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  height: 420px;
  background: var(--bg-gray);
}

.ps-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.ps-slide.active { opacity: 1; }

.ps-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.ps-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  padding: 0;
}

.ps-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* ── PAGE TRANSITION ── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

body { animation: pageFadeIn 0.2s ease forwards; }

/* 페이지 나갈 때 페이드아웃 */
body.page-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

/* 아임웹 이동 로딩 오버레이 */
.imweb-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.imweb-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.imweb-overlay .io-logo {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.imweb-overlay .io-msg {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
}

.imweb-overlay .io-spinner {
  width: 28px; height: 28px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── FLOATING CONTACT ── */
.float-contact {
  position: fixed;
  right: 20px;
  bottom: 70px;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  z-index: 9990;
}

.fc-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 28px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }

.fc-kakao {
  background: #FEE500;
  color: #3A1D1D;
}

.fc-contact {
  background: var(--accent);
  color: #fff;
}

.fc-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }

/* ── MOBILE ── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* 모바일 메뉴 오픈 — 3열 그리드 */
  .nav-links.mobile-open {
    display: flex !important;
    position: fixed;
    top: 60px; left: 0; right: 0;
    transform: none;
    background: rgba(255,255,255,0.99);
    backdrop-filter: blur(8px);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 998;
    gap: 0;
  }

  .nav-links.mobile-open li {
    flex: 0 0 33.333%;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.mobile-open li:nth-child(3n) { border-right: none; }
  .nav-links.mobile-open li:last-child { border-right: none; }
  .nav-links.mobile-open li:nth-last-child(-n+3) { border-bottom: none; }
  /* 모바일 드롭다운 비활성화 — 서브 항목을 인라인으로 보이게 */
  .nav-has-drop:hover .nav-drop { display: none; }
  .nav-drop { display: none !important; }
  .nav-arrow { display: none; }
  /* 계약현황 모바일 전용 노출 */
  .nav-mobile-contract { display: block !important; }

  .nav-links.mobile-open a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 8px;
    font-size: 14px;
    text-align: center;
    color: var(--dark) !important;
    font-weight: 500;
    background: none !important;
    border-radius: 0 !important;
  }

  .nav-links.mobile-open .contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 8px;
    background: var(--black) !important;
    color: #fff !important;
    border-radius: 0 !important;
    margin: 0;
    text-align: center;
  }

  /* 햄버거 → X */
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 3.5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -3.5px); }

  /* 섹션/헤더 */
  .section-wrap { padding: 48px 5%; }
  .page-header { padding: 100px 5% 48px; }

  /* 플로팅 버튼 */
  .float-contact { right: 12px; bottom: 60px; gap: 8px; }
  .fc-btn { padding: 9px 13px; font-size: 12px; gap: 7px; }
  .fc-icon { font-size: 15px; }

  /* 하단 바 */
  .bb-text { font-size: 11px; gap: 5px; }
  .bb-sep { display: none; }
  .bb-text span:not(.bb-tag):not(:first-of-type) { display: none; }

  /* 푸터 2열 */
  .footer-sitemap { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  /* 주소 1층 모바일 숨김 */
  .addr-floor { display: none; }
}
