/* ═══════════════════════════════════════════════
   RESET & CSS VARIABLES
   ═══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Primary */
  --navy: #0A1628;
  --navy-mid: #0F2035;
  --navy-light: #162A45;

  /* Accent */
  --gold: #2B7AE8;       /* Primary accent — blue (was gold #C8A96E) */
  --gold-light: #5B9AEF; /* Accent hover — lighter blue (was #D4B87A) */

  /* Neutral */
  --white: #FFFFFF;
  --off-white: #F5F5F0;
  --gray-50: #F8F9FA;
  --gray-100: #E8ECF1;
  --gray-200: #D1D5DB;
  --gray-400: #8494A7;
  --gray-500: #4B5C6F;
  --gray-600: #374151;
  --gray-700: #1F2937;
  --dark: #111827;
  --black: #000000;

  /* Typography */
  --font-kr: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif;
  --font-en: 'Cormorant Garamond', 'Georgia', serif;

  /* Layout */
  --max-w: 1280px;
  --header-h: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-kr);
  color: var(--gray-700);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
}

.header.transparent { background: transparent; }

.header.solid {
  background: rgba(255,255,255,.97);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  transition: opacity .3s;
}
.header-logo:hover { opacity: .8; }
.logo-img {
  height: 56px;
  width: auto;
  transition: filter .35s, height .3s ease;
}
.header.transparent .logo-img { filter: brightness(0) invert(1); }
.header.solid .logo-img { filter: none; }

/* Footer Logo */
.footer-logo-img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .6;
}

/* Navigation */
.header-nav {
  display: flex;
  gap: 0;
  position: relative;
}

.header-nav > li {
  position: relative;
}

.header-nav > li > a {
  display: block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.01em;
  padding: 8px 20px;
  position: relative;
  transition: color .3s;
}

.header.transparent .header-nav > li > a { color: rgba(255,255,255,.85); }
.header.solid .header-nav > li > a { color: var(--gray-600); }
.header-nav > li > a:hover { color: var(--gold); }

.header-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s;
}
.header-nav > li > a:hover::after { transform: scaleX(1); }

/* Mega Menu - Full-width bar */
.mega-menu-bar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 28px 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .3s, visibility .3s, transform .3s;
  z-index: 999;
  display: flex;
  justify-content: center;
  gap: 0;
}

.mega-menu-bar.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-col {
  min-width: 140px;
  padding: 0 18px;
  border-right: 1px solid var(--gray-100);
}
.mega-menu-col:last-child { border-right: none; }

.mega-menu-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--gold);
  white-space: nowrap;
}

.mega-menu-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: var(--gray-500);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.mega-menu-col a:hover {
  color: var(--gold);
}

/* Hide old per-item dropdown menus */
.mega-menu {
  display: none;
}

/* Header Phone */
.header-tel {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header.transparent .header-tel { color: rgba(255,255,255,.7); }
.header.solid .header-tel { color: var(--gray-500); }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform .3s, opacity .3s, background .3s;
}
.header.solid .mobile-menu-btn span { background: var(--gray-600); }

.mobile-menu-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile Side Drawer */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  padding: 100px 32px 40px;
  transform: translateX(100%);
  transition: transform .35s ease;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.mobile-drawer-overlay.open { opacity: 1; visibility: visible; }

.mobile-drawer-nav { margin-bottom: 32px; }
.mobile-drawer-nav > li { border-bottom: 1px solid var(--gray-100); }
.mobile-drawer-nav > li > a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
}
.mobile-drawer-sub {
  padding: 0 0 12px 16px;
}
.mobile-drawer-sub a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--gray-500);
}
.mobile-drawer-sub a:hover { color: var(--gold); }

.mobile-drawer-info {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 2;
}
.mobile-drawer-tel {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════
   COMMON SECTION
   ═══════════════════════════════════════════════ */
.section {
  padding: 120px 48px;
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-eyebrow {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--navy);
}
.section-title strong { font-weight: 700; }
.section-desc {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-500);
  max-width: 520px;
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL ANIMATION
   ═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }
.reveal-d5 { transition-delay: .5s; }

/* ═══════════════════════════════════════════════
   MOTION GRAPHICS — 6가지 텍스트 모션
   ═══════════════════════════════════════════════ */

/* 1. 글자별 순차 등장 (char-reveal) */
[data-motion="char-reveal"] {
  overflow: hidden;
}
[data-motion="char-reveal"] .m-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .5s ease, transform .5s cubic-bezier(.23,1,.32,1);
}
[data-motion="char-reveal"].visible .m-char {
  opacity: 1;
  transform: translateY(0);
}

/* 2. 슬라이드인 (slide-in) */
[data-motion="slide-in-left"] {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94);
}
[data-motion="slide-in-left"].visible {
  opacity: 1;
  transform: translateX(0);
}

[data-motion="slide-in-right"] {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94);
}
[data-motion="slide-in-right"].visible {
  opacity: 1;
  transform: translateX(0);
}

[data-motion="slide-in-up"] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94);
}
[data-motion="slide-in-up"].visible {
  opacity: 1;
  transform: translateY(0);
}

/* 3. 숫자 카운트업 (countup) */
[data-motion="countup"] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-motion="countup"].visible {
  opacity: 1;
  transform: translateY(0);
}

/* 4. 단어별 하이라이트 (highlight) */
[data-motion="highlight"] {
  position: relative;
  background-image: linear-gradient(var(--gold-light), var(--gold-light));
  background-repeat: no-repeat;
  background-position: 0 85%;
  background-size: 0% 30%;
  transition: background-size .8s cubic-bezier(.25,.46,.45,.94) .2s;
}
[data-motion="highlight"].visible {
  background-size: 100% 30%;
}

/* 5. 패럴랙스 텍스트 (parallax) — JS로 transform 제어 */
[data-motion="parallax"] {
  will-change: transform;
  transition: none;
}

/* 6. Stagger 등장 (stagger) */
[data-motion="stagger"] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.23,1,.32,1);
}
[data-motion="stagger"].visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for children */
[data-motion="stagger"].visible > *:nth-child(1) { transition-delay: 0s; }
[data-motion="stagger"].visible > *:nth-child(2) { transition-delay: .1s; }
[data-motion="stagger"].visible > *:nth-child(3) { transition-delay: .2s; }
[data-motion="stagger"].visible > *:nth-child(4) { transition-delay: .3s; }
[data-motion="stagger"].visible > *:nth-child(5) { transition-delay: .4s; }
[data-motion="stagger"].visible > *:nth-child(6) { transition-delay: .5s; }
[data-motion="stagger"].visible > *:nth-child(7) { transition-delay: .6s; }
[data-motion="stagger"].visible > *:nth-child(8) { transition-delay: .7s; }

/* Motion delay utilities */
[data-delay="1"] { transition-delay: .1s !important; }
[data-delay="2"] { transition-delay: .2s !important; }
[data-delay="3"] { transition-delay: .3s !important; }
[data-delay="4"] { transition-delay: .4s !important; }
[data-delay="5"] { transition-delay: .5s !important; }

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  background: var(--dark);
  padding: 60px 48px 40px;
  color: rgba(255,255,255,.4);
  font-size: 13px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo {
  margin-bottom: 20px;
}
.footer-info {
  line-height: 2;
}
.footer-copy {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: .05em;
  color: rgba(255,255,255,.2);
}
.footer-links {
  display: flex;
  gap: 12px;
}
.footer-link-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.12);
  transition: border-color .3s;
}
.footer-link-icon { color: rgba(255,255,255,.45); transition: border-color .3s, color .3s; }
.footer-link-icon:hover { border-color: var(--gold); color: var(--gold-light); }
.footer-link-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

/* ═══════════════════════════════════════════════
   QUICK MENU (우측 플로팅)
   ═══════════════════════════════════════════════ */
.quick-menu {
  position: fixed;
  right: 24px;
  bottom: 120px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
.quick-menu.visible {
  opacity: 1;
  pointer-events: auto;
}
.quick-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 68px;
  padding: 14px 0;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-bottom: none;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: -.02em;
  transition: background .2s, color .2s, border-color .2s;
  text-align: center;
}
.quick-menu-item:first-child { border-radius: 6px 6px 0 0; }
.quick-menu-item:last-child { border-bottom: 1px solid var(--gray-100); border-radius: 0 0 6px 6px; }
.quick-menu-item:hover { background: var(--gray-50); }
.quick-menu-item svg, .quick-menu-item img {
  width: 22px;
  height: 22px;
}
.quick-menu-item svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
/* 브랜드별 색상 — 기본 상태에서 바로 적용 */
.quick-menu-item.qm-naver { background: #03C75A; color: var(--white); border-color: #03C75A; }
.quick-menu-item.qm-naver:hover { background: #02b351; }
.quick-menu-item.qm-naver svg { fill: var(--white); }
.quick-menu-item.qm-kakao { background: #FEE500; color: #391B1B; border-color: #FEE500; }
.quick-menu-item.qm-kakao:hover { background: #e6cf00; }
.quick-menu-item.qm-kakao svg { fill: #391B1B; }
.quick-menu-item.qm-blog { background: #03C75A; color: var(--white); border-color: #03C75A; }
.quick-menu-item.qm-blog:hover { background: #02b351; }
.quick-menu-item.qm-blog svg { fill: var(--white); }
.quick-menu-item.qm-tel { background: var(--navy); color: var(--white); border-color: var(--navy); }
.quick-menu-item.qm-tel:hover { background: var(--navy-light); }
.quick-menu-item.qm-tel svg { stroke: var(--white); }
.quick-menu-item.top-btn {
  margin-top: 6px;
  border-radius: 6px;
  border: 1px solid var(--gray-100);
  background: var(--navy);
  color: var(--white);
}
.quick-menu-item.top-btn:hover { background: var(--gold); border-color: var(--gold); }

/* ═══════════════════════════════════════════════
   FLOATING BOTTOM BAR (Mobile)
   ═══════════════════════════════════════════════ */
.float-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 950;
  background: var(--navy);
  justify-content: center;
}
.float-bar a {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .02em;
  transition: background .2s;
}
.float-bar a:hover { background: rgba(255,255,255,.08); }

/* ═══════════════════════════════════════════════
   CONSULT FORM (빠른상담 플로팅)
   ═══════════════════════════════════════════════ */
.consult-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 900;
}
.consult-float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--gold);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(184,149,106,.3);
  transition: background .3s, transform .2s;
  cursor: pointer;
}
.consult-float-btn:hover { background: var(--gold-light); transform: translateY(-2px); }
.consult-float-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.consult-panel {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 340px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.15);
  padding: 32px 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s;
}
.consult-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.consult-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.consult-field {
  margin-bottom: 14px;
}
.consult-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.consult-field select,
.consult-field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-kr);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  transition: border-color .2s;
  outline: none;
}
.consult-field select:focus,
.consult-field input:focus { border-color: var(--gold); }

.consult-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--gray-500);
  cursor: pointer;
}
.consult-agree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.consult-submit {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  border: none;
  cursor: pointer;
  transition: background .3s;
}
.consult-submit:hover { background: var(--gold); }

/* ═══════════════════════════════════════════════
   POPUP LAYER
   ═══════════════════════════════════════════════ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.popup-overlay.open { opacity: 1; visibility: visible; }

.popup-content {
  position: relative;
  max-width: 480px;
  width: 90%;
  background: var(--white);
  overflow: hidden;
}
.popup-img {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gray-400);
}
.popup-bottom {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gray-50);
}
.popup-bottom button {
  font-size: 13px;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px 8px;
  transition: color .2s;
}
.popup-bottom button:hover { color: var(--navy); }
.popup-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.3);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
}
.popup-close-btn:hover { background: rgba(0,0,0,.5); }

/* ═══════════════════════════════════════════════
   CTA COMMON
   ═══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .03em;
  transition: background .3s;
}
.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .03em;
  transition: border-color .3s, color .3s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
  padding-bottom: 4px;
  transition: color .3s, border-color .3s;
}
.btn-text:hover { color: var(--gold); border-color: var(--gold); }
.btn-text svg { transition: transform .3s; }
.btn-text:hover svg { transform: translateX(4px); }
